forked from External/mage
GUI related improves:
* GUI: fixed that choose triggers/piles dialog doesn't close correctly before cast mode choose (#8225); * GUI: fixed that some choose dialogs doesn't update battlefield state (example: choose amount, choose mana); * Game: fixed duplicated json logs at the game's end;
This commit is contained in:
parent
f31781e4a4
commit
46081d9185
11 changed files with 212 additions and 171 deletions
|
|
@ -17,9 +17,11 @@ public class AbilityPickerView implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Map<UUID, String> choices = new LinkedHashMap<>();
|
||||
private String message = null;
|
||||
private String message;
|
||||
private GameView gameView;
|
||||
|
||||
public AbilityPickerView(String objectName, List<? extends Ability> abilities, String message) {
|
||||
public AbilityPickerView(GameView gameView, String objectName, List<? extends Ability> abilities, String message) {
|
||||
this.gameView = gameView;
|
||||
this.message = message;
|
||||
|
||||
int num = 0;
|
||||
|
|
@ -44,6 +46,12 @@ public class AbilityPickerView implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
public AbilityPickerView(GameView gameView, Map<UUID, String> modes, String message) {
|
||||
this.gameView = gameView;
|
||||
this.choices = modes;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
private String getAbilityRules(Ability ability, String objectName) {
|
||||
String rule = ability.getRule(objectName);
|
||||
if (rule.isEmpty()) {
|
||||
|
|
@ -55,11 +63,6 @@ public class AbilityPickerView implements Serializable {
|
|||
return rule;
|
||||
}
|
||||
|
||||
public AbilityPickerView(Map<UUID, String> modes, String message) {
|
||||
this.choices = modes;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Map<UUID, String> getChoices() {
|
||||
return choices;
|
||||
}
|
||||
|
|
@ -67,4 +70,8 @@ public class AbilityPickerView implements Serializable {
|
|||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public GameView getGameView() {
|
||||
return gameView;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue