From 5c4b13863f90877e920ce329bd60e99559d7fe35 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Tue, 27 Jun 2023 05:26:44 +0300 Subject: [PATCH] Larva surge is limited by marines/xenos ratio (#3592) # About the pull request Xenos after hijack now get larva based on marines/xenos ratio. Instead of infinite larva, larva surge will try to increase the initial amount of xenos on hijack to 50% of marines forces over time (with a minimum of 5 larvas, if xenos already have good numbers). # Explain why it's good for the game Initially, if I remember correctly, larva surge was brought into the game to discourage marines from early meta-evacuations, which is fair. But consequently, it really hurt the hijack sequence. Even if marines evac fair and square, larva surge still comes in action and makes situation for marines even worse, utterly discouraging everything but either boomrushing the Alamo or holding lifeboats to evac. This resulted in hijacks being very repetitive and boring. More than that, larva surge is extremely busted on lowpop due to the fact you can get around 20 xenos from nothing, making lowpop hijack even less interesting. So with this change marines will still get punished for evaccing with good numbers, but won't be penalized as much for honest evacuations. So hopefully, we will see more variety of hijacks and more interesting stories! P.S. if you have a better formula, let me know. # Testing Photographs and Procedure
My friend @Diegoflores31 tested this for me, thanks! Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: ihatethisengine balance: larva surge is limited by marines/xenos ratio fix: xenos no longer get free larva from abandoned facehuggers during hijack /:cl: --------- Co-authored-by: ihatethisengine Co-authored-by: fira --- .../cm_aliens/structures/special/pylon_core.dm | 5 +++++ .../mob/living/carbon/xenomorph/xeno_defines.dm | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/code/modules/cm_aliens/structures/special/pylon_core.dm b/code/modules/cm_aliens/structures/special/pylon_core.dm index 11a0b0de597f..c38e540efb30 100644 --- a/code/modules/cm_aliens/structures/special/pylon_core.dm +++ b/code/modules/cm_aliens/structures/special/pylon_core.dm @@ -162,9 +162,14 @@ if(linked_hive.hijack_burrowed_surge && (last_surge_time + surge_cooldown) < world.time) last_surge_time = world.time linked_hive.stored_larva++ + linked_hive.hijack_burrowed_left-- announce_dchat("The hive has gained another burrowed larva! Use the Join As Xeno verb to take it.", src) if(surge_cooldown > 30 SECONDS) //mostly for sanity purposes surge_cooldown = surge_cooldown - surge_incremental_reduction //ramps up over time + if(linked_hive.hijack_burrowed_left < 1) + linked_hive.hijack_burrowed_surge = FALSE + xeno_message(SPAN_XENOANNOUNCE("The hive's power wanes. You will no longer gain pooled larva over time."), 3, linked_hive.hivenumber) + // Hive core can repair itself over time if(health < maxhealth && last_healed <= world.time) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index b5431720e14a..5d3ee0b04ba7 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -285,6 +285,8 @@ var/larva_gestation_multiplier = 1 var/bonus_larva_spawn_chance = 1 var/hijack_burrowed_surge = FALSE //at hijack, start spawning lots of burrowed + /// how many burrowed is going to spawn during larva surge + var/hijack_burrowed_left = 0 var/ignore_slots = FALSE var/dynamic_evolution = TRUE @@ -877,6 +879,8 @@ /datum/hive_status/proc/abandon_on_hijack() var/area/hijacked_dropship = get_area(living_xeno_queen) + var/shipside_humans_weighted_count = 0 + var/xenos_count = 0 for(var/name_ref in hive_structures) for(var/obj/effect/alien/resin/special/S in hive_structures[name_ref]) if(get_area(S) == hijacked_dropship) @@ -885,6 +889,10 @@ qdel(S) for(var/mob/living/carbon/xenomorph/xeno as anything in totalXenos) if(get_area(xeno) != hijacked_dropship && xeno.loc && is_ground_level(xeno.loc.z)) + if(isfacehugger(xeno)) + to_chat(xeno, SPAN_XENOANNOUNCE("The Queen has left without you, you quickly find a hiding place to enter hibernation as you lose touch with the hive mind.")) + qdel(xeno) + continue if(xeno.hunter_data.hunted && !isqueen(xeno)) to_chat(xeno, SPAN_XENOANNOUNCE("The Queen has left without you, seperating you from her hive! You must defend yourself from the headhunter before you can enter hibernation...")) xeno.set_hive_and_update(XENO_HIVE_FORSAKEN) @@ -895,6 +903,9 @@ xeno.handle_stomach_contents() qdel(xeno) stored_larva++ + continue + if(!isfacehugger(xeno)) + xenos_count++ for(var/i in GLOB.alive_mob_list) var/mob/living/potential_host = i if(!(potential_host.status_flags & XENO_HOST)) @@ -907,7 +918,13 @@ for(var/obj/item/alien_embryo/embryo in potential_host) embryo.hivenumber = XENO_HIVE_FORSAKEN potential_host.update_med_icon() + for(var/mob/living/carbon/human/current_human as anything in GLOB.alive_human_list) + if((isspecieshuman(current_human) || isspeciessynth(current_human)) && current_human.job) + var/turf/turf = get_turf(current_human) + if(is_mainship_level(turf?.z)) + shipside_humans_weighted_count += RoleAuthority.calculate_role_weight(current_human.job) hijack_burrowed_surge = TRUE + hijack_burrowed_left = max(n_ceil(shipside_humans_weighted_count * 0.5) - xenos_count, 5) hivecore_cooldown = FALSE xeno_message(SPAN_XENOBOLDNOTICE("The weeds have recovered! A new hive core can be built!"),3,hivenumber)