package spelldeck; import game.model.AbstractCommandCard; import game.model.Card; import game.model.CardType; import game.model.Command; import game.model.Fighter; import game.model.Game; import game.model.Phase; import game.model.Player; import java.util.ArrayList; public class SkipBattlePhaseCard extends AbstractCommandCard implements Card, Command { protected SkipBattlePhaseCard() { super(CardType.SPELL, "Battle Skipper", "With battle skipper, your opponent must drop the current attack and skip the battle phase."); } @Override public boolean execute(Game game) { Player p = game.getOwner(this); if (game.getPlayer() == p) { p.getUI().print("You can only play this card during your opponent's battle phase after an attack."); return false; } else { game.setAttacking(new ArrayList()); game.setPhase(Phase.RECOVER); game.toGrave(this); printBoth(game, p + " plays Battle Skipper, which causes the current battle phase to end."); return true; } } }