mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
Added method to SupportAbility class to allow for removal of 'other' text in rule generation
This commit is contained in:
parent
8a3ba6729f
commit
235c5aa86f
2 changed files with 19 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue