Added method to SupportAbility class to allow for removal of 'other' text in rule generation

This commit is contained in:
etpalmer63 2020-05-11 10:52:34 -07:00
parent 8a3ba6729f
commit 235c5aa86f
2 changed files with 19 additions and 1 deletions

View file

@ -31,6 +31,24 @@ public class SupportAbility extends EntersBattlefieldTriggeredAbility {
}
}
/*
* For enchanments, the text should not include the word "other". This method
* allows the otherPermanent choice to be selected in the call to SupportAbility
* and removes the "other" text from rule creation.
*/
public SupportAbility(Card card, int amount, boolean otherPermanent) {
super(new SupportEffect(card, amount, otherPermanent));
if (!card.isInstant() && !card.isSorcery()) {
FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures");
if (card.isCreature()) {
filter.add(AnotherPredicate.instance);
filter.setMessage("other target creatures");
}
addTarget(new TargetCreaturePermanent(0, amount, filter, false));
}
}
public SupportAbility(final SupportAbility ability) {
super(ability);
}