mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Merge branch 'validblocker' into 'master'
Fix ValidBlocker See merge request core-developers/forge!5067
This commit is contained in:
@@ -92,7 +92,7 @@ public class StaticAbilityCantAttackBlock {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns true if attacker can be blocked by blocker
|
||||
* returns true if attacker can't be blocked by blocker
|
||||
* @param stAb
|
||||
* @param attacker
|
||||
* @param blocker
|
||||
@@ -104,9 +104,10 @@ public class StaticAbilityCantAttackBlock {
|
||||
return false;
|
||||
}
|
||||
if (stAb.hasParam("ValidBlocker")) {
|
||||
boolean stillblock = true;
|
||||
for (final String v : stAb.getParam("ValidBlocker").split(",")) {
|
||||
if (blocker.isValid(v, host.getController(), host, stAb)) {
|
||||
boolean stillblock = false;
|
||||
stillblock = false;
|
||||
//Dragon Hunter check
|
||||
if (v.contains("withoutReach") && blocker.hasStartOfKeyword("IfReach")) {
|
||||
for (KeywordInterface inst : blocker.getKeywords()) {
|
||||
@@ -120,13 +121,14 @@ public class StaticAbilityCantAttackBlock {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!stillblock) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (stillblock) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// relative valid relative to each other
|
||||
if (!stAb.matchesValidParam("ValidAttackerRelative", attacker, blocker)) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Name:Unexpected Windfall
|
||||
ManaCost:2 R R
|
||||
Types:Instant
|
||||
A:SP$ Draw | Cost$ 3 R Discard<1/Card/card> | CostDesc$ As an additional cost to cast this spell, discard a card. | NumCards$ 2 | Defined$ You | SubAbility$ DBToken | SpellDescription$ Draw two cards and create two Treasure tokens. (They're artifacts with "{T}, Sacrifice this artifact: Add one mana of any color.")
|
||||
A:SP$ Draw | Cost$ 2 R R Discard<1/Card/card> | CostDesc$ As an additional cost to cast this spell, discard a card. | NumCards$ 2 | Defined$ You | SubAbility$ DBToken | SpellDescription$ Draw two cards and create two Treasure tokens. | StackDescription$ SpellDescription
|
||||
SVar:DBToken:DB$ Token | TokenAmount$ 2 | TokenScript$ c_a_treasure_sac | TokenOwner$ You
|
||||
DeckHas:Ability$Discard
|
||||
DeckHints:Keyword$Madness & Ability$Delirium
|
||||
|
||||
Reference in New Issue
Block a user