obj/ki_blasts
icon = 'ki.dmi'
density = 1
var
dmg = 0
delay = 2
length = 7
mob/player/owner
New(loc, mob/player/_owner)
if(_owner)
_owner.canmove = 0
src.dir = _owner.dir
src.dmg = round((_owner.level * 1.1) + _owner.maxki)
if(!src.loc) src.loc = get_step(_owner, _owner.dir)
src.owner = _owner
Move()
src.length--
if(!src.length)
src.owner.canmove = 1
del src
return ..()
Bump(atom/O)
if(ismob(O))
O:TakeKiDamage(src.dmg,src.owner)
else if(isobj(O)) del O
else if(isturf(O)) del O //will add explosion and destroyed turf later
src.owner.canmove = 1
del src
beam
var
list/trails = new
max_trails = 0
New()
..()
src.icon_state = "[src.icon_state]head"
Del()
for(var/A in src.trails) del A
..()
Move()
var/turf/old_loc = src.loc
.=..()
if(!.) return
var/obj/O = new(old_loc)
O.name = "trail"
O.dir = src.dir
O.icon = icon(src.icon,"[initial(src.icon_state)]trail")
src.trails += O
if(src.max_trails && src.trails.len > src.max_trails)
var/a = src.trails[1]
src.trails-=a
del a
Kamehameha
icon_state = "kamehameha_"
Problem description:
How do I delete the ki blast after it hits the void? Right now if you shoot a ki blast from, say, 5 spaces away from the void it just stops at the void. Should I add a timer to the ki blast or is there something else I can do with this?
Note this does assume you don't muck up Move() by not having it return a value indicating success/failure.