diff --git a/src/main/java/forge/card/spellability/HumanPlaySpellAbility.java b/src/main/java/forge/card/spellability/HumanPlaySpellAbility.java index 8df97928b50..3e21b2c6eba 100644 --- a/src/main/java/forge/card/spellability/HumanPlaySpellAbility.java +++ b/src/main/java/forge/card/spellability/HumanPlaySpellAbility.java @@ -50,7 +50,7 @@ public class HumanPlaySpellAbility { } - public final void fillRequirements(boolean isAlreadyTargeted, boolean isFree, boolean skipStack) { + public final void playAbility(boolean mayChoseTargets, boolean isFree, boolean skipStack) { final Game game = ability.getActivatingPlayer().getGame(); // used to rollback @@ -71,7 +71,7 @@ public class HumanPlaySpellAbility { // is only executed or evaluated if the first argument does not suffice to determine the value of the expression boolean prerequisitesMet = this.announceValuesLikeX() && this.announceType() - && ( isAlreadyTargeted || setupTargets() ) + && ( !mayChoseTargets || setupTargets() ) // if you can choose targets, then do choose them. && ( isFree || this.payment.payCost(game) ); @@ -93,7 +93,7 @@ public class HumanPlaySpellAbility { // no worries here. The same thread must resolve, and by this moment ability will have been resolved already // Triggers haven't resolved yet ?? - if (!isAlreadyTargeted) { + if (mayChoseTargets) { clearTargets(ability); } } @@ -131,11 +131,6 @@ public class HumanPlaySpellAbility { final Game game = ability.getActivatingPlayer().getGame(); final Card c = ability.getSourceCard(); - // split cards transform back to full form if targeting is canceled - if (c.isSplitCard()) { - c.setState(CardCharacteristicName.Original); - } - if (fromZone != null) { // and not a copy // add back to where it came from game.getAction().moveTo(fromZone, c, zonePosition >= 0 ? Integer.valueOf(zonePosition) : null); diff --git a/src/main/java/forge/game/GameAction.java b/src/main/java/forge/game/GameAction.java index 39013c6bf8d..8753c8690b9 100644 --- a/src/main/java/forge/game/GameAction.java +++ b/src/main/java/forge/game/GameAction.java @@ -152,6 +152,11 @@ public class GameAction { lastKnownInfo = c; copied = c; } else { + if (c.isSplitCard() && !zoneTo.is(ZoneType.Stack)) { + c.setState(CardCharacteristicName.Original); + } + + lastKnownInfo = CardUtil.getLKICopy(c); if (c.isCloned()) { diff --git a/src/main/java/forge/game/player/HumanPlay.java b/src/main/java/forge/game/player/HumanPlay.java index 3c4681ca125..cfab31a1f04 100644 --- a/src/main/java/forge/game/player/HumanPlay.java +++ b/src/main/java/forge/game/player/HumanPlay.java @@ -118,15 +118,11 @@ public class HumanPlay { // System.out.println("Playing:" + sa.getDescription() + " of " + sa.getSourceCard() + " new = " + newAbility); if (newAbility) { - CostPayment payment = null; - if (sa.getPayCosts() == null) { - payment = new CostPayment(new Cost("0", sa.isAbility()), sa); - } else { - payment = new CostPayment(sa.getPayCosts(), sa); - } + Cost abCost = sa.getPayCosts() == null ? new Cost("0", sa.isAbility()) : sa.getPayCosts(); + CostPayment payment = new CostPayment(abCost, sa); final HumanPlaySpellAbility req = new HumanPlaySpellAbility(sa, payment); - req.fillRequirements(false, false, false); + req.playAbility(true, false, false); } else { if (payManaCostIfNeeded(p, sa)) { if (sa.isSpell() && !source.isCopiedSpell()) { @@ -210,7 +206,7 @@ public class HumanPlay { final CostPayment payment = new CostPayment(sa.getPayCosts(), sa); final HumanPlaySpellAbility req = new HumanPlaySpellAbility(sa, payment); - req.fillRequirements(!mayChooseNewTargets, true, false); + req.playAbility(mayChooseNewTargets, true, false); } else { if (sa.isSpell()) { final Card c = sa.getSourceCard(); @@ -242,7 +238,7 @@ public class HumanPlay { if (sa.getPayCosts() != null) { final HumanPlaySpellAbility req = new HumanPlaySpellAbility(sa, new CostPayment(sa.getPayCosts(), sa)); - req.fillRequirements(useOldTargets, false, true); + req.playAbility(!useOldTargets, false, true); } else { if (payManaCostIfNeeded(player, sa)) { AbilityUtils.resolve(sa);