mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
[ZNR] Implemented Archon of Emeria
This commit is contained in:
parent
a6163321a4
commit
0c9b7f76eb
2 changed files with 92 additions and 0 deletions
91
Mage.Sets/src/mage/cards/a/ArchonOfEmeria.java
Normal file
91
Mage.Sets/src/mage/cards/a/ArchonOfEmeria.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.CantCastMoreThanOneSpellEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
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 ArchonOfEmeria extends CardImpl {
|
||||
|
||||
public ArchonOfEmeria(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
this.subtype.add(SubType.ARCHON);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Each player can't cast more than one spell each turn.
|
||||
this.addAbility(new SimpleStaticAbility(new CantCastMoreThanOneSpellEffect(TargetController.ANY)));
|
||||
|
||||
// Nonbasic lands your opponents control enter the battlefield tapped.
|
||||
this.addAbility(new SimpleStaticAbility(new ArchonOfEmeriaEffect()));
|
||||
}
|
||||
|
||||
private ArchonOfEmeria(final ArchonOfEmeria card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArchonOfEmeria copy() {
|
||||
return new ArchonOfEmeria(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ArchonOfEmeriaEffect extends ReplacementEffectImpl {
|
||||
|
||||
ArchonOfEmeriaEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Tap);
|
||||
staticText = "nonbasic lands your opponents control enter the battlefield tapped";
|
||||
}
|
||||
|
||||
private ArchonOfEmeriaEffect(final ArchonOfEmeriaEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent target = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
if (target != null) {
|
||||
target.setTapped(true);
|
||||
}
|
||||
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) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
if (permanent != null && permanent.isLand() && !permanent.isBasic()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArchonOfEmeriaEffect copy() {
|
||||
return new ArchonOfEmeriaEffect(this);
|
||||
}
|
||||
}
|
|
@ -95,6 +95,7 @@ public final class ZendikarRising extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Akoum Warrior", 134, Rarity.UNCOMMON, mage.cards.a.AkoumWarrior.class));
|
||||
cards.add(new SetCardInfo("Angelheart Protector", 3, Rarity.COMMON, mage.cards.a.AngelheartProtector.class));
|
||||
cards.add(new SetCardInfo("Anticognition", 45, Rarity.COMMON, mage.cards.a.Anticognition.class));
|
||||
cards.add(new SetCardInfo("Archon of Emeria", 4, Rarity.RARE, mage.cards.a.ArchonOfEmeria.class));
|
||||
cards.add(new SetCardInfo("Archpriest of Iona", 5, Rarity.RARE, mage.cards.a.ArchpriestOfIona.class));
|
||||
cards.add(new SetCardInfo("Ardent Electromancer", 135, Rarity.COMMON, mage.cards.a.ArdentElectromancer.class));
|
||||
cards.add(new SetCardInfo("Ashaya, Soul of the Wild", 179, Rarity.MYTHIC, mage.cards.a.AshayaSoulOfTheWild.class));
|
||||
|
|
Loading…
Reference in a new issue