Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test3
local health = 55 local maxHP = 100 local hp_diff = (maxHP - health) local reps = math.max(1, math.floor(hp_diff / 10)) local inc_hp = math.ceil(hp_diff / reps) print(reps, inc_hp) for k = 1, reps do if (health > maxHP) then break end health = math.min(maxHP, health + inc_hp) end print(health)
run
|
edit
|
history
|
help
-1
cases
True every 5
test3
Lua stuff
Beispiel
python like round function in lua
test123
String Searcher
Goalless DRAWS
test