Commit 0e194d75 authored by Hans Mackowiak's avatar Hans Mackowiak

Merge branch 'cherry-pick-e171e802' into 'master'

Add support for pumping a player UntilLoseControlOfHost

See merge request core-developers/forge!675
parents c67194d5 7e7d8356
......@@ -113,6 +113,13 @@ public class PumpEffect extends SpellAbilityEffect {
private static void applyPump(final SpellAbility sa, final Player p,
final List<String> keywords, final long timestamp) {
final Game game = p.getGame();
final Card host = sa.getHostCard();
//if host is not on the battlefield don't apply
// Suspend should does Affect the Stack
if (sa.hasParam("UntilLoseControlOfHost")
&& !(host.isInPlay() || host.isInZone(ZoneType.Stack))) {
return;
}
p.addChangedKeywords(keywords, ImmutableList.<String>of(), timestamp);
if (!sa.hasParam("Permanent")) {
......@@ -134,6 +141,9 @@ public class PumpEffect extends SpellAbilityEffect {
game.getEndOfCombat().addUntil(untilEOT);
} else if (sa.hasParam("UntilYourNextUpkeep")) {
game.getUpkeep().addUntil(sa.getActivatingPlayer(), untilEOT);
} else if (sa.hasParam("UntilLoseControlOfHost")) {
sa.getHostCard().addLeavesPlayCommand(untilEOT);
sa.getHostCard().addChangeControllerCommand(untilEOT);
} else {
game.getEndOfTurn().addUntil(untilEOT);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment