[MIRROR] Splits Pirates into Two Subgroups, One For Light Midrounds And Another For Heavy [MDB IGNORE] (#20135)

* Splits Pirates into Two Subgroups, One For Light Midrounds And Another For Heavy (#73881)

## About The Pull Request

This PR splits the Pirate midround antagonists into two separate groups,
normal and dangerous. Normal pirates are the human, silverscale, and
psycker groups, and they are all light antagonists now, meaning they can
show up early in the round, similar to when a revenant or nightmare can
spawn. Dangerous Space Pirates only consist of the Skeleton Crew, and
they will remain as heavy weight antagonists with the same spawning
restrictions as it is currently. I also fudged with the crew required
value some for both, not that it makes a huge difference.

Since pirates were split into two separate groups, both versions have a
reduced dynamic weight of 3, from 4.

Also added a sanity check to the pirate's dynamic ruleset to make sure
there are remaining pirates to be spawned for the ruleset to be allowed.
Also added a check to the pirate event itself to prevent runtimes when
no pirate team is available to be chosen, unless an admin specifies what
pirate team they want to use.

## Why It's Good For The Game

As it is right now, there is a massive difference between the skeleton
pirates and the rest of the pirate types. Skeleton Pirates have cannons,
innate space immunity and other small benefits which make them much more
threatening than the other pirate crews. In our current system,
something like Psycker pirates can spawn in lieu of something like blob
or xenomorphs when they aren't anywhere near the same level of
threatening, so moving the less dangerous pirates off to be light weight
midrounds seems like a good move, especially since we need more
lightweight midrounds to keep the variety up anyway.

Keep in mind these designations are not permanent and may change at the
request of maintainers or as the pirate teams get nerfed/buffed.

## Changelog

🆑
balance: The pirate gangs have been split into two subcategories, one
which can spawn earlier in a shift and one that spawns later as they
currently do. While skeleton pirates will still be only seen later into
the shift, expect to see the other pirate gangs earlier on.
fix: Prevented the pirate event from runtiming when no possible pirate
gangs were available.
fix: Pirates can no longer be selected by Dynamic if there are no more
pirates gangs that can be used.
/🆑

* Splits Pirates into Two Subgroups, One For Light Midrounds And Another For Heavy

---------

Co-authored-by: IndieanaJones <47086570+IndieanaJones@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-29 23:29:43 +02:00
committed by GitHub
parent 70d9d943d1
commit 10f65497e1
3 changed files with 45 additions and 16 deletions
@@ -17,14 +17,17 @@
/datum/round_event/pirates
///admin chosen pirate team
var/datum/pirate_gang/chosen_gang
var/list/datum/pirate_gang/gang_list
/datum/round_event/pirates/start()
send_pirate_threat(chosen_gang)
send_pirate_threat(gang_list)
/proc/send_pirate_threat(datum/pirate_gang/chosen_gang)
/proc/send_pirate_threat(list/pirate_selection)
var/datum/pirate_gang/chosen_gang = pick_n_take(pirate_selection)
///If there was nothing to pull from our requested list, stop here.
if(!chosen_gang)
chosen_gang = pick_n_take(GLOB.pirate_gangs)
message_admins("Error attempting to run the space pirate event, as the given pirate gangs list was empty.")
return
//set payoff
var/payoff = 0
var/datum/bank_account/account = SSeconomy.get_dep_account(ACCOUNT_CAR)
@@ -90,6 +93,6 @@
/datum/event_admin_setup/listed_options/pirates/apply_to_event(datum/round_event/pirates/event)
if(isnull(chosen))
event.chosen_gang = null
event.gang_list = GLOB.light_pirate_gangs + GLOB.heavy_pirate_gangs
else
event.chosen_gang = new chosen
event.gang_list = list(new chosen)
@@ -1,15 +1,16 @@
///global list of all pirate gangs that can show up today. these will be taken out of the global list as spawned so dupes cannot spawn.
GLOBAL_LIST_INIT(pirate_gangs, init_pirate_gangs())
///global lists of all pirate gangs that can show up today. they will be taken out of the global lists as spawned so dupes cannot spawn.
GLOBAL_LIST_INIT(light_pirate_gangs, init_pirate_gangs(is_heavy = FALSE))
GLOBAL_LIST_INIT(heavy_pirate_gangs, init_pirate_gangs(is_heavy = TRUE))
///initializes the pirate gangs glob list, adding all subtypes that can roll today.
/proc/init_pirate_gangs()
/proc/init_pirate_gangs(is_heavy)
var/list/pirate_gangs = list()
for(var/type in subtypesof(/datum/pirate_gang))
var/datum/pirate_gang/possible_gang = new type
if(!possible_gang.can_roll())
qdel(possible_gang)
else
else if(possible_gang.is_heavy_threat == is_heavy)
pirate_gangs += possible_gang
return pirate_gangs
@@ -18,6 +19,8 @@ GLOBAL_LIST_INIT(pirate_gangs, init_pirate_gangs())
///name of this gang, for spawning feedback
var/name = "Space Bugs"
///Whether or not this pirate crew is a heavy-level threat
var/is_heavy_threat = FALSE
///the random ship name chosen from pirates.json
var/ship_name
///the ship they load in on.
@@ -97,6 +100,7 @@ GLOBAL_LIST_INIT(pirate_gangs, init_pirate_gangs())
/datum/pirate_gang/skeletons
name = "Skeleton Pirates"
is_heavy_threat = TRUE
ship_template_id = "dutchman"
ship_name_pool = "skeleton_names" //just points to THE ONE AND ONLY