From 1101bde6e618d4d9e5a948c0a130f9b4602b6b64 Mon Sep 17 00:00:00 2001 From: Sloth Date: Mon, 1 Oct 2012 08:08:11 +0000 Subject: [PATCH] - Little improvements for Attach AI. --- res/cardsfolder/d/destructive_urge.txt | 2 +- res/cardsfolder/l/latullas_orders.txt | 2 +- res/cardsfolder/n/necromantic_thirst.txt | 2 +- res/cardsfolder/o/one_with_nature.txt | 2 +- res/cardsfolder/p/pollenbright_wings.txt | 2 +- res/cardsfolder/s/sleepers_robe.txt | 2 +- res/cardsfolder/s/snake_cult_initiation.txt | 2 +- .../java/forge/card/abilityfactory/AbilityFactoryAttach.java | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/res/cardsfolder/d/destructive_urge.txt b/res/cardsfolder/d/destructive_urge.txt index a00ff9a5baf..5e3e1b714fc 100644 --- a/res/cardsfolder/d/destructive_urge.txt +++ b/res/cardsfolder/d/destructive_urge.txt @@ -3,7 +3,7 @@ ManaCost:1 R R Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 1 R R | ValidTgts$ Creature | AILogic$ Pump +A:SP$ Attach | Cost$ 1 R R | ValidTgts$ Creature | AITgts$ Card.powerGE1 | AILogic$ Pump T:Mode$ DamageDone | ValidSource$ Card.AttachedBy | ValidTarget$ Player | Execute$ TrigSacrifice | CombatDamage$ True | TriggerDescription$ Whenever enchanted creature deals combat damage to a player, that player sacrifices a land. SVar:TrigSacrifice:AB$Sacrifice | Cost$ 0 | Defined$ TriggeredTarget | SacValid$ Land | ChangeNum$ 1 | SpellDescription$ Sacrifice a land. SVar:Rarity:Uncommon diff --git a/res/cardsfolder/l/latullas_orders.txt b/res/cardsfolder/l/latullas_orders.txt index 0574606cceb..2d8caa3abcd 100644 --- a/res/cardsfolder/l/latullas_orders.txt +++ b/res/cardsfolder/l/latullas_orders.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura Text:no text K:Flash K:Enchant creature -A:SP$ Attach | Cost$ 1 R | ValidTgts$ Creature | AILogic$ Pump +A:SP$ Attach | Cost$ 1 R | ValidTgts$ Creature | AITgts$ Card.powerGE1 | AILogic$ Pump T:Mode$ DamageDone | ValidSource$ Card.AttachedBy | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigDestroy | OptionalDecider$ You | TriggerDescription$ Whenever enchanted creature deals combat damage to defending player, you may destroy target artifact that player controls. SVar:TrigDestroy:AB$Destroy | Cost$ 0 | ValidTgts$ Artifact.YouDontCtrl | TgtPrompt$ Select target artifact SVar:Rarity:Common diff --git a/res/cardsfolder/n/necromantic_thirst.txt b/res/cardsfolder/n/necromantic_thirst.txt index 98a96d7ed39..f9e959751d0 100644 --- a/res/cardsfolder/n/necromantic_thirst.txt +++ b/res/cardsfolder/n/necromantic_thirst.txt @@ -3,7 +3,7 @@ ManaCost:2 B B Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 2 B B | ValidTgts$ Creature | AILogic$ Pump +A:SP$ Attach | Cost$ 2 B B | ValidTgts$ Creature | AITgts$ Card.powerGE1 | AILogic$ Pump T:Mode$ DamageDone | ValidSource$ Card.AttachedBy | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigReturn | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever enchanted creature deals combat damage to a player, you may return target creature card from your graveyard to your hand. SVar:TrigReturn:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand | ValidTgts$ Creature.YouCtrl SVar:Rarity:Common diff --git a/res/cardsfolder/o/one_with_nature.txt b/res/cardsfolder/o/one_with_nature.txt index dce5d314498..20433650d57 100644 --- a/res/cardsfolder/o/one_with_nature.txt +++ b/res/cardsfolder/o/one_with_nature.txt @@ -3,7 +3,7 @@ ManaCost:G Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ G | ValidTgts$ Creature | AILogic$ Pump +A:SP$ Attach | Cost$ G | ValidTgts$ Creature | AITgts$ Card.powerGE1 | AILogic$ Pump T:Mode$ DamageDone | ValidSource$ Card.AttachedBy | ValidTarget$ Player | TriggerZones$ Battlefield | Execute$ TrigChange | CombatDamage$ True | TriggerDescription$ Whenever enchanted creature deals combat damage to a player, you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Battlefield | Tapped$ True | ChangeType$ Land.Basic | ChangeNum$ 1 SVar:Rarity:Uncommon diff --git a/res/cardsfolder/p/pollenbright_wings.txt b/res/cardsfolder/p/pollenbright_wings.txt index 02654319f2c..c71ea63794a 100644 --- a/res/cardsfolder/p/pollenbright_wings.txt +++ b/res/cardsfolder/p/pollenbright_wings.txt @@ -3,7 +3,7 @@ ManaCost:4 G W Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 4 G W | ValidTgts$ Creature | AILogic$ Pump +A:SP$ Attach | Cost$ 4 G W | ValidTgts$ Creature | AITgts$ Card.powerGE1 | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Flying | Description$ Enchanted creature has flying. T:Mode$ DamageDone | ValidSource$ Card.AttachedBy | Execute$ TrigToken | ValidTarget$ Player | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted creature deals combat damage to a player, put that many 1/1 green Saproling creature tokens onto the battlefield. SVar:TrigToken:AB$Token | Cost$ 0 | TokenAmount$ X | References$ X | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 diff --git a/res/cardsfolder/s/sleepers_robe.txt b/res/cardsfolder/s/sleepers_robe.txt index 95ca77ad84e..af576b7cc35 100644 --- a/res/cardsfolder/s/sleepers_robe.txt +++ b/res/cardsfolder/s/sleepers_robe.txt @@ -3,7 +3,7 @@ ManaCost:U B Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ U B | ValidTgts$ Creature | AILogic$ Pump +A:SP$ Attach | Cost$ U B | ValidTgts$ Creature | AITgts$ Card.powerGE1 | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Fear | Description$ Enchanted creature has fear. (It can't be blocked except by artifact creatures and/or black creatures.) T:Mode$ DamageDone | ValidSource$ Card.AttachedBy | ValidTarget$ Opponent | OptionalDecider$ You | Execute$ TrigDraw | CombatDamage$ True | TriggerDescription$ Whenever enchanted creature deals combat damage to an opponent, you may draw a card. SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1 diff --git a/res/cardsfolder/s/snake_cult_initiation.txt b/res/cardsfolder/s/snake_cult_initiation.txt index 97254f9c972..acd4dc8fecc 100644 --- a/res/cardsfolder/s/snake_cult_initiation.txt +++ b/res/cardsfolder/s/snake_cult_initiation.txt @@ -3,7 +3,7 @@ ManaCost:3 B Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 3 B | ValidTgts$ Creature | AILogic$ Pump +A:SP$ Attach | Cost$ 3 B | ValidTgts$ Creature | AITgts$ Card.powerGE1 | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Poisonous 3 | Description$ Enchanted creature has poisonous 3. (Whenever it deals combat damage to a player, that player gets three poison counters. A player with ten or more poison counters loses the game.) SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/snake_cult_initiation.jpg diff --git a/src/main/java/forge/card/abilityfactory/AbilityFactoryAttach.java b/src/main/java/forge/card/abilityfactory/AbilityFactoryAttach.java index fe8a80a03dc..586df1abc04 100644 --- a/src/main/java/forge/card/abilityfactory/AbilityFactoryAttach.java +++ b/src/main/java/forge/card/abilityfactory/AbilityFactoryAttach.java @@ -597,7 +597,7 @@ public class AbilityFactoryAttach { || keyword.equals("Intimidate") || keyword.equals("Shadow") || keyword.equals("Flying") || keyword.equals("Horsemanship") || keyword.endsWith("walk")); - // give evasive keywords to creatures that can or do attack + // give evasive keywords to creatures that can attack and deal damage if (evasive) { if (card.getNetCombatDamage() <= 0 || !CombatUtil.canAttackNextTurn(card) @@ -662,7 +662,7 @@ public class AbilityFactoryAttach { return false; } } else if (keyword.endsWith("CARDNAME can block an additional creature.")) { - if (!CombatUtil.canBlock(card, true)) { + if (!CombatUtil.canBlock(card, true) || card.hasKeyword("CARDNAME can block any number of creatures.")) { return false; } } else if (keyword.equals("Shroud") || keyword.equals("Hexproof")) {