- Little AI fix in AF Attach Curse.

- Added Screams from Within.
This commit is contained in:
Sloth
2011-09-04 15:03:39 +00:00
parent 78468572d0
commit 936fae779e
4 changed files with 19 additions and 3 deletions

1
.gitattributes vendored
View File

@@ -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/scrapyard_salvo.txt svneol=native#text/plain
res/cardsfolder/s/screaming_fury.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/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/screams_of_the_damned.txt svneol=native#text/plain
res/cardsfolder/s/screeching_buzzard.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 res/cardsfolder/s/screeching_drake.txt svneol=native#text/plain

1
.gitignore vendored
View File

@@ -9,6 +9,7 @@
res/PerSetTrackingResults res/PerSetTrackingResults
res/cardsfolder/cardsfolder.zip res/cardsfolder/cardsfolder.zip
res/gui/display_new_layout.xml res/gui/display_new_layout.xml
res/oracleScript.log
res/quest/questData.dat res/quest/questData.dat
res/reprintSetInfo.log res/reprintSetInfo.log
res/setInfoScript.log res/setInfoScript.log

View File

@@ -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

View File

@@ -425,17 +425,17 @@ public class AbilityFactory_Attach {
prefList = list.filter(new CardListFilter() { prefList = list.filter(new CardListFilter() {
@Override @Override
public boolean addCard(Card c) { 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 true;
return c.getLethalDamage() <= Math.abs(tgh); return c.getNetDefense() <= Math.abs(tgh);
} }
}); });
} }
Card c = null; Card c = null;
if (prefList == null || prefList.size() == 0) if (prefList == null || prefList.size() == 0)
prefList = new CardList(list); prefList = new CardList(list);
else if (prefList.size() > 0){ else {
c = CardFactoryUtil.AI_getBest(prefList); c = CardFactoryUtil.AI_getBest(prefList);
if (c != null) if (c != null)
return c; return c;