mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 20:29:19 -08:00
more work at Kicker - now we shall use special KickerManaCost for it
This commit is contained in:
parent
0491c34005
commit
8dfd3bfc9d
6 changed files with 43 additions and 27 deletions
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
|
|
@ -37,11 +36,9 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.KickerManaCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
|
|
@ -59,7 +56,7 @@ public class DesolationAngel extends CardImpl<DesolationAngel> {
|
|||
this.color.setBlack(true);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(4);
|
||||
this.getSpellAbility().addOptionalCost(new ManaCostsImpl("{W}{W}"));
|
||||
this.getSpellAbility().addOptionalCost(new KickerManaCost("{W}{W}"));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DesolationAngelEntersBattlefieldEffect()));
|
||||
}
|
||||
|
||||
|
|
@ -90,8 +87,8 @@ class DesolationAngelEntersBattlefieldEffect extends OneShotEffect<DesolationAng
|
|||
boolean kicked = false;
|
||||
if (p != null) {
|
||||
for (Object cost : p.getSpellAbility().getOptionalCosts()) {
|
||||
if (cost instanceof ManaCost) {
|
||||
if (((ManaCost) cost).isPaid()) {
|
||||
if (cost instanceof KickerManaCost) {
|
||||
if (((KickerManaCost) cost).isPaid()) {
|
||||
kicked = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,25 +32,14 @@ import java.util.UUID;
|
|||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.costs.mana.KickerManaCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterStackObject;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -68,7 +57,7 @@ public class VinesOfVastwood extends CardImpl<VinesOfVastwood> {
|
|||
this.getSpellAbility().addTarget(target);
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new HexproofAbility(), Duration.EndOfTurn));
|
||||
|
||||
this.getSpellAbility().addOptionalCost(new ManaCostsImpl("{G}"));
|
||||
this.getSpellAbility().addOptionalCost(new KickerManaCost("{G}"));
|
||||
this.getSpellAbility().addEffect(new ConditionalContinousEffect(new BoostTargetEffect(4, 4, Duration.EndOfTurn),
|
||||
KickedCondition.getInstance(), staticText));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue