mob
verb
Attack()
set category = "Taijutsu"
for(var/mob/M in get_step(usr,usr.dir))
if(M.ingat||M.intank)
return
if(usr.battlingRC)
return
if(M.battlingRC)
return
if(M.Phasing)
usr<<"<font size=1>Your attack go right through [M]!"
return
if(M.drunk&&M.NonClan)
view()<<"[M] dodges [usr]'s attack"
return
if(!usr.canattack)
return
if(M.inspike)
usr<<"<font size=1>Your attack bounces off of [usr]!"
return
if(M.inbone)
usr<<"<font size=1>Your attack bounces off of [usr]!"
return
if(M.sphere)
usr<<"<font size=1>Your attack bounces off of the sand!"
return
if(M.PK==0)
usr<<"NONE PK ZONE!!!"
return
if(usr.PK==0)
usr<<"NONE PK ZONE!!!"
return
if(M.Kaiten)
var/damage = round(usr.tai-M.tai/4)
if(damage <= 1)
damage = 1
usr <<"<font size=1>You attack [M] but their kaiten hakkeshou reflects the damage back at you."
M <<"<font size=1>You reflect [usr]'s attack causing them to hurt themselfs."
usr.health -= damage
usr.Death(M)
usr.dead = 1
return
else
usr <<"<font size=1>You attack [M] but their kaiten hakkeshou reflects the damage back at you."
M <<"<font size=1>You reflect [usr]'s attack causing them to hurt themselfs."
usr.health -= damage
usr.Death(M)
src.dead = 1
return
if(M.ingat)
usr << "<font size=1>Your attack bounces off of [M] because they are in gatsuuga.."
return
if(M.bloodtaste)
for(var/obj/Religion/jashinsymbol2/A in oview(0,M))
if(A.owner==M)
for(var/mob/C in world)
if("[C]" in M.JashinRitual)
usr << "<font size=1>You attack [M]!"
var/damage = round(usr.tai/1.5 + usr.swordD)
damage+=rand(1,damage)
view() << "<font size=1>[usr] attacks [M] for [damage]!"
M.health -= damage
C.health -= damage
M.Death(usr)
C.Death(M)
return
if(M.immortal)
return
else
if(usr.Tekken&&usr.canattack)
usr.canattack=0
usr << "<font size=1>You attack [M]!"
flick("Attack",usr)
var/damage = round(usr.tai*1.5 + usr.swordD)
damage+=rand(1,damage)
if(damage <= 1)
damage = 1
view() << "<font size=1>[usr] attacks [M] for [damage]!"
M.health -= damage
M.Death(usr)
if(istype(M,/mob/enemy))
M.killlist += src.name
if(istype(M,/mob/player))
usr.random = rand(1,8)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.exp += rand(1,2)
usr.Levelup()
usr.taiup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.canattack=1
return
else
usr.random = rand(1,20)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.canattack=1
return
else
view() << "<font size=1>[usr] attacks [M] for [damage]!"
M.health -= damage
M.Death(usr)
if(istype(M,/mob/enemy))
M.killlist += src.name
if(istype(M,/mob/player))
usr.random = rand(1,8)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.canattack=1
return
else
usr.random = rand(1,20)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.canattack=1
return
else if(usr.Jyuken&&usr.canattack)
if(usr.chakra >= 2)
usr.canattack =0
usr << "<font size=1>You attack [M] using Jyuuken!"
flick("Attack",usr)
flick("Jyuken",usr)
var/damage = round(usr.tai + usr.swordD)
damage+=rand(1,damage)
if(damage <= 1)
damage = 1
view() << "<font size=1>[usr] attacks [M] for [damage]!"
M.health -= damage
M.chakra -= damage
usr.chakra -= 2
M.Death(usr)
if(istype(M,/mob/enemy))
M.killlist += src.name
if(istype(M,/mob/player))
usr.random = rand(1,8)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else
usr.random = rand(1,20)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else
view() << "<font size=1>[usr] attacks [M] for [damage]!"
M.health -= damage
M.chakra -= damage
usr.chakra -= 2
M.Death(usr)
if(istype(M,/mob/enemy))
M.killlist += src.name
if(istype(M,/mob/player))
usr.random = rand(1,8)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else
usr.random = rand(1,20)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else
usr<<"<font size=1>You dont have enough chakra to use Jyuuken so you are now useing tekken."
usr.Jyuken = 0
usr.Tekken = 1
return
else if(usr.FrogStyleKata&&usr.canattack)
if(usr.NaturalEnergy >= 2)
usr.canattack =0
usr << "<font size=1>You attack [M] using Frog Kata!"
flick("Attack",usr)
flick("Jyuken",usr)
var/damage = round(usr.tai + usr.swordD)
damage+=rand(1,damage)
if(damage <= 1)
damage = 1
view() << "<font size=1>[usr] attacks [M] for [damage]!"
M.health -= damage
usr.NaturalEnergy -= 2
M.Death(usr)
if(istype(M,/mob/enemy))
M.killlist += src.name
if(istype(M,/mob/player))
usr.random = rand(1,8)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else
usr.random = rand(1,20)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else
view() << "<font size=1>[usr] attacks [M] for [damage]!"
M.health -= damage
usr.NaturalEnergy -= 2
M.Death(usr)
if(istype(M,/mob/enemy))
M.killlist += src.name
if(istype(M,/mob/player))
usr.random = rand(1,8)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else
usr.random = rand(1,20)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else
usr<<"<font size=1>You dont have enough Natura to use Frog Style Kata so you are now useing tekken."
usr.FrogStyleKata = 0
usr.Tekken = 1
return
else if(usr.Basic&&usr.canattack)
usr.canattack =0
usr << "<font size=1>You attack [M]!"
flick("Attack",usr)
var/damage = round(usr.tai/1.5 + usr.swordD)
damage+=rand(1,damage)
if(damage <= 1)
damage = 1
view() << "<font size=1>[usr] attacks [M] for [damage]!"
M.health -= damage
M.Death(usr)
if(istype(M,/mob/enemy))
M.killlist += src.name
usr.random = rand(1,8)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else
view() << "<font size=1>[usr] attacks [M] for [damage]!"
M.health -= damage
M.Death(usr)
if(istype(M,/mob/enemy))
M.killlist += src.name
usr.random = rand(1,8)
if(random == 5||random==1)
usr.taiexp += rand(1,3)
usr.taiup()
usr.exp += rand(1,2)
usr.Levelup()
sleep(2)
usr.canattack=1
else
sleep(2)
usr.Levelup()
usr.canattack=1
return
else if(usr.wearingscythe&&usr.canattack&&usr.bloodtaste)
usr << "<font size=1>You attack [M] with your scythe!"
view() << "<font size=1>[usr] strikes [M] with there Scythe for 0 Damage!"
M.blood()
usr.icon = 'hidan ritual form.dmi'
usr.bloodtaste = 1
usr.bloodhit = M.name
usr.JashinRitual.Add("[M]")
return
else if(usr.wearingscythe&&usr.canattack&&!usr.bloodtaste)
for(var/mob/Q in world)
if("[Q]" in usr.JashinRitual)
usr.JashinRitual.Remove("[Q]")
usr.JashinRitual.Remove("[Q]")
usr.JashinRitual.Remove("[Q]")
usr << "<font size=1>You attack [M] with your scythe!"
view() << "<font size=1>[usr] strikes [M] with there Scythe for 0 Damage!"
M.blood()
usr.icon = 'hidan ritual form.dmi'
usr.bloodtaste = 1
usr.bloodhit = M.name
usr.JashinRitual.Add("[M]")
sleep(300)
IMMORTALOMG
sleep(150)
src.icon = 'hidan ritual form.dmi'
src.jashinpride -= 1
src.immortal=1
if(src.jashinpride <= 0)
view(src)<<"Blood was not shead enough [src]'s immortality wears off!"
src.immortal = 0
src.icon = src.Oicon
src.jashinpride = 0
usr.bloodtaste = 0
for(var/mob/L in world)
if("[L]" in usr.JashinRitual)
usr.JashinRitual.Remove("[L]")
usr.JashinRitual.Remove("[L]")
usr.JashinRitual.Remove("[L]")
return
else
goto IMMORTALOMG
usr.canattack=0
sleep(15)
usr.canattack=1
Problem description: I do not know if you guys know Naruto but the skill are separated by categories!
- Taijutsu: Hand to hand
- Ninjutsu: Long Range or Close Range Attacks
- Genjutsu: Use non-attackable techniques.
For my levelling, I want to code something in my death proc that if someone use Taijutsu it levels up his taijutsu of a little but if he ends a battle with a Taijutsu it levels up a lot but the problem is My team made tons of Jutsu and it would take me a lot of time to define every jutsu's category in their code. Isn't their another way if not do I just use variables to code the categories?
Ex: usr.Taijutsu=1 or I use something else to define it?!?! Also if there is a faster method?
and
Quick little edit:
I didn't read your entire post, I skipped most of the code snippit and read your problem, just figured I'd go for the issue here instead of reading through that. Also, I suspect you're dealing with a rip of some kind. If so, have fun with that. Most rips have horrible programming and never get improved uppon by anyone of actual talent in the feild. Not a good place to study codes from.