Skip to content

Commit dac81c2

Browse files
committed
(wip) revenant blight rework
1 parent 975c969 commit dac81c2

File tree

4 files changed

+109
-0
lines changed

4 files changed

+109
-0
lines changed

code/__DEFINES/~monkestation/colors.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111

1212
#define LIGHT_RANGE_FIRE_BLOSSOM_HARVESTED 2.7
1313
#define LIGHT_POWER_FIRE_BLOSSOM_HARVESTED 1.5
14+
15+
#define COLOR_REVENANT "#1d2953"

code/modules/mob/living/basic/space_fauna/revenant/revenant_abilities.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@
229229
cyborg.spark_system.start()
230230
cyborg.emp_act(EMP_HEAVY)
231231

232+
/* monkestation removal: reimplemented in [monkestation\code\modules\mob\living\basic\space_fauna\revenant\revenant_abilities.dm]
232233
//Blight: Infects nearby humans and in general messes living stuff up.
233234
/datum/action/cooldown/spell/aoe/revenant/blight
234235
name = "Blight"
@@ -281,6 +282,7 @@
281282
SEND_SIGNAL(tray, COMSIG_GROWING_ADJUST_TOXIN, rand(45, 55))
282283
SEND_SIGNAL(tray, COMSIG_GROWING_ADJUST_PEST, rand(8, 10))
283284
SEND_SIGNAL(tray, COMSIG_GROWING_ADJUST_WEED, rand(8, 10))
285+
monkestation end */
284286

285287
/datum/action/cooldown/spell/aoe/revenant/haunt_object
286288
name = "Haunt Object"
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/// Minimum cooldown time before we start trying to do effect emotes again.
2+
#define MIN_EMOTE_COOLDOWN (10 SECONDS)
3+
/// Maximum cooldown time before we start trying to do effect emotes again.
4+
#define MAX_EMOTE_COOLDOWN (45 SECONDS)
5+
/// How many seconds are shaved off each tick while holy water is in the victim's system.
6+
#define HOLY_WATER_CURE_RATE (5 SECONDS)
7+
8+
//Blight: Infects nearby humans and in general messes living stuff up.
9+
/datum/action/cooldown/spell/aoe/revenant/blight
10+
name = "Blight"
11+
desc = "Causes nearby living things to waste away."
12+
button_icon_state = "blight"
13+
cooldown_time = 20 SECONDS
14+
15+
aoe_radius = 3
16+
cast_amount = 50
17+
unlock_amount = 75
18+
19+
/datum/action/cooldown/spell/aoe/revenant/blight/cast_on_thing_in_aoe(turf/victim, mob/living/basic/revenant/caster)
20+
for(var/mob/living/mob in victim)
21+
if(mob == caster)
22+
continue
23+
if(mob.can_block_magic(antimagic_flags))
24+
to_chat(caster, span_warning("The spell had no effect on [mob]!"))
25+
continue
26+
new /obj/effect/temp_visual/revenant(get_turf(mob))
27+
if(iscarbon(mob))
28+
if(ishuman(mob))
29+
mob.apply_status_effect(/datum/status_effect/revenant_blight)
30+
else
31+
mob.reagents?.add_reagent(/datum/reagent/toxin/plasma, 5)
32+
else
33+
mob.adjustToxLoss(5)
34+
for(var/obj/structure/spacevine/vine in victim) //Fucking with botanists, the ability.
35+
vine.add_atom_colour("#823abb", TEMPORARY_COLOUR_PRIORITY)
36+
new /obj/effect/temp_visual/revenant(vine.loc)
37+
QDEL_IN(vine, 10)
38+
for(var/obj/structure/glowshroom/shroom in victim)
39+
shroom.add_atom_colour("#823abb", TEMPORARY_COLOUR_PRIORITY)
40+
new /obj/effect/temp_visual/revenant(shroom.loc)
41+
QDEL_IN(shroom, 10)
42+
for(var/atom/movable/tray in victim)
43+
if(!tray.GetComponent(/datum/component/plant_growing))
44+
continue
45+
46+
new /obj/effect/temp_visual/revenant(tray.loc)
47+
SEND_SIGNAL(tray, COMSIG_GROWING_ADJUST_TOXIN, rand(45, 55))
48+
SEND_SIGNAL(tray, COMSIG_GROWING_ADJUST_PEST, rand(8, 10))
49+
SEND_SIGNAL(tray, COMSIG_GROWING_ADJUST_WEED, rand(8, 10))
50+
51+
/datum/status_effect/revenant_blight
52+
id = "revenant_blight"
53+
duration = 5 MINUTES
54+
tick_interval = 0
55+
status_type = STATUS_EFFECT_REFRESH
56+
alert_type = null
57+
remove_on_fullheal = TRUE
58+
/// The omen/cursed component applied to the victim.
59+
var/datum/component/omen/revenant_blight/misfortune
60+
/// The revenant that cast this blight.
61+
var/mob/living/basic/revenant/gohst
62+
/// Cooldown var for when the status effect can emote again.
63+
COOLDOWN_DECLARE(next_emote)
64+
65+
/datum/status_effect/revenant_blight/on_creation(mob/living/new_owner, mob/living/basic/revenant/gohst)
66+
. = ..()
67+
if(. && istype(gohst))
68+
src.gohst = gohst
69+
RegisterSignal(gohst, COMSIG_QDELETING, PROC_REF(remove_when_ghost_dies))
70+
71+
/datum/status_effect/revenant_blight/on_apply()
72+
misfortune = owner.AddComponent(/datum/component/omen/revenant_blight)
73+
owner.set_haircolor(COLOR_REVENANT, override = TRUE)
74+
to_chat(owner, span_revenminor("You feel [pick("suddenly sick", "a surge of nausea", "like your skin is <i>wrong</i>")]."))
75+
return ..()
76+
77+
/datum/status_effect/revenant_blight/on_remove()
78+
QDEL_NULL(misfortune)
79+
owner.set_haircolor(null, override = TRUE)
80+
if(gohst)
81+
UnregisterSignal(gohst, COMSIG_QDELETING)
82+
gohst = null
83+
to_chat(owner, span_notice("You feel better."))
84+
85+
/datum/status_effect/revenant_blight/tick(seconds_per_tick, times_fired)
86+
var/delta_time = DELTA_WORLD_TIME(SSfastprocess)
87+
if(owner.stat == CONSCIOUS && COOLDOWN_FINISHED(src, next_emote) && SPT_PROB(5, delta_time))
88+
owner.emote(pick("pale", "shiver", "cries"))
89+
COOLDOWN_START(src, next_emote, rand(MIN_EMOTE_COOLDOWN, MAX_EMOTE_COOLDOWN))
90+
if(owner.reagents?.has_reagent(/datum/reagent/water/holywater))
91+
remove_duration(HOLY_WATER_CURE_RATE * delta_time)
92+
93+
/datum/status_effect/revenant_blight/proc/remove_when_ghost_dies(datum/source)
94+
SIGNAL_HANDLER
95+
qdel(src)
96+
97+
/datum/component/omen/revenant_blight
98+
incidents_left = INFINITY
99+
luck_mod = 0.6 // 60% chance of bad things happening
100+
damage_mod = 0.25 // 25% of normal damage
101+
102+
#undef HOLY_WATER_CURE_RATE
103+
#undef MAX_EMOTE_COOLDOWN
104+
#undef MIN_EMOTE_COOLDOWN

tgstation.dme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7688,6 +7688,7 @@
76887688
#include "monkestation\code\modules\mob\living\basic\pets\parrot\parrot_ai\parroting_action.dm"
76897689
#include "monkestation\code\modules\mob\living\basic\space_fauna\carp\carp.dm"
76907690
#include "monkestation\code\modules\mob\living\basic\space_fauna\regal_rat\regal_rat_actions.dm"
7691+
#include "monkestation\code\modules\mob\living\basic\space_fauna\revenant\revenant_abilities.dm"
76917692
#include "monkestation\code\modules\mob\living\basic\space_fauna\slugcat\slugcat.dm"
76927693
#include "monkestation\code\modules\mob\living\basic\trooper\syndicate.dm"
76937694
#include "monkestation\code\modules\mob\living\basic\vermin\frog.dm"

0 commit comments

Comments
 (0)