summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-17 11:09:16 +0200
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-17 11:09:16 +0200
commit7f60f74c4026e04ec303a793015b5805e38eb900 (patch)
tree389129c4e459e5e1d38a6ab65dabf95b6f188968
parentfeac28f95c1ec7b1f0cb3aa821a8f78a153119ab (diff)
downloadalgeria-7f60f74c4026e04ec303a793015b5805e38eb900.tar.gz
prevent PSL from going below 0
-rw-r--r--rules.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 70cbe65..17c3074 100644
--- a/rules.js
+++ b/rules.js
@@ -143,9 +143,9 @@ function raise_fln_psl(amount) {
log(`>FLN PSL +${amount}`)
if (game.fln_psl > MAX_PSL) {
let excess_psl = game.fln_psl - MAX_PSL
- log(`FLN PSL exceeds ${MAX_PSL}; Goverment ${-excess_psl} PSL`)
+ log(`FLN PSL exceeds ${MAX_PSL}`)
game.fln_psl = MAX_PSL
- game.gov_psl -= excess_psl
+ lower_gov_psl(excess_psl)
}
}
@@ -155,9 +155,9 @@ function raise_gov_psl(amount) {
log(`>Goverment PSL +${amount}`)
if (game.gov_psl > MAX_PSL) {
let excess_psl = game.gov_psl - MAX_PSL
- log(`Government PSL exceeds ${MAX_PSL}; FLN ${-excess_psl} PSL`)
+ log(`Government PSL exceeds ${MAX_PSL}`)
game.gov_psl = MAX_PSL
- game.fln_psl -= excess_psl
+ lower_fln_psl(excess_psl)
}
}