diff --git a/Mage.Sets/src/mage/cards/a/ArchelosLagoonMystic.java b/Mage.Sets/src/mage/cards/a/ArchelosLagoonMystic.java new file mode 100644 index 00000000000..baed9ca6fca --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/ArchelosLagoonMystic.java @@ -0,0 +1,88 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.EntersTheBattlefieldEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ArchelosLagoonMystic extends CardImpl { + + public ArchelosLagoonMystic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.TURTLE); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // As long as Archelos, Lagoon Mystic is tapped, other permanents enter the battlefield tapped. + this.addAbility(new SimpleStaticAbility(new ArchelosLagoonMysticEffect(true))); + + // As long as Archelos, Lagoon Mystic is untapped, other permanents enter the battlefield untapped. + this.addAbility(new SimpleStaticAbility(new ArchelosLagoonMysticEffect(false))); + } + + private ArchelosLagoonMystic(final ArchelosLagoonMystic card) { + super(card); + } + + @Override + public ArchelosLagoonMystic copy() { + return new ArchelosLagoonMystic(this); + } +} + +class ArchelosLagoonMysticEffect extends ReplacementEffectImpl { + + private final boolean tapped; + + ArchelosLagoonMysticEffect(boolean tapped) { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + this.tapped = tapped; + staticText = "as long as {this} is " + + (tapped ? "" : "un") + "tapped, other permanents enter the battlefield " + + (tapped ? "" : "un") + "tapped"; + } + + private ArchelosLagoonMysticEffect(final ArchelosLagoonMysticEffect effect) { + super(effect); + this.tapped = effect.tapped; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Permanent target = ((EntersTheBattlefieldEvent) event).getTarget(); + if (target != null) { + target.setTapped(tapped); + } + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return !source.getSourceId().equals(((EntersTheBattlefieldEvent) event).getTarget().getId()); + } + + @Override + public ArchelosLagoonMysticEffect copy() { + return new ArchelosLagoonMysticEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegends.java b/Mage.Sets/src/mage/sets/CommanderLegends.java index 3d49f05ee25..9c77d75ebbf 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegends.java +++ b/Mage.Sets/src/mage/sets/CommanderLegends.java @@ -35,6 +35,7 @@ public final class CommanderLegends extends ExpansionSet { cards.add(new SetCardInfo("Ancient Animus", 215, Rarity.COMMON, mage.cards.a.AncientAnimus.class)); cards.add(new SetCardInfo("Apex Devastator", 217, Rarity.MYTHIC, mage.cards.a.ApexDevastator.class)); cards.add(new SetCardInfo("Arcane Signet", 297, Rarity.UNCOMMON, mage.cards.a.ArcaneSignet.class)); + cards.add(new SetCardInfo("Archelos, Lagoon Mystic", 268, Rarity.RARE, mage.cards.a.ArchelosLagoonMystic.class)); cards.add(new SetCardInfo("Archon of Coronation", 9, Rarity.MYTHIC, mage.cards.a.ArchonOfCoronation.class)); cards.add(new SetCardInfo("Armillary Sphere", 298, Rarity.COMMON, mage.cards.a.ArmillarySphere.class)); cards.add(new SetCardInfo("Armix, Filigree Thrasher", 108, Rarity.UNCOMMON, mage.cards.a.ArmixFiligreeThrasher.class));