forked from External/mage
Replace Overriden getTriggerPhrase() with setTriggerPhrase() usage (#9343)
This commit is contained in:
parent
188e6dd8c1
commit
ebdb6b53a4
406 changed files with 918 additions and 2665 deletions
|
|
@ -9,18 +9,17 @@ import mage.game.events.GameEvent;
|
|||
|
||||
public class AttacksOrBlocksTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
protected String startText = "Whenever";
|
||||
|
||||
public AttacksOrBlocksTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
if (effect instanceof CreateDelayedTriggeredAbilityEffect) {
|
||||
startText = "When";
|
||||
setTriggerPhrase("When {this} attacks or blocks, ");
|
||||
} else {
|
||||
setTriggerPhrase("Whenever {this} attacks or blocks, ");
|
||||
}
|
||||
}
|
||||
|
||||
public AttacksOrBlocksTriggeredAbility(final AttacksOrBlocksTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.startText = ability.startText;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -28,11 +27,6 @@ public class AttacksOrBlocksTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return new AttacksOrBlocksTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTriggerPhrase() {
|
||||
return startText + " {this} attacks or blocks, " ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ATTACKER_DECLARED || event.getType() == GameEvent.EventType.BLOCKER_DECLARED;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue