mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[MKM] Implement Mistway Spy
This commit is contained in:
parent
2205dd61c5
commit
72b01f282c
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/m/MistwaySpy.java
Normal file
83
Mage.Sets/src/mage/cards/m/MistwaySpy.java
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.keyword.InvestigateEffect;
|
||||
import mage.abilities.keyword.DisguiseAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MistwaySpy extends CardImpl {
|
||||
|
||||
public MistwaySpy(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
||||
|
||||
this.subtype.add(SubType.MERFOLK);
|
||||
this.subtype.add(SubType.DETECTIVE);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Disguise {1}{U}
|
||||
this.addAbility(new DisguiseAbility(this, new ManaCostsImpl<>("{1}{U}")));
|
||||
|
||||
// When Mistway Spy is turned face up, until end of turn, whenever a creature you control deals combat damage to a player, investigate.
|
||||
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(
|
||||
new CreateDelayedTriggeredAbilityEffect(new MistwaySpyTriggeredAbility())
|
||||
.setText("until end of turn, whenever a creature you control deals combat damage to a player, investigate")
|
||||
));
|
||||
}
|
||||
|
||||
private MistwaySpy(final MistwaySpy card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MistwaySpy copy() {
|
||||
return new MistwaySpy(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MistwaySpyTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
MistwaySpyTriggeredAbility() {
|
||||
super(new InvestigateEffect(), Duration.EndOfTurn, false, false);
|
||||
setTriggerPhrase("Whenever a creature you control deals combat damage to a player, ");
|
||||
}
|
||||
|
||||
private MistwaySpyTriggeredAbility(final MistwaySpyTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MistwaySpyTriggeredAbility copy() {
|
||||
return new MistwaySpyTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return ((DamagedEvent) event).isCombatDamage() && isControlledBy(game.getControllerId(event.getSourceId()));
|
||||
}
|
||||
}
|
||||
|
|
@ -119,6 +119,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Massacre Girl, Known Killer", 94, Rarity.MYTHIC, mage.cards.m.MassacreGirlKnownKiller.class));
|
||||
cards.add(new SetCardInfo("Meddling Youths", 219, Rarity.UNCOMMON, mage.cards.m.MeddlingYouths.class));
|
||||
cards.add(new SetCardInfo("Meticulous Archive", 264, Rarity.RARE, mage.cards.m.MeticulousArchive.class));
|
||||
cards.add(new SetCardInfo("Mistway Spy", 65, Rarity.UNCOMMON, mage.cards.m.MistwaySpy.class));
|
||||
cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Murder", 95, Rarity.COMMON, mage.cards.m.Murder.class));
|
||||
cards.add(new SetCardInfo("Museum Nightwatch", 25, Rarity.COMMON, mage.cards.m.MuseumNightwatch.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue