From 6c3b83bcb3ebc042be46ab5b66af1a99f6f85a4f Mon Sep 17 00:00:00 2001 From: Dip Date: Wed, 16 Sep 2020 16:37:59 -0300 Subject: [PATCH 1/3] Carp Team Random Event --- code/modules/events/carpteam.dm | 78 +++++++++++++++++++++++++++++++++ tgstation.dme | 1 + 2 files changed, 79 insertions(+) create mode 100644 code/modules/events/carpteam.dm diff --git a/code/modules/events/carpteam.dm b/code/modules/events/carpteam.dm new file mode 100644 index 00000000..23dd3b1c --- /dev/null +++ b/code/modules/events/carpteam.dm @@ -0,0 +1,78 @@ +/datum/round_event_control/carpteam + name = "Carp Team" + typepath = /datum/round_event/ghost_role/carpteam + weight = 5 + min_players = 8 + earliest_start = 45 MINUTES + max_occurrences = 2 + +/datum/round_event/ghost_role/carpteam + minimum_required = 1 + role_name = "Carp Team" + var/maxspawnedanimals = 3 + var/animals = 1 + fakeable = FALSE + +/datum/round_event/ghost_role/carpteam/announce(fake) + var/sentience_report = "" + + var/data = pick("our sophisticated probabilistic models", "our omnipotence", "energy emissions we detected", "\[REDACTED\]") + var/pets = pick("strange lifeforms", "\[REDACTED\]") + var/strength = pick("human", "moderate", "\[REDACTED\]") + + sentience_report += "Based on [data], we believe that [pets] around the station has developed [strength] level intelligence, and the ability to communicate." + + priority_announce(sentience_report,"[command_name()] Medium-Priority Update") + +/datum/round_event/ghost_role/carpteam/spawn_role() + var/list/mob/dead/observer/candidates + candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN) + if (candidates.len > maxspawnedanimals) + animals = maxspawnedanimals + else + animals = candidates.len + var/list/potential = list() + var/counter = 0 + for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list) + if (counter < animals) + var/mob/living/simple_animal/thiscarp = null + // 1% chance for the spawned carp to be a magicarp, 15% to be a shark-type carp and if neither, regular carp. + if(prob(1)) + thiscarp = new /mob/living/simple_animal/hostile/carp/ranged(C.loc) + else if(prob(15)) + thiscarp = new /mob/living/simple_animal/hostile/carp/megacarp(C.loc) + else + thiscarp = new /mob/living/simple_animal/hostile/carp(C.loc) + counter++ + potential += thiscarp + + if(!potential.len) + return WAITING_FOR_SOMETHING + if(!candidates.len) + return NOT_ENOUGH_PLAYERS + + var/spawned_animals = 0 + while(spawned_animals < animals && candidates.len && potential.len) + var/mob/living/simple_animal/SA = pick_n_take(potential) + var/mob/dead/observer/SG = pick_n_take(candidates) + + spawned_animals++ + + SA.key = SG.key + + SA.grant_all_languages(TRUE) + + SA.sentience_act() + + SA.maxHealth = max(SA.maxHealth, 120) + SA.health = SA.maxHealth + SA.del_on_death = FALSE + + spawned_mobs += SA + + to_chat(SA, "Hello carp!") + to_chat(SA, "My oh my, seems you're a bit more than just a space fish now, aren't you? \ + It's up to you and your team of above average IQ carps to either root these pesky stationeers out \ + or help them along their path!") + + return SUCCESSFUL_SPAWN diff --git a/tgstation.dme b/tgstation.dme index 0fbce8f1..03b9a181 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1602,6 +1602,7 @@ #include "code\modules\events\bureaucratic_error.dm" #include "code\modules\events\camerafailure.dm" #include "code\modules\events\carp_migration.dm" +#include "code\modules\events\carpteam.dm" #include "code\modules\events\communications_blackout.dm" #include "code\modules\events\devil.dm" #include "code\modules\events\disease_outbreak.dm" From 7568fd27a3eb37627e3d52981885210aab6f891d Mon Sep 17 00:00:00 2001 From: Dip Date: Wed, 16 Sep 2020 19:13:43 -0300 Subject: [PATCH 2/3] Balance changes --- code/modules/events/carpteam.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/events/carpteam.dm b/code/modules/events/carpteam.dm index 23dd3b1c..935e501c 100644 --- a/code/modules/events/carpteam.dm +++ b/code/modules/events/carpteam.dm @@ -1,8 +1,8 @@ /datum/round_event_control/carpteam name = "Carp Team" typepath = /datum/round_event/ghost_role/carpteam - weight = 5 - min_players = 8 + weight = 3 + min_players = 18 earliest_start = 45 MINUTES max_occurrences = 2 From 4a255a107eaec7fe41dfbe73bb83edcf2950a681 Mon Sep 17 00:00:00 2001 From: Dip Date: Sat, 19 Sep 2020 13:07:58 -0300 Subject: [PATCH 3/3] adminbus change --- code/modules/events/carpteam.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/events/carpteam.dm b/code/modules/events/carpteam.dm index 935e501c..bdece057 100644 --- a/code/modules/events/carpteam.dm +++ b/code/modules/events/carpteam.dm @@ -1,7 +1,7 @@ /datum/round_event_control/carpteam name = "Carp Team" typepath = /datum/round_event/ghost_role/carpteam - weight = 3 + weight = 0 //Now adminbus min_players = 18 earliest_start = 45 MINUTES max_occurrences = 2