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:
Evan Kranzler 2021-07-15 07:46:38 -04:00 committed by GitHub
parent 0a31110164
commit ca80806400
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
398 changed files with 946 additions and 989 deletions

View file

@ -61,9 +61,9 @@ public class AttacksAttachedTriggeredAbility extends TriggeredAbilityImpl {
}
@Override
public String getRule() {
public String getTriggerPhrase() {
StringBuilder sb = new StringBuilder("Whenever ");
sb.append(attachmentType.verb().toLowerCase(Locale.ENGLISH));
return sb.append(" creature attacks, ").append(super.getRule()).toString();
return sb.append(" creature attacks, ").toString();
}
}