Skip to content

Commit

Permalink
Latcher sounds and polish
Browse files Browse the repository at this point in the history
  • Loading branch information
Rukofamicom committed Oct 21, 2023
1 parent a1fa3eb commit 5d18215
Show file tree
Hide file tree
Showing 29 changed files with 127 additions and 26 deletions.
1 change: 1 addition & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3149,6 +3149,7 @@
#include "code\modules\mob\living\simple_animal\hostile\gorilla\visuals_icons.dm"
#include "code\modules\mob\living\simple_animal\hostile\halloween\aetherial.dm"
#include "code\modules\mob\living\simple_animal\hostile\halloween\ambush-carp.dm"
#include "code\modules\mob\living\simple_animal\hostile\halloween\latcher.dm"
#include "code\modules\mob\living\simple_animal\hostile\jungle\_jungle_mobs.dm"
#include "code\modules\mob\living\simple_animal\hostile\jungle\leaper.dm"
#include "code\modules\mob\living\simple_animal\hostile\jungle\mega_arachnid.dm"
Expand Down
140 changes: 119 additions & 21 deletions code/modules/mob/living/simple_animal/hostile/halloween/latcher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,61 +13,134 @@
wander = FALSE
anchored = TRUE
density = TRUE
maxHealth = 240
health = 240
maxHealth = 500
health = 500
obj_damage = 0
melee_damage = 50 //extreme damage to anything that isn't a carbon... which shouldn't happen often, but it's prepared in any case.
attacktext = "devours"
attack_sound = 'sound/hallucinations/over_here2.ogg' //Cronch cronch bones
vision_range = 9
aggro_vision_range = 9
a_intent = INTENT_HARM
ranged = TRUE
projectiletype = /obj/projectile/latcher_harpoon
projectilesound = 'sound/weapons/pierce.ogg' //Laugh + spring load
ranged_cooldown_time = 7 SECONDS
var/mob/living/carbon/hooked_victim //the current victim, if they exist
var/tether_active
var/half_life = FALSE //for something we want to activate on every other life proc
var/reel_sound
var/idle_sound
var/laugh_sound
var/mine_cooldown

/mob/living/simple_animal/hostile/latcher/Life()
/mob/living/simple_animal/hostile/latcher/Initialize()
..()
rotate_sound("all")

/mob/living/simple_animal/hostile/latcher/proc/rotate_sound(type)
switch(type)
if("all")
deathsound = pick('sound/creatures/halloween/Latcher/LatcherDeath1.ogg',
'sound/creatures/halloween/Latcher/LatcherDeath2.ogg',
'sound/creatures/halloween/Latcher/LatcherDeath3.ogg',
'sound/creatures/halloween/Latcher/LatcherDeath4.ogg')
rotate_sound("attack")
rotate_sound("idle")
rotate_sound("spit")
rotate_sound("reel")
rotate_sound("laugh")
return

if("attack")
attack_sound = pick('sound/creatures/halloween/Latcher/Chomp1.ogg',
'sound/creatures/halloween/Latcher/Chomp2.ogg',
'sound/creatures/halloween/Latcher/Chomp3.ogg')
return

if("idle")
idle_sound = pick('sound/creatures/halloween/Latcher/LatcherIdle1.ogg',
'sound/creatures/halloween/Latcher/LatcherIdle2.ogg',
'sound/creatures/halloween/Latcher/LatcherIdle3.ogg',
'sound/creatures/halloween/Latcher/LatcherIdle4.ogg')
return

if("spit")
projectilesound = pick('sound/creatures/halloween/Latcher/LatcherSpit1.ogg',
'sound/creatures/halloween/Latcher/LatcherSpit2.ogg',
'sound/creatures/halloween/Latcher/LatcherSpit3.ogg')
return

if("reel")
reel_sound = pick('sound/creatures/halloween/Latcher/REEL1.ogg',
'sound/creatures/halloween/Latcher/REEL2.ogg',
'sound/creatures/halloween/Latcher/REEL3.ogg',
'sound/creatures/halloween/Latcher/REEL4.ogg')
return

if("laugh")
laugh_sound = pick('sound/creatures/halloween/Latcher/LatcherEx1.ogg',
'sound/creatures/halloween/Latcher/LatcherEx2.ogg',
'sound/creatures/halloween/Latcher/LatcherEx3.ogg',
'sound/creatures/halloween/Latcher/LatcherEx4.ogg')

/mob/living/simple_animal/hostile/latcher/Life()
. = ..()
if(hooked_victim)

target = hooked_victim //stay on the same target so long as someone is hooked
ranged_cooldown = world.time + ranged_cooldown_time //Cooldown is maintained until victim is freed

if(hooked_victim.pulledby)
hooked_victim = null
var/datum/beam/B = tether_active
if(B)
qdel(B)
tether_active = null
hooked_victim.SetKnockdown(1 SECONDS)
hooked_victim.SetImmobilized(1 SECONDS)
release_target()
FindTarget() //pick a new target

else
if(half_life)
step(hooked_victim,get_dir(hooked_victim,src))
half_life = FALSE
else
half_life = TRUE
hooked_victim.Knockdown(6 SECONDS)
hooked_victim.Immobilize(6 SECONDS)
if(hooked_victim.loc != loc) //They will be allowed to run briefly, but quickly be reeled in again.
if(half_life)
playsound(loc, reel_sound, 200)
rotate_sound("reel")
step(hooked_victim,get_dir(hooked_victim,src))
half_life = FALSE
else
half_life = TRUE
playsound(loc, laugh_sound, 200)
rotate_sound("laugh")
hooked_victim.Knockdown(4 SECONDS)
hooked_victim.Immobilize(4 SECONDS)
else if(!target && prob(5))
playsound(loc, idle_sound, 200)
rotate_sound("idle")

/mob/living/simple_animal/hostile/latcher/death(gibbed)
..()
release_target()

/mob/living/simple_animal/hostile/latcher/attack_basic_mob()
playsound(loc, attack_sound, 200)
attack_sound = null //we want to override modulation
..()
rotate_sound("attack")

//THE MAUL PROC

/mob/living/simple_animal/hostile/latcher/AttackingTarget()
if(iscarbon(target))
if(target.loc != loc)
return
if(prob(50)) //slower and inconsistent attack
maul_target(target)
//else play laughing sound instead of attacking sound
else if(prob(60))
playsound(loc, laugh_sound, 200)
rotate_sound("laugh")
else
playsound(hooked_victim, 'sound/creatures/halloween/Latcher/LatcherMINE.ogg', 300)
return
else
..()


/mob/living/simple_animal/hostile/latcher/proc/maul_target(maul_target)
playsound(loc, attack_sound, 200)
rotate_sound("attack")
if(iscarbon(maul_target))
var/mob/living/carbon/C = maul_target
var/obj/item/bodypart/affecting
Expand All @@ -83,7 +156,22 @@
affecting.dismember()
else
C.gib()
release_target()

/mob/living/simple_animal/hostile/latcher/proc/release_target()
if(hooked_victim)
hooked_victim.SetKnockdown(1 SECONDS)
hooked_victim.SetImmobilized(1 SECONDS)
hooked_victim = null
var/datum/beam/B = tether_active
if(B)
qdel(B)
tether_active = null


/mob/living/simple_animal/hostile/latcher/OpenFire()
..()
rotate_sound("spit")

//THE BONE HARPOON

Expand All @@ -98,6 +186,12 @@
pass_flags = PASSTABLE
var/reel

/obj/projectile/latcher_harpoon/Initialize()
..()
hitsound = pick('sound/creatures/halloween/Latcher/LProjectileHit1.ogg',
'sound/creatures/halloween/Latcher/LProjectileHit2.ogg',
'sound/creatures/halloween/Latcher/LProjectileHit3.ogg')

/obj/projectile/latcher_harpoon/fire()
..()
if(firer)
Expand All @@ -110,8 +204,12 @@
var/mob/living/carbon/hooked = target
var/mob/living/simple_animal/hostile/latcher/fisherman = firer

playsound(fisherman, 'sound/creatures/halloween/Latcher/LatcherMINE.ogg', 400)

fisherman.hooked_victim = hooked
hooked.Paralyze(4 SECONDS)
hooked.Paralyze(1 SECONDS)
hooked.Knockdown(6 SECONDS)
hooked.Immobilize(6 SECONDS)
to_chat(hooked, "<span class='userdanger'>\The [fisherman] has impaled you and is reeling you in!</span>")
fisherman.tether_active = fisherman.Beam(hooked, "latcher", time=INFINITY, maxdistance=9, beam_type=/obj/effect/ebeam)

Expand Down
12 changes: 7 additions & 5 deletions code/modules/projectiles/guns/energy/laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@
else
balloon_alert(user, "You start cranking")
while(cell.charge < gun_charge)
do_after(user, 1 SECONDS)
playsound(src, 'sound/weapons/autoguninsert.ogg', 50)
cell.charge += 50
flick("repeater", src)
update_icon()
if(do_after(user, 1 SECONDS))
playsound(src, 'sound/weapons/autoguninsert.ogg', 30)
cell.charge += 50
flick("repeater", src)
update_icon()
else
break

/obj/item/gun/energy/laser/repeater/attack_self(mob/living/user)
crank_charge(user)
Expand Down
Binary file added sound/creatures/halloween/Latcher/Chomp1.ogg
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/Chomp2.ogg
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/Chomp3.ogg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/LatcherEx1.ogg
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/LatcherEx2.ogg
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/LatcherEx3.ogg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/LatcherMINE.ogg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/REEL1.ogg
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/REEL2.ogg
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/REEL3.ogg
Binary file not shown.
Binary file added sound/creatures/halloween/Latcher/REEL4.ogg
Binary file not shown.

0 comments on commit 5d18215

Please sign in to comment.