forked from External/mage
[MH2] Implemented Captain Ripley Vance (#7872)
This commit is contained in:
parent
ce3f69c5d9
commit
f7c3d15ed2
2 changed files with 86 additions and 0 deletions
85
Mage.Sets/src/mage/cards/c/CaptainRipleyVance.java
Normal file
85
Mage.Sets/src/mage/cards/c/CaptainRipleyVance.java
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
import mage.watchers.common.SpellsCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class CaptainRipleyVance extends CardImpl {
|
||||
|
||||
public CaptainRipleyVance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.PIRATE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever you cast your third spell each turn, put a +1/+1 counter on Captain Ripley Vance, then it deals damage equal to its power to any target.
|
||||
this.addAbility(new CaptainRipleyVanceTriggeredAbility(), new SpellsCastWatcher());
|
||||
}
|
||||
|
||||
private CaptainRipleyVance(final CaptainRipleyVance card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CaptainRipleyVance copy() {
|
||||
return new CaptainRipleyVance(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CaptainRipleyVanceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public CaptainRipleyVanceTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
||||
addEffect(new DamageTargetEffect(new SourcePermanentPowerCount()).setText("it deals damage equal to its power to any target").concatBy(", then"));
|
||||
addTarget(new TargetAnyTarget());
|
||||
}
|
||||
|
||||
private CaptainRipleyVanceTriggeredAbility(final CaptainRipleyVanceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CaptainRipleyVanceTriggeredAbility copy() {
|
||||
return new CaptainRipleyVanceTriggeredAbility(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 (event.getPlayerId().equals(this.getControllerId())) {
|
||||
SpellsCastWatcher watcher = game.getState().getWatcher(SpellsCastWatcher.class);
|
||||
return watcher != null && watcher.getSpellsCastThisTurn(this.getControllerId()).size() == 3;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you cast your third spell each turn, " + super.getRule();
|
||||
}
|
||||
}
|
||||
|
|
@ -48,6 +48,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Breya's Apprentice", 117, Rarity.RARE, mage.cards.b.BreyasApprentice.class));
|
||||
cards.add(new SetCardInfo("Cabal Coffers", 301, Rarity.MYTHIC, mage.cards.c.CabalCoffers.class));
|
||||
cards.add(new SetCardInfo("Calibrated Blast", 118, Rarity.RARE, mage.cards.c.CalibratedBlast.class));
|
||||
cards.add(new SetCardInfo("Captain Ripley Vance", 119, Rarity.UNCOMMON, mage.cards.c.CaptainRipleyVance.class));
|
||||
cards.add(new SetCardInfo("Chainer, Nightmare Adept", 289, Rarity.RARE, mage.cards.c.ChainerNightmareAdept.class));
|
||||
cards.add(new SetCardInfo("Chance Encounter", 277, Rarity.RARE, mage.cards.c.ChanceEncounter.class));
|
||||
cards.add(new SetCardInfo("Chatterstorm", 152, Rarity.COMMON, mage.cards.c.Chatterstorm.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue