diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 035529d57f6..b3470f86c96 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -37,6 +37,8 @@ #define ROLE_SPACE_DRAGON "Space Dragon" #define ROLE_SPIDER "Spider" #define ROLE_WIZARD_MIDROUND "Wizard (Midround)" +//SKYRAT EDIT: Cortical Borers +#define ROLE_BORER "Borer" // Latejoin roles #define ROLE_HERETIC_SMUGGLER "Heretic Smuggler" @@ -135,6 +137,8 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_SPACE_DRAGON = 0, ROLE_SPIDER = 0, ROLE_WIZARD_MIDROUND = 14, + //SKYRAT EDIT: Cortical Borers + ROLE_BORER = 0, // Latejoin ROLE_HERETIC_SMUGGLER = 0, diff --git a/code/modules/admin/sql_ban_system.dm b/code/modules/admin/sql_ban_system.dm index 1520cb5b0d6..d4f3fc94ec6 100644 --- a/code/modules/admin/sql_ban_system.dm +++ b/code/modules/admin/sql_ban_system.dm @@ -358,6 +358,7 @@ ROLE_SYNDICATE, ROLE_TRAITOR, ROLE_WIZARD, + ROLE_BORER,//SKYRAT EDIT: Cortical Borers ), "Skyrat Ban Options" = list( BAN_PACIFICATION, diff --git a/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm b/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm index 7f0e8199873..2b18150cb00 100644 --- a/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm +++ b/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm @@ -1,9 +1,12 @@ GLOBAL_VAR_INIT(objective_egg_borer_number, 5) GLOBAL_VAR_INIT(objective_egg_egg_number, 10) -GLOBAL_VAR_INIT(objective_willing_hosts, 20) +GLOBAL_VAR_INIT(objective_willing_hosts, 10) +GLOBAL_VAR_INIT(objective_blood_chem, 5) +GLOBAL_VAR_INIT(objective_blood_borer, 5) -GLOBAL_VAR_INIT(successful_borer, 0) +GLOBAL_VAR_INIT(successful_egg_number, 0) GLOBAL_LIST_EMPTY(willing_hosts) +GLOBAL_VAR_INIT(successful_blood_chem, 0) //we need a way of buffing leg speed... here /datum/movespeed_modifier/borer_speed @@ -240,10 +243,16 @@ GLOBAL_LIST_EMPTY(willing_hosts) var/body_focus = null ///how many children the borer has produced var/children_produced = 0 + ///how many blood chems have been learned through the blood + var/blood_chems_learned = 0 ///we dont want to spam the chat var/deathgasp_once = FALSE //the limit to the chemical and stat evolution var/limited_borer = 10 + ///borers can only enter biologicals if true + var/organic_restricted = TRUE + ///borers are unable to enter changelings if true + var/changeling_restricted = TRUE /mob/living/simple_animal/cortical_borer/Initialize(mapload) . = ..() @@ -299,8 +308,9 @@ GLOBAL_LIST_EMPTY(willing_hosts) . += "Sugar detected! Unable to generate resources!" . += "" . += "OBJECTIVES:" - . += "1) [GLOB.objective_egg_borer_number] borers producing [GLOB.objective_egg_egg_number] eggs: [GLOB.successful_borer]/[GLOB.objective_egg_borer_number]" + . += "1) [GLOB.objective_egg_borer_number] borers producing [GLOB.objective_egg_egg_number] eggs: [GLOB.successful_egg_number]/[GLOB.objective_egg_borer_number]" . += "2) [GLOB.objective_willing_hosts] willing hosts: [length(GLOB.willing_hosts)]/[GLOB.objective_willing_hosts]" + . += "3) [GLOB.objective_blood_borer] borers learning [GLOB.objective_blood_chem] from the blood: [GLOB.successful_blood_chem]/[GLOB.objective_blood_borer]" /mob/living/simple_animal/cortical_borer/Life(delta_time, times_fired) . = ..() @@ -336,12 +346,14 @@ GLOBAL_LIST_EMPTY(willing_hosts) timed_maturity = world.time + 1 SECONDS maturity_age++ - //no objectives means 20:40; one objective means 15:30; two objectives mean 10:20 + //20:40, 15:30, 10:20, 5:10 var/maturity_threshold = 20 - if(GLOB.successful_borer >= GLOB.objective_egg_borer_number) + if(GLOB.successful_egg_number >= GLOB.objective_egg_borer_number) maturity_threshold -= 5 if(length(GLOB.willing_hosts) >= GLOB.objective_willing_hosts) maturity_threshold -= 5 + if(GLOB.successful_blood_chem >= GLOB.objective_blood_borer) + maturity_threshold -= 5 if(maturity_age == maturity_threshold) if(chemical_evolution < limited_borer) //you can only have a default of 10 at a time diff --git a/modular_skyrat/modules/cortical_borer/code/cortical_borer_abilities.dm b/modular_skyrat/modules/cortical_borer/code/cortical_borer_abilities.dm index 91a73de6a9f..7293ef6127f 100644 --- a/modular_skyrat/modules/cortical_borer/code/cortical_borer_abilities.dm +++ b/modular_skyrat/modules/cortical_borer/code/cortical_borer_abilities.dm @@ -135,6 +135,9 @@ cortical_owner.chemical_evolution += 5 return cortical_owner.known_chemicals += reagent_choice.type + cortical_owner.blood_chems_learned++ + if(cortical_owner.blood_chems_learned == 5) + GLOB.successful_blood_chem += 1 to_chat(owner, span_notice("You have learned [initial(reagent_choice.name)]")) StartCooldown() @@ -624,6 +627,9 @@ //having a host means we need to leave them then if(cortical_owner.human_host) + if(cortical_owner.host_sugar()) + to_chat(owner, span_warning("Sugar inhibits your abilities to function!")) + return to_chat(cortical_owner, span_notice("You forcefully detach from the host.")) to_chat(cortical_owner.human_host, span_notice("Something carefully tickles your inner ear...")) var/obj/item/organ/borer_body/borer_organ = locate() in cortical_owner.human_host.internal_organs @@ -648,15 +654,15 @@ if(listed_human.has_borer()) continue // hosts need to be organic - if(!(listed_human.dna.species.inherent_biotypes & MOB_ORGANIC)) + if(!(listed_human.dna.species.inherent_biotypes & MOB_ORGANIC) && cortical_owner.organic_restricted) continue // hosts need to be organic - if(!(listed_human.mob_biotypes & MOB_ORGANIC)) + if(!(listed_human.mob_biotypes & MOB_ORGANIC) && cortical_owner.organic_restricted) continue //hosts cannot be changelings if(listed_human.mind) var/datum/antagonist/changeling/changeling = listed_human.mind.has_antag_datum(/datum/antagonist/changeling) - if(changeling) + if(changeling && cortical_owner.changeling_restricted) continue usable_hosts += listed_human @@ -773,8 +779,8 @@ var/obj/effect/mob_spawn/ghost_role/borer_egg/spawned_egg = new /obj/effect/mob_spawn/ghost_role/borer_egg(borer_turf) spawned_egg.generation = (cortical_owner.generation + 1) cortical_owner.children_produced++ - if(cortical_owner.children_produced >= GLOB.objective_egg_egg_number) - GLOB.successful_borer += 1 + if(cortical_owner.children_produced == GLOB.objective_egg_egg_number) + GLOB.successful_egg_number += 1 if(prob(25)) cortical_owner.human_host.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_BASIC) to_chat(cortical_owner.human_host, span_warning("Your brain begins to hurt...")) @@ -918,12 +924,13 @@ to_chat(owner, span_warning("Sugar inhibits your abilities to function!")) return if(cortical_owner.chemical_storage < 300) - to_chat(cortical_owner, span_warning("You require at least 200 chemical units before you can revive your host!")) + to_chat(cortical_owner, span_warning("You require at least 300 chemical units before you can ask your host!")) return cortical_owner.chemical_storage -= 300 - if(locate(cortical_owner.human_host) in GLOB.willing_hosts) - to_chat(cortical_owner, span_warning("This host is already willing, try another host!")) - return + for(var/ckey_check in GLOB.willing_hosts) + if(ckey_check == cortical_owner.human_host.ckey) + to_chat(cortical_owner, span_warning("This host is already willing, try another host!")) + return to_chat(cortical_owner, span_notice("The host is being asked...")) var/host_choice = tgui_input_list(cortical_owner.human_host,"Do you accept to be a willing host?", "Willing Host Request", list("Yes", "No")) if(host_choice != "Yes") @@ -932,5 +939,5 @@ return to_chat(cortical_owner, span_notice("The host was willing!")) to_chat(cortical_owner.human_host, span_notice("You have accepted being a willing host!")) - GLOB.willing_hosts += cortical_owner.human_host + GLOB.willing_hosts += cortical_owner.human_host.ckey StartCooldown() diff --git a/modular_skyrat/modules/cortical_borer/code/cortical_borer_antag.dm b/modular_skyrat/modules/cortical_borer/code/cortical_borer_antag.dm index 943d8d59d03..58006466cfb 100644 --- a/modular_skyrat/modules/cortical_borer/code/cortical_borer_antag.dm +++ b/modular_skyrat/modules/cortical_borer/code/cortical_borer_antag.dm @@ -24,7 +24,7 @@ /datum/antagonist/cortical_borer name = "Cortical Borer" - job_rank = ROLE_ALIEN + job_rank = ROLE_BORER show_in_antagpanel = TRUE roundend_category = "cortical borers" antagpanel_category = "Cortical borers" @@ -32,6 +32,9 @@ show_to_ghosts = TRUE var/datum/team/cortical_borers/borers +/datum/antagonist/cortical_borer/get_preview_icon() + return finish_preview_icon(icon('modular_skyrat/modules/cortical_borer/icons/animal.dmi', "brainslug")) + /datum/antagonist/cortical_borer/get_team() return borers @@ -67,7 +70,7 @@ parts += span_greentext("Borers were able to survive the shift!") else parts += span_redtext("Borers were unable to survive the shift!") - if(GLOB.successful_borer >= GLOB.objective_egg_borer_number) + if(GLOB.successful_egg_number >= GLOB.objective_egg_borer_number) parts += span_greentext("Borers were able to produce enough eggs!") else parts += span_redtext("Borers were unable to produce enough eggs!") @@ -75,6 +78,10 @@ parts += span_greentext("Borers were able to gather enough willing hosts!") else parts += span_redtext("Borers were unable to gather enough willing hosts!") + if(GLOB.successful_blood_chem >= GLOB.objective_blood_borer) + parts += span_greentext("Borers were able to learn enough chemicals through the blood!") + else + parts += span_redtext("Borers were unable to learn enough chemicals through the blood!") return "