forked from External/mage
Reworking triggered ability text generation to allow for ability words and flavor words to be added more easily (#8010)
* refactor all instances of getRule in triggered abilities using new getTriggerPrefix method * updated triggered ability rules generation * renamed method * fixed a test failure * some more refactoring * simplified some instances of ability word usage
This commit is contained in:
parent
0a31110164
commit
ca80806400
398 changed files with 946 additions and 989 deletions
|
|
@ -2,15 +2,16 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
* FAQ 2013/01/11
|
||||
*
|
||||
* <p>
|
||||
* Battalion is an ability word that appears in italics at the beginning of abilities
|
||||
* that trigger whenever you attack with that creature and at least two other
|
||||
* creatures. (An ability word has no rules meaning.)
|
||||
|
|
@ -23,6 +24,7 @@ public class BattalionAbility extends TriggeredAbilityImpl {
|
|||
|
||||
public BattalionAbility(Effect effect) {
|
||||
super(Zone.BATTLEFIELD, effect);
|
||||
this.setAbilityWord(AbilityWord.BATTALION);
|
||||
}
|
||||
|
||||
public BattalionAbility(final BattalionAbility ability) {
|
||||
|
|
@ -45,8 +47,8 @@ public class BattalionAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return new StringBuilder("<i>Battalion</i> — Whenever {this} and at least two other creatures attack, ").append(super.getRule()).toString() ;
|
||||
public String getTriggerPhrase() {
|
||||
return "Whenever {this} and at least two other creatures attack, ";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue