Merge pull request #14755 from farie82/floor-cluwne-fixes-tweaks

Floor cluwnes fixes. Can't hide in lockers no more + limits the speed of stage changes
This commit is contained in:
AffectedArc07
2020-11-06 09:42:40 +00:00
committed by GitHub
2 changed files with 26 additions and 11 deletions
@@ -15,6 +15,7 @@
health = 200
speed = -1
attacktext = "attacks"
anchored = TRUE
attack_sound = 'sound/items/bikehorn.ogg'
del_on_death = TRUE
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB | LETPASSTHROW | PASSGLASS | PASSBLOB//it's practically a ghost when unmanifested (under the floor)
@@ -32,6 +33,7 @@
var/mob/living/carbon/human/current_victim
var/manifested = FALSE
var/switch_stage = 60
var/switch_stage_min = 20
var/stage = STAGE_HAUNT
var/interest = 0
var/target_area
@@ -302,12 +304,12 @@
if(STAGE_ATTACK)
if(!eating)
for(var/I in getline(src,H))
for(var/I in getline(src, get_turf(H)))
var/turf/T = I
for(var/obj/structure/O in T)
if(istype(O, /obj/structure/closet))
var/obj/structure/closet/locker = O
locker.dump_contents()
locker.bust_open()
if(O.density || istype(O, /obj/machinery/door/airlock))
forceMove(H.loc)
if(T.density)
@@ -366,17 +368,12 @@
/mob/living/simple_animal/hostile/floor_cluwne/proc/Kill(mob/living/carbon/human/H)
playsound(H, 'sound/spookoween/scary_horn2.ogg', 100, 0)
var/old_color = H.client.color
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
H.client.color = pure_red
var/old_color = H.client?.color
client_kill_animation(H)
animate(H.client, color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
for(var/turf/T in orange(H, 4))
H.add_splatter_floor(T)
if(do_after(src, 50, target = H))
if(prob(50) || smiting)
H.makeCluwne()
@@ -400,7 +397,7 @@
eating = FALSE
if(prob(2))
switch_stage = switch_stage * 0.75 //he gets a chance to be faster after each feast
switch_stage = max(switch_stage * 0.75, switch_stage_min) //he gets a chance to be faster after each feast
if(smiting)
playsound(loc, 'sound/spookoween/scary_horn2.ogg', 100, 0, -4)
qdel(src)
@@ -409,6 +406,15 @@
interest = 0
/mob/living/simple_animal/hostile/floor_cluwne/proc/client_kill_animation(mob/living/carbon/human/H)
if(!H.client)
return
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
H.client.color = pure_red
animate(H.client, color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
//manifestation animation
/obj/effect/temp_visual/fcluwne_manifest
icon = 'icons/turf/floors.dmi'