diff --git a/.gitattributes b/.gitattributes index 2539cc70954..124aed9128f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7382,6 +7382,7 @@ res/cardsfolder/thunder_wall.txt -text svneol=native#text/plain res/cardsfolder/thunderblust.txt svneol=native#text/plain res/cardsfolder/thunderbolt.txt svneol=native#text/plain res/cardsfolder/thunderclap.txt -text svneol=native#text/plain +res/cardsfolder/thundercloud_elemental.txt -text svneol=native#text/plain res/cardsfolder/thundercloud_shaman.txt svneol=native#text/plain res/cardsfolder/thunderheads.txt svneol=native#text/plain res/cardsfolder/thundering_giant.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/thundercloud_elemental.txt b/res/cardsfolder/thundercloud_elemental.txt new file mode 100644 index 00000000000..08f0b584f70 --- /dev/null +++ b/res/cardsfolder/thundercloud_elemental.txt @@ -0,0 +1,11 @@ +Name:Thundercloud Elemental +ManaCost:5 U U +Types:Creature Elemental +Text:no text +PT:3/4 +K:Flying +A:AB$ TapAll | Cost$ 3 U | ValidCards$ Creature.toughnessLE2 | SpellDescription$ Tap all creatures with toughness 2 or less. +A:AB$ DebuffAll | Cost$ 3 U | ValidCards$ Creature.Other | Keywords$ Flying | SpellDescription$ All other creatures lose flying until end of turn. +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/thundercloud_elemental.jpg +End \ No newline at end of file diff --git a/src/forge/card/abilityFactory/AbilityFactory.java b/src/forge/card/abilityFactory/AbilityFactory.java index 2ea3330aa5c..d4cd6498f9c 100644 --- a/src/forge/card/abilityFactory/AbilityFactory.java +++ b/src/forge/card/abilityFactory/AbilityFactory.java @@ -718,7 +718,7 @@ public class AbilityFactory { SA = AbilityFactory_Animate.createDrawbackAnimateAll(this); } - if(API.equals("Debuff")){ + if(API.equals("Debuff")) { if (isAb) SA = AbilityFactory_Debuff.createAbilityDebuff(this); else if (isSp) @@ -727,7 +727,7 @@ public class AbilityFactory { SA = AbilityFactory_Debuff.createDrawbackDebuff(this); } - if(API.equals("DebuffAll")){ + if(API.equals("DebuffAll")) { if (isAb) SA = AbilityFactory_Debuff.createAbilityDebuffAll(this); else if (isSp) diff --git a/src/forge/card/abilityFactory/AbilityFactory_Debuff.java b/src/forge/card/abilityFactory/AbilityFactory_Debuff.java index 13acfdd1063..f0f7d3ac385 100644 --- a/src/forge/card/abilityFactory/AbilityFactory_Debuff.java +++ b/src/forge/card/abilityFactory/AbilityFactory_Debuff.java @@ -514,22 +514,16 @@ public class AbilityFactory_Debuff { CardList human = AllZoneUtil.getPlayerCardsInPlay(AllZone.HumanPlayer); human = human.getValidCards(valid,hostCard.getController(), hostCard); + //TODO - add blocking situations here also + //only count creatures that can attack human = human.filter(new CardListFilter() { public boolean addCard(Card c) { - return CombatUtil.canAttack(c) && !af.isCurse(); + return CombatUtil.canAttack(c); } }); - if(af.isCurse()) { - //evaluate both lists and pass only if human creatures are more valuable - if(CardFactoryUtil.evaluateCreatureList(comp) + 200 >= CardFactoryUtil.evaluateCreatureList(human)) - return false; - - return chance; - }//end Curse - - //don't use non curse DebuffAll after Combat_Begin until AI is improved + //don't use DebuffAll after Combat_Begin until AI is improved if(AllZone.Phase.isAfter(Constant.Phase.Combat_Begin)) return false; @@ -537,7 +531,7 @@ public class AbilityFactory_Debuff { return false; return (r.nextFloat() < .6667) && chance; - }//pumpAllCanPlayAI() + }//debuffAllCanPlayAI() private static void debuffAllResolve(AbilityFactory af, SpellAbility sa) { HashMap params = af.getMapParams(); @@ -574,7 +568,7 @@ public class AbilityFactory_Debuff { }); } } - }//pumpAllResolve() + }//debuffAllResolve() private static boolean debuffAllTriggerAI(AbilityFactory af, SpellAbility sa, boolean mandatory) { if (!ComputerUtil.canPayCost(sa))