Implement Brazen Cannonade, and new UntilEndOfNextCombatStep duration (#10047)

This commit is contained in:
Sean Walsh 2023-04-10 19:36:21 -05:00 committed by GitHub
parent f1fdfc2c70
commit 7db278bdf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 91 additions and 0 deletions

View file

@ -228,6 +228,12 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
return EndStepCountWatcher.getCount(startingControllerId, game) > effectStartingEndStep;
}
public boolean isYourNextEndCombatStep(Game game) {
return effectStartingOnTurn < game.getTurnNum()
&& game.isActivePlayer(startingControllerId)
&& game.getPhase().getType() == TurnPhase.POSTCOMBAT_MAIN;
}
@Override
public boolean isInactive(Ability source, Game game) {
// YOUR turn checks
@ -237,6 +243,7 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
case UntilYourNextTurn:
case UntilEndOfYourNextTurn:
case UntilYourNextEndStep:
case UntilYourNextEndCombatStep:
break;
default:
return false;
@ -278,6 +285,12 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
if (player != null && player.isInGame()) {
return this.isYourNextEndStep(game);
}
break;
case UntilYourNextEndCombatStep:
if (player != null && player.isInGame()) {
return this.isYourNextEndCombatStep(game);
}
break;
}
return canDelete;