diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-01-30 22:27:29 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:39 +0100 |
commit | df2880f3fafd3be2321ecfd0a26b3917f516ebfd (patch) | |
tree | caa4442d97224e298eeafaf4b020db3f9de8c348 /rules.js | |
parent | 7f68f6bcc1ac1486d7e518ace6786d3105c72cac (diff) | |
download | nevsky-df2880f3fafd3be2321ecfd0a26b3917f516ebfd.tar.gz |
Only log the final feed.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -667,7 +667,10 @@ function feed_lord_skip(lord) { function feed_lord(lord) { // reuse "moved" flag for hunger - set_lord_moved(lord, get_lord_moved(lord) - 1) + let n = get_lord_moved(lord) - 1 + set_lord_moved(lord, n) + if (n === 0) + log(`Fed L${lord}.`) } function get_lord_array_position(lord) { @@ -9918,13 +9921,11 @@ states.feed = { }, prov(lord) { push_undo() - log(`Fed L${lord}.`) add_lord_assets(lord, PROV, -1) feed_lord(lord) }, loot(lord) { push_undo() - log(`Fed L${lord}.`) add_lord_assets(lord, LOOT, -1) feed_lord(lord) }, @@ -9968,14 +9969,12 @@ states.feed_lord_shared = { }, prov(lord) { push_undo() - log(`Fed L${game.who}.`) add_lord_assets(lord, PROV, -1) feed_lord(game.who) resume_feed_lord_shared() }, loot(lord) { push_undo() - log(`Fed L${game.who}.`) add_lord_assets(lord, LOOT, -1) feed_lord(game.who) resume_feed_lord_shared() |