From d6277449d5301a3b2a6030804c2c0045ba4c3eaa Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 9 May 2013 09:07:18 +0200 Subject: [PATCH] Added AtTheBeginOfCombatDelayedTriggeredAbility. --- ...eBeginOfCombatDelayedTriggeredAbility.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Mage/src/mage/abilities/common/delayed/AtTheBeginOfCombatDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/AtTheBeginOfCombatDelayedTriggeredAbility.java b/Mage/src/mage/abilities/common/delayed/AtTheBeginOfCombatDelayedTriggeredAbility.java new file mode 100644 index 0000000000..37ae7ac019 --- /dev/null +++ b/Mage/src/mage/abilities/common/delayed/AtTheBeginOfCombatDelayedTriggeredAbility.java @@ -0,0 +1,34 @@ +package mage.abilities.common.delayed; + +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.game.Game; +import mage.game.events.GameEvent; + +public class AtTheBeginOfCombatDelayedTriggeredAbility extends DelayedTriggeredAbility { + public AtTheBeginOfCombatDelayedTriggeredAbility(Effect effect) { + super(effect); + } + + public AtTheBeginOfCombatDelayedTriggeredAbility(AtTheBeginOfCombatDelayedTriggeredAbility ability) { + super(ability); + } + + @Override + public AtTheBeginOfCombatDelayedTriggeredAbility copy() { + return new AtTheBeginOfCombatDelayedTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.COMBAT_PHASE_PRE) { + return true; + } + return false; + } + + @Override + public String getRule() { + return " At the beginning of the next combat, " + modes.getText(); + } +}