Fix IsTriggerRemembered for Tokens (#93)

Co-authored-by: TRT <>
This commit is contained in:
tool4ever
2022-04-19 15:06:08 +02:00
committed by GitHub
parent 3058b172b6
commit 9a88de1d6f
2 changed files with 40 additions and 46 deletions

View File

@@ -275,7 +275,6 @@ public class GameAction {
lastKnownInfo = CardUtil.getLKICopy(c); lastKnownInfo = CardUtil.getLKICopy(c);
} }
if (!c.isRealToken()) {
copied = CardFactory.copyCard(c, false); copied = CardFactory.copyCard(c, false);
if (zoneTo.is(ZoneType.Stack)) { if (zoneTo.is(ZoneType.Stack)) {
@@ -321,10 +320,6 @@ public class GameAction {
!(zoneTo.is(ZoneType.Hand) || zoneTo.is(ZoneType.Library))) { !(zoneTo.is(ZoneType.Hand) || zoneTo.is(ZoneType.Library))) {
copied.setCounters(Maps.newHashMap(lastKnownInfo.getCounters())); copied.setCounters(Maps.newHashMap(lastKnownInfo.getCounters()));
} }
} else { //Token
copied = c;
copied.setTimestamp(game.getNextTimestamp());
}
} }
// ensure that any leftover keyword/type changes are cleared in the state view // ensure that any leftover keyword/type changes are cleared in the state view

View File

@@ -3,8 +3,7 @@ ManaCost:6
Types:Legendary Artifact Equipment Types:Legendary Artifact Equipment
K:Equip:3 K:Equip:3
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 5 | AddToughness$ 5 | Description$ Equipped creature gets +5/+5. S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 5 | AddToughness$ 5 | Description$ Equipped creature gets +5/+5.
A:AB$ Token | Cost$ 6 Exile<1/CARDNAME> | TokenAmount$ 1 | TokenScript$ u_5_5_dragon_spirit_flying | TokenOwner$ You | RememberTokens$ True | SpellDescription$ Create a 5/5 blue Dragon Spirit creature token with flying. Return CARDNAME to the battlefield under its owner's control when that token dies. A:AB$ Token | Cost$ 6 Exile<1/CARDNAME> | TokenAmount$ 1 | TokenScript$ u_5_5_dragon_spirit_flying | TokenOwner$ You | RememberTokens$ True | SubAbility$ DelTrig | SpellDescription$ Create a 5/5 blue Dragon Spirit creature token with flying. Return CARDNAME to the battlefield under its owner's control when that token dies.
T:Mode$ ChangesZone | ValidCard$ Creature.IsRemembered | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Exile | Execute$ TrigReturn | Secondary$ True | TriggerDescription$ Return CARDNAME to the battlefield under its owner's control when that token dies. SVar:DelTrig:DB$ DelayedTrigger | Mode$ ChangesZone | ValidCard$ Card.IsTriggerRemembered | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigReturn | RememberObjects$ Remembered | TriggerDescription$ Return CARDNAME to the battlefield under its owner's control when that token dies.
SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Battlefield | Defined$ Self | SubAbility$ DBCleanUp SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Battlefield | Defined$ Self
SVar:DBCleanUp:DB$ Cleanup | ClearRemembered$ True
Oracle:Equipped creature gets +5/+5.\n{6}, Exile Tatsumasa, the Dragon's Fang: Create a 5/5 blue Dragon Spirit creature token with flying. Return Tatsumasa to the battlefield under its owner's control when that token dies.\nEquip {3} Oracle:Equipped creature gets +5/+5.\n{6}, Exile Tatsumasa, the Dragon's Fang: Create a 5/5 blue Dragon Spirit creature token with flying. Return Tatsumasa to the battlefield under its owner's control when that token dies.\nEquip {3}