From 936fae779e557596361e8ac5833b52ced8150abc Mon Sep 17 00:00:00 2001 From: Sloth Date: Sun, 4 Sep 2011 15:03:39 +0000 Subject: [PATCH] - Little AI fix in AF Attach Curse. - Added Screams from Within. --- .gitattributes | 1 + .gitignore | 1 + res/cardsfolder/s/screams_from_within.txt | 14 ++++++++++++++ .../card/abilityFactory/AbilityFactory_Attach.java | 6 +++--- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 res/cardsfolder/s/screams_from_within.txt diff --git a/.gitattributes b/.gitattributes index 4de9221da8e..7e235ddf0b4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6531,6 +6531,7 @@ res/cardsfolder/s/scrapheap.txt svneol=native#text/plain res/cardsfolder/s/scrapyard_salvo.txt svneol=native#text/plain res/cardsfolder/s/screaming_fury.txt svneol=native#text/plain res/cardsfolder/s/screaming_seahawk.txt svneol=native#text/plain +res/cardsfolder/s/screams_from_within.txt -text res/cardsfolder/s/screams_of_the_damned.txt svneol=native#text/plain res/cardsfolder/s/screeching_buzzard.txt svneol=native#text/plain res/cardsfolder/s/screeching_drake.txt svneol=native#text/plain diff --git a/.gitignore b/.gitignore index db2af797153..e567fa16071 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ res/PerSetTrackingResults res/cardsfolder/cardsfolder.zip res/gui/display_new_layout.xml +res/oracleScript.log res/quest/questData.dat res/reprintSetInfo.log res/setInfoScript.log diff --git a/res/cardsfolder/s/screams_from_within.txt b/res/cardsfolder/s/screams_from_within.txt new file mode 100644 index 00000000000..6b9fb012da6 --- /dev/null +++ b/res/cardsfolder/s/screams_from_within.txt @@ -0,0 +1,14 @@ +Name:Screams from Within +ManaCost:1 B B +Types:Enchantment Aura +Text:no text +K:Enchant creature +A:SP$ Attach | Cost$ 1 B B | ValidTgts$ Creature | AILogic$ Curse +S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ -1 | AddToughness$ -1 | Description$ Enchanted creature gets -1/-1. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.AttachedBy | Execute$ TrigChange | TriggerDescription$ When enchanted creature is put into a graveyard, return CARDNAME from your graveyard to the battlefield. +SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Battlefield +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/screams_from_within.jpg +SetInfo:DST|Uncommon|http://magiccards.info/scans/en/ds/52.jpg +Oracle:Enchant creature\nEnchanted creature gets -1/-1.\nWhen enchanted creature dies, return Screams from Within from your graveyard to the battlefield. +End \ No newline at end of file diff --git a/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java b/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java index cea823f8dff..7adc2935b66 100644 --- a/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java +++ b/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java @@ -425,17 +425,17 @@ public class AbilityFactory_Attach { prefList = list.filter(new CardListFilter() { @Override public boolean addCard(Card c) { - if (c.hasKeyword("Indestructible") && c.getNetDefense() <= Math.abs(tgh)) + if (!c.hasKeyword("Indestructible") && c.getLethalDamage() <= Math.abs(tgh)) return true; - return c.getLethalDamage() <= Math.abs(tgh); + return c.getNetDefense() <= Math.abs(tgh); } }); } Card c = null; if (prefList == null || prefList.size() == 0) prefList = new CardList(list); - else if (prefList.size() > 0){ + else { c = CardFactoryUtil.AI_getBest(prefList); if (c != null) return c;