From 1577f9110d96161a1b76b40731924de36c2361d3 Mon Sep 17 00:00:00 2001 From: RedDeckWins Date: Wed, 15 May 2013 04:49:56 +0000 Subject: [PATCH] war tax implemented. propaganda combat check now looks in the command zone as well. --- .gitattributes | 1 + res/cardsfolder/w/war_tax.txt | 12 ++++++++++++ src/main/java/forge/game/phase/CombatUtil.java | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 res/cardsfolder/w/war_tax.txt diff --git a/.gitattributes b/.gitattributes index e75cf0a2122..52a0e619726 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12217,6 +12217,7 @@ res/cardsfolder/w/war_mammoth.txt svneol=native#text/plain res/cardsfolder/w/war_priest_of_thune.txt svneol=native#text/plain res/cardsfolder/w/war_report.txt svneol=native#text/plain res/cardsfolder/w/war_spike_changeling.txt svneol=native#text/plain +res/cardsfolder/w/war_tax.txt -text res/cardsfolder/w/war_torch_goblin.txt svneol=native#text/plain res/cardsfolder/w/warbreak_trumpeter.txt svneol=native#text/plain res/cardsfolder/w/warclamp_mastiff.txt -text diff --git a/res/cardsfolder/w/war_tax.txt b/res/cardsfolder/w/war_tax.txt new file mode 100644 index 00000000000..02bc5ec948e --- /dev/null +++ b/res/cardsfolder/w/war_tax.txt @@ -0,0 +1,12 @@ +Name:War Tax +ManaCost:2 U +Types:Enchantment +A:AB$ StoreSVar | SVar$ Y | Type$ Count | Expression$ xPaid | Cost$ X U | SubAbility$ DBEffect | SpellDescription$ This turn, creatures can't attack unless their controller pays X for each attacking creature he or she controls. +SVar:DBEffect:DB$ Effect | StaticAbilities$ AttackTax | SVars$ Y | SubAbility$ DBReset | EffectOwner$ SourceController +SVar:AttackTax:Mode$ CantAttackUnless | ValidCard$ Creature | EffectZone$ Command | Cost$ Y | Description$ Creatures can't attack unless their controller pays X for each attacking creature he or she controls. +SVar:DBReset:DB$ StoreSVar | SVar$ Y | Type$ Number | Expression$ 0 +SVar:X:Count$xPaid +SVar:Y:Number$0 +SVar:Picture:http://www.wizards.com/global/images/magic/general/war_tax.jpg +Oracle:X U:This turn, creatures can't attack unless their controller pays X for each attacking creature he or she controls. +SetInfo:MMQ Uncommon diff --git a/src/main/java/forge/game/phase/CombatUtil.java b/src/main/java/forge/game/phase/CombatUtil.java index 4e7941ae796..02b58af676a 100644 --- a/src/main/java/forge/game/phase/CombatUtil.java +++ b/src/main/java/forge/game/phase/CombatUtil.java @@ -1063,7 +1063,7 @@ public class CombatUtil { public static void checkPropagandaEffects(final GameState game, final Card c) { Cost attackCost = new Cost(ManaCost.ZERO, true); // Sort abilities to apply them in proper order - for (Card card : game.getCardsIn(ZoneType.Battlefield)) { + for (Card card : game.getCardsIn(ZoneType.listValueOf("Battlefield,Command"))) { final ArrayList staticAbilities = card.getStaticAbilities(); for (final StaticAbility stAb : staticAbilities) { Cost additionalCost = stAb.getAttackCost(c, game.getCombat().getDefenderByAttacker(c));