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
-5
View File
@@ -11,11 +11,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
*/
#define SCREWYHUD_NONE 0
#define SCREWYHUD_CRIT 1
#define SCREWYHUD_DEAD 2
#define SCREWYHUD_HEALTHY 3
/mob/living/carbon
var/image/halimage
var/image/halbody
@@ -0,0 +1,107 @@
/mob/living/simple_animal/hostile/asteroid/curseblob
name = "curse mass"
desc = "A mass of purple... smoke?"
icon = 'icons/mob/lavaland/lavaland_monsters.dmi'
icon_state = "curseblob"
icon_living = "curseblob"
icon_aggro = "curseblob"
move_to_delay = 5
vision_range = 20
aggro_vision_range = 20
idle_vision_range = 20
maxHealth = 40 //easy to kill, but oh, will you be seeing a lot of them.
health = 40
melee_damage_lower = 10
melee_damage_upper = 10
melee_damage_type = BURN
attacktext = "slashes"
attack_sound = 'sound/effects/curseattack.ogg'
throw_message = "passes through the smokey body of"
obj_damage = 0
environment_smash = ENVIRONMENT_SMASH_NONE
sentience_type = SENTIENCE_BOSS
layer = LARGE_MOB_LAYER
var/doing_move_loop = FALSE
var/mob/living/set_target
var/timerid
/mob/living/simple_animal/hostile/asteroid/curseblob/Initialize(mapload)
. = ..()
timerid = QDEL_IN(src, 600)
playsound(src, 'sound/effects/curse1.ogg', 100, 1, -1)
/mob/living/simple_animal/hostile/asteroid/curseblob/Destroy()
new /obj/effect/temp_visual/dir_setting/curse/blob(loc, dir)
doing_move_loop = FALSE
return ..()
/mob/living/simple_animal/hostile/asteroid/curseblob/Goto(move_target, delay, minimum_distance)
move_loop(target, delay)
/mob/living/simple_animal/hostile/asteroid/curseblob/proc/move_loop(move_target, delay)
set waitfor = FALSE
if(doing_move_loop)
return
doing_move_loop = TRUE
if(check_for_target())
return
while(!QDELETED(src) && doing_move_loop && isturf(loc) && !check_for_target())
var/step_turf = get_step(src, get_dir(src, set_target))
if(step_turf != get_turf(set_target))
forceMove(step_turf)
sleep(delay)
doing_move_loop = FALSE
/mob/living/simple_animal/hostile/asteroid/curseblob/proc/check_for_target()
if(QDELETED(set_target) || set_target.stat != CONSCIOUS || z != set_target.z)
qdel(src)
return TRUE
/mob/living/simple_animal/hostile/asteroid/curseblob/GiveTarget(new_target)
if(check_for_target())
return
new_target = set_target
. = ..()
Goto(target, move_to_delay)
/mob/living/simple_animal/hostile/asteroid/curseblob/LoseTarget() //we can't lose our target!
if(check_for_target())
return
//if it's not our target, we ignore it
/mob/living/simple_animal/hostile/asteroid/curseblob/CanPass(atom/movable/mover, turf/target, height = 0)
if(mover == set_target)
return FALSE
if(istype(mover, /obj/item/projectile))
var/obj/item/projectile/P = mover
if(P.firer == set_target)
return FALSE
return TRUE
#define IGNORE_PROC_IF_NOT_TARGET(X) /mob/living/simple_animal/hostile/asteroid/curseblob/##X(AM) { if (AM == set_target) return ..(); }
IGNORE_PROC_IF_NOT_TARGET(attack_hand)
IGNORE_PROC_IF_NOT_TARGET(attack_hulk)
IGNORE_PROC_IF_NOT_TARGET(attack_paw)
IGNORE_PROC_IF_NOT_TARGET(attack_alien)
IGNORE_PROC_IF_NOT_TARGET(attack_larva)
IGNORE_PROC_IF_NOT_TARGET(attack_animal)
IGNORE_PROC_IF_NOT_TARGET(attack_slime)
/mob/living/simple_animal/hostile/asteroid/curseblob/bullet_act(obj/item/projectile/Proj)
if(Proj.firer != set_target)
return
return ..()
/mob/living/simple_animal/hostile/asteroid/curseblob/attacked_by(obj/item/I, mob/living/L)
if(L != set_target)
return
return ..()
#undef IGNORE_PROC_IF_NOT_TARGET
+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 ..()