* Changed "Activate only during upkeep" abilities to conditional abilities instead of a cost for this restriction.

This commit is contained in:
LevelX2 2014-07-28 16:53:37 +02:00
parent f51e7722cc
commit caf8a1e5ec
16 changed files with 102 additions and 160 deletions

View file

@ -33,15 +33,15 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.OnlyDuringUpkeepCost;
import mage.abilities.condition.common.IsStepCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.SkipUntapSourceEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.PhaseStep;
/**
*
@ -64,9 +64,8 @@ public class ColossusOfSardia extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipUntapSourceEffect()));
// {9}: Untap Colossus of Sardia. Activate this ability only during your upkeep.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl("{9}"));
ability.addCost(new OnlyDuringUpkeepCost());
this.addAbility(ability);
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new UntapSourceEffect(), new ManaCostsImpl("{9}"), new IsStepCondition(PhaseStep.UPKEEP), null));
}
public ColossusOfSardia(final ColossusOfSardia card) {

View file

@ -30,15 +30,14 @@ package mage.sets.futuresight;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.OnlyDuringUpkeepCost;
import mage.abilities.condition.common.IsStepCondition;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.PhaseStep;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.common.TargetCreaturePermanent;
@ -61,11 +60,12 @@ public class LlanowarAugur extends CardImpl {
// Sacrifice Llanowar Augur: Target creature gets +3/+3 and gains trample until end of turn.
// Activate this ability only during your upkeep.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BoostTargetEffect(3, 3, Duration.EndOfTurn),
new SacrificeSourceCost());
ability.addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
ability.addCost(new OnlyDuringUpkeepCost());
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new BoostTargetEffect(3, 3, Duration.EndOfTurn),
new SacrificeSourceCost(),
new IsStepCondition(PhaseStep.UPKEEP),
null
);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -30,6 +30,7 @@ package mage.sets.magic2015;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -74,7 +75,7 @@ public class SpiritBonds extends CardImpl {
this.color.setWhite(true);
// Whenever a nontoken creature enters the battlefield under your control, you may pay {W}. If you do, but a 1/1 white Spirit creature token with flying into play.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid(new CreateTokenEffect(new SpiritWhiteToken("M15")), new ManaCostsImpl("{W}")), filterNontoken, false));
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid(new CreateTokenEffect(new SpiritWhiteToken("M15")), new ManaCostsImpl("{W}")), filterNontoken, false));
// {1}{W}, Sacrifice a Spirit: Target non-Spirit creature you control gains indestructible until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,

View file

@ -31,13 +31,13 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.OnlyDuringUpkeepCost;
import mage.abilities.condition.common.IsStepCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
import mage.cards.CardImpl;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.target.common.TargetCreatureOrPlayer;
@ -59,9 +59,8 @@ public class HammerOfBogardan extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
// {2}{R}{R}{R}: Return Hammer of Bogardan from your graveyard to your hand. Activate this ability only during your upkeep.
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{2}{R}{R}{R}"));
ability.addCost(new OnlyDuringUpkeepCost());
this.addAbility(ability);
this.addAbility(new ConditionalActivatedAbility(Zone.GRAVEYARD,
new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{2}{R}{R}{R}"), new IsStepCondition(PhaseStep.END_COMBAT), null));
}
public HammerOfBogardan(final HammerOfBogardan card) {

View file

@ -34,16 +34,17 @@ import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.costs.common.OnlyDuringUpkeepCost;
import mage.abilities.condition.common.IsStepCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.constants.PhaseStep;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.game.Game;
@ -71,12 +72,12 @@ public class FiremaneAngel extends CardImpl {
// At the beginning of your upkeep, if Firemane Angel is in your graveyard or on the battlefield, you may gain 1 life.
Ability ability = new ConditionalTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(Zone.ALL, new GainLifeEffect(1), TargetController.YOU, true),
SourceOnBattelfieldOrGraveyardCondition.getInstance(), "");
SourceOnBattelfieldOrGraveyardCondition.getInstance(),
"At the beginning of your upkeep, if {this} is in your graveyard or on the battlefield, you may gain 1 life", true);
this.addAbility(ability);
// {6}{R}{R}{W}{W}: Return Firemane Angel from your graveyard to the battlefield. Activate this ability only during your upkeep.
ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{6}{R}{R}{W}{W}"));
ability.addCost(new OnlyDuringUpkeepCost());
this.addAbility(ability);
this.addAbility(new ConditionalActivatedAbility(Zone.GRAVEYARD,
new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{6}{R}{R}{W}{W}"), new IsStepCondition(PhaseStep.UPKEEP), null));
}
public FiremaneAngel(final FiremaneAngel card) {

View file

@ -33,14 +33,15 @@ import mage.constants.Rarity;
import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.common.IsStepCondition;
import mage.abilities.costs.common.MetalcraftCost;
import mage.abilities.costs.common.OnlyDuringUpkeepCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.constants.PhaseStep;
/**
*
@ -56,11 +57,19 @@ public class KuldothaPhoenix extends CardImpl {
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Flying, haste
this.addAbility(FlyingAbility.getInstance());
this.addAbility(HasteAbility.getInstance());
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl("{4}"));
ability.addCost(new MetalcraftCost());
ability.addCost(new OnlyDuringUpkeepCost());
// Metalcraft - : Return Kuldotha Phoenix from your graveyard to the battlefield.
// Activate this ability only during your upkeep and only if you control three or more artifacts.
Ability ability = new ConditionalActivatedAbility(Zone.GRAVEYARD,
new ReturnSourceFromGraveyardToBattlefieldEffect(true),
new ManaCostsImpl("{4}"),
new IsStepCondition(PhaseStep.UPKEEP),
null
);
ability.addCost(new MetalcraftCost());
this.addAbility(ability);
}

View file

@ -33,13 +33,14 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.OnlyDuringUpkeepCost;
import mage.abilities.condition.common.IsStepCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.PlainscyclingAbility;
import mage.cards.CardImpl;
import mage.constants.PhaseStep;
import mage.constants.Zone;
/**
@ -60,9 +61,14 @@ public class EternalDragon extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// {3}{W}{W}: Return Eternal Dragon from your graveyard to your hand. Activate this ability only during your upkeep.
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{3}{W}{W}"));
ability.addCost(new OnlyDuringUpkeepCost());
// {3}{W}{W}: Return Eternal Dragon from your graveyard to your hand. Activate this ability only during your upkeep.
Ability ability = new ConditionalActivatedAbility(Zone.GRAVEYARD,
new ReturnToHandSourceEffect(),
new ManaCostsImpl("{3}{W}{W}"),
new IsStepCondition(PhaseStep.UPKEEP),
null
);
this.addAbility(ability);
// PlainscyclingAbility {2}
this.addAbility(new PlainscyclingAbility(new ManaCostsImpl("{2}")));

View file

@ -31,12 +31,12 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.OnlyDuringUpkeepCost;
import mage.abilities.condition.common.IsStepCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
@ -49,6 +49,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
public class Scourglass extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("permanents except for artifacts and lands");
static{
filter.add(Predicates.not(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.LAND))));
}
@ -60,9 +61,8 @@ public class Scourglass extends CardImpl {
this.color.setWhite(true);
// {tap}, Sacrifice Scourglass: Destroy all permanents except for artifacts and lands. Activate this ability only during your upkeep.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(filter), new TapSourceCost());
ability.addCost(new OnlyDuringUpkeepCost());
this.addAbility(ability);
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new DestroyAllEffect(filter), new TapSourceCost(), new IsStepCondition(PhaseStep.UPKEEP), null));
}
public Scourglass(final Scourglass card) {

View file

@ -29,7 +29,7 @@ package mage.sets.timeshifted;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.IsStepCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DamageTargetEffect;
@ -41,7 +41,6 @@ import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AttackingPredicate;
import mage.game.Game;
import mage.target.Target;
import mage.target.common.TargetCreaturePermanent;
@ -64,7 +63,7 @@ public class Desert extends CardImpl {
// {tap}: Add {1} to your mana pool.
this.addAbility(new ColorlessManaAbility());
// {tap}: Desert deals 1 damage to target attacking creature. Activate this ability only during the end of combat step.
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost(), IsEndOfCombatStep.getInstance(), null);
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost(), new IsStepCondition(PhaseStep.END_COMBAT, false), null);
Target target = new TargetCreaturePermanent(filter);
ability.addTarget(target);
this.addAbility(ability);
@ -79,23 +78,3 @@ public class Desert extends CardImpl {
return new Desert(this);
}
}
class IsEndOfCombatStep implements Condition {
private static IsEndOfCombatStep fInstance = new IsEndOfCombatStep();
public static Condition getInstance() {
return fInstance;
}
@Override
public boolean apply(Game game, Ability source) {
return game.getStep().getType() == PhaseStep.END_COMBAT;
}
@Override
public String toString() {
return "during the end of combat step";
}
}

View file

@ -30,13 +30,14 @@ package mage.sets.visions;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.OnlyDuringUpkeepCost;
import mage.abilities.condition.common.IsStepCondition;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.PhaseStep;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
@ -58,9 +59,13 @@ public class Necrosavant extends CardImpl {
this.toughness = new MageInt(5);
// {3}{B}{B}, Sacrifice a creature: Return Necrosavant from your graveyard to the battlefield. Activate this ability only during your upkeep.
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{3}{B}{B}"));
Ability ability = new ConditionalActivatedAbility(Zone.GRAVEYARD,
new ReturnSourceFromGraveyardToBattlefieldEffect(),
new ManaCostsImpl("{3}{B}{B}"),
new IsStepCondition(PhaseStep.UPKEEP),
null
);
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
ability.addCost(new OnlyDuringUpkeepCost());
this.addAbility(ability);
}

View file

@ -70,7 +70,7 @@ public class EntersBattlefieldControlledTriggeredAbility extends EntersBattlefie
super(zone, effect, filter, optional, setTargetPointer, rule, true);
}
public EntersBattlefieldControlledTriggeredAbility(EntersBattlefieldControlledTriggeredAbility ability) {
public EntersBattlefieldControlledTriggeredAbility(final EntersBattlefieldControlledTriggeredAbility ability) {
super(ability);
}

View file

@ -18,7 +18,7 @@ public interface Condition extends Serializable {
Equal("=="),
LessThan("<");
private String text;
private final String text;
ComparisonType(String text) {
this.text = text;

View file

@ -31,7 +31,6 @@ package mage.abilities.condition.common;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.constants.PhaseStep;
import mage.constants.TurnPhase;
import mage.game.Game;
/**
@ -41,19 +40,25 @@ import mage.game.Game;
public class IsStepCondition implements Condition {
protected PhaseStep phaseStep;
protected boolean onlyDuringYourSteps;
public IsStepCondition(PhaseStep phaseStep) {
this(phaseStep, true);
}
public IsStepCondition(PhaseStep phaseStep, boolean onlyDuringYourSteps) {
this.phaseStep = phaseStep;
this.onlyDuringYourSteps = onlyDuringYourSteps;
}
@Override
public boolean apply(Game game, Ability source) {
return game.getActivePlayerId().equals(source.getSourceId()) && game.getStep().getType().equals(phaseStep);
return phaseStep.equals(game.getStep().getType()) && (!onlyDuringYourSteps || game.getActivePlayerId().equals(source.getControllerId()));
}
@Override
public String toString() {
return new StringBuilder("during your ").append(phaseStep.toString()).toString();
return new StringBuilder("during ").append(onlyDuringYourSteps ? "your ":"the ").append(phaseStep.getStepText()).toString();
}
}

View file

@ -1,68 +0,0 @@
/*
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.abilities.costs.common;
import java.util.UUID;
import mage.constants.PhaseStep;
import mage.abilities.Ability;
import mage.abilities.costs.CostImpl;
import mage.game.Game;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class OnlyDuringUpkeepCost extends CostImpl {
public OnlyDuringUpkeepCost() {
text = "Activate this ability only during your upkeep";
}
public OnlyDuringUpkeepCost(final OnlyDuringUpkeepCost cost) {
super(cost);
}
@Override
public OnlyDuringUpkeepCost copy() {
return new OnlyDuringUpkeepCost(this);
}
@Override
public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
if (game.getActivePlayerId().equals(controllerId) && game.getStep().getType() == PhaseStep.UPKEEP)
return true;
return false;
}
@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
this.paid = true;
return paid;
}
}

View file

@ -23,7 +23,7 @@ import mage.game.Game;
*/
public class ConditionalActivatedAbility extends ActivatedAbilityImpl {
private Condition condition;
private final Condition condition;
private String ruleText = null;
private static final Effects emptyEffects = new Effects();
@ -34,7 +34,7 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl {
this.ruleText = rule;
}
public ConditionalActivatedAbility(Zone zone, Effect effect, Costs costs, Condition condition, String rule) {
public ConditionalActivatedAbility(Zone zone, Effect effect, Costs<Cost> costs, Condition condition, String rule) {
super(zone, effect, costs);
this.condition = condition;
this.ruleText = rule;

View file

@ -5,30 +5,32 @@ package mage.constants;
* @author North
*/
public enum PhaseStep {
UNTAP ("Untap", 0),
UPKEEP ("Upkeep", 1),
DRAW ("Draw", 2),
PRECOMBAT_MAIN ("Precombat Main", 3),
BEGIN_COMBAT ("Begin Combat", 4),
DECLARE_ATTACKERS ("Declare Attackers", 5),
DECLARE_BLOCKERS ("Declare Blockers", 6),
FIRST_COMBAT_DAMAGE ("First Combat Damage", 7),
COMBAT_DAMAGE ("Combat Damage", 8),
END_COMBAT ("End Combat", 9),
POSTCOMBAT_MAIN ("Postcombat Main", 10),
END_TURN ("End Turn", 11),
CLEANUP ("Cleanup", 12);
UNTAP ("Untap", 0, "untap step"),
UPKEEP ("Upkeep", 1, "upkeep"), // card texts don't use the word "step" for this phase step
DRAW ("Draw", 2, "draw step"),
PRECOMBAT_MAIN ("Precombat Main", 3,"precombat main step"),
BEGIN_COMBAT ("Begin Combat", 4, "begin combat step"),
DECLARE_ATTACKERS ("Declare Attackers", 5, "declare attackers step"),
DECLARE_BLOCKERS ("Declare Blockers", 6, "declare blockers"),
FIRST_COMBAT_DAMAGE ("First Combat Damage", 7, "first combat damage"),
COMBAT_DAMAGE ("Combat Damage", 8, "combat damage step"),
END_COMBAT ("End Combat", 9, "end combat step"),
POSTCOMBAT_MAIN ("Postcombat Main", 10, "postcombat main step"),
END_TURN ("End Turn", 11, "end turn step"),
CLEANUP ("Cleanup", 12, "cleanup step");
private final String text;
private final String stepText;
/**
* Index is used for game state scoring system.
*/
private final int index;
PhaseStep(String text, int index) {
PhaseStep(String text, int index, String stepText) {
this.text = text;
this.index = index;
this.stepText = stepText;
}
public int getIndex() {
@ -40,4 +42,8 @@ public enum PhaseStep {
return text;
}
public String getStepText() {
return stepText;
}
}