From 79a8e7ff2b1ca89bd681cad6f938740c100ad0af Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Fri, 20 Oct 2023 06:19:03 +0200 Subject: coup logging prefix --- rules.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 1e7986c..8dec833 100644 --- a/rules.js +++ b/rules.js @@ -4514,33 +4514,34 @@ function roll_coup_table(drm=0) { let coup = roll_nd6(2, drm) let delta_psp = 0 + const prefix="Outcome: " if (coup === 2) { - log("Coup: Wild success") //: +3d6 PSP, mobilize 2d6 PSP of units for free + log(`${prefix}Wild success`) //: +3d6 PSP, mobilize 2d6 PSP of units for free delta_psp = roll_nd6(3, drm) raise_gov_psl(delta_psp) return 'wild_success' } else if (coup <= 4) { - log("Big success") //: +2d6 PSP, mobilize 1d6 PSP of units for free + log(`${prefix}Big success`) //: +2d6 PSP, mobilize 1d6 PSP of units for free delta_psp = roll_nd6(2, drm) raise_gov_psl(delta_psp) return 'big_success' } else if (coup <= 6) { - log("Coup: Success") //: +1d6 PSP + log(`${prefix}Success`) //: +1d6 PSP delta_psp = roll_d6(drm) raise_gov_psl(delta_psp) return 'success' } else if (coup === 7) { - log("Coup: Fizzle") //: -1d6 PSP + log(`${prefix}Fizzle`) //: -1d6 PSP delta_psp = roll_d6(drm) lower_gov_psl(delta_psp) return 'fizzle' } else if (coup <= 9) { - log("Coup: Failure") //: -2d6 PSP, remove 1 elite unit from the game + log(`${prefix}Failure`) //: -2d6 PSP, remove 1 elite unit from the game delta_psp = roll_nd6(2, drm) lower_gov_psl(delta_psp) return 'failure' } else { - log("Coup: Abject failure") //: -3d6 PSP, remove 1d6 elite units from the game + log(`${prefix}Abject failure`) //: -3d6 PSP, remove 1d6 elite units from the game delta_psp = roll_nd6(3, drm) lower_gov_psl(delta_psp) return 'abject_failure' -- cgit v1.2.3