mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Clean up some code ugliness and fix a meaningless "unknown key: turn" error message in GameState.
This commit is contained in:
@@ -82,7 +82,7 @@ public abstract class GameState {
|
|||||||
private String precastHuman = null;
|
private String precastHuman = null;
|
||||||
private String precastAI = null;
|
private String precastAI = null;
|
||||||
|
|
||||||
private int turn;
|
private int turn = 1;
|
||||||
|
|
||||||
// Targeting for precast spells in a game state (mostly used by Puzzle Mode game states)
|
// Targeting for precast spells in a game state (mostly used by Puzzle Mode game states)
|
||||||
private final int TARGET_NONE = -1; // untargeted spell (e.g. Joraga Invocation)
|
private final int TARGET_NONE = -1; // untargeted spell (e.g. Joraga Invocation)
|
||||||
@@ -398,10 +398,9 @@ public abstract class GameState {
|
|||||||
|
|
||||||
if (categoryName.equals("turn")) {
|
if (categoryName.equals("turn")) {
|
||||||
turn = Integer.parseInt(categoryValue);
|
turn = Integer.parseInt(categoryValue);
|
||||||
} else {
|
|
||||||
turn = 1;
|
|
||||||
}
|
}
|
||||||
if (categoryName.endsWith("life")) {
|
|
||||||
|
else if (categoryName.endsWith("life")) {
|
||||||
if (isHuman)
|
if (isHuman)
|
||||||
humanLife = Integer.parseInt(categoryValue);
|
humanLife = Integer.parseInt(categoryValue);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user