mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- 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:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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/GameEventCardCounters.java -text
|
||||||
forge-game/src/main/java/forge/game/event/GameEventCardDamaged.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/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/GameEventCardPhased.java -text
|
||||||
forge-game/src/main/java/forge/game/event/GameEventCardRegenerated.java -text
|
forge-game/src/main/java/forge/game/event/GameEventCardRegenerated.java -text
|
||||||
forge-game/src/main/java/forge/game/event/GameEventCardSacrificed.java -text
|
forge-game/src/main/java/forge/game/event/GameEventCardSacrificed.java -text
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import forge.game.event.GameEventAttackersDeclared;
|
|||||||
import forge.game.event.GameEventBlockersDeclared;
|
import forge.game.event.GameEventBlockersDeclared;
|
||||||
import forge.game.event.GameEventCardDamaged;
|
import forge.game.event.GameEventCardDamaged;
|
||||||
import forge.game.event.GameEventCardDamaged.DamageType;
|
import forge.game.event.GameEventCardDamaged.DamageType;
|
||||||
|
import forge.game.event.GameEventCardModeChosen;
|
||||||
import forge.game.event.GameEventGameOutcome;
|
import forge.game.event.GameEventGameOutcome;
|
||||||
import forge.game.event.GameEventLandPlayed;
|
import forge.game.event.GameEventLandPlayed;
|
||||||
import forge.game.event.GameEventMulligan;
|
import forge.game.event.GameEventMulligan;
|
||||||
@@ -97,6 +98,13 @@ public class GameLogFormatter extends IGameEventVisitor.Base<GameLogEntry> {
|
|||||||
return new GameLogEntry(GameLogEntryType.STACK_ADD, sb.toString());
|
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) {
|
private static GameLogEntry generateSummary(final List<GameOutcome> gamesPlayed) {
|
||||||
final GameOutcome outcome1 = gamesPlayed.get(0);
|
final GameOutcome outcome1 = gamesPlayed.get(0);
|
||||||
final List<Player> players = outcome1.getPlayers();
|
final List<Player> players = outcome1.getPlayers();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import forge.game.ability.AbilityFactory;
|
|||||||
import forge.game.ability.AbilityUtils;
|
import forge.game.ability.AbilityUtils;
|
||||||
import forge.game.ability.SpellAbilityEffect;
|
import forge.game.ability.SpellAbilityEffect;
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
|
import forge.game.event.GameEventCardModeChosen;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.AbilitySub;
|
import forge.game.spellability.AbilitySub;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
@@ -57,7 +58,10 @@ public class ChooseGenericEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
SpellAbility chosenSA = AbilityFactory.getAbility(host.getSVar(chosenName), host);
|
SpellAbility chosenSA = AbilityFactory.getAbility(host.getSVar(chosenName), host);
|
||||||
if (sa.hasParam("ShowChoice")) {
|
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());
|
chosenSA.setActivatingPlayer(sa.getActivatingPlayer());
|
||||||
((AbilitySub) chosenSA).setParent(sa);
|
((AbilitySub) chosenSA).setParent(sa);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@ public interface IGameEventVisitor<T> {
|
|||||||
T visit(GameEventCardDestroyed event);
|
T visit(GameEventCardDestroyed event);
|
||||||
T visit(GameEventCardAttachment event);
|
T visit(GameEventCardAttachment event);
|
||||||
T visit(GameEventCardChangeZone event);
|
T visit(GameEventCardChangeZone event);
|
||||||
|
T visit(GameEventCardModeChosen event);
|
||||||
T visit(GameEventCardRegenerated event);
|
T visit(GameEventCardRegenerated event);
|
||||||
T visit(GameEventCardSacrificed event);
|
T visit(GameEventCardSacrificed event);
|
||||||
T visit(GameEventCardPhased event);
|
T visit(GameEventCardPhased event);
|
||||||
@@ -56,6 +57,7 @@ public interface IGameEventVisitor<T> {
|
|||||||
public T visit(GameEventCardDestroyed event) { return null; }
|
public T visit(GameEventCardDestroyed event) { return null; }
|
||||||
public T visit(GameEventCardAttachment event) { return null; }
|
public T visit(GameEventCardAttachment event) { return null; }
|
||||||
public T visit(GameEventCardChangeZone 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(GameEventCardRegenerated event) { return null; }
|
||||||
public T visit(GameEventCardSacrificed event) { return null; }
|
public T visit(GameEventCardSacrificed event) { return null; }
|
||||||
public T visit(GameEventCardTapped event) { return null; }
|
public T visit(GameEventCardTapped event) { return null; }
|
||||||
|
|||||||
@@ -32,15 +32,13 @@ The interface has received several small changes.
|
|||||||
|
|
||||||
|
|
||||||
- Display tokens on the same row as other cards / on their own row -
|
- 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
|
By default the game now displays tokens on the same row as non-token cards (and
|
||||||
cards to conserve battlefield space (for example, creature tokens are displayed
|
to the right of them), which makes the game use the battlefield space more
|
||||||
on the same row as creatures). The option that controls this behavior can be
|
effectively. For example, creature tokens are displayed to the right of regular
|
||||||
found in Forge preferences under "Graphic Options". It is called "Display Tokens
|
non-token creatures in the same row. If you prefer the classic Forge behavior
|
||||||
in a Separate Row" and defaults to "enabled" (classic Forge behavior) until the
|
(when tokens are displayed on their own row), the option that controls this
|
||||||
new mode is tested thoroughly. If you disable this option, the game will display
|
behavior can be found in Forge preferences under "Graphic Options". It is called
|
||||||
tokens together with other cards as opposed to in their own row, which will make
|
"Display Tokens in a Separate Row".
|
||||||
the game use your screen space more effectively. Tokens will be displayed to the
|
|
||||||
right of the non-token cards in the same row.
|
|
||||||
|
|
||||||
|
|
||||||
- Network play (BETA) -
|
- Network play (BETA) -
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Citadel Siege
|
|||||||
ManaCost:2 W W
|
ManaCost:2 W W
|
||||||
Types:Enchantment
|
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.
|
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: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: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
|
SVar:Boost:AB$ PutCounter | Cost$ 0 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | CounterType$ P1P1 | CounterNum$ 2
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Frontier Siege
|
|||||||
ManaCost:3 G
|
ManaCost:3 G
|
||||||
Types:Enchantment
|
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.
|
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: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: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
|
SVar:ManaGain:AB$ Mana | Cost$ 0 | Produced$ G G
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Monastery Siege
|
|||||||
ManaCost:2 U
|
ManaCost:2 U
|
||||||
Types:Enchantment
|
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.
|
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: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: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
|
SVar:Filter:AB$ Draw | Cost$ 0 | Defined$ You | NumCards$ 1 | SubAbility$ DBDiscard
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Outpost Siege
|
|||||||
ManaCost:3 R
|
ManaCost:3 R
|
||||||
Types:Enchantment
|
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.
|
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: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: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
|
SVar:PseudoDraw:DB$ Mill | Defined$ You | NumCards$ 1 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBMayBePlay
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Palace Siege
|
|||||||
ManaCost:3 B B
|
ManaCost:3 B B
|
||||||
Types:Enchantment
|
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.
|
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: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: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
|
SVar:RaiseDead:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
|
|||||||
UI_CLOSE_ACTION ("NONE"),
|
UI_CLOSE_ACTION ("NONE"),
|
||||||
UI_MANA_LOST_PROMPT ("false"), // Prompt on losing mana when passing priority
|
UI_MANA_LOST_PROMPT ("false"), // Prompt on losing mana when passing priority
|
||||||
UI_PAUSE_WHILE_MINIMIZED("false"),
|
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"),
|
UI_FOR_TOUCHSCREN("false"),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user