mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Adds cult scaling for lower population (#31765)
* Cult team size
* Adds cult scaling for lowpop
* Oops
* Constants make me physically ill
* Linters
* Cult budget scales with number of roundstart cult
* Adjusts methodology
* Revert "Adjusts methodology"
This reverts commit 75b7695ba0.
* Change
* Linter
This commit is contained in:
@@ -8,19 +8,28 @@
|
||||
config_tag = "cult"
|
||||
restricted_jobs = list("Chaplain", "AI", "Cyborg", "Internal Affairs Agent", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Blueshield", "Nanotrasen Representative", "Magistrate", "Nanotrasen Career Trainer", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General", "Research Director", "Chief Medical Officer", "Chief Engineer", "Quartermaster")
|
||||
protected_jobs = list()
|
||||
required_players = 30
|
||||
required_enemies = 3
|
||||
required_players = 15
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
var/list/pre_cult = list()
|
||||
|
||||
var/const/min_cultists_to_start = 3
|
||||
var/const/max_cultists_to_start = 4
|
||||
var/const/min_cultists_to_start = 1
|
||||
var/max_cultists_to_start = 4
|
||||
|
||||
/datum/game_mode/cult/announce()
|
||||
to_chat(world, "<B>The current game mode is - Cult!</B>")
|
||||
to_chat(world, "<B>Some crewmembers are attempting to start a cult!<BR>\nCultists - complete your objectives. Convert crewmembers to your cause by using the offer rune. Remember - there is no you, there is only the cult.<BR>\nPersonnel - Do not let the cult succeed in its mission. Brainwashing them with holy water reverts them to whatever CentComm-allowed faith they had.</B>")
|
||||
|
||||
/datum/game_mode/cult/can_start()
|
||||
. = ..()
|
||||
var/playerC = 0
|
||||
for(var/mob/new_player/player in GLOB.player_list)
|
||||
if((player.client) && (player.ready))
|
||||
playerC++
|
||||
|
||||
max_cultists_to_start = min(1 + round_down((playerC - 15) / 5), 4)
|
||||
|
||||
/datum/game_mode/cult/pre_setup()
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
/datum/ruleset/implied/roundstart_pre_setup()
|
||||
// antag_amount is always 0 when this proc is called, so we need to update banned_jobs manually
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
banned_jobs += protected_jobs
|
||||
banned_jobs += protected_jobs
|
||||
|
||||
/datum/ruleset/implied/mindflayer
|
||||
name = "Mindflayer"
|
||||
@@ -303,6 +303,10 @@
|
||||
var/unique_team = TRUE
|
||||
/// How many players on a team.
|
||||
var/team_size = 1
|
||||
/// How much does each person on the team cost?
|
||||
var/individual_cost = 5
|
||||
/// Minimum team size
|
||||
var/minimum_team_size = 2
|
||||
/// Team datum to create.
|
||||
var/datum/team/team_type
|
||||
|
||||
@@ -314,8 +318,9 @@
|
||||
stack_trace("Undefined behavior for dynamic non-unique teams!")
|
||||
|
||||
/datum/ruleset/team/automatic_deduct(budget)
|
||||
team_size = team_scale()
|
||||
antag_amount = team_size
|
||||
. = antag_cost
|
||||
. = antag_cost + max(((team_size - minimum_team_size) * individual_cost), 0) // The starting antags cost as much as the team.
|
||||
log_dynamic("Automatic deduction: +[antag_amount] [name]\s. Remaining budget: [budget - .].")
|
||||
|
||||
/datum/ruleset/team/antagonist_possible(budget)
|
||||
@@ -323,11 +328,14 @@
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/ruleset/team/proc/team_scale()
|
||||
return team_size
|
||||
|
||||
/datum/ruleset/team/cult
|
||||
name = "Cultist"
|
||||
ruleset_weight = 3
|
||||
// antag_weight doesnt matter, since we've already allocated our budget for 4 cultists only
|
||||
antag_cost = 30
|
||||
// antag_weight doesnt matter, since we've already allocated our budget for cultists
|
||||
antag_cost = 12.5 // 15 players
|
||||
antagonist_type = /datum/antagonist/cultist
|
||||
banned_mutual_rulesets = list(
|
||||
/datum/ruleset/traitor,
|
||||
@@ -336,9 +344,15 @@
|
||||
)
|
||||
banned_jobs = list("Cyborg", "AI", "Chaplain", "Head of Personnel")
|
||||
|
||||
team_size = 4
|
||||
team_type = /datum/team/cult
|
||||
|
||||
/datum/ruleset/team/cult/team_scale()
|
||||
var/players = 0
|
||||
for(var/mob/new_player/P in GLOB.player_list)
|
||||
if(P.client && P.ready)
|
||||
players++
|
||||
return min(1 + round_down((players - 15) / 5), 4)
|
||||
|
||||
/datum/ruleset/team/cult/declare_completion()
|
||||
if(SSticker.mode.cult_team.cult_status == NARSIE_HAS_RISEN)
|
||||
SSticker.mode_result = "cult win - cult win"
|
||||
|
||||
Reference in New Issue
Block a user