Skip to content

Commit

Permalink
Create_boiler_bomb now specified glow + CD reduction (#12831)
Browse files Browse the repository at this point in the history
* ye

* blame xander if kaput

* e

* oof

* properly kills the ammo_mult define

* Glowie

* Descr + simplify math

* Descr + simplify math ech
  • Loading branch information
Losenis authored May 7, 2023
1 parent 0a2a42f commit 4ce6b9e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 3 additions & 1 deletion code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,11 @@ GLOBAL_LIST_INIT(xenoupgradetiers, list(XENO_UPGRADE_BASETYPE, XENO_UPGRADE_INVA
//Boiler defines
#define BOILER_LUMINOSITY_BASE 0
#define BOILER_LUMINOSITY_BASE_COLOR LIGHT_COLOR_GREEN
#define BOILER_LUMINOSITY_AMMO 1 //don't set this to 0. How much each 'piece' of ammo in reserve glows by.
#define BOILER_LUMINOSITY_AMMO 0.5 //don't set this to 0. How much each 'piece' of ammo in reserve glows by.
#define BOILER_LUMINOSITY_AMMO_NEUROTOXIN_COLOR LIGHT_COLOR_YELLOW
#define BOILER_LUMINOSITY_AMMO_CORROSIVE_COLOR LIGHT_COLOR_GREEN
#define BOILER_BOMBARD_COOLDOWN_REDUCTION 1.5 //Amount of seconds each glob stored reduces bombard cooldown by
#define BOILER_LUMINOSITY_THRESHOLD 2 //Amount of ammo needed to start glowing

//Hivelord defines
#define HIVELORD_TUNNEL_DISMANTLE_TIME 3 SECONDS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ GLOBAL_LIST_INIT(boiler_glob_image_list, list(
KEYBINDING_NORMAL = COMSIG_XENOABILITY_CREATE_BOMB,
)

/datum/action/xeno_action/create_boiler_bomb/New(Target)
. = ..()
desc = "Creates a Boiler Bombard of the type currently selected. Reduces bombard cooldown by [BOILER_BOMBARD_COOLDOWN_REDUCTION] seconds for each stored. Begins to emit light when surpassing [BOILER_LUMINOSITY_THRESHOLD] globs stored."

/datum/action/xeno_action/create_boiler_bomb/action_activate()
var/mob/living/carbon/xenomorph/boiler/X = owner

Expand Down Expand Up @@ -181,7 +185,7 @@ GLOBAL_LIST_INIT(boiler_glob_image_list, list(

/datum/action/xeno_action/activable/bombard/get_cooldown()
var/mob/living/carbon/xenomorph/boiler/X = owner
return X.xeno_caste.bomb_delay - ((X.neuro_ammo + X.corrosive_ammo) * X.xeno_caste.ammo_multiplier)
return X.xeno_caste.bomb_delay - ((X.neuro_ammo + X.corrosive_ammo) * (BOILER_BOMBARD_COOLDOWN_REDUCTION SECONDS))

/datum/action/xeno_action/activable/bombard/on_cooldown_finish()
to_chat(owner, span_notice("We feel your toxin glands swell. We are able to bombard an area again."))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
///updates the boiler's glow, based on its base glow/color, and its ammo reserves. More green ammo = more green glow; more yellow = more yellow.
/mob/living/carbon/xenomorph/boiler/proc/update_boiler_glow()
var/current_ammo = corrosive_ammo + neuro_ammo
var/ammo_glow = BOILER_LUMINOSITY_AMMO * (current_ammo/2)
var/ammo_glow = BOILER_LUMINOSITY_AMMO * current_ammo
var/glow = CEILING(BOILER_LUMINOSITY_BASE + ammo_glow, 1)
var/color = BOILER_LUMINOSITY_BASE_COLOR
if(current_ammo)
var/ammo_color = BlendRGB(BOILER_LUMINOSITY_AMMO_CORROSIVE_COLOR, BOILER_LUMINOSITY_AMMO_NEUROTOXIN_COLOR, neuro_ammo/current_ammo)
color = BlendRGB(color, ammo_color, (ammo_glow*2)/glow)
if(!light_on && glow >= 2)
if(!light_on && glow >= BOILER_LUMINOSITY_THRESHOLD)
set_light_on(TRUE)
else if(glow < 2 && !fire_luminosity)
else if(glow < BOILER_LUMINOSITY_THRESHOLD && !fire_luminosity)
set_light_range_power_color(0, 0)
set_light_on(FALSE)
set_light_range_power_color(glow, 4, color)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
max_ammo = 4
bomb_strength = 1 //Multiplier to the effectiveness of the boiler glob.
bomb_delay = 32 SECONDS
ammo_multiplier = 1.5 SECONDS

acid_spray_duration = 10 SECONDS
acid_spray_damage = 16
Expand Down
2 changes: 0 additions & 2 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@
var/bomb_strength = 0
///Delay between firing the bombard ability for boilers
var/bomb_delay = 0
///Used to reduce cooldown for the boiler
var/ammo_multiplier = 0

// *** Carrier Abilities *** //
///maximum amount of huggers a carrier can carry at one time.
Expand Down

0 comments on commit 4ce6b9e

Please sign in to comment.