forked from External/mage
* apply regex to change public copy constructors to protected * cleanup code using now protected constructors * fix manaBuilder weird casting of Mana into ConditionalMana
38 lines
1 KiB
Java
38 lines
1 KiB
Java
|
|
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 BecomesExertSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|
|
|
public BecomesExertSourceTriggeredAbility(Effect effect) {
|
|
super(Zone.BATTLEFIELD, effect, false);
|
|
setTriggerPhrase("When {this} becomes exerted, ");
|
|
}
|
|
|
|
protected BecomesExertSourceTriggeredAbility(final BecomesExertSourceTriggeredAbility ability) {
|
|
super(ability);
|
|
}
|
|
|
|
@Override
|
|
public BecomesExertSourceTriggeredAbility copy() {
|
|
return new BecomesExertSourceTriggeredAbility(this);
|
|
}
|
|
|
|
@Override
|
|
public boolean checkEventType(GameEvent event, Game game) {
|
|
return event.getType() == GameEvent.EventType.BECOMES_EXERTED;
|
|
}
|
|
|
|
@Override
|
|
public boolean checkTrigger(GameEvent event, Game game) {
|
|
return event.getTargetId().equals(this.getSourceId());
|
|
}
|
|
}
|