- Cards which need a mode choice (e.g. the Siege cycle, Master of Predicaments etc.) will now log the choice that was made.

- The Siege cycle cards will now also report the choice in a message box so that it's immediately apparent what was chosen for them.
- Changed the default value of "Display Tokens in a Separate Row" to "disabled" (tokens are now displayed on the same row as non-token cards).
This commit is contained in:
Agetian
2015-05-19 17:56:38 +00:00
parent 73bef51fcc
commit 4e56670a23
12 changed files with 52 additions and 16 deletions

1
.gitattributes vendored
View File

@@ -526,6 +526,7 @@ forge-game/src/main/java/forge/game/event/GameEventCardChangeZone.java -text
forge-game/src/main/java/forge/game/event/GameEventCardCounters.java -text
forge-game/src/main/java/forge/game/event/GameEventCardDamaged.java -text
forge-game/src/main/java/forge/game/event/GameEventCardDestroyed.java -text
forge-game/src/main/java/forge/game/event/GameEventCardModeChosen.java -text
forge-game/src/main/java/forge/game/event/GameEventCardPhased.java -text
forge-game/src/main/java/forge/game/event/GameEventCardRegenerated.java -text
forge-game/src/main/java/forge/game/event/GameEventCardSacrificed.java -text

View File

@@ -13,6 +13,7 @@ import forge.game.event.GameEventAttackersDeclared;
import forge.game.event.GameEventBlockersDeclared;
import forge.game.event.GameEventCardDamaged;
import forge.game.event.GameEventCardDamaged.DamageType;
import forge.game.event.GameEventCardModeChosen;
import forge.game.event.GameEventGameOutcome;
import forge.game.event.GameEventLandPlayed;
import forge.game.event.GameEventMulligan;
@@ -97,6 +98,13 @@ public class GameLogFormatter extends IGameEventVisitor.Base<GameLogEntry> {
return new GameLogEntry(GameLogEntryType.STACK_ADD, sb.toString());
}
@Override
public GameLogEntry visit(GameEventCardModeChosen ev) {
String modeChoiceOutcome = String.format("%s has chosen %s for %s.", ev.player, ev.mode, ev.cardName);
return new GameLogEntry(GameLogEntryType.STACK_RESOLVE, modeChoiceOutcome);
}
private static GameLogEntry generateSummary(final List<GameOutcome> gamesPlayed) {
final GameOutcome outcome1 = gamesPlayed.get(0);
final List<Player> players = outcome1.getPlayers();

View File

@@ -4,6 +4,7 @@ import forge.game.ability.AbilityFactory;
import forge.game.ability.AbilityUtils;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
import forge.game.event.GameEventCardModeChosen;
import forge.game.player.Player;
import forge.game.spellability.AbilitySub;
import forge.game.spellability.SpellAbility;
@@ -57,7 +58,10 @@ public class ChooseGenericEffect extends SpellAbilityEffect {
}
SpellAbility chosenSA = AbilityFactory.getAbility(host.getSVar(chosenName), host);
if (sa.hasParam("ShowChoice")) {
p.getGame().getAction().nofityOfValue(sa, p, abilities.get(idxChosen).getDescription(), null);
boolean dontNotifySelf = sa.getParam("ShowChoice").equals("ExceptSelf");
String chosenValue = abilities.get(idxChosen).getDescription();
p.getGame().getAction().nofityOfValue(sa, p, chosenValue, dontNotifySelf ? sa.getActivatingPlayer() : null);
p.getGame().fireEvent(new GameEventCardModeChosen(p, host.getName(), chosenValue));
}
chosenSA.setActivatingPlayer(sa.getActivatingPlayer());
((AbilitySub) chosenSA).setParent(sa);

View File

@@ -0,0 +1,23 @@
package forge.game.event;
import forge.game.player.Player;
public class GameEventCardModeChosen extends GameEvent {
public final Player player;
public final String cardName;
public final String mode;
public GameEventCardModeChosen(Player player, String cardName, String mode) {
this.player = player;
this.cardName = cardName;
this.mode = mode;
}
@Override
public <T> T visit(IGameEventVisitor<T> visitor) {
return visitor.visit(this);
}
}

View File

@@ -12,6 +12,7 @@ public interface IGameEventVisitor<T> {
T visit(GameEventCardDestroyed event);
T visit(GameEventCardAttachment event);
T visit(GameEventCardChangeZone event);
T visit(GameEventCardModeChosen event);
T visit(GameEventCardRegenerated event);
T visit(GameEventCardSacrificed event);
T visit(GameEventCardPhased event);
@@ -56,6 +57,7 @@ public interface IGameEventVisitor<T> {
public T visit(GameEventCardDestroyed event) { return null; }
public T visit(GameEventCardAttachment event) { return null; }
public T visit(GameEventCardChangeZone event) { return null; }
public T visit(GameEventCardModeChosen event) { return null; }
public T visit(GameEventCardRegenerated event) { return null; }
public T visit(GameEventCardSacrificed event) { return null; }
public T visit(GameEventCardTapped event) { return null; }

View File

@@ -32,15 +32,13 @@ The interface has received several small changes.
- Display tokens on the same row as other cards / on their own row -
It is now possible to make the game display tokens on the same row as other
cards to conserve battlefield space (for example, creature tokens are displayed
on the same row as creatures). The option that controls this behavior can be
found in Forge preferences under "Graphic Options". It is called "Display Tokens
in a Separate Row" and defaults to "enabled" (classic Forge behavior) until the
new mode is tested thoroughly. If you disable this option, the game will display
tokens together with other cards as opposed to in their own row, which will make
the game use your screen space more effectively. Tokens will be displayed to the
right of the non-token cards in the same row.
By default the game now displays tokens on the same row as non-token cards (and
to the right of them), which makes the game use the battlefield space more
effectively. For example, creature tokens are displayed to the right of regular
non-token creatures in the same row. If you prefer the classic Forge behavior
(when tokens are displayed on their own row), the option that controls this
behavior can be found in Forge preferences under "Graphic Options". It is called
"Display Tokens in a Separate Row".
- Network play (BETA) -

View File

@@ -2,7 +2,7 @@ Name:Citadel Siege
ManaCost:2 W W
Types:Enchantment
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ SiegeChoice | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons. Khans - At the beginning of combat on your turn, put two +1/+1 counters on target creature you control. Dragons - At the beginning of combat on each opponent's turn, tap target creature that player controls.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Dragons
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Dragons | ShowChoice$ ExceptSelf
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Permanent$ True | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ BeginCombat | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ Boost | TriggerDescription$ At the beginning of combat on your turn, put two +1/+1 counters on target creature you control.
SVar:Boost:AB$ PutCounter | Cost$ 0 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | CounterType$ P1P1 | CounterNum$ 2

View File

@@ -2,7 +2,7 @@ Name:Frontier Siege
ManaCost:3 G
Types:Enchantment
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ SiegeChoice | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons. Khans - At the beginning of each of your main phases, add {G}{G} to your mana pool. Dragons - Whenever a creature with flying enters the battlefield under your control, you may have it fight target creature you don't control.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Khans
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Khans | ShowChoice$ ExceptSelf
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Permanent$ True | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ Main1,Main2 | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ ManaGain | TriggerDescription$ At the beginning of each of your main phases, add {G}{G} to your mana pool.
SVar:ManaGain:AB$ Mana | Cost$ 0 | Produced$ G G

View File

@@ -2,7 +2,7 @@ Name:Monastery Siege
ManaCost:2 U
Types:Enchantment
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ SiegeChoice | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons. Khans - At the beginning of your draw step, draw an additional card, then discard a card. Dragons - Spells your opponents cast that target you or a permanent you control cost {2} more to cast.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Khans
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Khans | ShowChoice$ ExceptSelf
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Permanent$ True | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ Draw | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ Filter | TriggerDescription$ At the beginning of your draw step, draw an additional card, then discard a card.
SVar:Filter:AB$ Draw | Cost$ 0 | Defined$ You | NumCards$ 1 | SubAbility$ DBDiscard

View File

@@ -2,7 +2,7 @@ Name:Outpost Siege
ManaCost:3 R
Types:Enchantment
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ SiegeChoice | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons. Khans - At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card. Dragons - Whenever a creature you control leaves the battlefield, CARDNAME deals 1 damage to target creature or player.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Khans
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Khans | ShowChoice$ ExceptSelf
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Permanent$ True | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ PseudoDraw | TriggerDescription$ At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card.
SVar:PseudoDraw:DB$ Mill | Defined$ You | NumCards$ 1 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBMayBePlay

View File

@@ -2,7 +2,7 @@ Name:Palace Siege
ManaCost:3 B B
Types:Enchantment
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ SiegeChoice | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons. Khans - At the beginning of your upkeep, return target creature card from your graveyard to your hand. Dragons - At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Dragons
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | AILogic$ Dragons | ShowChoice$ ExceptSelf
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Permanent$ True | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ RaiseDead | TriggerDescription$ At the beginning of your upkeep, return target creature card from your graveyard to your hand.
SVar:RaiseDead:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl

View File

@@ -77,7 +77,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
UI_CLOSE_ACTION ("NONE"),
UI_MANA_LOST_PROMPT ("false"), // Prompt on losing mana when passing priority
UI_PAUSE_WHILE_MINIMIZED("false"),
UI_TOKENS_IN_SEPARATE_ROW("true"), // Display tokens in their own battlefield row.
UI_TOKENS_IN_SEPARATE_ROW("false"), // Display tokens in their own battlefield row.
UI_FOR_TOUCHSCREN("false"),