mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
[40K] Implemented Mortarion, Daemon Primarch
This commit is contained in:
parent
2c35f8ad31
commit
f1bd17fbb3
2 changed files with 85 additions and 0 deletions
84
Mage.Sets/src/mage/cards/m/MortarionDaemonPrimarch.java
Normal file
84
Mage.Sets/src/mage/cards/m/MortarionDaemonPrimarch.java
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.AstartesWarriorToken;
|
||||
import mage.players.Player;
|
||||
import mage.util.ManaUtil;
|
||||
import mage.watchers.common.PlayerLostLifeWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MortarionDaemonPrimarch extends CardImpl {
|
||||
|
||||
public MortarionDaemonPrimarch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.DEMON);
|
||||
this.subtype.add(SubType.PRIMARCH);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Primarch of the Death Guard -- At the beginning of your end step, you may pay {X}. If you do, create X 2/2 black Astartes Warrior creature tokens with menace. X can't be greater than the amount of life you lost this turn.
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||
new MortarionDaemonPrimarchEffect(), TargetController.YOU, false
|
||||
).withFlavorWord("Primarch of the Death Guard"));
|
||||
}
|
||||
|
||||
private MortarionDaemonPrimarch(final MortarionDaemonPrimarch card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MortarionDaemonPrimarch copy() {
|
||||
return new MortarionDaemonPrimarch(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MortarionDaemonPrimarchEffect extends OneShotEffect {
|
||||
|
||||
MortarionDaemonPrimarchEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you may pay {X}. If you do, create X 2/2 black Astartes Warrior creature tokens with menace. " +
|
||||
"X can't be greater than the amount of life you lost this turn";
|
||||
}
|
||||
|
||||
private MortarionDaemonPrimarchEffect(final MortarionDaemonPrimarchEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MortarionDaemonPrimarchEffect copy() {
|
||||
return new MortarionDaemonPrimarchEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int lifeLost = game
|
||||
.getState()
|
||||
.getWatcher(PlayerLostLifeWatcher.class)
|
||||
.getLifeLost(source.getControllerId());
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (lifeLost < 1 || player == null) {
|
||||
return false;
|
||||
}
|
||||
int manaPaid = ManaUtil.playerPaysXGenericMana(
|
||||
true, "Mortarion, Daemon Primarch", player, source, game, lifeLost
|
||||
);
|
||||
return manaPaid > 0 && new AstartesWarriorToken().putOntoBattlefield(manaPaid, game, source);
|
||||
}
|
||||
}
|
||||
|
|
@ -161,6 +161,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Memorial to Glory", 283, Rarity.UNCOMMON, mage.cards.m.MemorialToGlory.class));
|
||||
cards.add(new SetCardInfo("Mind Stone", 244, Rarity.UNCOMMON, mage.cards.m.MindStone.class));
|
||||
cards.add(new SetCardInfo("Molten Slagheap", 284, Rarity.UNCOMMON, mage.cards.m.MoltenSlagheap.class));
|
||||
cards.add(new SetCardInfo("Mortarion, Daemon Primarch", 41, Rarity.RARE, mage.cards.m.MortarionDaemonPrimarch.class));
|
||||
cards.add(new SetCardInfo("Mortify", 225, Rarity.UNCOMMON, mage.cards.m.Mortify.class));
|
||||
cards.add(new SetCardInfo("Mountain", 315, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Mutalith Vortex Beast", 134, Rarity.RARE, mage.cards.m.MutalithVortexBeast.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue