mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[CMR] Implemented Archon of Coronation
This commit is contained in:
parent
b8106cd554
commit
9e22b4395f
2 changed files with 92 additions and 0 deletions
91
Mage.Sets/src/mage/cards/a/ArchonOfCoronation.java
Normal file
91
Mage.Sets/src/mage/cards/a/ArchonOfCoronation.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.BecomesMonarchSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ArchonOfCoronation extends CardImpl {
|
||||
|
||||
public ArchonOfCoronation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
|
||||
|
||||
this.subtype.add(SubType.ARCHON);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Archon of Coronation enters the battlefield, you become the monarch.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect()));
|
||||
|
||||
// As long as you're the monarch, damage doesn't cause you to lose life.
|
||||
this.addAbility(new SimpleStaticAbility(new ArchonOfCoronationEffect()));
|
||||
}
|
||||
|
||||
private ArchonOfCoronation(final ArchonOfCoronation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArchonOfCoronation copy() {
|
||||
return new ArchonOfCoronation(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ArchonOfCoronationEffect extends ReplacementEffectImpl {
|
||||
|
||||
ArchonOfCoronationEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "As long as you're the monarch, damage doesn't cause you to lose life. " +
|
||||
"<i>(When a creature deals combat damage to you, its controller still becomes the monarch.)</i>";
|
||||
}
|
||||
|
||||
private ArchonOfCoronationEffect(final ArchonOfCoronationEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArchonOfCoronationEffect copy() {
|
||||
return new ArchonOfCoronationEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGE_CAUSES_LIFE_LOSS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(event.getPlayerId())
|
||||
&& source.isControlledBy(game.getMonarchId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(0);
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -33,6 +33,7 @@ public final class CommanderLegends extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Amphin Mutineer", 55, Rarity.RARE, mage.cards.a.AmphinMutineer.class));
|
||||
cards.add(new SetCardInfo("Ancestral Blade", 5, Rarity.COMMON, mage.cards.a.AncestralBlade.class));
|
||||
cards.add(new SetCardInfo("Arcane Signet", 297, Rarity.UNCOMMON, mage.cards.a.ArcaneSignet.class));
|
||||
cards.add(new SetCardInfo("Archon of Coronation", 9, Rarity.MYTHIC, mage.cards.a.ArchonOfCoronation.class));
|
||||
cards.add(new SetCardInfo("Aurora Phoenix", 161, Rarity.RARE, mage.cards.a.AuroraPhoenix.class));
|
||||
cards.add(new SetCardInfo("Averna, the Chaos Bloom", 269, Rarity.RARE, mage.cards.a.AvernaTheChaosBloom.class));
|
||||
cards.add(new SetCardInfo("Bladegriff Prototype", 300, Rarity.RARE, mage.cards.b.BladegriffPrototype.class));
|
||||
|
|
Loading…
Reference in a new issue