mob
var/tmp
defense = 5
injuries = 0
MaxInjuries = 100
lvl = 1
str = 10
reiki = 10
youki = 100
Maxyouki = 100
stat_points = 0
dmg
mob
verb
Rest()
stun=1
if(usr.youki <= 150)
usr.youki += 10
sleep(10)
if(usr.youki <= 150)
usr.youki += 20
sleep(10)
if(usr.youki <= 150)
usr.youki += 20
if(usr.youki ==160)
usr.youki -= 10
stun=0
proc
Attack(mob/User, mob/Target, Type = "Str", Stat="injuries", Chance=100, Cure, Extra)
if(!prob(Chance))
switch(Type)
if("Str")
dmg = User.str - (Target.defense)
if("Reiki")
dmg = User.reiki - (Target.defense)
//If Extra has been set
if(Extra)
//Set Damage to [Extra]%
dmg = (dmg/100)*Extra
//If damage is lower than 0, set it to 0
dmg = max(0,dmg)
mob
Boxer
verb
Meele()
var/mob/M = locate(/mob) in get_step(src,src.dir)
if(M)
if(!usr.BMeeleCD)return
usr.BMeeleCD = FALSE
flick('Boxer.dmi',usr)// flick jab
flick("Jab",usr)// ^
Attack(usr,M,"Str","Injuries",100,0,100)
sleep(5)
usr.BMeeleCD = TRUE
//If Cure has been set
if(Cure)
//Change damage to a negative value
dmg *= -1
switch(Stat)
if("Injuries")
Target.injuries += dmg
if("Youki")
Target.youki += dmg
//If the Attack is to cure Target, output the following
if(Cure)
//If the User is the Target, and is also a Player
if(User == Target && User.client)
User << "You restore your [Stat] by [-dmg] points!"
//Otherwise
else
//If User is a Player
if(User.client)
User << "You restore [Target]'s [Stat] by [-dmg] points!"
//If Target is a Player
if(Target.client)
Target << "[User] restored your [Stat] by [-dmg] points!"
//If the Attck is to damage the Target, output this instead
else
if(User == Target && User.client)
User <<output( "You attack [Target] for [dmg] Damage using a [Type] attack!", "output1")
DeathCheck(User,Target)
else
if(User.client)
User <<output( "You attack [Target] for [dmg] Damage using a [Type] attack!", "output1")
DeathCheck(User,Target)
if(Target.client)
Target <<output( "[User] attacked you for [dmg] Damage using a [Type] attack!", "output1")
DeathCheck(User,Target)
proc
DeathCheck(mob/Attacker, mob/Attackee)
if(Attackee.injuries >= Attackee.MaxInjuries)
Attackee.injuries = 1
Attackee << "<b>You Died!</b>"
Attacker << "<b>You killed [Attackee]!<b>"
Attackee.loc=locate(1,1,1)
return 1
return 0
Problem description: no errors but injuries are not being added and dmg variable is also not being well its not working
if(!prob(Chance))
It should be
if(prob(Chance))