forked from External/mage
47 lines
1.2 KiB
Java
47 lines
1.2 KiB
Java
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
package mage.abilities.common;
|
|
|
|
import mage.abilities.TriggeredAbilityImpl;
|
|
import mage.abilities.effects.Effect;
|
|
import mage.constants.Zone;
|
|
import mage.game.Game;
|
|
import mage.game.events.GameEvent;
|
|
|
|
/**
|
|
*
|
|
* @author LevelX2
|
|
*/
|
|
public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl {
|
|
|
|
public EndOfCombatTriggeredAbility(Effect effect, boolean optional) {
|
|
super(Zone.BATTLEFIELD, effect, optional);
|
|
}
|
|
|
|
public EndOfCombatTriggeredAbility(final EndOfCombatTriggeredAbility ability) {
|
|
super(ability);
|
|
}
|
|
|
|
@Override
|
|
public EndOfCombatTriggeredAbility copy() {
|
|
return new EndOfCombatTriggeredAbility(this);
|
|
}
|
|
|
|
@Override
|
|
public boolean checkEventType(GameEvent event, Game game) {
|
|
return event.getType() == GameEvent.EventType.END_COMBAT_STEP_PRE;
|
|
}
|
|
|
|
@Override
|
|
public boolean checkTrigger(GameEvent event, Game game) {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public String getRule() {
|
|
return "At end of combat, " + super.getRule();
|
|
}
|
|
}
|