Merge branch 'copyNonCreatureSetPT' into 'master'

getCloneStates: copying a non Creature can't set PT

See merge request core-developers/forge!6270
This commit is contained in:
Michael Kamensky
2022-02-20 15:27:05 +00:00

View File

@@ -681,13 +681,16 @@ public class CardFactory {
state.removeIntrinsicKeyword(kw); state.removeIntrinsicKeyword(kw);
} }
if (state.getType().isCreature()) {
if (sa.hasParam("SetPower")) { if (sa.hasParam("SetPower")) {
state.setBasePower(AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("SetPower"), sa)); state.setBasePower(AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("SetPower"), sa));
} }
if (sa.hasParam("SetToughness")) { if (sa.hasParam("SetToughness")) {
state.setBaseToughness(AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("SetToughness"), sa)); state.setBaseToughness(AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("SetToughness"), sa));
} }
if (sa.hasParam("SetLoyalty")) { }
if (state.getType().isPlaneswalker() && sa.hasParam("SetLoyalty")) {
state.setBaseLoyalty(String.valueOf(sa.getParam("SetLoyalty"))); state.setBaseLoyalty(String.valueOf(sa.getParam("SetLoyalty")));
} }