ttack()
if(src.Fight == 1)
var/obj/O
var/obj/N
var/obj/A
var/obj/B
var/obj/C
if(src.delayattack==1)
return
if(src.WeaponType == "Club")
O = new/obj/Attacking/Club(get_step(usr,usr.dir))
if(src.WeaponType == "Battle_Axe")
O = new/obj/Attacking/Battle_Axe(get_step(usr,usr.dir))
if(src.WeaponType == "Broad_Sword")
O = new/obj/Attacking/Broad_Sword(get_step(usr,usr.dir))
if(src.WeaponType == "Chain Sickle")
O = new/obj/Attacking/Chain_Sickle(get_step(usr,usr.dir))
N = new/obj/Attacking/Chain_Sickle(get_step(O,usr.dir))
A = new/obj/Attacking/Chain_Sickle(get_step(N,usr.dir))
B = new/obj/Attacking/Chain_Sickle(get_step(A,usr.dir))
C = new/obj/Attacking/Chain_Sickle2(get_step(B,usr.dir))
if(src.WeaponType == "Pilgrim")
O = new/obj/Attacking/Pilgrim(get_step(usr,usr.dir))
if(src.WeaponType == "Wizard")
O = new/obj/Attacking/Wizard(get_step(usr,usr.dir))
if(src.WeaponType == "Soldier")
O = new/obj/Attacking/Soldier(get_step(usr,usr.dir))
if(src.WeaponType == "Nunchaku")
O = new/obj/Attacking/Nunchaku(get_step(usr,usr.dir))
if(src.WeaponType == "Dagger")
O = new/obj/Attacking/Dagger(get_step(usr,usr.dir))
if(src.WeaponType == "SledgeHammer")
O = new/obj/Attacking/SledgeHammer(get_step(usr,usr.dir))
O.dir=usr.dir
if(N!=null)
N.dir=usr.dir
if(A!=null)
A.dir=usr.dir
if(B!=null)
B.dir=usr.dir
if(C!=null)
C.dir=usr.dir
view() << 'sounds/hit.wav'
for(var/mob/M in get_step(src,src.dir))
if(M.HP>0)
var/misschance=pick(prob((src.Agility/100)+(src.Focusing),src),prob((M.Agility/100),M))
if(misschance==M)
if(M.client)
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(4)
//del(O)
src.Lock=0
src.delayattack=0
del(O)
return
s_damage(M, 0, "blue")
src.delayattack=1
src.Lock=1
sleep(40)
del(O)
del(N)
del(A)
del(B)
del(C)
src.Lock=0
src.delayattack=0
if(!M.client)
M.Aggroing=src
del(O)
del(N)
del(A)
del(B)
del(C)
return
else
if(M.client)
M.icon_state = "hit"
sleep(10)
M.icon_state = "world"
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(4)
del(O)
src.Lock=0
src.delayattack=0
del(O)
return
Damage = (usr.Strength-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
if(prob(usr.Luck))
Damage=((usr.Strength*2)-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
M.HP-=(Damage)
s_damage(M, -1, "blue")
else
M.HP-=(Damage)
s_damage(M, Damage, "blue")
src.delayattack=1
src.Lock=1
sleep(4)
del(O)
del(N)
del(A)
del(B)
del(C)
src.Lock=0
src.delayattack=0
if(src.Boosting)
src.Boosting=0
var/icon/I=new(src.icon)
I.SwapColor(rgb(204,0,0),rgb(240,208,176))
src.icon=I
M.deathcheck()
if(!M.client)
M.Aggroing=src
usr.Level_Up()
del(O)
del(N)
del(A)
del(B)
del(C)
return
if(N!=null)
for(var/mob/M in get_step(O,src.dir))
if(M.HP>0)
var/misschance=pick(prob((src.Agility/100)+(src.Focusing),src),prob((M.Agility/100),M))
if(misschance==M)
if(M.client)
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(4)
del(O)
del(N)
del(A)
del(B)
del(C)
src.Lock=0
src.delayattack=0
del(O)
del(N)
del(A)
del(B)
del(C)
return
s_damage(M, 0, "blue")
src.delayattack=1
src.Lock=1
sleep(4)
del(O)
del(N)
del(A)
del(B)
del(C)
src.Lock=0
src.delayattack=0
if(!M.client)
M.Aggroing=src
del(N)
del(O)
del(N)
del(A)
del(B)
del(C)
return
else
if(M.client)
M.icon_state = "hit"
sleep(10)
M.icon_state = "world"
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(40)
del(N)
src.Lock=0
src.delayattack=0
del(N)
return
Damage = (usr.Strength-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
if(prob(usr.Luck))
Damage=((usr.Strength*2)-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
M.HP-=(Damage)
s_damage(M, -1, "blue")
else
M.HP-=(Damage)
s_damage(M, Damage, "blue")
src.delayattack=1
src.Lock=1
sleep(4)
del(N)
src.Lock=0
src.delayattack=0
if(src.Boosting)
src.Boosting=0
var/icon/I=new(src.icon)
I.SwapColor(rgb(204,0,0),rgb(240,208,176))
src.icon=I
M.deathcheck()
if(!M.client)
M.Aggroing=src
usr.Level_Up()
del(N)
return
if(A!=null)
for(var/mob/M in get_step(N,src.dir))
if(M.HP>0)
var/misschance=pick(prob((src.Agility/100)+(src.Focusing),src),prob((M.Agility/100),M))
if(misschance==M)
if(M.client)
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(40)
del(A)
src.Lock=0
src.delayattack=0
del(A)
return
s_damage(M, 0, "blue")
src.delayattack=1
src.Lock=1
sleep(40)
del(A)
src.Lock=0
src.delayattack=0
if(!M.client)
M.Aggroing=src
del(A)
return
else
if(M.client)
M.icon_state = "hit"
sleep(10)
M.icon_state = "world"
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(4)
del(A)
src.Lock=0
src.delayattack=0
del(A)
return
Damage = (usr.Strength-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
if(prob(usr.Luck))
Damage=((usr.Strength*2)-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
M.HP-=(Damage)
s_damage(M, -1, "blue")
else
M.HP-=(Damage)
s_damage(M, Damage, "blue")
src.delayattack=1
src.Lock=1
sleep(4)
del(A)
src.Lock=0
src.delayattack=0
if(src.Boosting)
src.Boosting=0
var/icon/I=new(src.icon)
I.SwapColor(rgb(204,0,0),rgb(240,208,176))
src.icon=I
M.deathcheck()
if(!M.client)
M.Aggroing=src
usr.Level_Up()
del(A)
return
if(B!=null)
for(var/mob/M in get_step(A,src.dir))
if(M.HP>0)
var/misschance=pick(prob((src.Agility/100)+(src.Focusing),src),prob((M.Agility/100),M))
if(misschance==M)
if(M.client)
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(4)
del(B)
src.Lock=0
src.delayattack=0
del(B)
return
s_damage(M, 0, "blue")
src.delayattack=1
src.Lock=1
sleep(4)
del(B)
src.Lock=0
src.delayattack=0
if(!M.client)
M.Aggroing=src
del(B)
return
else
if(M.client)
M.icon_state = "hit"
sleep(10)
M.icon_state = "world"
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(4)
del(B)
src.Lock=0
src.delayattack=0
del(B)
return
Damage = (usr.Strength-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
if(prob(usr.Luck))
Damage=((usr.Strength*2)-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
M.HP-=(Damage)
s_damage(M, -1, "blue")
else
M.HP-=(Damage)
s_damage(M, Damage, "blue")
src.delayattack=1
src.Lock=1
sleep(4)
del(B)
src.Lock=0
src.delayattack=0
if(src.Boosting)
src.Boosting=0
var/icon/I=new(src.icon)
I.SwapColor(rgb(204,0,0),rgb(240,208,176))
src.icon=I
M.deathcheck()
if(!M.client)
M.Aggroing=src
usr.Level_Up()
del(B)
return
if(C!=null)
for(var/mob/M in get_step(B,src.dir))
if(M.HP>0)
var/misschance=pick(prob((src.Agility/100)+(src.Focusing),src),prob((M.Agility/100),M))
if(misschance==M)
if(M.client)
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(4)
del(C)
src.Lock=0
src.delayattack=0
del(C)
return
s_damage(M, 0, "blue")
src.delayattack=1
src.Lock=1
sleep(4)
del(C)
src.Lock=0
src.delayattack=0
if(!M.client)
M.Aggroing=src
del(C)
return
else
if(M.client)
M.icon_state = "hit"
sleep(10)
M.icon_state = "world"
if(!src.FriendlyFire)
if(M.Guild==src.Guild)
src.delayattack=1
src.Lock=1
sleep(4)
del(C)
src.Lock=0
src.delayattack=0
del(C)
return
Damage = (usr.Strength-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
if(prob(usr.Luck))
Damage=((usr.Strength*2)-M.Vitality+src.Boosting)
if(Damage <= 0)
Damage = 1
M.HP-=(Damage)
s_damage(M, -1, "blue")
else
M.HP-=(Damage)
s_damage(M, Damage, "blue")
src.delayattack=1
src.Lock=1
sleep(4)
del(C)
src.Lock=0
src.delayattack=0
if(src.Boosting)
src.Boosting=0
var/icon/I=new(src.icon)
I.SwapColor(rgb(204,0,0),rgb(240,208,176))
src.icon=I
M.deathcheck()
if(!M.client)
M.Aggroing=src
usr.Level_Up()
del(C)
return
del(O)
del(N)
del(A)
del(B)
del(C)
return
Problem description: the weapons stays on the map and will not delete