diff --git a/docs/dev/Lua API.rst b/docs/dev/Lua API.rst index 004d71841..e1952158b 100644 --- a/docs/dev/Lua API.rst +++ b/docs/dev/Lua API.rst @@ -3583,7 +3583,9 @@ Examples: -- check projectile distance flown is zero, get firer, etc... local multiplier = tonumber(customRawTokens.getToken(bow, "EXAMPLE_MOD_FIRE_RATE_MULTIPLIER")) or 1 - firer.counters.think_counter = math.floor(firer.counters.think_counter * multiplier) + if firer.counters.think_counter > 0 then + firer.counters.think_counter = math.max(math.floor(firer.counters.think_counter * multiplier), 1) + end * Something for a script that prints help text about different types of units::