ID:139647
 
I have made a code that helps player powerup but there is a problem it dont power up Ki it only power up HP here is my code
mob/var
powering = 0
power_delay = 0
power_up_skill = 3
power_up_aura = 0
mob
proc
PUP_PLM()
var/healing = round(src.MaxHP * 0.23)
var/KIHEAlING=round(src.MaxKi * 0.23)
var/max_pl_healing = 0
var/max_ki_healing = 0
if(src.power_up_skill == 1)
max_pl_healing = src.MaxHP * 0.33
max_ki_healing = src.MaxKi * 0.33
if(src.power_up_skill == 2)
max_pl_healing = src.MaxHP * 0.66
max_ki_healing = src.MaxKi * 0.66
if(src.power_up_skill == 3)
max_pl_healing = src.MaxHP
max_ki_healing = src.MaxKi




if(!src.PUP)
src.icon_state = ""
sleep(50)
return
else
if(!src.HP >= max_pl_healing||!src.Ki >= max_ki_healing)
if(src.HP >= max_pl_healing)
src.HP = max_pl_healing
src.PUP = 0
src.icon_state = ""
sleep(25)
return

else
src.HP += healing
src.icon_state = "powerup"
if(src.Ki >= max_ki_healing)
src.Ki = max_ki_healing
src.PUP = 0
src.icon_state = ""
sleep(25)
return
else
src.Ki += KIHEAlING
src.icon_state = "powerup"



Nothing happens to your KI because you end the procedure after healing the HP. remove the return.