Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions Mage.Sets/src/mage/cards/e/EmeritusOfConflict.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package mage.cards.e;

import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.target.common.TargetAnyTarget;
import mage.watchers.common.SpellsCastWatcher;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.BecomePreparedSourceEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardSetInfo;
import mage.cards.PrepareCard;
import mage.constants.CardType;

/**
*
* @author muz
*/
public final class EmeritusOfConflict extends PrepareCard {

public EmeritusOfConflict(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}", "Lightning Bolt", CardType.INSTANT, "{R}");

this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

// First strike
this.addAbility(FirstStrikeAbility.getInstance());

// Whenever you cast your third spell each turn, this creature becomes prepared.
this.addAbility(new EmeritusOfConflictTriggeredAbility());

// Lightning Bolt
// Instant {R}
// Lightning Bolt deals 3 damage to any target.
this.getSpellCard().getSpellAbility().addEffect(new DamageTargetEffect(3));
this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget());
}

private EmeritusOfConflict(final EmeritusOfConflict card) {
super(card);
}

@Override
public EmeritusOfConflict copy() {
return new EmeritusOfConflict(this);
}
}

class EmeritusOfConflictTriggeredAbility extends TriggeredAbilityImpl {

public EmeritusOfConflictTriggeredAbility() {
super(Zone.BATTLEFIELD, new BecomePreparedSourceEffect());
setTriggerPhrase("Whenever you cast your third spell each turn, ");
}

private EmeritusOfConflictTriggeredAbility(final EmeritusOfConflictTriggeredAbility ability) {
super(ability);
}

@Override
public EmeritusOfConflictTriggeredAbility copy() {
return new EmeritusOfConflictTriggeredAbility(this);
}

@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.SPELL_CAST;
}

@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (this.isControlledBy(event.getPlayerId())) {
SpellsCastWatcher watcher = game.getState().getWatcher(SpellsCastWatcher.class);
return watcher != null && watcher.getSpellsCastThisTurn(this.getControllerId()).size() == 3;
}
return false;
}
}
2 changes: 2 additions & 0 deletions Mage.Sets/src/mage/sets/SecretsOfStrixhaven.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ private SecretsOfStrixhaven() {
cards.add(new SetCardInfo("Embrace the Paradox", 186, Rarity.COMMON, mage.cards.e.EmbraceTheParadox.class));
cards.add(new SetCardInfo("Emeritus of Abundance", 145, Rarity.MYTHIC, mage.cards.e.EmeritusOfAbundance.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Emeritus of Abundance", 339, Rarity.MYTHIC, mage.cards.e.EmeritusOfAbundance.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Emeritus of Conflict", 113, Rarity.MYTHIC, mage.cards.e.EmeritusOfConflict.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Emeritus of Conflict", 332, Rarity.MYTHIC, mage.cards.e.EmeritusOfConflict.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Emeritus of Ideation", 306, Rarity.MYTHIC, mage.cards.e.EmeritusOfIdeation.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Emeritus of Ideation", 315, Rarity.MYTHIC, mage.cards.e.EmeritusOfIdeation.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Emeritus of Ideation", 45, Rarity.MYTHIC, mage.cards.e.EmeritusOfIdeation.class, NON_FULL_USE_VARIOUS));
Expand Down
Loading