Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malkavian ramblings now have a proper cooldown #3628

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading