mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Implemented Savai Thundermane
This commit is contained in:
parent
7d44fa6a88
commit
28659043ca
2 changed files with 112 additions and 0 deletions
111
Mage.Sets/src/mage/cards/s/SavaiThundermane.java
Normal file
111
Mage.Sets/src/mage/cards/s/SavaiThundermane.java
Normal file
|
@ -0,0 +1,111 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.CycleControllerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.SendOptionUsedEventEffect;
|
||||
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 mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SavaiThundermane extends CardImpl {
|
||||
|
||||
public SavaiThundermane(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}");
|
||||
|
||||
this.subtype.add(SubType.ELEMENTAL);
|
||||
this.subtype.add(SubType.CAT);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever you cycle a card, you may pay {2}. When you do Savai Thundermane deals 2 damage to target creature and you gain 2 life.
|
||||
this.addAbility(new CycleControllerTriggeredAbility(
|
||||
new DoIfCostPaid(
|
||||
new SavaiThundermaneCreateReflexiveTriggerEffect(), new GenericManaCost(2),
|
||||
"Pay {2} to deal 2 damage and gain 2 life?"
|
||||
).setText("you may pay {2}. When you do, {this} deals 2 damage to target creature and you gain 2 life")
|
||||
));
|
||||
}
|
||||
|
||||
private SavaiThundermane(final SavaiThundermane card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SavaiThundermane copy() {
|
||||
return new SavaiThundermane(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SavaiThundermaneCreateReflexiveTriggerEffect extends OneShotEffect {
|
||||
|
||||
SavaiThundermaneCreateReflexiveTriggerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
}
|
||||
|
||||
private SavaiThundermaneCreateReflexiveTriggerEffect(final SavaiThundermaneCreateReflexiveTriggerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SavaiThundermaneCreateReflexiveTriggerEffect copy() {
|
||||
return new SavaiThundermaneCreateReflexiveTriggerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
game.addDelayedTriggeredAbility(new SavaiThundermaneReflexiveTriggeredAbility(), source);
|
||||
return new SendOptionUsedEventEffect().apply(game, source);
|
||||
}
|
||||
}
|
||||
|
||||
class SavaiThundermaneReflexiveTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
SavaiThundermaneReflexiveTriggeredAbility() {
|
||||
super(new DamageTargetEffect(2), Duration.OneUse, true);
|
||||
this.addEffect(new GainLifeEffect(2));
|
||||
this.addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private SavaiThundermaneReflexiveTriggeredAbility(final SavaiThundermaneReflexiveTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SavaiThundermaneReflexiveTriggeredAbility copy() {
|
||||
return new SavaiThundermaneReflexiveTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.OPTION_USED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getPlayerId().equals(this.getControllerId())
|
||||
&& event.getSourceId().equals(this.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "{this} deals 2 damage to target creature and you gain 2 life";
|
||||
}
|
||||
}
|
|
@ -254,6 +254,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sanctuary Smasher", 135, Rarity.UNCOMMON, mage.cards.s.SanctuarySmasher.class));
|
||||
cards.add(new SetCardInfo("Savai Crystal", 239, Rarity.UNCOMMON, mage.cards.s.SavaiCrystal.class));
|
||||
cards.add(new SetCardInfo("Savai Sabertooth", 29, Rarity.COMMON, mage.cards.s.SavaiSabertooth.class));
|
||||
cards.add(new SetCardInfo("Savai Thundermane", 205, Rarity.UNCOMMON, mage.cards.s.SavaiThundermane.class));
|
||||
cards.add(new SetCardInfo("Savai Triome", 253, Rarity.RARE, mage.cards.s.SavaiTriome.class));
|
||||
cards.add(new SetCardInfo("Scoured Barrens", 254, Rarity.COMMON, mage.cards.s.ScouredBarrens.class));
|
||||
cards.add(new SetCardInfo("Sea-Dasher Octopus", 66, Rarity.RARE, mage.cards.s.SeaDasherOctopus.class));
|
||||
|
|
Loading…
Reference in a new issue