diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-19 11:23:15 +0200 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-19 11:36:09 +0200 |
commit | 2dc01dc75e85e4723667819d8575cc08157ed3ee (patch) | |
tree | 5d0acff128183a5dfffe9b37606f051c8db86a0c /rules.js | |
parent | 932b85f9c0da6e0eb5f5953d243ea67e5c0a2008 (diff) | |
download | algeria-2dc01dc75e85e4723667819d8575cc08157ed3ee.tar.gz |
fix: Distribute PSL could lead to FLN PSL overflow
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -2951,12 +2951,19 @@ function goto_distribute_psp(who, psp, reason) { function distribute_psl(where, delta) { push_undo() - log(`>${player_name(where)} PSL ${add_sign(delta)}`) if (where === FLN) { - game.fln_psl += delta + if (delta > 0) { + raise_fln_psl(delta) + } else { + lower_fln_psl(-delta) + } } else { - game.gov_psl += delta + if (delta > 0) { + raise_gov_psl(delta) + } else { + lower_gov_psl(-delta) + } } game.distribute.psp -= Math.abs(delta) if (check_victory()) |