mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Visual and balance changes to brimdust sacks and rush glands (#93323)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#define BRIMDUST_STACKS_ON_LIFE 1
|
||||
/// Number of stacks to add if you activate the item in hand
|
||||
#define BRIMDUST_STACKS_ON_USE 3
|
||||
/// Overlay alpha per effect stack
|
||||
#define BRIMDUST_ALPHA_PER_STACK 75
|
||||
|
||||
/**
|
||||
* Gives you three stacks of Brimdust Coating, when you get hit by anything it will make a short ranged explosion.
|
||||
@@ -89,7 +91,8 @@
|
||||
/atom/movable/screen/alert/status_effect/brimdust_coating
|
||||
name = "Brimdust Coating"
|
||||
desc = "You %STACKS% explosive dust, kinetic impacts will cause it to detonate! \
|
||||
The explosion will not harm you as long as you're not under atmospheric pressure."
|
||||
The explosion will not harm you as long as you're not under atmospheric pressure. \
|
||||
Click this alert to shake off the dust."
|
||||
|
||||
/atom/movable/screen/alert/status_effect/brimdust_coating/MouseEntered(location,control,params)
|
||||
desc = initial(desc)
|
||||
@@ -106,6 +109,21 @@
|
||||
desc = replacetext(desc, "%STACKS%", dust_amount_string)
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/alert/status_effect/brimdust_coating/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!owner.can_resist())
|
||||
return
|
||||
owner.balloon_alert(owner, "shaking off the dust...")
|
||||
var/datum/status_effect/stacking/brimdust_coating/dust = attached_effect
|
||||
if (!do_after(owner, dust.stacks * 1.5 SECONDS, owner))
|
||||
return
|
||||
dust.explode()
|
||||
// The effect can get deleted from exploding and reducing stacks
|
||||
if (!QDELETED(dust))
|
||||
qdel(dust)
|
||||
|
||||
/datum/status_effect/stacking/brimdust_coating/refresh(effect, stacks_to_add)
|
||||
. = ..()
|
||||
add_stacks(stacks_to_add)
|
||||
@@ -115,6 +133,10 @@
|
||||
if (stacks == 0)
|
||||
return
|
||||
linked_alert.icon_state = "brimdemon_[stacks]"
|
||||
if (dust_overlay)
|
||||
owner.cut_overlay(dust_overlay)
|
||||
dust_overlay.alpha = stacks * BRIMDUST_ALPHA_PER_STACK
|
||||
owner.add_overlay(dust_overlay)
|
||||
|
||||
/datum/status_effect/stacking/brimdust_coating/on_creation(mob/living/new_owner, stacks_to_apply)
|
||||
. = ..()
|
||||
@@ -122,16 +144,19 @@
|
||||
|
||||
/datum/status_effect/stacking/brimdust_coating/on_apply()
|
||||
. = ..()
|
||||
|
||||
dust_overlay = mutable_appearance('icons/effects/weather_effects.dmi', "ash_storm")
|
||||
dust_overlay.alpha = stacks * BRIMDUST_ALPHA_PER_STACK
|
||||
dust_overlay.color = COLOR_RED_LIGHT
|
||||
dust_overlay.blend_mode = BLEND_INSET_OVERLAY
|
||||
owner.add_overlay(dust_overlay)
|
||||
owner.add_shared_particles(/particles/brimdust)
|
||||
RegisterSignal(owner, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(on_cleaned))
|
||||
RegisterSignal(owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_take_damage))
|
||||
|
||||
/datum/status_effect/stacking/brimdust_coating/on_remove()
|
||||
. = ..()
|
||||
owner.cut_overlay(dust_overlay)
|
||||
owner.remove_shared_particles(/particles/brimdust)
|
||||
UnregisterSignal(owner, list(COMSIG_MOB_APPLY_DAMAGE, COMSIG_COMPONENT_CLEAN_ACT))
|
||||
|
||||
/// When you are cleaned, wash off the buff
|
||||
@@ -162,14 +187,14 @@
|
||||
new /obj/effect/temp_visual/explosion/fast(origin_turf)
|
||||
|
||||
var/damage_dealt = blast_damage
|
||||
var/list/possible_targets = range(1, origin_turf)
|
||||
if(lavaland_equipment_pressure_check(origin_turf))
|
||||
possible_targets -= owner
|
||||
else
|
||||
var/safe_explosion = lavaland_equipment_pressure_check(origin_turf)
|
||||
if(!safe_explosion)
|
||||
damage_dealt *= pressure_modifier
|
||||
owner.apply_status_effect(/datum/status_effect/brimdust_concussion)
|
||||
|
||||
for(var/mob/living/target in possible_targets)
|
||||
for(var/mob/living/target in range(1, origin_turf) - (safe_explosion ? list(owner, owner.buckled) : null))
|
||||
if (safe_explosion && owner.faction_check_atom(target))
|
||||
continue
|
||||
var/armor = target.run_armor_check(attack_flag = BOMB)
|
||||
target.apply_damage(damage_dealt, damagetype = BURN, blocked = armor, spread_damage = TRUE)
|
||||
|
||||
@@ -202,3 +227,4 @@
|
||||
#undef BRIMDUST_LIFE_APPLY_COOLDOWN
|
||||
#undef BRIMDUST_STACKS_ON_LIFE
|
||||
#undef BRIMDUST_STACKS_ON_USE
|
||||
#undef BRIMDUST_ALPHA_PER_STACK
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define HEALTH_DANGER_ZONE 30
|
||||
|
||||
/**
|
||||
* On use in hand, makes you run really fast for 5 seconds and ignore injury movement decrease.
|
||||
* On use in hand, makes you run faster for a bit and ignore injury movement decrease.
|
||||
* On use when implanted, run for longer and ignore all negative movement. Automatically triggers if health is low (to escape).
|
||||
*/
|
||||
/obj/item/organ/monster_core/rush_gland
|
||||
@@ -37,13 +37,13 @@
|
||||
INVOKE_ASYNC(src, PROC_REF(trigger_organ_action))
|
||||
|
||||
/**
|
||||
* Status effect: Makes you run really fast and ignore speed penalties for a short duration.
|
||||
* Status effect: Makes you run faster and ignore damage speed penalties for a short duration.
|
||||
* If you run into a wall indoors you will fall over and lose the buff.
|
||||
* If you run into someone you both fall over.
|
||||
*/
|
||||
/datum/status_effect/lobster_rush
|
||||
id = "lobster_rush"
|
||||
duration = 3 SECONDS
|
||||
duration = 30 SECONDS
|
||||
alert_type = /atom/movable/screen/alert/status_effect/lobster_rush
|
||||
show_duration = TRUE
|
||||
var/spawned_last_move = FALSE
|
||||
@@ -55,50 +55,58 @@
|
||||
|
||||
/datum/status_effect/lobster_rush/on_apply()
|
||||
. = ..()
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(on_move))
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_BUMP, PROC_REF(on_bump))
|
||||
owner.add_traits(list(TRAIT_IGNORESLOWDOWN, TRAIT_TENTACLE_IMMUNE), TRAIT_STATUS_EFFECT(id))
|
||||
ADD_TRAIT(owner, TRAIT_TENTACLE_IMMUNE, TRAIT_STATUS_EFFECT(id))
|
||||
owner.add_movespeed_mod_immunities(id, /datum/movespeed_modifier/damage_slowdown)
|
||||
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/lobster_rush)
|
||||
to_chat(owner, span_notice("You feel your blood pumping!"))
|
||||
|
||||
/datum/status_effect/lobster_rush/on_remove()
|
||||
. = ..()
|
||||
UnregisterSignal(owner, list(COMSIG_MOVABLE_PRE_MOVE, COMSIG_MOVABLE_BUMP))
|
||||
owner.remove_traits(list(TRAIT_IGNORESLOWDOWN, TRAIT_TENTACLE_IMMUNE), TRAIT_STATUS_EFFECT(id))
|
||||
UnregisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_MOVABLE_BUMP))
|
||||
REMOVE_TRAIT(owner, TRAIT_TENTACLE_IMMUNE, TRAIT_STATUS_EFFECT(id))
|
||||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/lobster_rush)
|
||||
owner.remove_movespeed_mod_immunities(id, /datum/movespeed_modifier/damage_slowdown)
|
||||
to_chat(owner, span_notice("Your pulse returns to normal."))
|
||||
|
||||
/// Spawn an afterimage every other step, because every step was too many
|
||||
/datum/status_effect/lobster_rush/proc/on_move()
|
||||
/datum/status_effect/lobster_rush/proc/on_move(datum/source, atom/old_loc, dir)
|
||||
SIGNAL_HANDLER
|
||||
if (!isturf(old_loc) || !isturf(owner.loc))
|
||||
return
|
||||
if (!spawned_last_move)
|
||||
new /obj/effect/temp_visual/decoy/fading(owner.loc, owner)
|
||||
new /obj/effect/temp_visual/decoy/fading(old_loc, owner, 150)
|
||||
spawned_last_move = !spawned_last_move
|
||||
|
||||
/datum/status_effect/lobster_rush/proc/on_bump(mob/living/source, atom/target)
|
||||
SIGNAL_HANDLER
|
||||
if (!target.density)
|
||||
return
|
||||
if (isliving(target))
|
||||
source.visible_message(span_warning("[source] crashes into [target]!"))
|
||||
smack_into(source)
|
||||
smack_into(target)
|
||||
qdel(src)
|
||||
return
|
||||
if (lavaland_equipment_pressure_check(get_turf(source)))
|
||||
return
|
||||
smack_into(source)
|
||||
source.visible_message(span_warning("[source] crashes into [target]!"))
|
||||
if (isliving(target))
|
||||
smack_into(target)
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/lobster_rush/proc/smack_into(mob/living/target)
|
||||
target.Knockdown(5 SECONDS)
|
||||
target.apply_damage(40, STAMINA)
|
||||
target.apply_damage(20, BRUTE, spread_damage = TRUE)
|
||||
target.Knockdown(2 SECONDS)
|
||||
target.apply_damage(30, STAMINA)
|
||||
target.apply_damage(10, BRUTE, spread_damage = TRUE)
|
||||
|
||||
/// You get a longer buff if you take the time to implant it in yourself
|
||||
/datum/status_effect/lobster_rush/extended
|
||||
duration = 5 SECONDS
|
||||
duration = 60 SECONDS
|
||||
|
||||
/datum/status_effect/lobster_rush/extended/on_apply()
|
||||
. = ..()
|
||||
ADD_TRAIT(owner, TRAIT_IGNORESLOWDOWN, TRAIT_STATUS_EFFECT(id))
|
||||
|
||||
/datum/status_effect/lobster_rush/extended/on_remove()
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_IGNORESLOWDOWN, TRAIT_STATUS_EFFECT(id))
|
||||
|
||||
/// Action used by the rush gland
|
||||
/datum/action/cooldown/monster_core_action/adrenal_boost
|
||||
@@ -106,6 +114,6 @@
|
||||
desc = "Pump your rush gland to give yourself a boost of speed. \
|
||||
Impacts with objects can be dangerous under atmospheric pressure."
|
||||
button_icon_state = "lobster_gland_stable"
|
||||
cooldown_time = 90 SECONDS
|
||||
cooldown_time = 180 SECONDS
|
||||
|
||||
#undef HEALTH_DANGER_ZONE
|
||||
|
||||
Reference in New Issue
Block a user