[40K] Implement Nurgle's Rot (#9632)

This commit is contained in:
PurpleCrowbar 2022-10-08 21:03:20 +01:00 committed by GitHub
parent 181e4e46f8
commit d8b4257d66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package mage.cards.n;
import mage.abilities.Ability;
import mage.abilities.common.DiesAttachedTriggeredAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.PlaguebearerOfNurgleToken;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author PurpleCrowbar
*/
public final class NurglesRot extends CardImpl {
public NurglesRot(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}");
this.subtype.add(SubType.AURA);
// Enchant creature an opponent controls
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
this.addAbility(new EnchantAbility(auraTarget));
// When enchanted creature dies, return Nurgle's Rot to its owner's hand and you create a 1/3 black Demon creature token named Plaguebearer of Nurgle.
Ability ability = new DiesAttachedTriggeredAbility(new ReturnToHandSourceEffect(false, true), "enchanted creature");
ability.addEffect(new CreateTokenEffect(new PlaguebearerOfNurgleToken()).concatBy("and"));
this.addAbility(ability);
}
private NurglesRot(final NurglesRot card) {
super(card);
}
@Override
public NurglesRot copy() {
return new NurglesRot(this);
}
}

View file

@ -171,6 +171,7 @@ public final class Warhammer40000 extends ExpansionSet {
cards.add(new SetCardInfo("New Horizons", 218, Rarity.COMMON, mage.cards.n.NewHorizons.class));
cards.add(new SetCardInfo("Night Scythe", 162, Rarity.UNCOMMON, mage.cards.n.NightScythe.class));
cards.add(new SetCardInfo("Noise Marine", 82, Rarity.UNCOMMON, mage.cards.n.NoiseMarine.class));
cards.add(new SetCardInfo("Nurgle's Rot", 45, Rarity.UNCOMMON, mage.cards.n.NurglesRot.class));
cards.add(new SetCardInfo("Old One Eye", 96, Rarity.RARE, mage.cards.o.OldOneEye.class));
cards.add(new SetCardInfo("Opal Palace", 286, Rarity.COMMON, mage.cards.o.OpalPalace.class));
cards.add(new SetCardInfo("Overgrowth", 219, Rarity.COMMON, mage.cards.o.Overgrowth.class));