forked from External/mage
[MKC] Implement Boltbender
This commit is contained in:
parent
aaa082b4cc
commit
bc087bfb68
3 changed files with 60 additions and 4 deletions
49
Mage.Sets/src/mage/cards/b/Boltbender.java
Normal file
49
Mage.Sets/src/mage/cards/b/Boltbender.java
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
|
||||
import mage.abilities.keyword.DisguiseAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetStackObject;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Boltbender extends CardImpl {
|
||||
|
||||
public Boltbender(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
this.subtype.add(SubType.GOBLIN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Disguise {1}{R}
|
||||
this.addAbility(new DisguiseAbility(this, new ManaCostsImpl<>("{1}{R}")));
|
||||
|
||||
// When Boltbender is turned face up, you may choose new targets for any number of other spells and/or abilities.
|
||||
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new ChooseNewTargetsTargetEffect()
|
||||
.setText("you may choose new targets for any number of other spells and/or abilities"));
|
||||
ability.addTarget(new TargetStackObject(0, Integer.MAX_VALUE, StaticFilters.FILTER_SPELL_OR_ABILITY));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private Boltbender(final Boltbender card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boltbender copy() {
|
||||
return new Boltbender(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -46,6 +46,7 @@ public final class MurdersAtKarlovManorCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Black Sun's Zenith", 126, Rarity.RARE, mage.cards.b.BlackSunsZenith.class));
|
||||
cards.add(new SetCardInfo("Bloodthirsty Blade", 225, Rarity.UNCOMMON, mage.cards.b.BloodthirstyBlade.class));
|
||||
cards.add(new SetCardInfo("Bojuka Bog", 250, Rarity.COMMON, mage.cards.b.BojukaBog.class));
|
||||
cards.add(new SetCardInfo("Boltbender", 30, Rarity.RARE, mage.cards.b.Boltbender.class));
|
||||
cards.add(new SetCardInfo("Boros Garrison", 251, Rarity.UNCOMMON, mage.cards.b.BorosGarrison.class));
|
||||
cards.add(new SetCardInfo("Boros Reckoner", 201, Rarity.RARE, mage.cards.b.BorosReckoner.class));
|
||||
cards.add(new SetCardInfo("Brainstorm", 96, Rarity.COMMON, mage.cards.b.Brainstorm.class));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import mage.constants.Outcome;
|
|||
import mage.game.Game;
|
||||
import mage.game.stack.StackObject;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
|
@ -39,11 +41,15 @@ public class ChooseNewTargetsTargetEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
StackObject stackObject = game.getStack().getStackObject(source.getFirstTarget());
|
||||
if (stackObject != null) {
|
||||
return stackObject.chooseNewTargets(game, source.getControllerId(), forceChange, onlyOneTarget, null);
|
||||
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
|
||||
StackObject stackObject = game.getStack().getStackObject(targetId);
|
||||
if (stackObject != null) {
|
||||
stackObject.chooseNewTargets(
|
||||
game, source.getControllerId(), forceChange, onlyOneTarget, null
|
||||
);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue