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

Blood Brother storyteller tweaks #2559

Merged
merged 3 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
var/antag_datum
/// Prompt players for consent to turn them into antags before doing so. Dont allow this for roundstart.
var/prompted_picking = FALSE
/// A list of extra events to force whenever this one is chosen by the storyteller.
/// Can either be normal list or a weighted list.
var/list/extra_spawned_events

/datum/round_event_control/antagonist/solo/from_ghosts/get_candidates()
var/round_started = SSticker.HasRoundStarted()
Expand Down Expand Up @@ -199,6 +202,15 @@
var/list/setup_minds = list()
/// Whether we prompt the players before picking them.
var/prompted_picking = FALSE //TODO: Implement this
/// DO NOT SET THIS MANUALLY, THIS IS INHERITED FROM THE EVENT CONTROLLER ON NEW
var/list/extra_spawned_events

/datum/round_event/antagonist/solo/New(my_processing, datum/round_event_control/event_controller)
. = ..()
if(istype(event_controller, /datum/round_event_control/antagonist/solo))
var/datum/round_event_control/antagonist/solo/antag_event_controller = event_controller
if(antag_event_controller?.extra_spawned_events)
extra_spawned_events = fill_with_ones(antag_event_controller.extra_spawned_events)

/datum/round_event/antagonist/solo/setup()
var/datum/round_event_control/antagonist/solo/cast_control = control
Expand Down Expand Up @@ -267,6 +279,18 @@
candidate.mind.restricted_roles = restricted_roles

setup = TRUE
if(LAZYLEN(extra_spawned_events))
var/event_type = pick_weight(extra_spawned_events)
if(!event_type)
return
var/datum/round_event_control/triggered_event = locate(event_type) in SSgamemode.control
addtimer(CALLBACK(triggered_event, TYPE_PROC_REF(/datum/round_event_control, run_event), FALSE, null, FALSE, "storyteller"), 1 SECONDS) // wait a second to avoid any potential omnitraitor bs

/datum/round_event/antagonist/solo/proc/spawn_extra_events()
if(!LAZYLEN(extra_spawned_events))
return
var/datum/round_event_control/event = pick_weight(extra_spawned_events)
event?.run_event(random = FALSE, event_cause = "storyteller")


/datum/round_event/antagonist/solo/ghost/setup()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
JOB_SECURITY_ASSISTANT,
)
required_enemies = 1
// BBs should be less common/abundant than normal traitors, albeit not overly so.
weight = 16
weight = 10
Absolucy marked this conversation as resolved.
Show resolved Hide resolved
maximum_antags = 2
denominator = 30
cost = 0.45 // so it doesn't eat up threat for a relatively low-threat antag
Expand All @@ -40,6 +39,11 @@
name = "Blood Brothers"
roundstart = TRUE
earliest_start = 0 SECONDS
extra_spawned_events = list(
/datum/round_event_control/antagonist/solo/traitor/roundstart = 12,
/datum/round_event_control/antagonist/solo/bloodsucker/roundstart = 4,
/datum/round_event_control/antagonist/solo/heretic/roundstart = 2,
)

/datum/round_event_control/antagonist/solo/brother/midround
name = "Sleeper Agents (Blood Brothers)"
Expand Down
Loading