obj
magic
WingBlade
name = "Wing Blade"
icon = 'Skills.dmi'
icon_state = "wingblade"
suffix = "Attack all monsters in 3 tiles infront of you with 80% ATK."
Click()
if(usr.InUseWingBlade == 0)
if(usr.LVL <15)
usr << "You're to weak to use this skill."
else
var/Target
if(usr.attackdelay == 0)
if(usr.dir == NORTH)
for(var/mob/A in usr.x,usr.y+1,usr.z)
Target += A
for(var/mob/B in usr.x-1,usr.y+1,usr.z)
Target += B
for(var/mob/C in usr.x+1,usr.y+1,usr.z)
Target += C
if(usr.dir == SOUTH)
for(var/mob/A in usr.x,usr.y-1,usr.z)
Target += A
for(var/mob/B in usr.x-1,usr.y-1,usr.z)
Target += B
for(var/mob/C in usr.x+1,usr.y-1,usr.z)
Target += C
if(usr.dir == EAST)
for(var/mob/A in usr.x+1,usr.y,usr.z)
Target += A
for(var/mob/B in usr.x+1,usr.y-1,usr.z)
Target += B
for(var/mob/C in usr.x+1,usr.y+1,usr.z)
Target += C
if(usr.dir == WEST)
for(var/mob/A in usr.x-1,usr.y,usr.z)
Target += A
for(var/mob/B in usr.x-1,usr.y-1,usr.z)
Target += B
for(var/mob/C in usr.x-1,usr.y+1,usr.z)
Target += C
usr.attackdelay = 1
var/BaseDam = rand((usr.STR/2), (usr.STR))
var/WeapDam = rand((usr.WeaponSTR/2 + usr.STRSkillBoost)*0.8, (usr.WeaponSTR + usr.STRSkillBoost)*0.8)
var/BaseDef = rand((Target:BaseDef/4), (Target:BaseDef / 2))
var/WeapDef = rand((Target:WeapDef/4), (Target:WeapDef / 2))
var/Dam = (WeapDam + BaseDam) - (BaseDef + WeapDef)
if(Dam <= 0)
Dam = 0
var/colour = "white"
s_damage(Target,Dam,colour)
if(Dam > 0)
var/colour = "white"
s_damage(Target,Dam,colour)
Target:HP -= Dam
Target:Death(Target,usr)
sleep(usr.equipweapdelay - usr.attackdelaybonus + usr.attackspeedpenalty)
usr.attackdelay = 0
else
return
Problem description:
I want it to select the 3 monsters infront of me, and attack those, but it crashes the game when i use it