mob
verb
Fast_Punch()
set category = "Combat"
for (var/mob/M in oview(1))
if (usr.x == M.x && usr.y == M.y)
else
if((src.dir==1 && M.y==(src.y+1) && usr.x==M.x) | (src.dir==2 && M.y==(src.y-1) && usr.x==M.x) | (src.dir==8 && M.x==(src.x-1) && usr.y==M.y) | (src.dir==4 && M.x==(src.x+1) && usr.y==M.y) | (src.dir==9 && M.x==(src.x-1) && M.y==(src.y+1)) | (src.dir==6 && M.x==(src.x+1) && M.y==(src.y-1)) | (src.dir==10 && M.x==(src.x-1) && M.y==(src.y-1)) | (src.dir==5 && M.x==(src.x+1) && M.y==(src.y+1)))
if (M.attackable && usr.health >= 25)
if (!usr.punchdelay)
usr.random = rand (1, 10)
M.random = rand (1, 10)
usr.punchdelay = 1
usr.randomarm = rand(1,2)
spawn(100/punchdelaytime+2)
usr.punchdelay = 0
if ((usr.random*usr.health)+(usr.perc*usr.agi) > (M.random*M.health)+(usr.perc*usr.agi))
if (usr.randomarm == 1)
M << "<font color = blue>[usr] hits you hard in the [M.bodyparttext]!"
usr << "<font color = blue>You hit [M] hard in the [M.bodypart]!"
M.random = rand(10,75)
usr.random = rand(5,25)
punchdamage = (usr.str*100)+(usr.random)
if (usr.bodypart == 1)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-usr.punchdamage)+(M.BP/2)+(M.cons*100)-(usr.rarmhealth/4)
usr.rarmhealth = (usr.rarmhealth-usr.BP/2)+(usr.cons*10)
M.rarmhealth = (M.rarmhealth-(usr.rarmhealth/4))
if (usr.bodypart == 2)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)-(usr.larmhealth/4)
usr.larmhealth = (usr.larmhealth-usr.BP/2)+(usr.cons*10)
M.larmhealth = (M.larmhealth-(usr.larmhealth/4))
if (usr.bodypart == 3)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
usr.rleghealth = (usr.rleghealth-usr.BP/2)+(usr.cons*10)
M.rleghealth = (M.rleghealth-(usr.rleghealth/4))
if (usr.bodypart == 4)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
usr.lleghealth = (usr.lleghealth-usr.BP/2)+(usr.cons*10)
M.lleghealth = (M.lleghealth-(usr.lleghealth/4))
if (usr.bodypart == 5)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
if (usr.bodypart == 6)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
if (usr.bodypart == 7)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)*2
if (usr.bodypart == 8)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)*2
if (usr.bodypart == 9)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)*2
if (usr.bodypart == 10)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)*2
else if ((usr.random*usr.health)+(usr.perc*usr.agi) == (M.random*M.health)+(usr.perc*usr.agi))
if (M.dir == usr.dir | M.x+1 == usr.x | M.x-1 == usr.x)
M << "<font color = blue>You quickly block [usr]'s fast punch!"
usr << "<font color = blue>[M] blocks your punch!"
if (M.bodypart == 1)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)/2
usr.rarmhealth = (usr.rarmhealth-usr.BP/2)+(usr.cons*10)
M.rarmhealth = (M.rarmhealth-(usr.rarmhealth/4))/2
if (usr.bodypart == 2)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)/2
usr.larmhealth = (usr.larmhealth-usr.BP/2)+(usr.cons*10)
M.larmhealth = (M.larmhealth-(usr.larmhealth/4))/2
if (usr.bodypart == 3)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)/2
usr.rleghealth = (usr.rleghealth-usr.BP/2)+(usr.cons*10)
M.rleghealth = (M.rleghealth-(usr.rleghealth/4))/2
if (usr.bodypart == 4)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)/2
usr.lleghealth = (usr.lleghealth-usr.BP/2)+(usr.cons*10)
M.lleghealth = (M.lleghealth-(usr.lleghealth/4))/2
if (usr.bodypart == 5)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)/2
if (usr.bodypart == 6)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)/2
if (usr.bodypart == 7)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
if (usr.bodypart == 8)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
if (usr.bodypart == 9)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
if (usr.bodypart == 10)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
else
M << "<font color = blue>[usr] hits you hard in the [M.bodyparttext]!"
usr << "<font color = blue>You hit [M] hard in the [M.bodypart]!"
M.random = rand(10,75)
usr.random = rand(5,25)
punchdamage = (usr.str*100)+(usr.random)
if (usr.bodypart == 1)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
usr.rarmhealth = (usr.rarmhealth-usr.BP/2)+(usr.cons*10)
M.rarmhealth = (M.rarmhealth-(usr.rarmhealth/4))
if (usr.bodypart == 2)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
if (usr.bodypart == 3)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
M.rleghealth = (M.rleghealth-M.BP/2)+(M.cons*10)
usr.rleghealth = (usr.rleghealth-(M.rleghealth/4))
if (usr.bodypart == 4)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
M.lleghealth = (M.lleghealth-M.BP/2)+(M.cons*10)
usr.lleghealth = (usr.lleghealth-(M.lleghealth/4))
if (usr.bodypart == 5)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
if (usr.bodypart == 6)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)
if (usr.bodypart == 7)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)*2
if (usr.bodypart == 8)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)*2
if (usr.bodypart == 9)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)*2
if (usr.bodypart == 10)
usr.health = (usr.health-usr.punchdamage/2)+(usr.BP)+(usr.cons*100)
M.health = (M.health-M.punchdamage)+(M.BP/2)+(M.cons*100)*2
else if ((usr.random*usr.health)+(usr.perc*usr.agi) < (M.random*M.health)+(usr.perc*usr.agi))
M.random = rand(1,10)
usr.random = rand(1,10)
if ((usr.random*usr.health)+(usr.perc*usr.agi) > (M.random*M.health)+(usr.perc*usr.agi))
usr << "<font color = blue>[M] dodges your fast punch!"
M << "<font color = blue>You dodge [usr]'s fast punch!"
if ((usr.random*usr.health)+(usr.perc*usr.agi) <= (M.random*M.health)+(usr.perc*usr.agi))
usr << "<font color = blue>[M] counters your fast punch!"
M << "<font color = blue>You counter [usr]'s fast punch!"
M.random = rand(10,75)
usr.random = rand(5,25)
punchdamage = (usr.str*100)+(usr.random)
if (M.bodypart == 1)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)
M.rarmhealth = (M.rarmhealth-M.BP/2)+(M.cons*10)
usr.rarmhealth = (usr.rarmhealth-(M.rarmhealth/4))
if (M.bodypart == 2)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)
M.larmhealth = (M.larmhealth-M.BP/2)+(M.cons*10)
usr.larmhealth = (usr.larmhealth-(M.larmhealth/4))
if (M.bodypart == 3)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)
if (M.bodypart == 4)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)
if (M.bodypart == 5)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)
if (M.bodypart == 6)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)
if (M.bodypart == 7)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)*2
if (M.bodypart == 8)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)*2
if (M.bodypart == 9)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)*2
if (M.bodypart == 10)
M.health = (M.health-M.punchdamage/2)+(M.BP)+(M.cons*100)
usr.health = (usr.health-usr.punchdamage)+(usr.BP/2)+(usr.cons*100)*2
Problem description: It doesn't attack. I don't really know why....(Sorry for the long code)
...