- The Siege cycle cards now visualize their chosen mode in the card detail panel.

This commit is contained in:
Agetian
2017-06-12 13:20:21 +00:00
parent de837d66f9
commit ea65d1de4d
10 changed files with 33 additions and 5 deletions

View File

@@ -53,6 +53,9 @@ public class ChooseGenericEffect extends SpellAbilityEffect {
boolean dontNotifySelf = sa.getParam("ShowChoice").equals("ExceptSelf"); boolean dontNotifySelf = sa.getParam("ShowChoice").equals("ExceptSelf");
p.getGame().getAction().nofityOfValue(sa, p, chosenValue, dontNotifySelf ? sa.getActivatingPlayer() : null); 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"))); p.getGame().fireEvent(new GameEventCardModeChosen(p, host.getName(), chosenValue, sa.hasParam("ShowChoice")));
AbilityUtils.resolve(chosenSA); AbilityUtils.resolve(chosenSA);
} }

View File

@@ -223,6 +223,7 @@ public class Card extends GameEntity implements Comparable<Card> {
private int chosenNumber; private int chosenNumber;
private Player chosenPlayer; private Player chosenPlayer;
private Direction chosenDirection = null; private Direction chosenDirection = null;
private String chosenMode = "";
private Card exiledWith = null; private Card exiledWith = null;
@@ -1287,6 +1288,14 @@ public class Card extends GameEntity implements Comparable<Card> {
view.updateChosenDirection(this); view.updateChosenDirection(this);
} }
public String getChosenMode() {
return chosenMode;
}
public void setChosenMode(String mode) {
chosenMode = mode;
view.updateChosenMode(this);
}
// used for cards like Meddling Mage... // used for cards like Meddling Mage...
public final String getNamedCard() { public final String getNamedCard() {
return namedCard; return namedCard;

View File

@@ -280,6 +280,13 @@ public class CardView extends GameEntityView {
set(TrackableProperty.ChosenDirection, c.getChosenDirection()); set(TrackableProperty.ChosenDirection, c.getChosenDirection());
} }
public String getChosenMode() {
return get(TrackableProperty.ChosenMode);
}
void updateChosenMode(Card c) {
set(TrackableProperty.ChosenMode, c.getChosenMode());
}
private String getRemembered() { private String getRemembered() {
return get(TrackableProperty.Remembered); return get(TrackableProperty.Remembered);
} }

View File

@@ -36,6 +36,7 @@ public enum TrackableProperty {
ChosenCards(TrackableTypes.CardViewCollectionType), ChosenCards(TrackableTypes.CardViewCollectionType),
ChosenPlayer(TrackableTypes.PlayerViewType), ChosenPlayer(TrackableTypes.PlayerViewType),
ChosenDirection(TrackableTypes.EnumType(Direction.class)), ChosenDirection(TrackableTypes.EnumType(Direction.class)),
ChosenMode(TrackableTypes.StringType),
Remembered(TrackableTypes.StringType), Remembered(TrackableTypes.StringType),
NamedCard(TrackableTypes.StringType), NamedCard(TrackableTypes.StringType),
PlayerMayLook(TrackableTypes.PlayerViewCollectionType, false), PlayerMayLook(TrackableTypes.PlayerViewCollectionType, false),

View File

@@ -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 | 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: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

View File

@@ -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 | 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: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

View File

@@ -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 | 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: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

View File

@@ -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 | 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: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$ DBEffect SVar:PseudoDraw:DB$ Mill | Defined$ You | NumCards$ 1 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBEffect

View File

@@ -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 | 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: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

View File

@@ -417,6 +417,14 @@ public class CardDetailUtil {
area.append("(chosen player: " + card.getChosenPlayer() + ")"); 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 // named card
if (!card.getNamedCard().equals("")) { if (!card.getNamedCard().equals("")) {
if (area.length() != 0) { if (area.length() != 0) {