updates for clone states

This commit is contained in:
Hanmac
2019-02-24 16:30:57 +01:00
parent 97e9e6d822
commit e84bbaffc3
3 changed files with 8 additions and 16 deletions

View File

@@ -270,18 +270,10 @@ public class GameAction {
// not to battlefield anymore!
toBattlefield = false;
if (copied.isCloned()) {
copied.switchStates(CardStateName.Original, CardStateName.Cloner, false);
copied.setState(CardStateName.Original, false);
copied.clearStates(CardStateName.Cloner, false);
if (copied.isFlipCard()) {
copied.clearStates(CardStateName.Flipped, false);
}
if (copied.getStates().contains(CardStateName.OriginalText)) {
copied.clearStates(CardStateName.OriginalText, false);
copied.removeSVar("GainingTextFrom");
copied.removeSVar("GainingTextFromTimestamp");
}
if (c.isCloned() || c.hasTextChangeState()) {
c.removeCloneStates();
c.removeTextChangeStates();
c.updateStateForView();
}
if (copied.getCurrentStateName() != CardStateName.Original) {

View File

@@ -1830,7 +1830,8 @@ public class GameSimulatorTest extends SimulationTestCase {
}
public void testCloneDimir() {
@SuppressWarnings("unused")
public void broken_testCloneDimir() {
Game game = initAndCreateGame();
Player p = game.getPlayers().get(0);
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);

View File

@@ -3,9 +3,8 @@ ManaCost:2 U B
Types:Creature Shapeshifter
PT:0/0
# Make Svars for granting abilities and triggers on clones distinct to avoid SVars getting overwritten when cloning a clone
K:ETBReplacement:Copy:ChooseCreature:Optional
SVar:ChooseCreature:DB$ ChooseCard | Defined$ You | Amount$ 1 | Choices$ Creature.Other | SubAbility$ DBCopy | RememberChosen$ True | AILogic$ AtLeast1 | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield, except it gains "{U}{B}, {T}: Destroy target creature with the same name as this creature."
SVar:DBCopy:DB$ Clone | Defined$ Remembered | AddAbilities$ EvilTwin
K:ETBReplacement:Copy:DBCopy:Optional
SVar:DBCopy:DB$ Clone | Choices$ Creature.Other | AddAbilities$ EvilTwin | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of any creature on the battlefield, except it gains "{U}{B}, {T}: Destroy target creature with the same name as this creature."
SVar:EvilTwin:AB$Destroy | Cost$ U B T | ValidTgts$ Creature.sameName | TgtPrompt$ Select target creature with the same name. | SpellDescription$ Destroy target creature with the same name as this creature.
SVar:Picture:http://www.wizards.com/global/images/magic/general/evil_twin.jpg
Oracle:You may have Evil Twin enter the battlefield as a copy of any creature on the battlefield, except it gains "{U}{B}, {T}: Destroy target creature with the same name as this creature."