mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Force of Rage
This commit is contained in:
parent
6abfb1370f
commit
646113bc86
2 changed files with 96 additions and 0 deletions
95
Mage.Sets/src/mage/cards/f/ForceOfRage.java
Normal file
95
Mage.Sets/src/mage/cards/f/ForceOfRage.java
Normal file
|
@ -0,0 +1,95 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility;
|
||||
import mage.abilities.condition.common.NotMyTurnCondition;
|
||||
import mage.abilities.costs.AlternativeCostSourceAbility;
|
||||
import mage.abilities.costs.common.ExileFromHandCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterOwnedCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.AkoumStonewakerElementalToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ForceOfRage extends CardImpl {
|
||||
|
||||
private static final FilterOwnedCard filter = new FilterOwnedCard("a red card from your hand");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public ForceOfRage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}");
|
||||
|
||||
// If it's not your turn, you may exile a red card from your hand rather than pay this spell's mana cost.
|
||||
this.addAbility(new AlternativeCostSourceAbility(
|
||||
new ExileFromHandCost(new TargetCardInHand(filter)), NotMyTurnCondition.instance,
|
||||
"If it's not your turn, you may exile a red card from " +
|
||||
"your hand rather than pay this spell's mana cost."
|
||||
));
|
||||
|
||||
// Create two 3/1 red Elemental creature tokens with trample and haste. Sacrifice those tokens at the beginning of your next upkeep.
|
||||
this.getSpellAbility().addEffect(new ForceOfRageEffect());
|
||||
}
|
||||
|
||||
private ForceOfRage(final ForceOfRage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForceOfRage copy() {
|
||||
return new ForceOfRage(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ForceOfRageEffect extends OneShotEffect {
|
||||
|
||||
ForceOfRageEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Create two 3/1 red Elemental creature tokens with trample and haste. " +
|
||||
"Sacrifice those tokens at the beginning of your next upkeep.";
|
||||
}
|
||||
|
||||
private ForceOfRageEffect(final ForceOfRageEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForceOfRageEffect copy() {
|
||||
return new ForceOfRageEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Token token = new AkoumStonewakerElementalToken();
|
||||
token.putOntoBattlefield(2, game, source.getSourceId(), source.getControllerId());
|
||||
List<Permanent> permanentList = new ArrayList();
|
||||
for (UUID permId : token.getLastAddedTokenIds()) {
|
||||
permanentList.add(game.getPermanent(permId));
|
||||
}
|
||||
Effect effect = new SacrificeTargetEffect("sacrifice those tokens");
|
||||
effect.setTargetPointer(new FixedTargets(permanentList, game));
|
||||
game.addDelayedTriggeredAbility(new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(effect), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -58,6 +58,7 @@ public final class ModernHorizons extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Flusterstorm", 255, Rarity.RARE, mage.cards.f.Flusterstorm.class));
|
||||
cards.add(new SetCardInfo("Force of Despair", 92, Rarity.RARE, mage.cards.f.ForceOfDespair.class));
|
||||
cards.add(new SetCardInfo("Force of Negation", 52, Rarity.RARE, mage.cards.f.ForceOfNegation.class));
|
||||
cards.add(new SetCardInfo("Force of Rage", 124, Rarity.RARE, mage.cards.f.ForceOfRage.class));
|
||||
cards.add(new SetCardInfo("Force of Vigor", 164, Rarity.RARE, mage.cards.f.ForceOfVigor.class));
|
||||
cards.add(new SetCardInfo("Force of Virtue", 10, Rarity.RARE, mage.cards.f.ForceOfVirtue.class));
|
||||
cards.add(new SetCardInfo("Frostwalk Bastion", 240, Rarity.UNCOMMON, mage.cards.f.FrostwalkBastion.class));
|
||||
|
|
Loading…
Reference in a new issue