CantBeBlockedByAmount + expression used to specify number or creatures that can block given attacker

This commit is contained in:
Maxmtg
2013-06-21 21:42:26 +00:00
parent 06eb8e3e43
commit a75835f664
41 changed files with 230 additions and 217 deletions

View File

@@ -3,7 +3,7 @@ ManaCost:1 G
Types:Enchantment Aura Types:Enchantment Aura
K:Enchant creature K:Enchant creature
A:SP$ Attach | Cost$ 1 G | ValidTgts$ Creature | AILogic$ Pump A:SP$ Attach | Cost$ 1 G | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Hexproof | AddHiddenKeyword$ CARDNAME can't be blocked by more than one creature. | Description$ Enchanted creature has hexproof and can't be blocked by more than one creature. S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Hexproof & CantBeBlockedByAmount GT1 | Description$ Enchanted creature has hexproof and can't be blocked by more than one creature.
SVar:Picture:http://www.wizards.com/global/images/magic/general/alpha_authority.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/alpha_authority.jpg
Oracle:Enchant creature\nEnchanted creature has hexproof and can't be blocked by more than one creature. Oracle:Enchant creature\nEnchanted creature has hexproof and can't be blocked by more than one creature.
SetInfo:GTC Uncommon SetInfo:GTC Uncommon

View File

@@ -2,8 +2,8 @@ Name:Caterwauling Boggart
ManaCost:3 R ManaCost:3 R
Types:Creature Goblin Shaman Types:Creature Goblin Shaman
PT:2/2 PT:2/2
S:Mode$ Continuous | Affected$ Goblin.YouCtrl | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Each Goblin you control can't be blocked except by two or more creatures. S:Mode$ Continuous | Affected$ Goblin.YouCtrl | AddHiddenKeyword$ CantBeBlockedByAmount LT2 | Description$ Each Goblin you control can't be blocked except by two or more creatures.
S:Mode$ Continuous | Affected$ Elemental.YouCtrl | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Each Elemental you control can't be blocked except by two or more creatures. S:Mode$ Continuous | Affected$ Elemental.YouCtrl | AddHiddenKeyword$ CantBeBlockedByAmount LT2 | Description$ Each Elemental you control can't be blocked except by two or more creatures.
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/caterwauling_boggart.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/caterwauling_boggart.jpg
Oracle:Each Goblin you control can't be blocked except by two or more creatures.\nEach Elemental you control can't be blocked except by two or more creatures. Oracle:Each Goblin you control can't be blocked except by two or more creatures.\nEach Elemental you control can't be blocked except by two or more creatures.

View File

@@ -2,7 +2,7 @@ Name:Charging Rhino
ManaCost:3 G G ManaCost:3 G G
Types:Creature Rhino Types:Creature Rhino
PT:4/4 PT:4/4
K:CARDNAME can't be blocked by more than one creature. K:CantBeBlockedByAmount GT1
SVar:Picture:http://www.wizards.com/global/images/magic/general/charging_rhino.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/charging_rhino.jpg
Oracle:Charging Rhino can't be blocked by more than one creature. Oracle:Charging Rhino can't be blocked by more than one creature.
SetInfo:TMP Uncommon SetInfo:TMP Uncommon

View File

@@ -3,7 +3,7 @@ ManaCost:2 R
Types:Instant Types:Instant
A:SP$ Effect | Cost$ 2 R | Name$ Demoralize Effect | StaticAbilities$ KWPump | SubAbility$ DBEffect2 | SpellDescription$ Each creature can't be blocked this turn except by two or more creatures. A:SP$ Effect | Cost$ 2 R | Name$ Demoralize Effect | StaticAbilities$ KWPump | SubAbility$ DBEffect2 | SpellDescription$ Each creature can't be blocked this turn except by two or more creatures.
SVar:DBEffect2:DB$ Effect | Name$ Demoralize Effect 2 | StaticAbilities$ KWPump2 | Condition$ Threshold | SpellDescription$ Threshold - If seven or more cards are in your graveyard, creatures can't block this turn. SVar:DBEffect2:DB$ Effect | Name$ Demoralize Effect 2 | StaticAbilities$ KWPump2 | Condition$ Threshold | SpellDescription$ Threshold - If seven or more cards are in your graveyard, creatures can't block this turn.
SVar:KWPump:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature | AddKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Each creature can't be blocked this turn except by two or more creatures. SVar:KWPump:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature | AddKeyword$ CantBeBlockedByAmount LT2 | Description$ Each creature can't be blocked this turn except by two or more creatures.
SVar:KWPump2:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature | AddKeyword$ CARDNAME can't block. | Description$ Threshold - If seven or more cards are in your graveyard, creatures can't block this turn. SVar:KWPump2:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature | AddKeyword$ CARDNAME can't block. | Description$ Threshold - If seven or more cards are in your graveyard, creatures can't block this turn.
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/demoralize.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/demoralize.jpg

View File

@@ -1,7 +1,7 @@
Name:Familiar Ground Name:Familiar Ground
ManaCost:2 G ManaCost:2 G
Types:Enchantment Types:Enchantment
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CARDNAME can't be blocked by more than one creature. | Description$ Each creature you control can't be blocked by more than one creature. S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CantBeBlockedByAmount GT1 | Description$ Each creature you control can't be blocked by more than one creature.
SVar:NonStackingEffect:True SVar:NonStackingEffect:True
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/familiar_ground.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/familiar_ground.jpg

View File

@@ -1,7 +1,7 @@
Name:Goblin War Drums Name:Goblin War Drums
ManaCost:2 R ManaCost:2 R
Types:Enchantment Types:Enchantment
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Each creature you control can't be blocked except by two or more creatures. S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CantBeBlockedByAmount LT2 | Description$ Each creature you control can't be blocked except by two or more creatures.
SVar:NonStackingEffect:True SVar:NonStackingEffect:True
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_war_drums.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_war_drums.jpg

View File

@@ -4,7 +4,7 @@ Types:Instant
A:SP$ Effect | Cost$ 1 R | Name$ Gorilla War Cry Effect | StaticAbilities$ Blocking | ActivationPhases$ BeginCombat->Declare Attackers | AILogic$ Evasion | SubAbility$ DelTrigSlowtrip | SpellDescription$ Cast CARDNAME only during combat before blockers are declared. Creatures can't be blocked this turn except by two or more creatures. Draw a card at the beginning of next turn's upkeep. A:SP$ Effect | Cost$ 1 R | Name$ Gorilla War Cry Effect | StaticAbilities$ Blocking | ActivationPhases$ BeginCombat->Declare Attackers | AILogic$ Evasion | SubAbility$ DelTrigSlowtrip | SpellDescription$ Cast CARDNAME only during combat before blockers are declared. Creatures can't be blocked this turn except by two or more creatures. Draw a card at the beginning of next turn's upkeep.
SVar:DelTrigSlowtrip:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | TriggerDescription$ Draw a card. SVar:DelTrigSlowtrip:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | TriggerDescription$ Draw a card.
SVar:DrawSlowtrip:DB$Draw | NumCards$ 1 | Defined$ You SVar:DrawSlowtrip:DB$Draw | NumCards$ 1 | Defined$ You
SVar:Blocking:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Creatures can't be blocked this turn except by two or more creatures. SVar:Blocking:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature | AddKeyword$ CantBeBlockedByAmount LT2 | Description$ Creatures can't be blocked this turn except by two or more creatures.
SVar:Picture:http://www.wizards.com/global/images/magic/general/gorilla_war_cry.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/gorilla_war_cry.jpg
Oracle:Cast Gorilla War Cry only during combat before blockers are declared.\nCreatures can't be blocked this turn except by two or more creatures.\nDraw a card at the beginning of the next turn's upkeep. Oracle:Cast Gorilla War Cry only during combat before blockers are declared.\nCreatures can't be blocked this turn except by two or more creatures.\nDraw a card at the beginning of the next turn's upkeep.
SetInfo:ALL Common x2 SetInfo:ALL Common x2

View File

@@ -2,7 +2,7 @@ Name:Gruul Nodorog
ManaCost:4 G G ManaCost:4 G G
Types:Creature Beast Types:Creature Beast
PT:4/4 PT:4/4
A:AB$ Pump | Cost$ R | KW$ HIDDEN CARDNAME can't be blocked except by two or more creatures. | SpellDescription$ CARDNAME can't be blocked this turn except by two or more creatures. A:AB$ Pump | Cost$ R | KW$ CantBeBlockedByAmount LT2 | SpellDescription$ CARDNAME can't be blocked this turn except by two or more creatures.
SVar:Picture:http://www.wizards.com/global/images/magic/general/gruul_nodorog.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/gruul_nodorog.jpg
Oracle:{R}: Gruul Nodorog can't be blocked this turn except by two or more creatures. Oracle:{R}: Gruul Nodorog can't be blocked this turn except by two or more creatures.
SetInfo:GPT Common SetInfo:GPT Common

View File

@@ -1,7 +1,7 @@
Name:Gruul War Chant Name:Gruul War Chant
ManaCost:2 R G ManaCost:2 R G
Types:Enchantment Types:Enchantment
S:Mode$ Continuous | Affected$ Creature.YouCtrl+attacking | AddPower$ 1 | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Each attacking creature you control gets +1/+0 and can't be blocked except by two or more creatures. S:Mode$ Continuous | Affected$ Creature.YouCtrl+attacking | AddPower$ 1 | AddKeyword$ CantBeBlockedByAmount LT2 | Description$ Each attacking creature you control gets +1/+0 and can't be blocked except by two or more creatures.
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/gruul_war_chant.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/gruul_war_chant.jpg
Oracle:Each attacking creature you control gets +1/+0 and can't be blocked except by two or more creatures. Oracle:Each attacking creature you control gets +1/+0 and can't be blocked except by two or more creatures.

View File

@@ -2,7 +2,7 @@ Name:Horde of Boggarts
ManaCost:3 R ManaCost:3 R
Types:Creature Goblin Types:Creature Goblin
PT:*/* PT:*/*
K:CARDNAME can't be blocked except by two or more creatures. K:CantBeBlockedByAmount LT2
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to the number of red permanents you control. S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to the number of red permanents you control.
SVar:X:Count$Valid Permanent.Red+YouCtrl SVar:X:Count$Valid Permanent.Red+YouCtrl
SVar:BuffedBy:Permanent.Red SVar:BuffedBy:Permanent.Red

View File

@@ -2,7 +2,7 @@ Name:Huang Zhong, Shu General
ManaCost:2 W W ManaCost:2 W W
Types:Legendary Creature Human Soldier Types:Legendary Creature Human Soldier
PT:2/3 PT:2/3
K:CARDNAME can't be blocked by more than one creature. K:CantBeBlockedByAmount GT1
SVar:Picture:http://www.wizards.com/global/images/magic/general/huang_zhong_shu_general.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/huang_zhong_shu_general.jpg
Oracle:Huang Zhong, Shu General can't be blocked by more than one creature. Oracle:Huang Zhong, Shu General can't be blocked by more than one creature.
SetInfo:PTK Rare SetInfo:PTK Rare

View File

@@ -3,7 +3,7 @@ ManaCost:R
Types:Enchantment Aura Types:Enchantment Aura
K:Enchant creature K:Enchant creature
A:SP$ Attach | Cost$ R | ValidTgts$ Creature | AILogic$ Pump A:SP$ Attach | Cost$ R | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Enchanted creature can't be blocked except by two or more creatures. S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ CantBeBlockedByAmount LT2 | Description$ Enchanted creature can't be blocked except by two or more creatures.
SVar:Picture:http://www.wizards.com/global/images/magic/general/imposing_visage.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/imposing_visage.jpg
Oracle:Enchant creature\nEnchanted creature can't be blocked except by two or more creatures. Oracle:Enchant creature\nEnchanted creature can't be blocked except by two or more creatures.
SetInfo:ICE Common SetInfo:ICE Common

View File

@@ -2,7 +2,7 @@ Name:Ironhoof Ox
ManaCost:3 G G ManaCost:3 G G
Types:Creature Ox Types:Creature Ox
PT:4/4 PT:4/4
K:CARDNAME can't be blocked by more than one creature. K:CantBeBlockedByAmount GT1
SVar:Picture:http://resources.wizards.com/magic/cards/p2/en-us/card6628.jpg SVar:Picture:http://resources.wizards.com/magic/cards/p2/en-us/card6628.jpg
Oracle:Ironhoof Ox can't be blocked by more than one creature. Oracle:Ironhoof Ox can't be blocked by more than one creature.
SetInfo:PO2 Uncommon SetInfo:PO2 Uncommon

View File

@@ -3,7 +3,7 @@ ManaCost:U B R
Types:Creature Horror Types:Creature Horror
PT:2/3 PT:2/3
K:Deathtouch K:Deathtouch
K:CARDNAME can't be blocked except by two or more creatures. K:CantBeBlockedByAmount LT2
SVar:Picture:http://www.wizards.com/global/images/magic/general/kederekt_creeper.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/kederekt_creeper.jpg
Oracle:Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)\nKederekt Creeper can't be blocked except by two or more creatures. Oracle:Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)\nKederekt Creeper can't be blocked except by two or more creatures.
SetInfo:ALA Common SetInfo:ALA Common

View File

@@ -3,7 +3,7 @@ ManaCost:3 G
Types:Creature Cat Beast Types:Creature Cat Beast
PT:3/2 PT:3/2
K:Provoke K:Provoke
K:CARDNAME can't be blocked by more than one creature. K:CantBeBlockedByAmount GT1
SVar:Picture:http://www.wizards.com/global/images/magic/general/krosan_vorine.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/krosan_vorine.jpg
Oracle:Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.)\nKrosan Vorine can't be blocked by more than one creature. Oracle:Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.)\nKrosan Vorine can't be blocked by more than one creature.
SetInfo:LGN Common SetInfo:LGN Common

View File

@@ -17,7 +17,7 @@ Colors:red
Types:Creature Werewolf Types:Creature Werewolf
PT:3/3 PT:3/3
K:Double Strike K:Double Strike
S:Mode$ Continuous | Affected$ Werewolf.YouCtrl | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Each Werewolf you control can't be blocked except by two or more creatures. S:Mode$ Continuous | Affected$ Werewolf.YouCtrl | AddKeyword$ CantBeBlockedByAmount LT2 | Description$ Each Werewolf you control can't be blocked except by two or more creatures.
T:Mode$Phase | Phase$ Upkeep | WerewolfUntransformCondition$ True | TriggerZones$ Battlefield | Execute$ TrigTransform | TriggerDescription$ At the beginning of each upkeep, if a player cast two or more spells last turn, transform CARDNAME. T:Mode$Phase | Phase$ Upkeep | WerewolfUntransformCondition$ True | TriggerZones$ Battlefield | Execute$ TrigTransform | TriggerDescription$ At the beginning of each upkeep, if a player cast two or more spells last turn, transform CARDNAME.
SVar:TrigTransform:AB$SetState | Cost$ 0 | Defined$ Self | Mode$ Transform SVar:TrigTransform:AB$SetState | Cost$ 0 | Defined$ Self | Mode$ Transform
SVar:Picture:http://www.wizards.com/global/images/magic/general/terror_of_kruin_pass.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/terror_of_kruin_pass.jpg

View File

@@ -3,7 +3,7 @@ ManaCost:1 R
Types:Enchantment Aura Types:Enchantment Aura
K:Enchant creature K:Enchant creature
A:SP$ Attach | Cost$ 1 R | ValidTgts$ Creature | AILogic$ Pump A:SP$ Attach | Cost$ 1 R | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 3 | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Enchanted creature gets +3/+0 and can't be blocked except by two or more creatures. S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 3 | AddKeyword$ CantBeBlockedByAmount LT2 | Description$ Enchanted creature gets +3/+0 and can't be blocked except by two or more creatures.
SVar:Picture:http://www.wizards.com/global/images/magic/general/madcap_skills.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/madcap_skills.jpg
Oracle:Enchant creature\nEnchanted creature gets +3/+0 and can't be blocked except by two or more creatures. Oracle:Enchant creature\nEnchanted creature gets +3/+0 and can't be blocked except by two or more creatures.
SetInfo:GTC Common SetInfo:GTC Common

View File

@@ -2,7 +2,7 @@ Name:Norwood Riders
ManaCost:3 G ManaCost:3 G
Types:Creature Elf Types:Creature Elf
PT:3/3 PT:3/3
K:CARDNAME can't be blocked by more than one creature. K:CantBeBlockedByAmount GT1
SVar:Picture:http://resources.wizards.com/magic/cards/p2/en-us/card6615.jpg SVar:Picture:http://resources.wizards.com/magic/cards/p2/en-us/card6615.jpg
Oracle:Norwood Riders can't be blocked by more than one creature. Oracle:Norwood Riders can't be blocked by more than one creature.
SetInfo:PO2 Common SetInfo:PO2 Common

View File

@@ -4,7 +4,7 @@ Types:Creature Wolf
PT:1/1 PT:1/1
K:Undying K:Undying
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME attacks, each creature you control can't be blocked this turn except by two or more creatures. T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME attacks, each creature you control can't be blocked this turn except by two or more creatures.
SVar:TrigPump:AB$ PumpAll | Cost$ 0 | ValidCards$ Creature.YouCtrl | KW$ HIDDEN CARDNAME can't be blocked except by two or more creatures. SVar:TrigPump:AB$ PumpAll | Cost$ 0 | ValidCards$ Creature.YouCtrl | KW$ CantBeBlockedByAmount LT2
SVar:Picture:http://www.wizards.com/global/images/magic/general/pyreheart_wolf.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/pyreheart_wolf.jpg
Oracle:Whenever Pyreheart Wolf attacks, each creature you control can't be blocked this turn except by two or more creatures.\nUndying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.) Oracle:Whenever Pyreheart Wolf attacks, each creature you control can't be blocked this turn except by two or more creatures.\nUndying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
SetInfo:DKA Uncommon SetInfo:DKA Uncommon

View File

@@ -2,7 +2,7 @@ Name:Ripscale Predator
ManaCost:4 R R ManaCost:4 R R
Types:Creature Lizard Types:Creature Lizard
PT:6/5 PT:6/5
K:CARDNAME can't be blocked except by two or more creatures. K:CantBeBlockedByAmount LT2
SVar:Picture:http://www.wizards.com/global/images/magic/general/ripscale_predator.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/ripscale_predator.jpg
Oracle:Ripscale Predator can't be blocked except by two or more creatures. Oracle:Ripscale Predator can't be blocked except by two or more creatures.
SetInfo:GTC Uncommon SetInfo:GTC Uncommon

View File

@@ -3,7 +3,7 @@ ManaCost:2 R
Types:Creature Human Knight Types:Creature Human Knight
PT:2/2 PT:2/2
K:Flanking K:Flanking
A:AB$ Pump | Cost$ 1 R | KW$ HIDDEN CARDNAME can't be blocked except by two or more creatures. | SpellDescription$ CARDNAME can't be blocked except by two or more creatures this turn. A:AB$ Pump | Cost$ 1 R | KW$ CantBeBlockedByAmount LT2 | SpellDescription$ CARDNAME can't be blocked except by two or more creatures this turn.
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/searing_spear_askari.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/searing_spear_askari.jpg
Oracle:Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.)\n{1}{R}: Searing Spear Askari can't be blocked except by two or more creatures this turn. Oracle:Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.)\n{1}{R}: Searing Spear Askari can't be blocked except by two or more creatures this turn.

View File

@@ -2,7 +2,7 @@ Name:Stalking Tiger
ManaCost:3 G ManaCost:3 G
Types:Creature Cat Types:Creature Cat
PT:3/3 PT:3/3
K:CARDNAME can't be blocked by more than one creature. K:CantBeBlockedByAmount GT1
SVar:Picture:http://www.wizards.com/global/images/magic/general/stalking_tiger.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/stalking_tiger.jpg
Oracle:Stalking Tiger can't be blocked by more than one creature. Oracle:Stalking Tiger can't be blocked by more than one creature.
SetInfo:PTK Common SetInfo:PTK Common

View File

@@ -3,7 +3,7 @@ ManaCost:1 R
Types:Creature Human Berserker Types:Creature Human Berserker
PT:1/1 PT:1/1
K:Bloodthirst 2 K:Bloodthirst 2
K:CARDNAME can't be blocked except by two or more creatures. K:CantBeBlockedByAmount LT2
SVar:Picture:http://www.wizards.com/global/images/magic/general/stormblood_berserker.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/stormblood_berserker.jpg
Oracle:Bloodthirst 2 (If an opponent was dealt damage this turn, this creature enters the battlefield with two +1/+1 counters on it.)\nStormblood Berserker can't be blocked except by two or more creatures. Oracle:Bloodthirst 2 (If an opponent was dealt damage this turn, this creature enters the battlefield with two +1/+1 counters on it.)\nStormblood Berserker can't be blocked except by two or more creatures.
SetInfo:M12 Uncommon SetInfo:M12 Uncommon

View File

@@ -2,7 +2,7 @@ Name:Summit Apes
ManaCost:3 G ManaCost:3 G
Types:Creature Ape Types:Creature Ape
PT:5/2 PT:5/2
S:Mode$ Continuous | Affected$ Card.Self | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | CheckSVar$ X | SVarCompare$ GE1 | Description$ As long as you control a Mountain, CARDNAME can't be blocked except by two or more creatures. S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ CantBeBlockedByAmount LT2 | CheckSVar$ X | SVarCompare$ GE1 | Description$ As long as you control a Mountain, CARDNAME can't be blocked except by two or more creatures.
SVar:X:Count$Valid Mountain.YouCtrl SVar:X:Count$Valid Mountain.YouCtrl
SVar:BuffedBy:Mountain SVar:BuffedBy:Mountain
SVar:Picture:http://www.wizards.com/global/images/magic/general/summit_apes.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/summit_apes.jpg

View File

@@ -4,7 +4,7 @@ Types:Creature Dragon
PT:4/4 PT:4/4
K:Flying K:Flying
A:AB$ Pump | Cost$ 1 R | NumAtt$ +2 | NumDef$ +0 | SpellDescription$ CARDNAME gets +2/+0 until end of turn. A:AB$ Pump | Cost$ 1 R | NumAtt$ +2 | NumDef$ +0 | SpellDescription$ CARDNAME gets +2/+0 until end of turn.
K:CARDNAME can't be blocked except by two or more creatures. K:CantBeBlockedByAmount LT2
K:CARDNAME can block an additional creature. K:CARDNAME can block an additional creature.
SVar:Picture:http://www.wizards.com/global/images/magic/general/two_headed_dragon.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/two_headed_dragon.jpg
Oracle:Flying\n{1}{R}: Two-Headed Dragon gets +2/+0 until end of turn.\nTwo-Headed Dragon can't be blocked except by two or more creatures.\nTwo-Headed Dragon can block an additional creature. Oracle:Flying\n{1}{R}: Two-Headed Dragon gets +2/+0 until end of turn.\nTwo-Headed Dragon can't be blocked except by two or more creatures.\nTwo-Headed Dragon can block an additional creature.

View File

@@ -3,7 +3,7 @@ ManaCost:no cost
Types:Vanguard Types:Vanguard
HandLifeModifier:+1/-4 HandLifeModifier:+1/-4
S:Mode$ Continuous | EffectZone$ Command | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CARDNAME can block an additional creature. | Description$ Each creature you control can block an additional creature each combat. S:Mode$ Continuous | EffectZone$ Command | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CARDNAME can block an additional creature. | Description$ Each creature you control can block an additional creature each combat.
S:Mode$ Continuous | EffectZone$ Command | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ Each creature you control can't be blocked except by two or more creatures. S:Mode$ Continuous | EffectZone$ Command | Affected$ Creature.YouCtrl | AddKeyword$ CantBeBlockedByAmount LT2 | Description$ Each creature you control can't be blocked except by two or more creatures.
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/two_headed_giant_of_foriys_avatar.jpg SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/two_headed_giant_of_foriys_avatar.jpg
Oracle:Each creature you control can block an additional creature each combat.\nEach creature you control can't be blocked except by two or more creatures. Oracle:Each creature you control can block an additional creature each combat.\nEach creature you control can't be blocked except by two or more creatures.
SetInfo:VAN Special SetInfo:VAN Special

View File

@@ -2,7 +2,7 @@ Name:Two-Headed Sliver
ManaCost:1 R ManaCost:1 R
Types:Creature Sliver Types:Creature Sliver
PT:1/1 PT:1/1
S:Mode$ Continuous | Affected$ Creature.Sliver | AddKeyword$ CARDNAME can't be blocked except by two or more creatures. | Description$ All Sliver creatures have "This creature can't be blocked except by two or more creatures." S:Mode$ Continuous | Affected$ Creature.Sliver | AddKeyword$ CantBeBlockedByAmount LT2 | Description$ All Sliver creatures have "This creature can't be blocked except by two or more creatures."
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/two_headed_sliver.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/two_headed_sliver.jpg
Oracle:All Sliver creatures have "This creature can't be blocked except by two or more creatures." Oracle:All Sliver creatures have "This creature can't be blocked except by two or more creatures."

View File

@@ -2,7 +2,7 @@ Name:Viashino Runner
ManaCost:3 R ManaCost:3 R
Types:Creature Viashino Types:Creature Viashino
PT:3/2 PT:3/2
K:CARDNAME can't be blocked except by two or more creatures. K:CantBeBlockedByAmount LT2
SVar:Picture:http://www.wizards.com/global/images/magic/general/viashino_runner.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/viashino_runner.jpg
Oracle:Viashino Runner can't be blocked except by two or more creatures. Oracle:Viashino Runner can't be blocked except by two or more creatures.
SetInfo:10E Common SetInfo:10E Common

View File

@@ -2,7 +2,7 @@ Name:Vine Kami
ManaCost:6 G ManaCost:6 G
Types:Creature Spirit Types:Creature Spirit
PT:4/4 PT:4/4
K:CARDNAME can't be blocked except by two or more creatures. K:CantBeBlockedByAmount LT2
K:Soulshift 6 K:Soulshift 6
SVar:Picture:http://www.wizards.com/global/images/magic/general/vine_kami.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/vine_kami.jpg
Oracle:Vine Kami can't be blocked except by two or more creatures.\nSoulshift 6 (When this creature dies, you may return target Spirit card with converted mana cost 6 or less from your graveyard to your hand.) Oracle:Vine Kami can't be blocked except by two or more creatures.\nSoulshift 6 (When this creature dies, you may return target Spirit card with converted mana cost 6 or less from your graveyard to your hand.)

View File

@@ -2,7 +2,7 @@ Name:Vorrac Battlehorns
ManaCost:2 ManaCost:2
Types:Artifact Equipment Types:Artifact Equipment
K:Equip 1 K:Equip 1
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddKeyword$ Trample | AddHiddenKeyword$ CARDNAME can't be blocked by more than one creature. | Description$ Equipped creature has trample and can't be blocked by more than one creature. S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddKeyword$ Trample | AddKeyword$ CantBeBlockedByAmount GT1 | Description$ Equipped creature has trample and can't be blocked by more than one creature.
SVar:Picture:http://www.wizards.com/global/images/magic/general/vorrac_battlehorns.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/vorrac_battlehorns.jpg
Oracle:Equipped creature has trample and can't be blocked by more than one creature.\nEquip {1} ({1}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) Oracle:Equipped creature has trample and can't be blocked by more than one creature.\nEquip {1} ({1}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.)
SetInfo:MRD Common SetInfo:MRD Common

View File

@@ -3,7 +3,7 @@ ManaCost:4 U
Types:Creature Spirit Types:Creature Spirit
PT:3/2 PT:3/2
K:Flying K:Flying
K:CARDNAME can't be blocked except by two or more creatures. K:CantBeBlockedByAmount LT2
SVar:Picture:http://www.wizards.com/global/images/magic/general/wind_spirit.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/wind_spirit.jpg
Oracle:Flying\nWind Spirit can't be blocked except by two or more creatures. Oracle:Flying\nWind Spirit can't be blocked except by two or more creatures.
SetInfo:ICE Uncommon SetInfo:ICE Uncommon

View File

@@ -3,7 +3,7 @@ ManaCost:4 R
Types:Legendary Creature Human Soldier Types:Legendary Creature Human Soldier
PT:2/3 PT:2/3
K:Horsemanship K:Horsemanship
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CARDNAME can't be blocked by more than one creature. | Description$ Each creature you control can't be blocked by more than one creature. S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CantBeBlockedByAmount GT1 | Description$ Each creature you control can't be blocked by more than one creature.
SVar:Picture:http://www.wizards.com/global/images/magic/general/yuan_shao_the_indecisive.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/yuan_shao_the_indecisive.jpg
Oracle:Horsemanship (This creature can't be blocked except by creatures with horsemanship.)\nEach creature you control can't be blocked by more than one creature. Oracle:Horsemanship (This creature can't be blocked except by creatures with horsemanship.)\nEach creature you control can't be blocked by more than one creature.
SetInfo:PTK Rare SetInfo:PTK Rare

View File

@@ -1,7 +1,8 @@
All creatures able to block CARDNAME do so. All creatures able to block CARDNAME do so.
CARDNAME attacks each turn if able. CARDNAME attacks each turn if able.
CARDNAME can't be regenerated. CARDNAME can't be regenerated.
CARDNAME can't be blocked except by two or more creatures. CantBeBlockedByAmount LT2
CantBeBlockedByAmount LT3
CARDNAME doesn't untap during your untap step. CARDNAME doesn't untap during your untap step.
Changeling Changeling
Convoke Convoke

View File

@@ -42,7 +42,6 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import forge.CardPredicates.Presets; import forge.CardPredicates.Presets;
import forge.Constant.CardTypes;
import forge.card.CardCharacteristics; import forge.card.CardCharacteristics;
import forge.card.CardDb; import forge.card.CardDb;
import forge.card.CardRarity; import forge.card.CardRarity;
@@ -2128,7 +2127,43 @@ public class Card extends GameEntity implements Comparable<Card> {
continue; continue;
} else if (keyword.startsWith("CantBeBlockedBy")) { } else if (keyword.startsWith("CantBeBlockedBy")) {
sbLong.append(this.getName()).append(" can't be blocked "); sbLong.append(this.getName()).append(" can't be blocked ");
if( keyword.startsWith("CantBeBlockedByAmount"))
sbLong.append(getTextForKwCantBeBlockedByAmount(keyword));
else
sbLong.append(getTextForKwCantBeBlockedByType(keyword));
}
else {
if ((i != 0) && (sb.length() != 0)) {
sb.append(", ");
}
sb.append(keyword);
}
}
if (sb.length() > 0) {
sb.append("\r\n");
if (sbLong.length() > 0) {
sb.append("\r\n");
}
}
if (sbLong.length() > 0) {
sbLong.append("\r\n");
}
sb.append(sbLong);
sb.append(sbMana);
return sb.toString();
}
private String getTextForKwCantBeBlockedByAmount(String keyword) {
String restriction = keyword.split(" ", 2)[1];
boolean isLT = "LT".equals(restriction.substring(0,2));
final String byClause = isLT ? "except by " : "by more than";
int cnt = Integer.parseInt(restriction.substring(2));
return byClause + Lang.nounWithNumeral(cnt, isLT ? "or more creature" : "creature");
}
private String getTextForKwCantBeBlockedByType(String keyword) {
boolean negative = true; boolean negative = true;
List<String> subs = Lists.newArrayList(TextUtil.split(keyword.split(" ", 2)[1], ',')); List<String> subs = Lists.newArrayList(TextUtil.split(keyword.split(" ", 2)[1], ','));
List<List<String>> subsAnd = Lists.newArrayList(); List<List<String>> subsAnd = Lists.newArrayList();
@@ -2149,8 +2184,7 @@ public class Card extends GameEntity implements Comparable<Card> {
} }
final boolean allNegative = negative; final boolean allNegative = negative;
if( allNegative ) sbLong.append("except "); final String byClause = allNegative ? "except by " : "by ";
sbLong.append("by ");
final Function<Pair<Boolean, String>, String> withToString = new Function<Pair<Boolean, String>, String>() { final Function<Pair<Boolean, String>, String> withToString = new Function<Pair<Boolean, String>, String>() {
@Override @Override
@@ -2226,30 +2260,7 @@ public class Card extends GameEntity implements Comparable<Card> {
} }
orClauses.add(sbShort.toString()); orClauses.add(sbShort.toString());
} }
return byClause + StringUtils.join(orClauses, " or ");
sbLong.append(StringUtils.join(orClauses, " or "));
}
else {
if ((i != 0) && (sb.length() != 0)) {
sb.append(", ");
}
sb.append(keyword);
}
}
if (sb.length() > 0) {
sb.append("\r\n");
if (sbLong.length() > 0) {
sb.append("\r\n");
}
}
if (sbLong.length() > 0) {
sbLong.append("\r\n");
}
sb.append(sbLong);
sb.append(sbMana);
return sb.toString();
} }
// get the text of the abilities of a card // get the text of the abilities of a card
@@ -5141,7 +5152,7 @@ public class Card extends GameEntity implements Comparable<Card> {
* @return a boolean. * @return a boolean.
*/ */
public final boolean hasStartOfUnHiddenKeyword(final String keyword) { public final boolean hasStartOfUnHiddenKeyword(final String keyword) {
final ArrayList<String> a = this.getUnhiddenKeyword(); final List<String> a = this.getUnhiddenKeyword();
for (int i = 0; i < a.size(); i++) { for (int i = 0; i < a.size(); i++) {
if (a.get(i).toString().startsWith(keyword)) { if (a.get(i).toString().startsWith(keyword)) {
return true; return true;

View File

@@ -1047,9 +1047,8 @@ public class AttachAi extends SpellAbilityAi {
final boolean evasive = (keyword.equals("Unblockable") || keyword.equals("Fear") final boolean evasive = (keyword.equals("Unblockable") || keyword.equals("Fear")
|| keyword.equals("Intimidate") || keyword.equals("Shadow") || keyword.equals("Intimidate") || keyword.equals("Shadow")
|| keyword.equals("Flying") || keyword.equals("Horsemanship") || keyword.equals("Flying") || keyword.equals("Horsemanship")
|| keyword.endsWith("walk") || keyword.equals("CARDNAME can't be blocked except by Walls.") || keyword.endsWith("walk") || keyword.startsWith("CantBeBlockedBy")
|| keyword.equals("All creatures able to block CARDNAME do so.") || keyword.equals("All creatures able to block CARDNAME do so."));
|| keyword.equals("CARDNAME can't be blocked by more than one creature."));
// give evasive keywords to creatures that can attack and deal damage // give evasive keywords to creatures that can attack and deal damage
if (evasive) { if (evasive) {
if (card.getNetCombatDamage() + powerBonus <= 0 if (card.getNetCombatDamage() + powerBonus <= 0

View File

@@ -167,8 +167,7 @@ public abstract class PumpAiBase extends SpellAbilityAi {
final boolean evasive = (keyword.endsWith("Unblockable") || keyword.endsWith("Fear") final boolean evasive = (keyword.endsWith("Unblockable") || keyword.endsWith("Fear")
|| keyword.endsWith("Intimidate") || keyword.endsWith("Shadow") || keyword.endsWith("Intimidate") || keyword.endsWith("Shadow")
|| keyword.contains("CantBeBlockedBy") || keyword.endsWith("CARDNAME can't be blocked except by Walls.") || keyword.startsWith("CantBeBlockedBy"));
|| keyword.endsWith("CARDNAME can't be blocked except by two or more creatures."));
final boolean combatRelevant = (keyword.endsWith("First Strike") || keyword.contains("Bushido")); final boolean combatRelevant = (keyword.endsWith("First Strike") || keyword.contains("Bushido"));
// give evasive keywords to creatures that can or do attack // give evasive keywords to creatures that can or do attack
if (evasive) { if (evasive) {

View File

@@ -951,9 +951,7 @@ public class AiAttackController {
return true; return true;
} }
if (numberOfPossibleBlockers > 1 if (numberOfPossibleBlockers > 1 || (numberOfPossibleBlockers == 1 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 1))) {
|| (numberOfPossibleBlockers == 1
&& !attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures."))) {
canBeBlocked = true; canBeBlocked = true;
} }
/*System.out.println(attacker + " canBeKilledByOne: " + canBeKilledByOne + " canKillAll: " /*System.out.println(attacker + " canBeKilledByOne: " + canBeKilledByOne + " canKillAll: "

View File

@@ -343,7 +343,7 @@ public class ComputerUtilBlock {
for (final Card attacker : ComputerUtilBlock.getAttackersLeft()) { for (final Card attacker : ComputerUtilBlock.getAttackersLeft()) {
if (attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.")) { if (attacker.hasStartOfKeyword("CantBeBlockedByAmount LT")) {
continue; continue;
} }
@@ -405,7 +405,7 @@ public class ComputerUtilBlock {
* a {@link forge.game.phase.Combat} object. * a {@link forge.game.phase.Combat} object.
* @return a {@link forge.game.phase.Combat} object. * @return a {@link forge.game.phase.Combat} object.
*/ */
static final Predicate<Card> rampagesOrNeedsManyToBlock = Predicates.or(CardPredicates.containsKeyword("Rampage"), CardPredicates.containsKeyword("CARDNAME can't be blocked by more than one creature.")); static final Predicate<Card> rampagesOrNeedsManyToBlock = Predicates.or(CardPredicates.containsKeyword("Rampage"), CardPredicates.containsKeyword("CantBeBlockedByAmount GT"));
private static Combat makeGangBlocks(final Player ai, final Combat combat) { private static Combat makeGangBlocks(final Player ai, final Combat combat) {
List<Card> currentAttackers = CardLists.filter(ComputerUtilBlock.getAttackersLeft(), Predicates.not(rampagesOrNeedsManyToBlock)); List<Card> currentAttackers = CardLists.filter(ComputerUtilBlock.getAttackersLeft(), Predicates.not(rampagesOrNeedsManyToBlock));
@@ -537,7 +537,7 @@ public class ComputerUtilBlock {
for (final Card attacker : ComputerUtilBlock.getAttackersLeft()) { for (final Card attacker : ComputerUtilBlock.getAttackersLeft()) {
if (attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.")) { if (attacker.hasStartOfKeyword("CantBeBlockedByAmount LT")) {
continue; continue;
} }
@@ -579,8 +579,7 @@ public class ComputerUtilBlock {
Card attacker = attackers.get(0); Card attacker = attackers.get(0);
if (attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.") if (attacker.hasStartOfKeyword("CantBeBlockedByAmount LT") || attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")) {
|| attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")) {
attackers.remove(0); attackers.remove(0);
return makeChumpBlocks(ai, combat, attackers); return makeChumpBlocks(ai, combat, attackers);
} }
@@ -643,8 +642,7 @@ public class ComputerUtilBlock {
for (final Card attacker : tramplingAttackers) { for (final Card attacker : tramplingAttackers) {
if ((attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.") if ((attacker.hasStartOfKeyword("CantBeBlockedByAmount LT") && !combat.isBlocked(attacker))
&& !combat.isBlocked(attacker))
|| attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")) { || attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")) {
continue; continue;
} }

View File

@@ -417,11 +417,8 @@ public class ComputerUtilCard {
if (c.hasKeyword("Intimidate")) { if (c.hasKeyword("Intimidate")) {
value += power * 6; value += power * 6;
} }
if (c.hasStartOfKeyword("CARDNAME can't be blocked except by")) { if (c.hasStartOfKeyword("CantBeBlockedBy")) {
value += power * 5; value += power * 3;
}
if (c.hasStartOfKeyword("CARDNAME can't be blocked by")) {
value += power * 2;
} }
} }

View File

@@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils;
import com.esotericsoftware.minlog.Log; import com.esotericsoftware.minlog.Log;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import forge.Card; import forge.Card;
import forge.CardLists; import forge.CardLists;
@@ -50,6 +51,8 @@ import forge.game.combat.AttackingBand;
import forge.game.player.Player; import forge.game.player.Player;
import forge.game.player.PlayerController.ManaPaymentPurpose; import forge.game.player.PlayerController.ManaPaymentPurpose;
import forge.game.zone.ZoneType; import forge.game.zone.ZoneType;
import forge.util.Expressions;
import forge.util.TextUtil;
/** /**
@@ -179,8 +182,7 @@ public class CombatUtil {
return true; return true;
} }
if (attacker.hasKeyword("CARDNAME can't be blocked by more than one creature.") && if (attacker.hasStartOfKeyword("CantBeBlockedByAmount GT") && !combat.getBlockers(attacker).isEmpty()) {
!combat.getBlockers(attacker).isEmpty()) {
return false; return false;
} }
return CombatUtil.canBeBlocked(attacker); return CombatUtil.canBeBlocked(attacker);
@@ -321,24 +323,14 @@ public class CombatUtil {
return false; return false;
} }
if (attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.")) {
int blocks = 0; int blocks = 0;
for (final Card blocker : blockers) { for (final Card blocker : blockers) {
if (CombatUtil.canBlock(attacker, blocker)) { if (CombatUtil.canBlock(attacker, blocker)) {
blocks += 1; blocks++;
if (blocks > 1) {
return true;
} }
} }
}
} else { return canAttackerBeBlockedWithAmount(attacker, blocks);
for (final Card blocker : blockers) {
if (CombatUtil.canBlock(attacker, blocker)) {
return true;
}
}
}
return false;
} }
/** /**
@@ -356,10 +348,11 @@ public class CombatUtil {
return 0; return 0;
} }
if (attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.")) { if (attacker.hasKeyword("CantBeBlockedByAmount LT2")) {
return 2; return 2;
} } else if (attacker.hasKeyword("CantBeBlockedByAmount LT3")) {
return 3;
} else
return 1; return 1;
} }
@@ -390,7 +383,7 @@ public class CombatUtil {
for (final Card attacker : attackers) { for (final Card attacker : attackers) {
if (CombatUtil.canBlock(attacker, blocker, combat)) { if (CombatUtil.canBlock(attacker, blocker, combat)) {
boolean must = true; boolean must = true;
if (attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.")) { if (attacker.hasStartOfKeyword("CantBeBlockedByAmount LT")) {
final List<Card> possibleBlockers = CardLists.filter(defending.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.CREATURES); final List<Card> possibleBlockers = CardLists.filter(defending.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.CREATURES);
possibleBlockers.remove(blocker); possibleBlockers.remove(blocker);
if (!CombatUtil.canBeBlocked(attacker, possibleBlockers)) { if (!CombatUtil.canBeBlocked(attacker, possibleBlockers)) {
@@ -406,12 +399,10 @@ public class CombatUtil {
} }
for (final Card attacker : attackers) { for (final Card attacker : attackers) {
// don't accept one blocker for attackers with this keyword // don't accept blocker amount for attackers with keyword defining valid blockers amount
if (attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.") if (!canAttackerBeBlockedWithAmount(attacker, combat.getBlockers(attacker).size()))
&& (combat.getBlockers(attacker).size() == 1)) {
return false; return false;
} }
}
return true; return true;
} }
@@ -497,7 +488,7 @@ public class CombatUtil {
for (final Card attacker : attackersWithLure) { for (final Card attacker : attackersWithLure) {
if (CombatUtil.canBeBlocked(attacker, combat) && CombatUtil.canBlock(attacker, blocker)) { if (CombatUtil.canBeBlocked(attacker, combat) && CombatUtil.canBlock(attacker, blocker)) {
boolean canBe = true; boolean canBe = true;
if (attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.")) { if (attacker.hasStartOfKeyword("CantBeBlockedByAmount LT")) {
final List<Card> blockers = combat.getDefenderPlayerByAttacker(attacker).getCreaturesInPlay(); final List<Card> blockers = combat.getDefenderPlayerByAttacker(attacker).getCreaturesInPlay();
blockers.remove(blocker); blockers.remove(blocker);
if (!CombatUtil.canBeBlocked(attacker, blockers)) { if (!CombatUtil.canBeBlocked(attacker, blockers)) {
@@ -515,7 +506,7 @@ public class CombatUtil {
if (CombatUtil.canBeBlocked(attacker, combat) && CombatUtil.canBlock(attacker, blocker) if (CombatUtil.canBeBlocked(attacker, combat) && CombatUtil.canBlock(attacker, blocker)
&& combat.isAttacking(attacker)) { && combat.isAttacking(attacker)) {
boolean canBe = true; boolean canBe = true;
if (attacker.hasKeyword("CARDNAME can't be blocked except by two or more creatures.")) { if (attacker.hasStartOfKeyword("CantBeBlockedByAmount LT")) {
final List<Card> blockers = combat.getDefenderPlayerByAttacker(attacker).getCreaturesInPlay(); final List<Card> blockers = combat.getDefenderPlayerByAttacker(attacker).getCreaturesInPlay();
blockers.remove(blocker); blockers.remove(blocker);
if (!CombatUtil.canBeBlocked(attacker, blockers)) { if (!CombatUtil.canBeBlocked(attacker, blockers)) {
@@ -645,23 +636,13 @@ public class CombatUtil {
return false; return false;
} }
if (attacker.hasKeyword("Creatures with power less than CARDNAME's power can't block it.") if (attacker.hasKeyword("Creatures with power less than CARDNAME's power can't block it.") && attacker.getNetAttack() > blocker.getNetAttack()) {
&& (attacker.getNetAttack() > blocker.getNetAttack())) {
return false;
}
if ((blocker.getNetAttack() > attacker.getNetAttack())
&& blocker.hasKeyword("CARDNAME can't be blocked by creatures "
+ "with power greater than CARDNAME's power.")) {
return false;
}
if ((blocker.getNetAttack() >= attacker.getNetDefense())
&& blocker.hasKeyword("CARDNAME can't be blocked by creatures with "
+ "power equal to or greater than CARDNAME's toughness.")) {
return false; return false;
} }
if (attacker.hasStartOfKeyword("CantBeBlockedBy")) {
final int keywordPosition = attacker.getKeywordPosition("CantBeBlockedBy"); if (attacker.hasStartOfKeyword("CantBeBlockedBy ")) {
final int keywordPosition = attacker.getKeywordPosition("CantBeBlockedBy ");
final String parse = attacker.getKeyword().get(keywordPosition).toString(); final String parse = attacker.getKeyword().get(keywordPosition).toString();
final String[] k = parse.split(" ", 2); final String[] k = parse.split(" ", 2);
final String[] restrictions = k[1].split(","); final String[] restrictions = k[1].split(",");
@@ -684,30 +665,21 @@ public class CombatUtil {
return false; return false;
} }
if (attacker.hasKeyword("Flying") if (attacker.hasKeyword("Flying") && !blocker.hasKeyword("Flying") && !blocker.hasKeyword("Reach")) {
|| attacker.hasKeyword("CARDNAME can't be blocked except by creatures with flying or reach.")) {
if (!blocker.hasKeyword("Flying") && !blocker.hasKeyword("Reach")) {
return false; return false;
} }
}
if (attacker.hasKeyword("Horsemanship")) { if (attacker.hasKeyword("Horsemanship") && !blocker.hasKeyword("Horsemanship")) {
if (!blocker.hasKeyword("Horsemanship")) {
return false; return false;
} }
}
if (attacker.hasKeyword("Fear")) { if (attacker.hasKeyword("Fear") && !blocker.isArtifact() && !blocker.isBlack()) {
if (!blocker.isArtifact() && !blocker.isBlack()) {
return false; return false;
} }
}
if (attacker.hasKeyword("Intimidate")) { if (attacker.hasKeyword("Intimidate") && !blocker.isArtifact() && !blocker.sharesColorWith(attacker)) {
if (!blocker.isArtifact() && !blocker.sharesColorWith(attacker)) {
return false; return false;
} }
}
return true; return true;
} // canBlock() } // canBlock()
@@ -789,6 +761,22 @@ public class CombatUtil {
return true; return true;
} }
public static boolean canAttackerBeBlockedWithAmount(Card attacker, int amount) {
List<String> restrictions = Lists.newArrayList();
for ( String kw : attacker.getKeyword() ) {
if ( kw.startsWith("CantBeBlockedByAmount") )
restrictions.add(TextUtil.split(kw, ' ', 2)[1]);
}
for ( String res : restrictions ) {
int operand = Integer.parseInt(res.substring(2));
String operator = res.substring(0,2);
if (Expressions.compare(amount, operator, operand) )
return false;
}
return true;
}
// can a creature attack if untapped and without summoning sickness? // can a creature attack if untapped and without summoning sickness?
/** /**
* <p> * <p>

View File

@@ -75,6 +75,10 @@ public class Lang {
return strCount + countedForm; return strCount + countedForm;
} }
public static <T> String nounWithNumeral(int cnt, String noun) {
String countedForm = cnt <= 1 ? noun : getPlural(noun);
return getNumeral(cnt) + " " + countedForm;
}
/** /**
* TODO: Write javadoc for this method. * TODO: Write javadoc for this method.
* @param name * @param name
@@ -96,4 +100,22 @@ public class Lang {
return false; return false;
} }
public final static String[] numbers0 = new String[] {
"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eightteen", "nineteen" };
public final static String[] numbers20 = new String[] {"twenty", "thirty", "fourty", "fifty", "sixty", "seventy", "eighty", "ninety" };
public static String getNumeral(int n) {
String prefix = n < 0 ? "minus " : "";
n = Math.abs(n);
if ( n >= 0 && n < 20 )
return prefix + numbers0[n];
if ( n < 100 ) {
int n1 = n % 10;
String ones = n1 == 0 ? "" : numbers0[n1];
return prefix + numbers20[(n / 10) - 2] + " " + ones;
}
return Integer.toString(n);
}
} }