From a1ef9839bab313cf45236e463ad0cdbbc87893a9 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 5 Feb 2022 10:41:52 -0500 Subject: [PATCH] [NEO] Implemented Cloudsteel Kirin --- .../src/mage/cards/c/CloudsteelKirin.java | 88 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + 2 files changed, 89 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CloudsteelKirin.java diff --git a/Mage.Sets/src/mage/cards/c/CloudsteelKirin.java b/Mage.Sets/src/mage/cards/c/CloudsteelKirin.java new file mode 100644 index 0000000000..63b8ed6f13 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CloudsteelKirin.java @@ -0,0 +1,88 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ReconfigureAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.GameEvent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CloudsteelKirin extends CardImpl { + + public CloudsteelKirin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.EQUIPMENT); + this.subtype.add(SubType.KIRIN); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Equipped creature has flying and "You can't lose the game and your opponents can't win the game." + Ability ability = new SimpleStaticAbility(new GainAbilityAttachedEffect( + FlyingAbility.getInstance(), AttachmentType.EQUIPMENT + )); + ability.addEffect(new GainAbilityAttachedEffect( + new SimpleStaticAbility(new CloudsteelKirinEffect()), AttachmentType.EQUIPMENT + ).setText("and \"You can't lose the game and your opponents can't win the game.\"")); + this.addAbility(ability); + + // Reconfigure {5} + this.addAbility(new ReconfigureAbility("{5}")); + } + + private CloudsteelKirin(final CloudsteelKirin card) { + super(card); + } + + @Override + public CloudsteelKirin copy() { + return new CloudsteelKirin(this); + } +} + +class CloudsteelKirinEffect extends ContinuousRuleModifyingEffectImpl { + + CloudsteelKirinEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit, false, false); + staticText = "You can't lose the game and your opponents can't win the game"; + } + + private CloudsteelKirinEffect(final CloudsteelKirinEffect effect) { + super(effect); + } + + @Override + public CloudsteelKirinEffect copy() { + return new CloudsteelKirinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + switch (event.getType()) { + case WINS: + return game.getOpponents(source.getControllerId()).contains(event.getPlayerId()); + case LOSES: + return source.isControlledBy(event.getPlayerId()); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index 16c1ad2b13..3133bd1814 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -59,6 +59,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Careful Cultivation", 178, Rarity.COMMON, mage.cards.c.CarefulCultivation.class)); cards.add(new SetCardInfo("Circuit Mender", 242, Rarity.UNCOMMON, mage.cards.c.CircuitMender.class)); cards.add(new SetCardInfo("Clawing Torment", 91, Rarity.COMMON, mage.cards.c.ClawingTorment.class)); + cards.add(new SetCardInfo("Cloudsteel Kirin", 8, Rarity.RARE, mage.cards.c.CloudsteelKirin.class)); cards.add(new SetCardInfo("Coiling Stalker", 179, Rarity.COMMON, mage.cards.c.CoilingStalker.class)); cards.add(new SetCardInfo("Colossal Skyturtle", 216, Rarity.UNCOMMON, mage.cards.c.ColossalSkyturtle.class)); cards.add(new SetCardInfo("Covert Technician", 49, Rarity.UNCOMMON, mage.cards.c.CovertTechnician.class));