I'm making it so that moving drains your movement(mv) stat. When you sit, you regain your mv. I want it so that different types of turfs regain mv at different rates.
here is an example of what i have so far:
turf/var
mvregen = 5
turf/grass
icon = 'grass.dmi'
turf/dirt
icon = 'dirt.dmi'
mvregen = 2
the turfs. mvregen defaults to 5, but on dirt you only regen 2
mob/proc
regenMove(mob/M, amount)
M << "You gain [amount] moves"
M.mv += amount
if(M.mv >= M.maxmv)
M << "You feel fully refreshed"
M.mv = M.maxmv
M.resting = 0
sleep(CBT_ROUND*2)
mob/pc/verb
Sit()
usr.resting = 1
usr << "You sit down."
sleep(CBT_ROUND*2)
while(resting)
regenMove(usr, ?) //what do i put here?
The verbs and proc, everything works great with a static amount being passed to regenMove(), but how do i pass whatever turf the usr is sitting on?
Make a var for a turf in your loc, then you can modify the vars of the var.