mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Support - Fixed rule text generation.
This commit is contained in:
parent
47c79fce8e
commit
1d98f78815
10 changed files with 20 additions and 25 deletions
|
@ -56,7 +56,7 @@ public class JoragaAuxiliary extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// {4}{G}{W}: Support 2.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SupportEffect(this, 2), new ManaCostsImpl("{4}{G}{W}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SupportEffect(this, 2, true), new ManaCostsImpl("{4}{G}{W}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 2, new FilterCreaturePermanent("target creatures"), false));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class LeadByExample extends CardImpl {
|
|||
this.expansionSetCode = "OGW";
|
||||
|
||||
// Support 2.
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2));
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2, false));
|
||||
}
|
||||
|
||||
public LeadByExample(final LeadByExample card) {
|
||||
|
|
|
@ -59,7 +59,7 @@ public class NissasJudgment extends CardImpl {
|
|||
this.expansionSetCode = "OGW";
|
||||
|
||||
// Support 2.
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2));
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2, false));
|
||||
|
||||
// Choose up to one target creature an opponent controls. Each creature you control with a +1/+1 counter on it deals damage equal to its power to that creature.
|
||||
Effect effect = new NissasJudgmentEffect();
|
||||
|
|
|
@ -52,7 +52,7 @@ public class PressIntoService extends CardImpl {
|
|||
this.expansionSetCode = "OGW";
|
||||
|
||||
// Support 2.
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2));
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2, false));
|
||||
|
||||
// Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
|
|
@ -52,7 +52,7 @@ public class SaddlebackLagac extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// When Saddleback Lagac enters the battlefield, support 2.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new SupportEffect(this, 2), false);
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new SupportEffect(this, 2, true), false);
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 2, new FilterCreaturePermanent("target creatures"), false));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ShoulderToShoulder extends CardImpl {
|
|||
this.expansionSetCode = "OGW";
|
||||
|
||||
// Support 2.
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2));
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2, false));
|
||||
|
||||
// Draw a card.
|
||||
getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
|
|
|
@ -54,7 +54,7 @@ public class UnityOfPurpose extends CardImpl {
|
|||
this.expansionSetCode = "OGW";
|
||||
|
||||
// Support 2.
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2));
|
||||
getSpellAbility().addEffect(new SupportEffect(this, 2, false));
|
||||
|
||||
// Untap each creature you control with a +1/+1 counter on it.
|
||||
this.getSpellAbility().addEffect(new UntapAllControllerEffect(filter, "Untap each creature you control with a +1/+1 counter on it"));
|
||||
|
|
|
@ -28,15 +28,15 @@
|
|||
package mage.sets.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
|
@ -62,6 +62,7 @@ public class SeaGateLoremaster extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {T}: Draw a card for each Ally you control.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filter)),
|
||||
new TapSourceCost()));
|
||||
|
|
|
@ -44,22 +44,16 @@ import mage.util.CardUtil;
|
|||
public class SupportEffect extends AddCountersTargetEffect {
|
||||
|
||||
private final DynamicValue amountSupportTargets;
|
||||
private boolean otherPermanent;
|
||||
private final boolean otherPermanent;
|
||||
|
||||
public SupportEffect(Card card, int amount) {
|
||||
this(new StaticValue(amount));
|
||||
if (card.getCardType().contains(CardType.INSTANT) || card.getCardType().contains(CardType.SORCERY)) {
|
||||
otherPermanent = false;
|
||||
card.getSpellAbility().addTarget(new TargetCreaturePermanent(0, amount, new FilterCreaturePermanent("target creatures"), false));
|
||||
} else {
|
||||
otherPermanent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public SupportEffect(DynamicValue amount) {
|
||||
public SupportEffect(Card card, int amount, boolean otherPermanent) {
|
||||
super(CounterType.P1P1.createInstance(0), new StaticValue(1));
|
||||
this.amountSupportTargets = amount;
|
||||
this.staticText = setText();
|
||||
this.amountSupportTargets = new StaticValue(amount);
|
||||
this.otherPermanent = otherPermanent;
|
||||
if (card.getCardType().contains(CardType.INSTANT) || card.getCardType().contains(CardType.SORCERY)) {
|
||||
card.getSpellAbility().addTarget(new TargetCreaturePermanent(0, amount, new FilterCreaturePermanent("target creatures"), false));
|
||||
}
|
||||
staticText = setText();
|
||||
}
|
||||
|
||||
public SupportEffect(final SupportEffect effect) {
|
||||
|
|
|
@ -42,7 +42,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class SupportAbility extends EntersBattlefieldTriggeredAbility {
|
||||
|
||||
public SupportAbility(Card card, int amount) {
|
||||
super(new SupportEffect(card, amount), false);
|
||||
super(new SupportEffect(card, amount, true));
|
||||
if (!card.getCardType().contains(CardType.INSTANT) && !card.getCardType().contains(CardType.SORCERY)) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures");
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
|
|
Loading…
Reference in a new issue