mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Changed old constructor to call the new one to prevent code duplication
This commit is contained in:
parent
235c5aa86f
commit
25db5f11eb
1 changed files with 5 additions and 15 deletions
|
@ -19,22 +19,9 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class SupportAbility extends EntersBattlefieldTriggeredAbility {
|
||||
|
||||
public SupportAbility(Card card, int amount) {
|
||||
super(new SupportEffect(card, amount, true));
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
* For enchantments, the text should not include the word "other".
|
||||
* The otherPermanent choice removes the word "other" from rule text creation.
|
||||
*/
|
||||
public SupportAbility(Card card, int amount, boolean otherPermanent) {
|
||||
super(new SupportEffect(card, amount, otherPermanent));
|
||||
|
@ -49,6 +36,9 @@ public class SupportAbility extends EntersBattlefieldTriggeredAbility {
|
|||
}
|
||||
|
||||
|
||||
public SupportAbility(Card card, int amount){ this( card, amount, true); }
|
||||
|
||||
|
||||
public SupportAbility(final SupportAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue