diff --git a/Mage.Sets/src/mage/cards/m/MichonneRuthlessSurvivor.java b/Mage.Sets/src/mage/cards/m/MichonneRuthlessSurvivor.java new file mode 100644 index 00000000000..f418dae1ad6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MichonneRuthlessSurvivor.java @@ -0,0 +1,100 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.EquippedSourceCondition; +import mage.abilities.decorator.ConditionalRequirementEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.token.ZombieToken; + +import java.util.Objects; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MichonneRuthlessSurvivor extends CardImpl { + + public MichonneRuthlessSurvivor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Michonne enters the battlefield, create two Walker tokens. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken(), 2))); + + // As long as Michonne is equipped, she must be blocked if able. + this.addAbility(new SimpleStaticAbility(new ConditionalRequirementEffect( + new MustBeBlockedByAllSourceEffect(), EquippedSourceCondition.instance, + "as long as {this} is equipped, she must be blocked if able" + ))); + + // Whenever Michonne and at least two Zombies attack, she gains indestructible until end of turn. + this.addAbility(new BattalionAbility()); + } + + private MichonneRuthlessSurvivor(final MichonneRuthlessSurvivor card) { + super(card); + } + + @Override + public MichonneRuthlessSurvivor copy() { + return new MichonneRuthlessSurvivor(this); + } +} + +class BattalionAbility extends TriggeredAbilityImpl { + + public BattalionAbility() { + super(Zone.BATTLEFIELD, new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn)); + } + + public BattalionAbility(final BattalionAbility ability) { + super(ability); + } + + @Override + public BattalionAbility copy() { + return new BattalionAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return game + .getCombat() + .getAttackers() + .contains(this.sourceId) + && game + .getCombat() + .getAttackers() + .stream() + .map(game::getPermanent) + .filter(Objects::nonNull) + .filter(permanent -> permanent.hasSubtype(SubType.ZOMBIE, game)) + .count() >= 2; + } + + @Override + public String getRule() { + return "Whenever {this} and at least two Zombies attack, she gains indestructible until end of turn."; + } +} diff --git a/Mage.Sets/src/mage/sets/SecretLairDrop.java b/Mage.Sets/src/mage/sets/SecretLairDrop.java index 2133f6cff1f..aad48f24a09 100644 --- a/Mage.Sets/src/mage/sets/SecretLairDrop.java +++ b/Mage.Sets/src/mage/sets/SecretLairDrop.java @@ -68,6 +68,7 @@ public class SecretLairDrop extends ExpansionSet { cards.add(new SetCardInfo("Lightning Greaves", 99, Rarity.RARE, mage.cards.l.LightningGreaves.class)); cards.add(new SetCardInfo("Marrow-Gnawer", 34, Rarity.RARE, mage.cards.m.MarrowGnawer.class)); cards.add(new SetCardInfo("Meren of Clan Nel Toth", 52, Rarity.MYTHIC, mage.cards.m.MerenOfClanNelToth.class)); + cards.add(new SetCardInfo("Michonne, Ruthless Survivor", 146, Rarity.MYTHIC, mage.cards.m.MichonneRuthlessSurvivor.class)); cards.add(new SetCardInfo("Mirri, Weatherlight Duelist", 26, Rarity.MYTHIC, mage.cards.m.MirriWeatherlightDuelist.class)); cards.add(new SetCardInfo("Mogis, God of Slaughter", 78, Rarity.MYTHIC, mage.cards.m.MogisGodOfSlaughter.class, FULL_ART)); cards.add(new SetCardInfo("Mountain", 66, Rarity.LAND, mage.cards.basiclands.Mountain.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/WalkerToken.java b/Mage/src/main/java/mage/game/permanent/token/WalkerToken.java new file mode 100644 index 00000000000..69ed0501183 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/WalkerToken.java @@ -0,0 +1,29 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class WalkerToken extends TokenImpl { + + public WalkerToken() { + super("Walker", "Walker token"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add(SubType.ZOMBIE); + power = new MageInt(2); + toughness = new MageInt(2); + } + + public WalkerToken(final WalkerToken token) { + super(token); + } + + @Override + public WalkerToken copy() { + return new WalkerToken(this); + } +} diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index ffb0f55a563..a71931787f3 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -179,6 +179,7 @@ Rivals of Ixalan|RivalsOfIxalan| Saviors of Kamigawa|SaviorsOfKamigawa| Scars of Mirrodin|ScarsOfMirrodin| Scourge|Scourge| +Secret Lair Drop|SecretLairDrop| Seventh Edition|SeventhEdition| Shadowmoor|Shadowmoor| Shadows over Innistrad|ShadowsOverInnistrad| diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index f2ef23c0e4c..c87fc52876e 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -180,6 +180,7 @@ Return to Ravnica|RTR| Starter 2000|S00| Starter 1999|S99| Scourge|SCG| +Secret Lair|SLD| Shadowmoor|SHM| Shadows over Innistrad|SOI| Saviors of Kamigawa|SOK|