summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js30
1 files changed, 20 insertions, 10 deletions
diff --git a/rules.js b/rules.js
index 7fdebf0..216d8d9 100644
--- a/rules.js
+++ b/rules.js
@@ -1474,12 +1474,17 @@ function resume_greek_naval_battle() {
states.persian_naval_retreat_attacker = {
prompt: function (view, current) {
- if (is_inactive_player(current))
- return view.prompt = "Persian Naval Battle: Attacker retreat?";
- view.prompt = "Persian Naval Battle: Continue the battle in " + game.where + " or retreat?";
- gen_action(view, 'port', game.where); // shortcut for battle
- if (game.greek.event !== THEMISTOCLES)
+ if (game.greek.event === THEMISTOCLES) {
+ if (is_inactive_player(current))
+ return view.prompt = "Persian Naval Battle: Continue the battle.";
+ view.prompt = "Persian Naval Battle: Continue the battle in " + game.where + ".";
+ } else {
+ if (is_inactive_player(current))
+ return view.prompt = "Persian Naval Battle: Attacker retreat?";
+ view.prompt = "Persian Naval Battle: Continue the battle in " + game.where + " or retreat?";
gen_action(view, 'port', game.from);
+ }
+ gen_action(view, 'port', game.where); // shortcut for battle
gen_action(view, 'battle');
},
port: function (to) {
@@ -1501,12 +1506,17 @@ states.persian_naval_retreat_attacker = {
states.greek_naval_retreat_attacker = {
prompt: function (view, current) {
- if (is_inactive_player(current))
- return view.prompt = "Greek Naval Battle: Attacker retreat?";
- view.prompt = "Greek Naval Battle: Continue the battle in " + game.where + " or retreat?";
- gen_action(view, 'port', game.where); // shortcut for battle
- if (game.greek.event !== THEMISTOCLES)
+ if (game.greek.event === THEMISTOCLES) {
+ if (is_inactive_player(current))
+ return view.prompt = "Greek Naval Battle: Continue the battle.";
+ view.prompt = "Greek Naval Battle: Continue the battle in " + game.where + ".";
+ } else {
+ if (is_inactive_player(current))
+ return view.prompt = "Greek Naval Battle: Attacker retreat?";
+ view.prompt = "Greek Naval Battle: Continue the battle in " + game.where + " or retreat?";
gen_action(view, 'port', game.from);
+ }
+ gen_action(view, 'port', game.where); // shortcut for battle
gen_action(view, 'battle');
},
port: function (to) {