diff --git a/Mage.Sets/src/mage/cards/s/SetessanChampion.java b/Mage.Sets/src/mage/cards/s/SetessanChampion.java new file mode 100644 index 00000000000..07657fc7424 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SetessanChampion.java @@ -0,0 +1,45 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.abilityword.ConstellationAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SetessanChampion extends CardImpl { + + public SetessanChampion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Constellation — Whenever an enchantment enters the battlefield under your control, put a +1/+1 counter on Setessan Champion and draw a card. + Ability ability = new ConstellationAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, false + ); + ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy("and")); + this.addAbility(ability); + } + + private SetessanChampion(final SetessanChampion card) { + super(card); + } + + @Override + public SetessanChampion copy() { + return new SetessanChampion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index 6bce93567a8..3ede81efd4e 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -32,6 +32,7 @@ public final class TherosBeyondDeath extends ExpansionSet { cards.add(new SetCardInfo("Klothys's Design", 176, Rarity.UNCOMMON, mage.cards.k.KlothyssDesign.class)); cards.add(new SetCardInfo("Mountain", 253, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Setessan Champion", 198, Rarity.RARE, mage.cards.s.SetessanChampion.class)); cards.add(new SetCardInfo("Swamp", 252, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); } } diff --git a/Mage/src/main/java/mage/abilities/abilityword/ConstellationAbility.java b/Mage/src/main/java/mage/abilities/abilityword/ConstellationAbility.java index f646dcaa880..5af021988bf 100644 --- a/Mage/src/main/java/mage/abilities/abilityword/ConstellationAbility.java +++ b/Mage/src/main/java/mage/abilities/abilityword/ConstellationAbility.java @@ -12,22 +12,29 @@ import mage.game.permanent.Permanent; /** * Constellation * - * * @author LevelX2 */ public class ConstellationAbility extends TriggeredAbilityImpl { + private final boolean thisOr; + public ConstellationAbility(Effect effect) { this(effect, false); } public ConstellationAbility(Effect effect, boolean optional) { + this(effect, optional, true); + } + + public ConstellationAbility(Effect effect, boolean optional, boolean thisOr) { super(Zone.BATTLEFIELD, effect, optional); + this.thisOr = thisOr; } public ConstellationAbility(final ConstellationAbility ability) { super(ability); + this.thisOr = ability.thisOr; } @Override @@ -42,17 +49,17 @@ public class ConstellationAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getPlayerId().equals(this.getControllerId())) { - Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.isEnchantment()) { - return true; - } + if (!event.getPlayerId().equals(this.getControllerId())) { + return false; } - return false; + Permanent permanent = game.getPermanent(event.getTargetId()); + return permanent != null && permanent.isEnchantment(); } @Override public String getRule() { - return new StringBuilder("Constellation — Whenever {this} or another enchantment enters the battlefield under your control, ").append(super.getRule()).toString(); + return "Constellation — Whenever " + + (thisOr ? "{this} or another" : "an") + + " enchantment enters the battlefield under your control, " + super.getRule(); } }