foul-magics/Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility.java
xenohedron cd6c5aa7ac
improve usability of Rebound ability (#11261)
* remove boilerplate template comments

* fix Rebound, now need to choose only once

* fix text: Harmless Assault
2023-10-05 22:03:23 -04:00

41 lines
1.3 KiB
Java

package mage.abilities.common.delayed;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.constants.Duration;
import mage.game.Game;
import mage.game.events.GameEvent;
/**
*
* @author jeffwadsworth
*/
public class AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility extends DelayedTriggeredAbility {
public AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(Effect effect) {
this(effect, Duration.Custom, true);
}
public AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(Effect effect, Duration duration, boolean triggerOnlyOnce) {
super(effect, duration, triggerOnlyOnce);
}
public AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility ability) {
super(ability);
}
@Override
public AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility copy() {
return new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
return event.getPlayerId().equals(this.controllerId);
}
}