mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[DFT] Implement Boommobile (#13287)
This commit is contained in:
parent
f112525ae8
commit
cc30159019
2 changed files with 106 additions and 0 deletions
102
Mage.Sets/src/mage/cards/b/Boommobile.java
Normal file
102
Mage.Sets/src/mage/cards/b/Boommobile.java
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.GetXValue;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.effects.mana.AddConditionalManaOfAnyColorEffect;
|
||||
import mage.abilities.effects.mana.ManaEffect;
|
||||
import mage.abilities.keyword.CrewAbility;
|
||||
import mage.abilities.keyword.ExhaustAbility;
|
||||
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.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jackd149
|
||||
*/
|
||||
public final class Boommobile extends CardImpl {
|
||||
|
||||
public Boommobile(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{R}{R}");
|
||||
|
||||
this.subtype.add(SubType.VEHICLE);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// When this Vehicle enters, add four mana of any one color. Spend this mana only to activate abilities.
|
||||
ManaEffect entersEffect = new AddConditionalManaOfAnyColorEffect(4, new BoommobileManaBuilder());
|
||||
entersEffect.setText("add four mana of any one color. Spend this mana only to activate abilities.");
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(entersEffect));
|
||||
|
||||
// Exhaust -- {X}{2}{R}: This vehicle deals X damage to any target. Put a +1/+1 counter on this Vehicle.
|
||||
Ability exhaustAbility = new ExhaustAbility(new DamageTargetEffect(GetXValue.instance), new ManaCostsImpl<>("{X}{2}{R}"));
|
||||
exhaustAbility.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
||||
exhaustAbility.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(exhaustAbility);
|
||||
|
||||
// Crew 2
|
||||
this.addAbility(new CrewAbility(2));
|
||||
}
|
||||
|
||||
private Boommobile(final Boommobile card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boommobile copy() {
|
||||
return new Boommobile(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BoommobileManaBuilder extends ConditionalManaBuilder {
|
||||
|
||||
@Override
|
||||
public ConditionalMana build(Object... options) {
|
||||
return new BoommobileConditionalMana(this.mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Spend this mana only to activate abilities";
|
||||
}
|
||||
}
|
||||
|
||||
class BoommobileConditionalMana extends ConditionalMana {
|
||||
|
||||
BoommobileConditionalMana(Mana mana) {
|
||||
super(mana);
|
||||
staticText = "Spend this mana only to activate abilities";
|
||||
addCondition(new BoommobileManaCondition());
|
||||
}
|
||||
}
|
||||
|
||||
class BoommobileManaCondition extends ManaCondition {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (source != null && !source.isActivated()) {
|
||||
return source.isActivatedAbility();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, UUID originalId, Cost costsToPay) {
|
||||
return apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
@ -41,6 +41,10 @@ public final class Aetherdrift extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Bloodfell Caves", 251, Rarity.COMMON, mage.cards.b.BloodfellCaves.class));
|
||||
cards.add(new SetCardInfo("Bloodghast", 77, Rarity.RARE, mage.cards.b.Bloodghast.class));
|
||||
cards.add(new SetCardInfo("Blossoming Sands", 252, Rarity.COMMON, mage.cards.b.BlossomingSands.class));
|
||||
cards.add(new SetCardInfo("Boommobile", 113, Rarity.RARE, mage.cards.b.Boommobile.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Boommobile", 310, Rarity.RARE, mage.cards.b.Boommobile.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Boommobile", 454, Rarity.RARE, mage.cards.b.Boommobile.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Boommobile", 526, Rarity.RARE, mage.cards.b.Boommobile.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Boom Scholar", 189, Rarity.UNCOMMON, mage.cards.b.BoomScholar.class));
|
||||
cards.add(new SetCardInfo("Boosted Sloop", 190, Rarity.UNCOMMON, mage.cards.b.BoostedSloop.class));
|
||||
cards.add(new SetCardInfo("Bounce Off", 39, Rarity.COMMON, mage.cards.b.BounceOff.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue