mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Merge branch '850-untilyournextturn-incorrectly-ends-during-your-next-cleanup-phase' into 'master'
Resolve "UntilYourNextTurn incorrectly ends during your next cleanup phase" Closes #850 See merge request core-developers/forge!1409
This commit is contained in:
@@ -94,32 +94,13 @@ public class PumpEffect extends SpellAbilityEffect {
|
|||||||
game.fireEvent(new GameEventCardStatsChanged(gameCard));
|
game.fireEvent(new GameEventCardStatsChanged(gameCard));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (sa.hasParam("UntilEndOfCombat")) {
|
addUntilCommand(sa, untilEOT);
|
||||||
game.getEndOfCombat().addUntil(untilEOT);
|
|
||||||
} else if (sa.hasParam("UntilYourNextUpkeep")) {
|
|
||||||
game.getUpkeep().addUntil(sa.getActivatingPlayer(), untilEOT);
|
|
||||||
} else if (sa.hasParam("UntilHostLeavesPlay")) {
|
|
||||||
sa.getHostCard().addLeavesPlayCommand(untilEOT);
|
|
||||||
} else if (sa.hasParam("UntilHostLeavesPlayOrEOT")) {
|
|
||||||
sa.getHostCard().addLeavesPlayCommand(untilEOT);
|
|
||||||
game.getEndOfTurn().addUntil(untilEOT);
|
|
||||||
} else if (sa.hasParam("UntilLoseControlOfHost")) {
|
|
||||||
sa.getHostCard().addLeavesPlayCommand(untilEOT);
|
|
||||||
sa.getHostCard().addChangeControllerCommand(untilEOT);
|
|
||||||
} else if (sa.hasParam("UntilYourNextTurn")) {
|
|
||||||
game.getCleanup().addUntil(sa.getActivatingPlayer(), untilEOT);
|
|
||||||
} else if (sa.hasParam("UntilUntaps")) {
|
|
||||||
sa.getHostCard().addUntapCommand(untilEOT);
|
|
||||||
} else {
|
|
||||||
game.getEndOfTurn().addUntil(untilEOT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
game.fireEvent(new GameEventCardStatsChanged(gameCard));
|
game.fireEvent(new GameEventCardStatsChanged(gameCard));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void applyPump(final SpellAbility sa, final Player p,
|
private static void applyPump(final SpellAbility sa, final Player p,
|
||||||
final List<String> keywords, final long timestamp) {
|
final List<String> keywords, final long timestamp) {
|
||||||
final Game game = p.getGame();
|
|
||||||
final Card host = sa.getHostCard();
|
final Card host = sa.getHostCard();
|
||||||
//if host is not on the battlefield don't apply
|
//if host is not on the battlefield don't apply
|
||||||
// Suspend should does Affect the Stack
|
// Suspend should does Affect the Stack
|
||||||
@@ -144,18 +125,34 @@ public class PumpEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
addUntilCommand(sa, untilEOT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void addUntilCommand(final SpellAbility sa, GameCommand untilEOT) {
|
||||||
|
final Card host = sa.getHostCard();
|
||||||
|
final Game game = host.getGame();
|
||||||
|
|
||||||
if (sa.hasParam("UntilEndOfCombat")) {
|
if (sa.hasParam("UntilEndOfCombat")) {
|
||||||
game.getEndOfCombat().addUntil(untilEOT);
|
game.getEndOfCombat().addUntil(untilEOT);
|
||||||
} else if (sa.hasParam("UntilYourNextUpkeep")) {
|
} else if (sa.hasParam("UntilYourNextUpkeep")) {
|
||||||
game.getUpkeep().addUntil(sa.getActivatingPlayer(), untilEOT);
|
game.getUpkeep().addUntil(sa.getActivatingPlayer(), untilEOT);
|
||||||
|
} else if (sa.hasParam("UntilHostLeavesPlay")) {
|
||||||
|
host.addLeavesPlayCommand(untilEOT);
|
||||||
|
} else if (sa.hasParam("UntilHostLeavesPlayOrEOT")) {
|
||||||
|
host.addLeavesPlayCommand(untilEOT);
|
||||||
|
game.getEndOfTurn().addUntil(untilEOT);
|
||||||
} else if (sa.hasParam("UntilLoseControlOfHost")) {
|
} else if (sa.hasParam("UntilLoseControlOfHost")) {
|
||||||
sa.getHostCard().addLeavesPlayCommand(untilEOT);
|
host.addLeavesPlayCommand(untilEOT);
|
||||||
sa.getHostCard().addChangeControllerCommand(untilEOT);
|
host.addChangeControllerCommand(untilEOT);
|
||||||
|
} else if (sa.hasParam("UntilYourNextTurn")) {
|
||||||
|
game.getCleanup().addUntil(sa.getActivatingPlayer(), untilEOT);
|
||||||
|
} else if (sa.hasParam("UntilUntaps")) {
|
||||||
|
host.addUntapCommand(untilEOT);
|
||||||
} else {
|
} else {
|
||||||
game.getEndOfTurn().addUntil(untilEOT);
|
game.getEndOfTurn().addUntil(untilEOT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
|
|||||||
Reference in New Issue
Block a user