[DMU] Implemented Sheoldred, the Apocalypse

This commit is contained in:
Evan Kranzler 2022-08-18 19:05:30 -04:00
parent 0abb3be49e
commit 55caa5e4eb
3 changed files with 59 additions and 13 deletions

View file

@ -0,0 +1,51 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.common.DrawCardControllerTriggeredAbility;
import mage.abilities.common.DrawCardOpponentTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SheoldredTheApocalypse extends CardImpl {
public SheoldredTheApocalypse(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.PRAETOR);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// Whenever you draw a card, you gain 2 life.
this.addAbility(new DrawCardControllerTriggeredAbility(new GainLifeEffect(2), false));
// Whenever an opponent draws a card, they lose 2 life.
this.addAbility(new DrawCardOpponentTriggeredAbility(
new LoseLifeTargetEffect(2).setText("they lose 2 life"), false, true
));
}
private SheoldredTheApocalypse(final SheoldredTheApocalypse card) {
super(card);
}
@Override
public SheoldredTheApocalypse copy() {
return new SheoldredTheApocalypse(this);
}
}

View file

@ -43,6 +43,7 @@ public final class DominariaUnited extends ExpansionSet {
cards.add(new SetCardInfo("Plains", 277, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Resolute Reinforcements", 29, Rarity.UNCOMMON, mage.cards.r.ResoluteReinforcements.class));
cards.add(new SetCardInfo("Shalai's Acolyte", 33, Rarity.UNCOMMON, mage.cards.s.ShalaisAcolyte.class));
cards.add(new SetCardInfo("Sheoldred, the Apocalypse", 107, Rarity.MYTHIC, mage.cards.s.SheoldredTheApocalypse.class));
cards.add(new SetCardInfo("Shivan Devastator", 143, Rarity.MYTHIC, mage.cards.s.ShivanDevastator.class));
cards.add(new SetCardInfo("Shivan Reef", 255, Rarity.RARE, mage.cards.s.ShivanReef.class));
cards.add(new SetCardInfo("Sulfurous Springs", 256, Rarity.RARE, mage.cards.s.SulfurousSprings.class));

View file

@ -1,5 +1,3 @@
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
@ -10,13 +8,11 @@ import mage.game.events.GameEvent;
import mage.target.targetpointer.FixedTarget;
/**
*
* @author LevelX2
*/
public class DrawCardOpponentTriggeredAbility extends TriggeredAbilityImpl {
boolean setTargetPointer;
private final boolean setTargetPointer;
public DrawCardOpponentTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) {
super(Zone.BATTLEFIELD, effect, optional);
@ -41,14 +37,12 @@ public class DrawCardOpponentTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (game.getPlayer(this.getControllerId()).hasOpponent(event.getPlayerId(), game)) {
if (setTargetPointer) {
for (Effect effect:this.getEffects()) {
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
}
}
return true;
if (!game.getPlayer(this.getControllerId()).hasOpponent(event.getPlayerId(), game)) {
return false;
}
return false;
if (setTargetPointer) {
this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId()));
}
return true;
}
}