Adds Necropolis curses for cursed items in Necropolis ruins

This commit is contained in:
CitadelStationBot
2017-07-06 10:15:09 -05:00
parent 01611a1c9f
commit 4796ede787
24 changed files with 313 additions and 8 deletions
+4 -2
View File
@@ -161,6 +161,8 @@
var/turf/target_turf = get_turf(A)
if(!prehit(A))
if(forcedodge)
loc = target_turf
return FALSE
var/permutation = A.bullet_act(src, def_zone) // searches for return value, could be deleted after run so check A isn't null
if(permutation == -1 || forcedodge)// the bullet passes through a dense object!
@@ -264,7 +266,7 @@
old_pixel_x = pixel_x_offset
old_pixel_y = pixel_y_offset
if(original && (original.layer>=2.75) || ismob(original))
if(original && (original.layer >= PROJECTILE_HIT_THRESHHOLD_LAYER) || ismob(original))
if(loc == get_turf(original))
if(!(original in permutated))
Bump(original, 1)
@@ -279,7 +281,7 @@
if((!( current ) || loc == current))
current = locate(Clamp(x+xo,1,world.maxx),Clamp(y+yo,1,world.maxy),z)
step_towards(src, current)
if(original && (original.layer>=2.75) || ismob(original))
if(original && (original.layer >= PROJECTILE_HIT_THRESHHOLD_LAYER) || ismob(original))
if(loc == get_turf(original))
if(!(original in permutated))
Bump(original, 1)
@@ -334,3 +334,57 @@
for(var/turf/Z in range(T,power))
new /obj/effect/temp_visual/gravpush(Z)
/obj/effect/ebeam/curse_arm
name = "curse arm"
layer = LARGE_MOB_LAYER
/obj/item/projectile/curse_hand
name = "curse hand"
icon_state = "cursehand"
hitsound = 'sound/effects/curse4.ogg'
layer = LARGE_MOB_LAYER
damage_type = BURN
damage = 10
knockdown = 20
speed = 2
range = 16
forcedodge = TRUE
var/datum/beam/arm
var/handedness = 0
/obj/item/projectile/curse_hand/Initialize(mapload)
. = ..()
handedness = prob(50)
update_icon()
/obj/item/projectile/curse_hand/update_icon()
icon_state = "[icon_state][handedness]"
/obj/item/projectile/curse_hand/fire(setAngle)
if(starting)
arm = starting.Beam(src, icon_state = "curse[handedness]", time = INFINITY, maxdistance = INFINITY, beam_type=/obj/effect/ebeam/curse_arm)
..()
/obj/item/projectile/curse_hand/prehit(atom/target)
if(target == original)
forcedodge = FALSE
else if(!isturf(target))
return FALSE
return ..()
/obj/item/projectile/curse_hand/Destroy()
if(arm)
arm.End()
arm = null
if(forcedodge)
playsound(src, 'sound/effects/curse3.ogg', 25, 1, -1)
var/turf/T = get_step(src, dir)
new/obj/effect/temp_visual/dir_setting/curse/hand(T, dir, handedness)
for(var/obj/effect/temp_visual/dir_setting/curse/grasp_portal/G in starting)
qdel(G)
new /obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading(starting, dir)
var/datum/beam/D = starting.Beam(T, icon_state = "curse[handedness]", time = 32, maxdistance = INFINITY, beam_type=/obj/effect/ebeam/curse_arm, beam_sleep_time = 1)
for(var/b in D.elements)
var/obj/effect/ebeam/B = b
animate(B, alpha = 0, time = 32)
return ..()