- Fixed Phantom Nomad getting multiple counters removed from combat damage (only one counter is now removed from it for all the damage applied to it simultaneously).

This commit is contained in:
Agetian
2015-06-02 17:12:35 +00:00
parent e94bf25c4c
commit 201542300b
2 changed files with 19 additions and 1 deletions

View File

@@ -87,6 +87,17 @@ public class ReplaceDamage extends ReplacementEffect {
} }
} }
} }
if (getMapParams().containsKey("IsNonCombat")) {
if (getMapParams().get("IsNonCombat").equals("True")) {
if (((Boolean) runParams.get("IsCombat"))) {
return false;
}
} else {
if (!(Boolean) runParams.get("IsCombat")) {
return false;
}
}
}
if (getMapParams().containsKey("IsEquipping") && !getHostCard().isEquipping()) { if (getMapParams().containsKey("IsEquipping") && !getHostCard().isEquipping()) {
return false; return false;
} }

View File

@@ -3,7 +3,14 @@ ManaCost:1 W
Types:Creature Spirit Nomad Types:Creature Spirit Nomad
PT:0/0 PT:0/0
K:etbCounter:P1P1:2 K:etbCounter:P1P1:2
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME. T:Mode$ Phase | Static$ True | Phase$ First Strike Damage | Execute$ DBCleanup
T:Mode$ Phase | Static$ True | Phase$ EndCombat | Execute$ DBCleanup
R:Event$ DamageDone | IsCombat$ True | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCountersInCombat | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
R:Event$ DamageDone | IsNonCombat$ True | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
SVar:DBRemoveCountersInCombat:AB$ RemoveCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | ConditionCheckSVar$ TimesFlagged | ConditionSVarCompare$ EQ0 | SubAbility$ DBFlagRemoveCounters
SVar:DBFlagRemoveCounters:DB$ StoreSVar | SVar$ TimesFlagged | Type$ CountSVar | Expression$ TimesFlagged/Plus.1
SVar:DBRemoveCounters:AB$ RemoveCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 SVar:DBRemoveCounters:AB$ RemoveCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
SVar:TimesFlagged:Number$0
SVar:DBCleanup:DB$ StoreSVar | SVar$ TimesFlagged | Type$ Number | Expression$ 0
SVar:Picture:http://www.wizards.com/global/images/magic/general/phantom_nomad.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/phantom_nomad.jpg
Oracle:Phantom Nomad enters the battlefield with two +1/+1 counters on it.\nIf damage would be dealt to Phantom Nomad, prevent that damage. Remove a +1/+1 counter from Phantom Nomad. Oracle:Phantom Nomad enters the battlefield with two +1/+1 counters on it.\nIf damage would be dealt to Phantom Nomad, prevent that damage. Remove a +1/+1 counter from Phantom Nomad.