[OTJ] Implement Rodeo Pyromancers

This commit is contained in:
Susucre 2024-03-30 17:36:52 +01:00
parent a9767b55b7
commit 0d837d3fac
2 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,74 @@
package mage.cards.r;
import mage.MageInt;
import mage.Mana;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.mana.BasicManaEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.watchers.common.SpellsCastWatcher;
import java.util.UUID;
/**
* @author Susucr
*/
public final class RodeoPyromancers extends CardImpl {
public RodeoPyromancers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.MERCENARY);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Whenever you cast your first spell each turn, add {R}{R}.
this.addAbility(new RodeoPyromancersTriggeredAbility());
}
private RodeoPyromancers(final RodeoPyromancers card) {
super(card);
}
@Override
public RodeoPyromancers copy() {
return new RodeoPyromancers(this);
}
}
class RodeoPyromancersTriggeredAbility extends TriggeredAbilityImpl {
RodeoPyromancersTriggeredAbility() {
super(Zone.BATTLEFIELD, new BasicManaEffect(Mana.RedMana(2)));
setTriggerPhrase("Whenever you cast your first spell each turn, ");
}
private RodeoPyromancersTriggeredAbility(final RodeoPyromancersTriggeredAbility ability) {
super(ability);
}
@Override
public RodeoPyromancersTriggeredAbility copy() {
return new RodeoPyromancersTriggeredAbility(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() == 1;
}
return false;
}
}

View file

@ -136,6 +136,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet {
cards.add(new SetCardInfo("Resilient Roadrunner", 141, Rarity.UNCOMMON, mage.cards.r.ResilientRoadrunner.class));
cards.add(new SetCardInfo("Rictus Robber", 102, Rarity.UNCOMMON, mage.cards.r.RictusRobber.class));
cards.add(new SetCardInfo("Rise of the Varmints", 179, Rarity.UNCOMMON, mage.cards.r.RiseOfTheVarmints.class));
cards.add(new SetCardInfo("Rodeo Pyromancers", 143, Rarity.COMMON, mage.cards.r.RodeoPyromancers.class));
cards.add(new SetCardInfo("Rooftop Assassin", 103, Rarity.COMMON, mage.cards.r.RooftopAssassin.class));
cards.add(new SetCardInfo("Roxanne, Starfall Savant", 228, Rarity.RARE, mage.cards.r.RoxanneStarfallSavant.class));
cards.add(new SetCardInfo("Ruthless Lawbringer", 229, Rarity.UNCOMMON, mage.cards.r.RuthlessLawbringer.class));