Skip to content

Commit e21f797

Browse files
authored
[Balance Discussion] Reworking the interaction between loyalty implants and cultists (#38818)
* loyalty implant interaction with cultists reworked * gneh * derp * any minute now
1 parent 38985b2 commit e21f797

6 files changed

Lines changed: 61 additions & 23 deletions

File tree

__DEFINES/role_datums_defines.dm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,15 @@
232232
#define DEVOTION_TIER_3 3
233233
#define DEVOTION_TIER_4 4
234234

235+
#define DEVOTION_REQ_1 100
236+
#define DEVOTION_REQ_2 500
237+
#define DEVOTION_REQ_3 1000
238+
#define DEVOTION_REQ_4 2000
239+
240+
#define CULT_IMPLANT_POP_NONE 0
241+
#define CULT_IMPLANT_POP_DELAYED 1
242+
#define CULT_IMPLANT_POP_IMMEDIATE 2
243+
235244
#define RITUAL_CULTIST_1 "first_ritual"
236245
#define RITUAL_CULTIST_2 "second_ritual"
237246

code/datums/gamemode/factions/bloodcult/bloodcult.dm

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,26 @@
8484

8585
var/countdown_to_first_rituals = 5
8686

87+
var/implant_pop = CULT_IMPLANT_POP_NONE
88+
8789
/datum/faction/bloodcult/stage(var/value)
8890
stage = value
8991
switch(stage)
9092
if (BLOODCULT_STAGE_READY)
93+
implant_pop = CULT_IMPLANT_POP_IMMEDIATE
9194
eclipse_trigger_cult()
9295
for(var/obj/structure/cult/spire/S in cult_spires)
9396
S.upgrade(3)
9497
if (BLOODCULT_STAGE_MISSED)
98+
implant_pop = CULT_IMPLANT_POP_NONE
9599
for (var/datum/role/cultist in members)
96100
var/mob/M = cultist.antag.current
97101
if (M)
98102
to_chat(M, "<span class='sinister'>The Eclipse has passed. You won't be able to tear reality aboard this station anymore. Escape the station alive with your fellow cultists so you may try again another day.</span>")
99103
for(var/obj/structure/cult/spire/S in cult_spires)
100104
S.upgrade(1)
101105
if (BLOODCULT_STAGE_ECLIPSE)
106+
implant_pop = CULT_IMPLANT_POP_IMMEDIATE
102107
update_all_parallax()
103108
var/datum/zLevel/ZL = map.zLevels[map.zMainStation]
104109
ZL.transitionLoops = TRUE
@@ -363,7 +368,8 @@
363368
for (var/datum/role/R in members)
364369
var/mob/M = R.antag.current
365370
calculate_eclipse_rate()
366-
if (isliving(M) && !M.isDead())
371+
if (isliving(M) && !M.isDead() && !M.occult_muted())
372+
//if at least one cultist is alive, and not suffering from holliness
367373
//we calculate the progress relative to the time since the last process so the overall time is independant from server lag and shit
368374
delta = 1
369375
if (last_process_time && (last_process_time < world.time))//carefully dealing with midnight rollover
@@ -373,6 +379,20 @@
373379
last_process_time = world.time
374380

375381
eclipse_progress += max(0.1, eclipse_increments) * delta
382+
383+
if (implant_pop == CULT_IMPLANT_POP_NONE)
384+
var/eclipse_remaining = eclipse_target - eclipse_progress
385+
var/eclipse_ticks_to_go_at_current_rate = eclipse_remaining / max(0.1, eclipse_increments)
386+
if(SSticker.initialized)
387+
eclipse_ticks_to_go_at_current_rate *= (SSticker.wait / 10)//converting to seconds
388+
var/minutes_to_go = floor(eclipse_ticks_to_go_at_current_rate / 60)
389+
if (minutes_to_go < 10)
390+
implant_pop = CULT_IMPLANT_POP_DELAYED
391+
for (var/datum/role/RR in members)
392+
var/mob/living/carbon/MM = RR.antag.current
393+
if (istype(MM))
394+
MM.implant_pop()//if there's no loyalty implant, this does nothing
395+
376396
if (eclipse_progress >= eclipse_target)
377397
stage(BLOODCULT_STAGE_READY)
378398
break

code/datums/gamemode/factions/bloodcult/bloodcult_misc_procs.dm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,13 @@ var/static/list/valid_cultpower_slots = list(
137137
/mob/living/carbon/proc/implant_pop()
138138
for(var/obj/item/weapon/implant/loyalty/I in src)
139139
if (I.imp_in)
140-
to_chat(src, "<span class='sinister'>Your blood pushes back against the loyalty implant, it will visibly pop out within seconds!</span>")
141-
spawn(10 SECONDS)
140+
to_chat(src, "<span class='userdanger'>As the veil grows thinner, the dark energies in your body disrupt \the [I.name].")
141+
var/delay = 0
142+
var/datum/faction/bloodcult/cult = find_active_faction_by_type(/datum/faction/bloodcult)
143+
if (cult && cult.implant_pop == CULT_IMPLANT_POP_DELAYED)
144+
to_chat(src, "<span class='userdanger'>It feels like it will be expelled from your body any minute now!</span>")
145+
delay = 60 SECONDS
146+
spawn(delay)
142147
if (I.remove())
143148
visible_message("<span class='warning'>\The [I] pops out of \the [src]'s head.</span>")
144149

code/datums/gamemode/factions/bloodcult/bloodcult_runespells.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ var/list/converted_minds = list()
10911091
if (istype(victim.handcuffed,/obj/item/weapon/handcuffs/cult))
10921092
victim.drop_from_inventory(victim.handcuffed)
10931093
//and their loyalty implants are removed, so they can't mislead security, not that the conversion should even go through
1094-
victim.implant_pop()
1094+
victim.implant_pop()//but it does prevent funny players from implanting people right before the ritual concludes
10951095
for(var/obj/item/weapon/implant/holy/H in victim)
10961096
to_chat(victim, "<span class='warning'>The ritual's energies have completely fried the holy implant that was lodged in your skull.</span>")
10971097
qdel(H)

code/datums/gamemode/role/cultist.dm

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
13
/datum/role/cultist
24
id = CULTIST
35
name = "Cultist"
@@ -134,7 +136,7 @@
134136
assign_rituals()
135137
var/mob/M = antag.current
136138
if (M)
137-
to_chat(M, "<span class='sinister'>Although you can generate devotion by performing most cult activities, a couple rituals for you to perform are now available. Check the cult panel.</span>")
139+
to_chat(M, "<span class='sinister'>Although you can generate devotion by performing most cult activities, a couple rituals for you to perform are now available. Check the cult panel to the left.</span>")
138140
if (!antag.current)
139141
return
140142
switch(cult.stage)
@@ -272,13 +274,13 @@
272274

273275
/datum/role/cultist/ExtraScoreboard()
274276
switch(devotion)
275-
if (2000 to INFINITY)
277+
if (DEVOTION_REQ_4 to INFINITY)
276278
return " <font color='#FF0000'>[devotion]</font>"
277-
if (1000 to 2000)
279+
if (DEVOTION_REQ_3 to DEVOTION_REQ_4)
278280
return " <font color='#FF8800'>[devotion]</font>"
279-
if (500 to 1000)
281+
if (DEVOTION_REQ_2 to DEVOTION_REQ_3)
280282
return " <font color='#FFFF00'>[devotion]</font>"
281-
if (100 to 500)
283+
if (DEVOTION_REQ_1 to DEVOTION_REQ_2)
282284
return " <font color='#88FF00'>[devotion]</font>"
283285
else
284286
return " <font color='#00FF00'>[devotion]</font>"
@@ -374,15 +376,15 @@
374376

375377
/datum/role/cultist/proc/get_devotion_rank()
376378
switch(devotion)
377-
if (2000 to INFINITY)
379+
if (DEVOTION_REQ_4 to INFINITY)
378380
return DEVOTION_TIER_4
379-
if (1000 to 2000)
381+
if (DEVOTION_REQ_3 to DEVOTION_REQ_4)
380382
return DEVOTION_TIER_3
381-
if (500 to 1000)
383+
if (DEVOTION_REQ_2 to DEVOTION_REQ_3)
382384
return DEVOTION_TIER_2
383-
if (100 to 500)
385+
if (DEVOTION_REQ_1 to DEVOTION_REQ_2)
384386
return DEVOTION_TIER_1
385-
if (0 to 100)
387+
if (0 to DEVOTION_REQ_1)
386388
return DEVOTION_TIER_0
387389

388390
/datum/role/cultist/proc/gain_devotion(var/acquired_devotion = 0, var/tier = DEVOTION_TIER_0, var/key, var/extra)
@@ -536,13 +538,13 @@
536538
if (DEVOTION_TIER_0)
537539
return 0.10
538540
if (DEVOTION_TIER_1)
539-
return 0.10 + (devotion-100)*0.000375
541+
return 0.10 + (devotion - DEVOTION_REQ_1) * 0.000375
540542
if (DEVOTION_TIER_2)
541-
return 0.25 + (devotion-500)*0.0003
543+
return 0.25 + (devotion - DEVOTION_REQ_2) * 0.0003
542544
if (DEVOTION_TIER_3)
543-
return 0.40 + (devotion-1000)*0.0001
545+
return 0.40 + (devotion - DEVOTION_REQ_3) * 0.0001
544546
if (DEVOTION_TIER_4)
545-
return 0.50 + (devotion-2000)*0.00005
547+
return 0.50 + (devotion - DEVOTION_REQ_4) * 0.00005
546548

547549
/datum/role/cultist/handle_reagent(var/reagent_id)
548550
var/mob/living/carbon/human/H = antag.current
@@ -569,7 +571,7 @@
569571
to_chat(H, "<span class='danger'>The burning touch of sacred water sears your skin.</span>")
570572

571573
switch(reagent_id)
572-
if (HOLYWATER,INCENSE_HAREBELLS,SACREDWATER)
574+
if (HOLYWATER, INCENSE_HAREBELLS, SACREDWATER)
573575
H.eye_blurry = max(H.eye_blurry, 12)
574576
H.Dizzy(12)
575577
H.stuttering = max(H.stuttering, 12)

code/game/objects/items/weapons/implants/types/loyalty_implant.dm

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@
2929
qdel(src)
3030
return
3131
if(iscultist(imp_in))
32-
to_chat(imp_in, "<span class='danger'>You feel the corporate tendrils of Nanotrasen trying to invade your mind!</span>")
33-
var/mob/living/carbon/host = imp_in
34-
if(istype(host))
35-
host.implant_pop()
32+
var/datum/faction/bloodcult/cult = find_active_faction_by_type(/datum/faction/bloodcult)
33+
if (cult?.implant_pop)
34+
to_chat(imp_in, "<span class='danger'>You feel the corporate tendrils of Nanotrasen trying to invade your mind!</span>")
35+
var/mob/living/carbon/host = imp_in
36+
if(istype(host))
37+
host.implant_pop()
3638
if(isrevnothead(imp_in))
3739
var/datum/role/R = imp_in.mind.GetRole(REV)
3840
R.Drop()

0 commit comments

Comments
 (0)