mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +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),
|
||||
|
||||
Reference in New Issue
Block a user