mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- The Siege cycle cards now visualize their chosen mode in the card detail panel.
This commit is contained in:
@@ -53,6 +53,9 @@ public class ChooseGenericEffect extends SpellAbilityEffect {
|
||||
boolean dontNotifySelf = sa.getParam("ShowChoice").equals("ExceptSelf");
|
||||
p.getGame().getAction().nofityOfValue(sa, p, chosenValue, dontNotifySelf ? sa.getActivatingPlayer() : null);
|
||||
}
|
||||
if (sa.hasParam("SetChosenMode")) {
|
||||
sa.getHostCard().setChosenMode(chosenValue);
|
||||
}
|
||||
p.getGame().fireEvent(new GameEventCardModeChosen(p, host.getName(), chosenValue, sa.hasParam("ShowChoice")));
|
||||
AbilityUtils.resolve(chosenSA);
|
||||
}
|
||||
|
||||
@@ -223,6 +223,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
private int chosenNumber;
|
||||
private Player chosenPlayer;
|
||||
private Direction chosenDirection = null;
|
||||
private String chosenMode = "";
|
||||
|
||||
private Card exiledWith = null;
|
||||
|
||||
@@ -1287,6 +1288,14 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
view.updateChosenDirection(this);
|
||||
}
|
||||
|
||||
public String getChosenMode() {
|
||||
return chosenMode;
|
||||
}
|
||||
public void setChosenMode(String mode) {
|
||||
chosenMode = mode;
|
||||
view.updateChosenMode(this);
|
||||
}
|
||||
|
||||
// used for cards like Meddling Mage...
|
||||
public final String getNamedCard() {
|
||||
return namedCard;
|
||||
|
||||
@@ -280,6 +280,13 @@ public class CardView extends GameEntityView {
|
||||
set(TrackableProperty.ChosenDirection, c.getChosenDirection());
|
||||
}
|
||||
|
||||
public String getChosenMode() {
|
||||
return get(TrackableProperty.ChosenMode);
|
||||
}
|
||||
void updateChosenMode(Card c) {
|
||||
set(TrackableProperty.ChosenMode, c.getChosenMode());
|
||||
}
|
||||
|
||||
private String getRemembered() {
|
||||
return get(TrackableProperty.Remembered);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public enum TrackableProperty {
|
||||
ChosenCards(TrackableTypes.CardViewCollectionType),
|
||||
ChosenPlayer(TrackableTypes.PlayerViewType),
|
||||
ChosenDirection(TrackableTypes.EnumType(Direction.class)),
|
||||
ChosenMode(TrackableTypes.StringType),
|
||||
Remembered(TrackableTypes.StringType),
|
||||
NamedCard(TrackableTypes.StringType),
|
||||
PlayerMayLook(TrackableTypes.PlayerViewCollectionType, false),
|
||||
|
||||
@@ -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 | ShowChoice$ ExceptSelf
|
||||
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | 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
|
||||
|
||||
@@ -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 | ShowChoice$ ExceptSelf
|
||||
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | 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
|
||||
|
||||
@@ -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 | ShowChoice$ ExceptSelf
|
||||
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | 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
|
||||
|
||||
@@ -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 | ShowChoice$ ExceptSelf
|
||||
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | 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$ DBEffect
|
||||
|
||||
@@ -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 | ShowChoice$ ExceptSelf
|
||||
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | 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
|
||||
|
||||
@@ -417,6 +417,14 @@ public class CardDetailUtil {
|
||||
area.append("(chosen player: " + card.getChosenPlayer() + ")");
|
||||
}
|
||||
|
||||
// chosen mode
|
||||
if (!card.getChosenMode().equals("")) {
|
||||
if (area.length() != 0) {
|
||||
area.append("\n");
|
||||
}
|
||||
area.append("(chosen mode: " + card.getChosenMode() + ")");
|
||||
}
|
||||
|
||||
// named card
|
||||
if (!card.getNamedCard().equals("")) {
|
||||
if (area.length() != 0) {
|
||||
|
||||
Reference in New Issue
Block a user