Improved MaximumHandSizeController effect.

This commit is contained in:
LevelX2 2012-12-12 01:05:13 +01:00
parent ef6ae9f5e4
commit 4fe64d99d9
9 changed files with 145 additions and 105 deletions

View file

@ -27,7 +27,12 @@
*/ */
package mage.sets.avacynrestored; package mage.sets.avacynrestored;
import mage.Constants.*; import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility; import mage.abilities.LoyaltyAbility;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
@ -40,6 +45,7 @@ import mage.abilities.effects.common.GetEmblemEffect;
import mage.abilities.effects.common.SkipNextUntapTargetEffect; import mage.abilities.effects.common.SkipNextUntapTargetEffect;
import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect; import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect.HandSizeModification;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -54,7 +60,6 @@ import mage.target.TargetPermanent;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/** /**
* *
@ -190,7 +195,7 @@ class TamiyoTheMoonSageEffect extends OneShotEffect<TamiyoTheMoonSageEffect> {
class TamiyoTheMoonSageEmblem extends Emblem { class TamiyoTheMoonSageEmblem extends Emblem {
public TamiyoTheMoonSageEmblem() { public TamiyoTheMoonSageEmblem() {
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.EndOfGame, false)); Ability ability = new SimpleStaticAbility(Zone.COMMAND, new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.EndOfGame, HandSizeModification.SET));
this.getAbilities().add(ability); this.getAbilities().add(ability);
this.getAbilities().add(new TamiyoTheMoonSageTriggeredAbility()); this.getAbilities().add(new TamiyoTheMoonSageTriggeredAbility());
} }

View file

@ -28,14 +28,15 @@
package mage.sets.championsofkamigawa; package mage.sets.championsofkamigawa;
import java.util.UUID; import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect; import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect.HandSizeModification;
import mage.cards.CardImpl; import mage.cards.CardImpl;
/** /**
@ -55,8 +56,8 @@ public class GracefulAdept extends CardImpl<GracefulAdept> {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// You have no maximum hand size. // You have no maximum hand size.
Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Constants.Duration.WhileOnBattlefield, false); Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
} }
public GracefulAdept(final GracefulAdept card) { public GracefulAdept(final GracefulAdept card) {

View file

@ -28,13 +28,14 @@
package mage.sets.conflux; package mage.sets.conflux;
import java.util.UUID; import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect; import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect.HandSizeModification;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -49,8 +50,8 @@ public class ReliquaryTower extends CardImpl<ReliquaryTower> {
this.expansionSetCode = "CON"; this.expansionSetCode = "CON";
// You have no maximum hand size. // You have no maximum hand size.
Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Constants.Duration.WhileOnBattlefield, false); Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// {tap}: Add {1} to your mana pool. // {tap}: Add {1} to your mana pool.
this.addAbility(new ColorlessManaAbility()); this.addAbility(new ColorlessManaAbility());

View file

@ -28,13 +28,13 @@
package mage.sets.magic2010; package mage.sets.magic2010;
import java.util.UUID; import java.util.UUID;
import mage.Constants; import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect; import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect.HandSizeModification;
import mage.cards.CardImpl; import mage.cards.CardImpl;
/** /**
@ -48,7 +48,7 @@ public class Spellbook extends CardImpl<Spellbook> {
this.expansionSetCode = "M10"; this.expansionSetCode = "M10";
// You have no maximum hand size. // You have no maximum hand size.
Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Constants.Duration.WhileOnBattlefield, false); Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Constants.Duration.WhileOnBattlefield, HandSizeModification.SET);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect));
} }

View file

@ -36,6 +36,7 @@ import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileSpellEffect; import mage.abilities.effects.common.ExileSpellEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect; import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect.HandSizeModification;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.Game; import mage.game.Game;
@ -53,7 +54,7 @@ public class PraetorsCounsel extends CardImpl<PraetorsCounsel> {
this.color.setGreen(true); this.color.setGreen(true);
this.getSpellAbility().addEffect(new PraetorsCounselEffect()); this.getSpellAbility().addEffect(new PraetorsCounselEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.EndOfGame, false)); this.getSpellAbility().addEffect(new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.EndOfGame, HandSizeModification.SET));
} }
public PraetorsCounsel(final PraetorsCounsel card) { public PraetorsCounsel(final PraetorsCounsel card) {

View file

@ -28,20 +28,19 @@
package mage.sets.newphyrexia; package mage.sets.newphyrexia;
import java.util.UUID; import java.util.UUID;
import mage.Constants; import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.TargetController;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect.HandSizeModification;
import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.Game;
import mage.players.Player;
/** /**
* *
@ -59,9 +58,15 @@ public class JinGitaxiasCoreAugur extends CardImpl<JinGitaxiasCoreAugur> {
this.power = new MageInt(5); this.power = new MageInt(5);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// Flash
this.addAbility(FlashAbility.getInstance()); this.addAbility(FlashAbility.getInstance());
// At the beginning of your end step, draw seven cards.
this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new DrawCardControllerEffect(7), false)); this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new DrawCardControllerEffect(7), false));
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new JinGitaxiasCoreAugurEffect()));
// Each opponent's maximum hand size is reduced by seven.
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD,
new MaximumHandSizeControllerEffect(7, Duration.WhileOnBattlefield, HandSizeModification.REDUCE, TargetController.OPPONENT)));
} }
public JinGitaxiasCoreAugur(final JinGitaxiasCoreAugur card) { public JinGitaxiasCoreAugur(final JinGitaxiasCoreAugur card) {
@ -73,30 +78,3 @@ public class JinGitaxiasCoreAugur extends CardImpl<JinGitaxiasCoreAugur> {
return new JinGitaxiasCoreAugur(this); return new JinGitaxiasCoreAugur(this);
} }
} }
class JinGitaxiasCoreAugurEffect extends ContinuousEffectImpl<JinGitaxiasCoreAugurEffect> {
JinGitaxiasCoreAugurEffect() {
super(Constants.Duration.WhileOnBattlefield, Constants.Layer.PlayerEffects, Constants.SubLayer.NA, Constants.Outcome.Detriment);
staticText = "Each opponent's maximum hand size is reduced by seven";
}
JinGitaxiasCoreAugurEffect(final JinGitaxiasCoreAugurEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
Player player = game.getPlayer(opponentId);
if (player != null) {
player.setMaxHandSize(player.getMaxHandSize() - 7);
}
}
return true;
}
@Override
public JinGitaxiasCoreAugurEffect copy() {
return new JinGitaxiasCoreAugurEffect(this);
}
}

View file

@ -28,16 +28,18 @@
package mage.sets.scarsofmirrodin; package mage.sets.scarsofmirrodin;
import java.util.UUID; import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.TargetController;
import mage.Constants.Zone;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect; import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect.HandSizeModification;
import mage.cards.CardImpl; import mage.cards.CardImpl;
/** /**
@ -51,11 +53,11 @@ public class VensersJournal extends CardImpl<VensersJournal> {
this.expansionSetCode = "SOM"; this.expansionSetCode = "SOM";
// You have no maximum hand size. // You have no maximum hand size.
Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Constants.Duration.WhileOnBattlefield, false); Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// At the beginning of your upkeep, you gain 1 life for each card in your hand. // At the beginning of your upkeep, you gain 1 life for each card in your hand.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(new CardsInControllerHandCount()), Constants.TargetController.YOU, false)); this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(new CardsInControllerHandCount()), TargetController.YOU, false));
} }
public VensersJournal(final VensersJournal card) { public VensersJournal(final VensersJournal card) {

View file

@ -30,13 +30,17 @@ package mage.sets.visions;
import java.util.UUID; import java.util.UUID;
import mage.Constants; import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.TargetController;
import mage.Constants.Zone;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfDrawTriggeredAbility; import mage.abilities.common.BeginningOfDrawTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect; import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect.HandSizeModification;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
@ -52,11 +56,11 @@ public class AnvilOfBogardan extends CardImpl<AnvilOfBogardan> {
this.expansionSetCode = "VIS"; this.expansionSetCode = "VIS";
// Players have no maximum hand size. // Players have no maximum hand size.
Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Constants.Duration.WhileOnBattlefield, false, true); Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET, TargetController.ANY);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// At the beginning of each player's draw step, that player draws an additional card, then discards a card. // At the beginning of each player's draw step, that player draws an additional card, then discards a card.
this.addAbility(new BeginningOfDrawTriggeredAbility(Constants.Zone.BATTLEFIELD, new AnvilOfBogardanEffect(), Constants.TargetController.ANY, false)); this.addAbility(new BeginningOfDrawTriggeredAbility(Zone.BATTLEFIELD, new AnvilOfBogardanEffect(), TargetController.ANY, false));
} }
public AnvilOfBogardan(final AnvilOfBogardan card) { public AnvilOfBogardan(final AnvilOfBogardan card) {

View file

@ -27,50 +27,51 @@
*/ */
package mage.abilities.effects.common.continious; package mage.abilities.effects.common.continious;
import java.util.UUID;
import mage.Constants.Duration; import mage.Constants.Duration;
import mage.Constants.Layer; import mage.Constants.Layer;
import mage.Constants.Outcome; import mage.Constants.Outcome;
import mage.Constants.SubLayer; import mage.Constants.SubLayer;
import mage.Constants.TargetController;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
/** /**
* @author nantuko * @author nantuko, LevelX2
*/ */
public class MaximumHandSizeControllerEffect extends ContinuousEffectImpl<MaximumHandSizeControllerEffect> { public class MaximumHandSizeControllerEffect extends ContinuousEffectImpl<MaximumHandSizeControllerEffect> {
public static enum HandSizeModification { SET, INCREASE, REDUCE };
protected int handSize; protected int handSize;
protected boolean reduce; protected HandSizeModification handSizeModification;
protected boolean allPlayers; protected TargetController targetController;
/** /**
* @param handSize Maximum hand size to set or to reduce by * @param handSize Maximum hand size to set or to reduce by
* @param duration Effect duration * @param duration Effect duration
* @param reduce If true, the hand size will be reduced related to current * @param handSizeModification SET, INCREASE, REDUCE
* value, otherwise it will be set. *
*/ */
public MaximumHandSizeControllerEffect(int handSize, Duration duration, boolean reduce) { public MaximumHandSizeControllerEffect(int handSize, Duration duration, HandSizeModification handSizeModification) {
super(duration, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit); this(handSize, duration, handSizeModification, TargetController.YOU);
this.handSize = handSize;
this.reduce = reduce;
setText();
} }
public MaximumHandSizeControllerEffect(int handSize, Duration duration, boolean reduce, boolean allPlayers) { public MaximumHandSizeControllerEffect(int handSize, Duration duration, HandSizeModification handSizeModification, TargetController targetController) {
super(duration, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit); super(duration, Layer.PlayerEffects, SubLayer.NA, defineOutcome(handSizeModification, targetController));
this.handSize = handSize; this.handSize = handSize;
this.reduce = reduce; this.handSizeModification = handSizeModification;
this.allPlayers = allPlayers; this.targetController = targetController;
setText(); setText();
} }
public MaximumHandSizeControllerEffect(final MaximumHandSizeControllerEffect effect) { public MaximumHandSizeControllerEffect(final MaximumHandSizeControllerEffect effect) {
super(effect); super(effect);
this.handSize = effect.handSize; this.handSize = effect.handSize;
this.reduce = effect.reduce; this.handSizeModification = effect.handSizeModification;
this.allPlayers = effect.allPlayers; this.targetController = effect.targetController;
} }
@Override @Override
@ -78,48 +79,95 @@ public class MaximumHandSizeControllerEffect extends ContinuousEffectImpl<Maximu
return new MaximumHandSizeControllerEffect(this); return new MaximumHandSizeControllerEffect(this);
} }
protected static Outcome defineOutcome(HandSizeModification handSizeModification, TargetController targetController) {
Outcome newOutcome = Outcome.Benefit;
if ((targetController.equals(TargetController.YOU) || targetController.equals(TargetController.ANY))
&& handSizeModification.equals(HandSizeModification.REDUCE)) {
newOutcome = Outcome.Detriment;
}
return newOutcome;
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (allPlayers) { switch(targetController) {
for (Player playerid : game.getPlayers().values()) { case ANY:
if (playerid != null) { for (UUID playerId: controller.getInRange()) {
if (reduce) { setHandSize(game, playerId);
player.setMaxHandSize(player.getMaxHandSize() - handSize);
} else {
player.setMaxHandSize(handSize);
}
} }
} break;
return true; case OPPONENT:
} for (UUID playerId: game.getOpponents(source.getControllerId())) {
if (!allPlayers && player != null) { setHandSize(game, playerId);
if (reduce) { }
player.setMaxHandSize(player.getMaxHandSize() - handSize); break;
} else { case YOU:
player.setMaxHandSize(handSize); setHandSize(game, source.getControllerId());
} break;
return true; default:
throw new UnsupportedOperationException("Not supported yet.");
} }
return true; return true;
} }
private void setText() { private void setHandSize(Game game, UUID playerId) {
if (allPlayers && handSize == Integer.MAX_VALUE) { Player player = game.getPlayer(playerId);
staticText = "All players have no maximum hand size"; if (player != null) {
} switch(handSizeModification) {
if (!allPlayers && handSize == Integer.MAX_VALUE) { case SET:
staticText = "You have no maximum hand size"; player.setMaxHandSize(handSize);
} break;
if (!allPlayers && staticText == null) { case INCREASE:
StringBuilder sb = new StringBuilder("Your maximum hand size is "); player.setMaxHandSize(player.getMaxHandSize() + handSize);
if (reduce) { break;
sb.append("reduced by "); case REDUCE:
sb.append(Integer.toString(handSize)); player.setMaxHandSize(player.getMaxHandSize() - handSize);
} else { break;
sb.append(Integer.toString(handSize));
} }
staticText = sb.toString();
} }
} }
private void setText() {
StringBuilder sb = new StringBuilder();
switch(targetController) {
case ANY:
if (handSize == Integer.MAX_VALUE) {
sb.append("All players have no ");
} else {
sb.append("All players ");
}
break;
case OPPONENT:
if (handSize == Integer.MAX_VALUE) {
sb.append("Each opponent has no ");
} else {
sb.append("Each opponent's ");
}
break;
case YOU:
if (handSize == Integer.MAX_VALUE) {
sb.append("You have no ");
} else {
sb.append("Your ");
}
break;
}
sb.append("maximum hand size");
if (handSizeModification.equals(HandSizeModification.INCREASE)){
sb.append(" is increased by ");
} else if (handSizeModification.equals(HandSizeModification.REDUCE)){
sb.append(" is reduced by ");
} else if (handSize != Integer.MAX_VALUE) {
sb.append(" is ");
}
if (handSize != Integer.MAX_VALUE) {
sb.append(handSize);
}
if (duration == Duration.EndOfGame) {
sb.append(" for the rest of the game");
}
staticText = sb.toString();
}
} }