mob
var
takedamage=0
verb/Attack()
set category = "Skills"
for(var/mob/m in obounds(16,src))
if(dir == get_dir(src,m))
var/damage=max(0,usr.Strength+usr.Offense+usr.Energy-m.Defense-m.Resistance-m.Endurance)
flick(pick(list("punch", "punch2", "kick", "kick2")), usr)
flick("hit",src)
if(m.Speed>usr.Speed)
dodge()
m.takedamage(usr,damage)
proc
takedamage(mob/attacker,damage)
src.takedamage=1
usr.random = rand(1,15)
if(usr.random == 8)
usr.rightarmdamage()
if(usr.random == 3)
usr.stomachdamage()
if(usr.random == 5)
usr.chestdamage()
if(usr.random == 1)
usr.headdamage()
if(usr.random == 2)
usr.leftarmdamage()
if(usr.random == 4)
usr.leftlegdamage()
if(usr.random == 6)
usr.rightlegdamage()
if(usr.random == 7)
usr.regulardamage()
if(usr.random == 9)
usr.regulardamage()
if(usr.random == 10)
usr.regulardamage()
src.Deathcheck(attacker)
src.takedamage=0
Deathcheck(mob/M)
if(Vitals>0)return
if(src==M)
view(15) << "[src] has killed himself!"
view(15)<<"<font size=2><b><font color=yellow>[name] has been killed by [M.name]</b>"
src.loc=locate(25,41,2)
src.Vitals=src.MaxVitals
src.Energy=src.MaxEnergy
dodge()
if(prob(src.dodge))
view(15)<<"[src] dodges [usr]'s attack!"
return
else
src.takedamage()
mob
proc
headdamage(mob/attacker,damage)
if(usr.Offense>src.Offense)
if(prob(35))
src.takedamage=1
src.HeadDamage-=damage*2
usr.random = rand(1,10)
if(usr.random == 8)
usr.Strength += rand(0.50,5)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,5)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 3)
usr.Strength += rand(0.50,3)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,3)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 5)
usr.Strength += rand(0.50,4)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,4)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 1)
usr.Strength += rand(0.50,6)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,6)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
view(10)<<"<font size=1><font color=red>[usr.name] attacks [attacker] in the head([damage])!"
src.Deathcheck(attacker)
src.takedamage=0
chestdamage(mob/attacker,damage)
if(usr.Offense>src.Offense)
if(prob(45))
src.takedamage=1
src.ChestDamage-=damage*1.65
usr.random = rand(1,10)
if(usr.random == 8)
usr.Strength += rand(0.50,5)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,5)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 3)
usr.Strength += rand(0.50,3)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,3)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 5)
usr.Strength += rand(0.50,4)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,4)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 1)
usr.Strength += rand(0.50,6)
usr.Offense += rand(0.020,2)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,6)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
view(10)<<"<font size=1><font color=red>[usr.name] attacks [attacker] in the chest([damage])!"
src.Deathcheck(attacker)
src.takedamage=0
stomachdamage(mob/attacker,damage)
if(usr.Offense>src.Offense)
if(prob(40))
src.takedamage=1
src.StomachDamage-=damage*1.75
usr.random = rand(1,10)
if(usr.random == 8)
usr.Strength += rand(0.50,5)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,5)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 3)
usr.Strength += rand(0.50,3)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,3)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 5)
usr.Strength += rand(0.50,4)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,4)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 1)
usr.Strength += rand(0.50,6)
usr.Offense += rand(0.020,2)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,6)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
view(10)<<"<font size=1><font color=red>[usr.name] attacks [attacker] in the stomach([damage])!"
src.Deathcheck(attacker)
src.takedamage=0
leftarmdamage(mob/attacker,damage)
if(usr.Offense>src.Offense)
if(prob(55))
src.takedamage=1
src.LeftArmDamage-=damage*1.10
usr.random = rand(1,10)
if(usr.random == 8)
usr.Strength += rand(0.50,5)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,5)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 3)
usr.Strength += rand(0.50,3)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,3)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 5)
usr.Strength += rand(0.50,4)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,4)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 1)
usr.Strength += rand(0.50,6)
usr.Offense += rand(0.020,2)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,6)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
view(10)<<"<font size=1><font color=red>[usr.name] attacks [attacker] in the left arm([damage])!"
src.Deathcheck(attacker)
src.takedamage=0
rightarmdamage(mob/attacker,damage)
if(usr.Offense>src.Offense)
if(prob(55))
src.takedamage=1
src.RightArmDamage-=damage*1.10
usr.random = rand(1,10)
if(usr.random == 8)
usr.Strength += rand(0.50,5)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,5)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 3)
usr.Strength += rand(0.50,3)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,3)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 5)
usr.Strength += rand(0.50,4)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,4)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 1)
usr.Strength += rand(0.50,6)
usr.Offense += rand(0.020,2)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,6)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
view(10)<<"<font size=1><font color=red>[usr.name] attacks [attacker] in the right arm([damage])!"
src.Deathcheck(attacker)
src.takedamage=0
leftlegdamage(mob/attacker,damage)
if(usr.Offense>src.Offense)
if(prob(55))
src.takedamage=1
src.LeftLegDamage-=damage*1.05
usr.random = rand(1,10)
if(usr.random == 8)
usr.Strength += rand(0.50,5)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,5)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 3)
usr.Strength += rand(0.50,3)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,3)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 5)
usr.Strength += rand(0.50,4)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,4)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 1)
usr.Strength += rand(0.50,6)
usr.Offense += rand(0.020,2)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,6)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
view(10)<<"<font size=1><font color=red>[usr.name] attacks [attacker] in the left leg([damage])!"
src.Deathcheck(attacker)
src.takedamage=0
rightlegdamage(mob/attacker,damage)
if(usr.Offense>src.Offense)
if(prob(55))
src.takedamage=1
src.RightLegDamage-=damage*1.05
usr.random = rand(1,10)
if(usr.random == 8)
usr.Strength += rand(0.50,5)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,5)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 3)
usr.Strength += rand(0.50,3)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,3)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 5)
usr.Strength += rand(0.50,4)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,4)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 1)
usr.Strength += rand(0.50,6)
usr.Offense += rand(0.020,2)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,6)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
view(10)<<"<font size=1><font color=red>[usr.name] attacks [src] in the right leg([damage])!"
src.takedamage=0
regulardamage(mob/attacker,damage)
if(usr.Offense>src.Offense)
if(prob(80))
src.takedamage=1
src.RegularDamage-=damage
usr.random = rand(1,10)
if(usr.random == 8)
usr.Strength += rand(0.50,5)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,5)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 3)
usr.Strength += rand(0.50,3)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,3)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 5)
usr.Strength += rand(0.50,4)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.020,2)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,4)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
if(usr.random == 1)
usr.Strength += rand(0.50,6)
usr.Offense += rand(0.020,2)
usr.Energy += rand(200,1000)
usr.Offense += rand(0.010,1)
src.Strength += rand(0.50,6)
src.Energy += rand(200,1000)
src.Offense += rand(0.020,2)
src.Offense += rand(0.010,1)
view(10)<<"<font size=1><font color=red>[usr.name] attacks [src] for ([damage])!"
src.takedamage=0</b>
Problem description:Hey, am trying to work on this new game I'm making and I was wondering if anyone could help me figure out what's wrong with my attack system.. I'm blind to the fact of how I could make it better? I'm not that experience and I just need some assistance and a better way of doing this. I know my coding is terrible but bare with me, ha. Edit: As you can see there is a gain system along with the combat system giving users the opportunity to increase physique skills by doing something actively, also I'm not sure about the limb procs at all they don' seem to function.