mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
CloneEffect: SetPower and SetToughness should overwrite CDA and they should not copied.
This commit is contained in:
@@ -14,6 +14,7 @@ import forge.game.card.CardUtil;
|
||||
import forge.game.event.GameEventCardStatsChanged;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.spellability.TargetRestrictions;
|
||||
import forge.game.staticability.StaticAbility;
|
||||
import forge.game.trigger.Trigger;
|
||||
import forge.game.trigger.TriggerHandler;
|
||||
|
||||
@@ -266,6 +267,11 @@ public class CloneEffect extends SpellAbilityEffect {
|
||||
} catch (final NumberFormatException e) {
|
||||
power = CardFactoryUtil.xCount(tgtCard, tgtCard.getSVar(rhs));
|
||||
}
|
||||
for (StaticAbility sta : tgtCard.getStaticAbilities()) {
|
||||
Map<String, String> params = sta.getMapParams();
|
||||
if (params.containsKey("CharacteristicDefining") && params.containsKey("SetPower"))
|
||||
tgtCard.removeStaticAbility(sta);
|
||||
}
|
||||
tgtCard.setBasePower(power);
|
||||
}
|
||||
|
||||
@@ -278,6 +284,11 @@ public class CloneEffect extends SpellAbilityEffect {
|
||||
} catch (final NumberFormatException e) {
|
||||
toughness = CardFactoryUtil.xCount(tgtCard, tgtCard.getSVar(rhs));
|
||||
}
|
||||
for (StaticAbility sta : tgtCard.getStaticAbilities()) {
|
||||
Map<String, String> params = sta.getMapParams();
|
||||
if (params.containsKey("CharacteristicDefining") && params.containsKey("SetToughness"))
|
||||
tgtCard.removeStaticAbility(sta);
|
||||
}
|
||||
tgtCard.setBaseToughness(toughness);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user