mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Mask of Immolation
This commit is contained in:
parent
e9cc7d0338
commit
d5c7fbfd0f
3 changed files with 90 additions and 1 deletions
88
Mage.Sets/src/mage/cards/m/MaskOfImmolation.java
Normal file
88
Mage.Sets/src/mage/cards/m/MaskOfImmolation.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.YoungPyromancerElementalToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MaskOfImmolation extends CardImpl {
|
||||
|
||||
public MaskOfImmolation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Mask of Immolation enters the battlefield, create a 1/1 red Elemental creature token, then attach Mask of Immolation to it.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new MaskOfImmolationEffect()));
|
||||
|
||||
// Equipped creature has "Sacrifice this creature: It deals 1 damage to any target."
|
||||
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(1), new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
|
||||
ability, AttachmentType.EQUIPMENT
|
||||
).setText("Equipped creature has \"Sacrifice this creature: It deals 1 damage to any target.\"")));
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(2));
|
||||
}
|
||||
|
||||
private MaskOfImmolation(final MaskOfImmolation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaskOfImmolation copy() {
|
||||
return new MaskOfImmolation(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MaskOfImmolationEffect extends CreateTokenEffect {
|
||||
|
||||
MaskOfImmolationEffect() {
|
||||
super(new YoungPyromancerElementalToken());
|
||||
staticText = "create a 1/1 red Elemental creature token, then attach {this} to it.";
|
||||
}
|
||||
|
||||
private MaskOfImmolationEffect(final MaskOfImmolationEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null || !super.apply(game, source)) {
|
||||
return false;
|
||||
}
|
||||
Permanent p = game.getPermanent(this.getLastAddedTokenId());
|
||||
if (p == null) {
|
||||
return false;
|
||||
}
|
||||
p.addAttachment(source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaskOfImmolationEffect copy() {
|
||||
return new MaskOfImmolationEffect(this);
|
||||
}
|
||||
}
|
|
@ -68,7 +68,7 @@ class WolfridersSaddleEffect extends CreateTokenEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null == !super.apply(game, source)) {
|
||||
if (controller == null || !super.apply(game, source)) {
|
||||
return false;
|
||||
}
|
||||
Permanent p = game.getPermanent(this.getLastAddedTokenId());
|
||||
|
|
|
@ -100,6 +100,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Loxodon Lifechanter", 27, Rarity.RARE, mage.cards.l.LoxodonLifechanter.class));
|
||||
cards.add(new SetCardInfo("Loyal Pegasus", 28, Rarity.UNCOMMON, mage.cards.l.LoyalPegasus.class));
|
||||
cards.add(new SetCardInfo("Manifold Key", 230, Rarity.UNCOMMON, mage.cards.m.ManifoldKey.class));
|
||||
cards.add(new SetCardInfo("Mask of Immolation", 151, Rarity.UNCOMMON, mage.cards.m.MaskOfImmolation.class));
|
||||
cards.add(new SetCardInfo("Moat Piranhas", 67, Rarity.COMMON, mage.cards.m.MoatPiranhas.class));
|
||||
cards.add(new SetCardInfo("Moldervine Reclamation", 214, Rarity.UNCOMMON, mage.cards.m.MoldervineReclamation.class));
|
||||
cards.add(new SetCardInfo("Mu Yanling, Sky Dancer", 68, Rarity.MYTHIC, mage.cards.m.MuYanlingSkyDancer.class));
|
||||
|
|
Loading…
Reference in a new issue