Skip to content

Commit

Permalink
Malkavian ramblings now have a proper cooldown (#3628)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored Oct 3, 2024
1 parent e2995c4 commit b79640d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion monkestation/code/modules/bloodsuckers/clans/malkavian.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#define REVELATION_MIN_COOLDOWN 20 SECONDS
#define REVELATION_MAX_COOLDOWN 1 MINUTES

/datum/bloodsucker_clan/malkavian
name = CLAN_MALKAVIAN
description = "Little is documented about Malkavians. Complete insanity is the most common theme. \n\
Expand All @@ -6,6 +9,7 @@
join_description = "Completely insane. You gain constant hallucinations, become a prophet with unintelligable rambling, \
and become the enforcer of the Masquerade code."
blood_drink_type = BLOODSUCKER_DRINK_INHUMANELY
COOLDOWN_DECLARE(revelation_cooldown)

/datum/bloodsucker_clan/malkavian/New(datum/antagonist/bloodsucker/owner_datum)
. = ..()
Expand All @@ -32,9 +36,10 @@

/datum/bloodsucker_clan/malkavian/handle_clan_life(datum/antagonist/bloodsucker/source)
. = ..()
if(prob(85) || bloodsuckerdatum.owner.current.stat != CONSCIOUS || HAS_TRAIT(bloodsuckerdatum.owner.current, TRAIT_MASQUERADE))
if(!COOLDOWN_FINISHED(src, revelation_cooldown) || prob(85) || bloodsuckerdatum.owner.current.stat != CONSCIOUS || HAS_TRAIT(bloodsuckerdatum.owner.current, TRAIT_MASQUERADE))
return
var/message = pick(strings("malkavian_revelations.json", "revelations", "monkestation/strings"))
COOLDOWN_START(src, revelation_cooldown, rand(REVELATION_MIN_COOLDOWN, REVELATION_MAX_COOLDOWN))
INVOKE_ASYNC(bloodsuckerdatum.owner.current, TYPE_PROC_REF(/atom/movable, say), message, , , , , , CLAN_MALKAVIAN)

/datum/bloodsucker_clan/malkavian/on_favorite_vassal(datum/antagonist/bloodsucker/source, datum/antagonist/vassal/vassaldatum)
Expand Down Expand Up @@ -66,3 +71,6 @@
masquerade_objective.explanation_text = "Ensure [masquerade_breaker.owner.current], who has broken the Masquerade, succumbs to Final Death."
bloodsuckerdatum.objectives += masquerade_objective
bloodsuckerdatum.owner.announce_objectives()

#undef REVELATION_MAX_COOLDOWN
#undef REVELATION_MIN_COOLDOWN

0 comments on commit b79640d

Please sign in to comment.