mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
[DMU] Implemented Volshe Tideturner
This commit is contained in:
parent
6ed0b523a7
commit
71aa4c6b08
2 changed files with 93 additions and 0 deletions
92
Mage.Sets/src/mage/cards/v/VolsheTideturner.java
Normal file
92
Mage.Sets/src/mage/cards/v/VolsheTideturner.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.mana.ConditionalColoredManaAbility;
|
||||
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
||||
import mage.abilities.mana.conditional.ManaCondition;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class VolsheTideturner extends CardImpl {
|
||||
|
||||
public VolsheTideturner(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
|
||||
this.subtype.add(SubType.MERFOLK);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {T}: Add {U}. Spend this mana only to cast an instant or sorcery spell or a kicked spell.
|
||||
this.addAbility(new ConditionalColoredManaAbility(
|
||||
new TapSourceCost(), Mana.BlueMana(1), new VolsheTideturnerManaBuilder()
|
||||
));
|
||||
}
|
||||
|
||||
private VolsheTideturner(final VolsheTideturner card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VolsheTideturner copy() {
|
||||
return new VolsheTideturner(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VolsheTideturnerManaBuilder extends ConditionalManaBuilder {
|
||||
|
||||
@Override
|
||||
public ConditionalMana build(Object... options) {
|
||||
return new VolsheTideturnerConditionalMana(this.mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Spend this mana only to cast an instant or sorcery spell or a kicked spell.";
|
||||
}
|
||||
}
|
||||
|
||||
class VolsheTideturnerConditionalMana extends ConditionalMana {
|
||||
|
||||
public VolsheTideturnerConditionalMana(Mana mana) {
|
||||
super(mana);
|
||||
addCondition(new VolsheTideturnerCondition());
|
||||
}
|
||||
}
|
||||
|
||||
class VolsheTideturnerCondition extends ManaCondition implements Condition {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (KickedCondition.ONCE.apply(game, source)) {
|
||||
return true;
|
||||
}
|
||||
if (!(source instanceof SpellAbility)) {
|
||||
return false;
|
||||
}
|
||||
MageObject object = game.getObject(source);
|
||||
return object != null && object.isInstantOrSorcery(game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, UUID originalId, Cost costsToPay) {
|
||||
return apply(game, source);
|
||||
}
|
||||
}
|
|
@ -237,6 +237,7 @@ public final class DominariaUnited extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Voda Sea Scavenger", 74, Rarity.COMMON, mage.cards.v.VodaSeaScavenger.class));
|
||||
cards.add(new SetCardInfo("Vodalian Hexcatcher", 75, Rarity.RARE, mage.cards.v.VodalianHexcatcher.class));
|
||||
cards.add(new SetCardInfo("Vodalian Mindsinger", 76, Rarity.RARE, mage.cards.v.VodalianMindsinger.class));
|
||||
cards.add(new SetCardInfo("Volshe Tideturner", 77, Rarity.COMMON, mage.cards.v.VolsheTideturner.class));
|
||||
cards.add(new SetCardInfo("Walking Bulwark", 241, Rarity.UNCOMMON, mage.cards.w.WalkingBulwark.class));
|
||||
cards.add(new SetCardInfo("Wingmantle Chaplain", 39, Rarity.UNCOMMON, mage.cards.w.WingmantleChaplain.class));
|
||||
cards.add(new SetCardInfo("Wooded Ridgeline", 260, Rarity.COMMON, mage.cards.w.WoodedRidgeline.class));
|
||||
|
|
Loading…
Reference in a new issue