Merge pull request #6539 from etpalmer63/TogetherFixTwo

Added method to SupportAbility class to allow for removal of 'other' …
This commit is contained in:
Oleg Agafonov 2020-05-29 07:09:46 +02:00 committed by GitHub
commit 2b448cea6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -41,7 +41,7 @@ public final class TogetherForever extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}{W}");
// When Together Forever enters the battlefield, support 2. (Put a +1/+1 counter on each of up to two other target creatures.)
this.addAbility(new SupportAbility(this, 2));
this.addAbility(new SupportAbility(this, 2, false));
// {1}: Choose target creature with a counter on it. When that creature dies this turn, return that card to its owner's hand.
Ability ability = new SimpleActivatedAbility(new TogetherForeverEffect(), new GenericManaCost(1));

View file

@ -19,8 +19,12 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class SupportAbility extends EntersBattlefieldTriggeredAbility {
public SupportAbility(Card card, int amount) {
super(new SupportEffect(card, amount, true));
/*
* 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));
if (!card.isInstant() && !card.isSorcery()) {
FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures");
if (card.isCreature()) {
@ -31,6 +35,10 @@ public class SupportAbility extends EntersBattlefieldTriggeredAbility {
}
}
public SupportAbility(Card card, int amount){ this( card, amount, true); }
public SupportAbility(final SupportAbility ability) {
super(ability);
}