Skip to content

Commit

Permalink
New Carrier Ability: Spawn Hugger (ColonialMarines-Mirror#631)
Browse files Browse the repository at this point in the history
-Carriers now have the Spawn Hugger ability, allowing them to increment their facehugger stores by +1 at the cost of a 10 second cooldown and 100 plasma.

-This should make multiple Carriers more viable, and allow them to be relatively independent rather than completely and wholly reliant on Ovi'ed Queens.
  • Loading branch information
Surrealaser authored and Rohesie committed Nov 7, 2018
1 parent 594cc67 commit d7adcac
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ var/list/global_mutations = list() // list of hidden mutation things
#define DEFENDER_HEADBUTT_COST 20
#define DEFENDER_TAILSWIPE_COST 30

//carrier defines

#define CARRIER_SPAWN_HUGGER_COST 100

// halloss defines

Expand Down
15 changes: 15 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,21 @@
var/mob/living/carbon/Xenomorph/X = owner
return !X.cresttoss_used

//Carrier abilities
/datum/action/xeno_action/activable/stealth
name = "Spawn Facehugger (100)"
action_icon_state = "spawn_hugger"
ability_name = "spawn facehugger"
plasma_cost = 100

/datum/action/xeno_action/activable/stealth/action_activate()
var/mob/living/carbon/Xenomorph/Carrier/X = owner
X.Spawn_Hugger()

/datum/action/xeno_action/activable/stealth/action_cooldown_check()
var/mob/living/carbon/Xenomorph/Carrier/X = owner
return !X.used_spawn_facehugger

/////////////////////////////////////////////////////////////////////////////////////////////

/mob/living/carbon/Xenomorph/proc/add_abilities()
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Castes/Carrier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
var/hugger_delay = 25
var/eggs_cur = 0
var/eggs_max = 3
var/used_spawn_facehugger = FALSE
var/last_spawn_facehugger
var/cooldown_spawn_facehugger = 100 //10 seconds; keeping this as a var for now as I may have it adjust with upgrade level
tier = 2
upgrade = 0
pixel_x = -16 //Needed for 2x2
Expand Down
39 changes: 38 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/Powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@
shake_camera(M, 2, 2)
playsound(M,pick('sound/weapons/alien_claw_block.ogg','sound/weapons/alien_bite2.ogg'), 50, 1)
M.KnockDown(1, 1)

cresttoss_cooldown()
spawn(3) //Revert to our prior icon state.
if(m_intent == MOVE_INTENT_RUN)
Expand All @@ -1566,3 +1566,40 @@
for(var/X in actions)
var/datum/action/act = X
act.update_button_icon()


// Carrier Spawn Hugger
/mob/living/carbon/Xenomorph/Carrier/proc/Spawn_Hugger(var/mob/living/carbon/M)
if(stagger)
to_chat(src, "<span class='xenowarning'>You try to spawn a young one but are unable to shake off the shock!</span>")
return

if(used_spawn_facehugger)
to_chat(src, "<span class='xenowarning'>You're not yet ready to spawn another young one; you must wait [(last_spawn_facehugger + cooldown_spawn_facehugger - world.time) * 0.1] more seconds.</span>")
return

if(!check_plasma(CARRIER_SPAWN_HUGGER_COST))
return

if(huggers_cur >= huggers_max)
to_chat(src, "<span class='xenowarning'>You can't host any more young ones!</span>")
return

to_chat(src, "<span class='xenowarning'>You spawn a young one via the miracle of asexual internal reproduction, adding it to your stores.</span>")
playsound(src, 'sound/voice/alien_drool2.ogg', 50, 0, 1)
huggers_cur = min(huggers_max, huggers_cur + 1) //Add it to our cache
last_spawn_facehugger = world.time
used_spawn_facehugger = TRUE
use_plasma(CARRIER_SPAWN_HUGGER_COST)
hugger_spawn_cooldown()

/mob/living/carbon/Xenomorph/Carrier/proc/hugger_spawn_cooldown()
if(!used_spawn_facehugger)//sanity check/safeguard
return
spawn(cooldown_spawn_facehugger)
used_spawn_facehugger = FALSE
to_chat(src, "<span class='xenowarning'><b>You can now spawn another young one.</b></span>")
playsound(src, 'sound/effects/xeno_newlarva.ogg', 50, 0, 1)
for(var/X in actions)
var/datum/action/act = X
act.update_button_icon()
Binary file modified icons/mob/actions.dmi
Binary file not shown.

0 comments on commit d7adcac

Please sign in to comment.