mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[DMU] Implemented Sheoldred, the Apocalypse
This commit is contained in:
parent
0abb3be49e
commit
55caa5e4eb
3 changed files with 59 additions and 13 deletions
51
Mage.Sets/src/mage/cards/s/SheoldredTheApocalypse.java
Normal file
51
Mage.Sets/src/mage/cards/s/SheoldredTheApocalypse.java
Normal 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);
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue