Skip to content

Commit

Permalink
Доработки и нерф равагера (Инцидент №10738) (PMC-Unga-Marines#322)
Browse files Browse the repository at this point in the history
* 10738

* .

* .

* .

* .

* .
  • Loading branch information
Waselon authored Oct 13, 2024
1 parent ee0fdb0 commit 0a01779
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 4 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@
#define COMSIG_XENOABILITY_SECOND_WIND "xenoability_second_wind"
#define COMSIG_XENOABILITY_ENDURE "xenoability_endure"
#define COMSIG_XENOABILITY_RAGE "xenoability_rage"
#define COMSIG_XENOABILITY_IMMORTALITY "xenoability_immortality"
#define COMSIG_XENOABILITY_VAMPIRISM "xenoability_vampirism"

#define COMSIG_XENOABILITY_RUNNER_POUNCE "xenoability_runner_pounce"
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,8 @@ GLOBAL_LIST_INIT(xenoupgradetiers, list(XENO_UPGRADE_BASETYPE, XENO_UPGRADE_INVA
#define RAVAGER_RAGE_MIN_HEALTH_THRESHOLD 0.75 //The maximum % of HP we can have to trigger Rage
#define RAVAGER_RAGE_STAGGERSTUN_IMMUNE_THRESHOLD 0.5
#define RAVAGER_RAGE_ENDURE_INCREASE_PER_SLASH 2 SECONDS //The amount of time each slash during Rage increases Endure's duration
#define RAVAGER_RAGE_HEALTH_RECOVERY_PER_SLASH 100 //Maximum amount of healing from slash during Rage
#define RAVAGER_RAGE_HEALTH_RECOVERY_PER_SLASH 40 //Base amount of healing from slash during Rage
#define RAVAGER_IMMORTALITY_DURATION 5 SECONDS

//crusher defines
#define CRUSHER_STOMP_LOWER_DMG 40
Expand Down
7 changes: 7 additions & 0 deletions code/datums/keybinding/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,13 @@
description = "While active, will increase the ravagers healing for a while for every time it hits a new enemy. Effects stack."
keybind_signal = COMSIG_XENOABILITY_VAMPIRISM

/datum/keybinding/xeno/ravager_immortality
name = "ravager_immortality"
full_name = "Ravager: Immortality"
description = "For the next few moments we will be immune to damage."
keybind_signal = COMSIG_XENOABILITY_IMMORTALITY
hotkey_keys = list("X")

/datum/keybinding/xeno/ravage
name = "ravage"
full_name = "Ravager: Ravage"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,52 @@
particle_holder.pixel_y = 18
particle_holder.pixel_x = 18
timer_ref = QDEL_NULL_IN(src, particle_holder, heal_delay)

// ***************************************
// *********** Immortality
// ***************************************
/datum/action/ability/xeno_action/immortality
name = "Immortality"
action_icon_state = "enhancement"
desc = "We are too angry to die."
ability_cost = 666
cooldown_duration = 35 SECONDS
keybinding_signals = list(
KEYBINDING_NORMAL = COMSIG_XENOABILITY_IMMORTALITY,
)
use_state_flags = ABILITY_USE_STAGGERED

/datum/action/ability/xeno_action/immortality/on_cooldown_finish()
to_chat(owner, span_xenodanger("We are able to become immortal once again."))
owner.playsound_local(owner, 'sound/effects/alien/newlarva.ogg', 25, 0, 1)
return ..()

/datum/action/ability/xeno_action/immortality/action_activate()
var/mob/living/carbon/xenomorph/ravager/X = owner

X.emote("roar")
X.visible_message(span_danger("[X]'s skin begins to glow!"), \
span_xenowarning("We are too angry to die!"))

X.add_filter("ravager_immortality_outline", 4, outline_filter(0.5, COLOR_TRANSPARENT_SHADOW))

ENABLE_BITFIELD(X.status_flags, GODMODE)

addtimer(CALLBACK(src, PROC_REF(immortality_deactivate)), RAVAGER_IMMORTALITY_DURATION, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_OVERRIDE)

succeed_activate()
add_cooldown()

/datum/action/ability/xeno_action/immortality/proc/immortality_deactivate()
if(QDELETED(owner))
return
var/mob/living/carbon/xenomorph/X = owner

DISABLE_BITFIELD(X.status_flags, GODMODE)

X.do_jitter_animation(500)

X.remove_filter("ravager_immortality_outline")

to_chat(owner,span_highdanger("We are now mortal again."))
owner.playsound_local(owner, 'sound/voice/alien/hiss8.ogg', 50, 0, 1)
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@
/datum/action/ability/activable/xeno/charge,
/datum/action/ability/activable/xeno/ravage,
/datum/action/ability/xeno_action/endure,
/datum/action/ability/xeno_action/vampirism,
/datum/action/ability/xeno_action/immortality,
)
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
var/burn_damage = getFireLoss()
if(!brute_damage && !burn_damage)
return
var/health_recovery = RAVAGER_RAGE_HEALTH_RECOVERY_PER_SLASH * rage_power
var/health_recovery = RAVAGER_RAGE_HEALTH_RECOVERY_PER_SLASH + (RAVAGER_RAGE_HEALTH_RECOVERY_PER_SLASH * rage_power)
var/health_modifier
if(brute_damage)
health_modifier = -min(brute_damage, health_recovery)
Expand All @@ -108,7 +108,7 @@

var/datum/action/ability/xeno_action/endure/endure_ability = actions_by_path[/datum/action/ability/xeno_action/endure]
if(endure_ability.endure_duration) //Check if Endure is active
var/new_duration = min(RAVAGER_ENDURE_DURATION, (timeleft(endure_ability.endure_duration) + RAVAGER_RAGE_ENDURE_INCREASE_PER_SLASH))
var/new_duration = min(RAVAGER_ENDURE_DURATION, (timeleft(endure_ability.endure_duration) + max(1 SECONDS, RAVAGER_RAGE_ENDURE_INCREASE_PER_SLASH * rage_power)))
deltimer(endure_ability.endure_duration) //Reset timers
deltimer(endure_ability.endure_warning_duration)
endure_ability.endure_duration = addtimer(CALLBACK(endure_ability, TYPE_PROC_REF(/datum/action/ability/xeno_action/endure, endure_deactivate)), new_duration, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_OVERRIDE)
Expand Down

0 comments on commit 0a01779

Please sign in to comment.