ID:1614025
 
(See the best response by Kozuma3.)
Code:
mob/proc/BoostCheck()
var/Value = src.Level < 100 ? 9 : (src.Level / 10)
src.ExpBoost = min(max(src.ExpBoost , 1), round(Value))


Problem description:

Basically I am trying to avoid a bunch of If statements and this was my best, that is the current code, what I am trying to accomplish is to limit the exp boost. An example: if the mob is level 100 then it will be limited to an exp boost of 10 <-- That is correct but if it's level 150 or 160 then it will be 15 or 16, I wanted it to be 20.

Thanks in advance, I'll feel bad if it's a really easy issue lol
Best response
100 = 10% , 150 = 20% , 200 = 30% , 250 = 40%

var/Value = (Level < 100 ? 9 : (Level * 0.2) - 10)
Not exactly what I expected but it goes well, thanks!