Unearth: add gain Haste as StaticLayer (#7369)

* Unearth: add gain Haste as StaticLayer
This commit is contained in:
Hans Mackowiak
2025-04-10 16:40:37 +02:00
committed by GitHub
parent 7e6697d100
commit 890ce2505c

View File

@@ -663,9 +663,24 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
} }
if (sa.isKeyword(Keyword.UNEARTH) && movedCard.isInPlay()) { if (sa.isKeyword(Keyword.UNEARTH) && movedCard.isInPlay()) {
movedCard.setUnearthed(true); movedCard.setUnearthed(true);
movedCard.addChangedCardKeywords(Lists.newArrayList("Haste"), null, false, game.getNextTimestamp(), null);
final Card eff = createEffect(sa, sa.getActivatingPlayer(), "Unearth Effect", hostCard.getImageKey());
// It gains haste.
String s = "Mode$ Continuous | Affected$ Card.IsRemembered | EffectZone$ Command | AddKeyword$ Haste";
eff.addStaticAbility(s);
// If it would leave the battlefield, exile it instead of putting it anywhere else.
addLeaveBattlefieldReplacement(eff, "Exile");
eff.addRemembered(movedCard);
movedCard.addLeavesPlayCommand(exileEffectCommand(game, eff));
game.getAction().moveToCommand(eff, sa);
// Exile it at the beginning of the next end step.
registerDelayedTrigger(sa, "Exile", Lists.newArrayList(movedCard)); registerDelayedTrigger(sa, "Exile", Lists.newArrayList(movedCard));
addLeaveBattlefieldReplacement(movedCard, sa, "Exile");
} }
if (sa.hasParam("LeaveBattlefield")) { if (sa.hasParam("LeaveBattlefield")) {
addLeaveBattlefieldReplacement(movedCard, sa, sa.getParam("LeaveBattlefield")); addLeaveBattlefieldReplacement(movedCard, sa, sa.getParam("LeaveBattlefield"));