Skip to content

Commit

Permalink
Boii here we go again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Venuska1117 committed Jul 26, 2024
1 parent 3eeccca commit 54c87c2
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 9 deletions.
12 changes: 6 additions & 6 deletions code/modules/mob/living/carbon/xenomorph/Evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
if(!evolve_checks())
return

if((!hive.living_xeno_queen) && castepick != XENO_CASTE_QUEEN && !islarva(src) && !hive.allow_no_queen_evo)
if((!hive.living_xeno_queen) && castepick != XENO_CASTE_QUEEN && !islarva(src) && !hive.allow_no_queen_evo && castepick != XENO_CASTE_RUNNER && castepick != XENO_CASTE_DEFENDER && castepick != XENO_CASTE_SENTINEL)
to_chat(src, SPAN_WARNING("The Hive is shaken by the death of the last Queen. We can't find the strength to evolve."))
return

Expand All @@ -66,9 +66,9 @@
else
to_chat(src, SPAN_WARNING("Nuh-uhh."))
return
if(evolution_threshold && castepick != XENO_CASTE_QUEEN) //Does the caste have an evolution timer? Then check it
if(evolution_stored < evolution_threshold)
to_chat(src, SPAN_WARNING("We must wait before evolving. Currently at: [evolution_stored] / [evolution_threshold]."))
if(caste_datum.evolution_cost && castepick != XENO_CASTE_QUEEN) //Does the caste have an evolution timer? Then check it
if(evolution_stored < caste_datum.evolution_cost)
to_chat(src, SPAN_WARNING("We must wait before evolving. Currently at: [evolution_stored] / [caste_datum.evolution_cost]."))
return

// Used for restricting benos to evolve to drone/queen when they're the only potential queen
Expand Down Expand Up @@ -128,8 +128,8 @@
else if(!can_evolve(castepick, potential_queens))
return

// subtract the threshold, keep the stored amount
evolution_stored -= evolution_threshold
// subtract the evolution cost, keep the stored amount
evolution_stored -= caste_datum.evolution_cost
var/obj/item/organ/xeno/organ = locate() in src
if(!isnull(organ))
qdel(organ)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
var/show_only_numbers = FALSE
var/evolution_stored = 0 //How much evolution they have stored
var/evolution_threshold = 200
var/evolution_cost = 30 //How much evolution to caste will cost
var/tier = 1 //This will track their "tier" to restrict/limit evolutions
var/time_of_birth

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
tacklestrength_max = 4

minimum_evolve_time = 15 MINUTES
evolution_cost = 500

minimap_icon = "boiler"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
tremor_cooldown = 450

minimum_evolve_time = 7 MINUTES
evolution_cost = 200

minimap_icon = "burrower"

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
egg_cooldown = 250

minimum_evolve_time = 5 MINUTES
evolution_cost = 200

minimap_icon = "carrier"

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
behavior_delegate_type = /datum/behavior_delegate/crusher_base

minimum_evolve_time = 15 MINUTES
evolution_cost = 500

tackle_min = 2
tackle_max = 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
tackle_max = 4

minimum_evolve_time = 4 MINUTES
evolution_cost = 30

minimap_icon = "defender"

Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/castes/Drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
build_time_mult = BUILD_TIME_MULT_BUILDER

caste_desc = "A builder of hives. Only drones may evolve into Queens."
evolves_to = list(XENO_CASTE_QUEEN, XENO_CASTE_BURROWER, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD) //Add more here separated by commas
evolves_to = list(XENO_CASTE_RUNNER, XENO_CASTE_SENTINEL, XENO_CASTE_DEFENDER, XENO_CASTE_QUEEN, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD, XENO_CASTE_BURROWER) //Add more here separated by commas
deevolves_to = list("Larva")
can_hold_facehuggers = 1
can_hold_eggs = CAN_HOLD_TWO_HANDS
Expand All @@ -36,6 +36,7 @@
aura_strength = 2

minimum_evolve_time = 1 MINUTES
evolution_cost = 30

minimap_icon = "drone"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
aura_strength = 2.5

minimum_evolve_time = 3 MINUTES
evolution_cost = 200

minimap_icon = "hivelord"

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/castes/Larva.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
caste_desc = "D'awwwww, so cute!"
speed = XENO_SPEED_TIER_10
innate_healing = TRUE //heals even outside weeds so you're not stuck unable to evolve when hiding on the ship wounded.
evolves_to = XENO_T1_CASTES
evolves_to = list(XENO_CASTE_DRONE)

evolve_without_queen = TRUE
can_be_revived = FALSE
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
heal_resting = 1.5

minimum_evolve_time = 9 MINUTES
evolution_cost = 200

minimap_icon = "lurker"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
behavior_delegate_type = /datum/behavior_delegate/praetorian_base

minimum_evolve_time = 15 MINUTES
evolution_cost = 500

minimap_icon = "praetorian"

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Queen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
minimap_icon = "xenoqueen"

royal_caste = TRUE
evolution_cost = 0

/proc/update_living_queens() // needed to update when you change a queen to a different hive
outer_loop:
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Ravager.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
behavior_delegate_type = /datum/behavior_delegate/ravager_base

minimum_evolve_time = 15 MINUTES
evolution_cost = 500

minimap_icon = "ravager"

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Runner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
heal_resting = 1.75

minimum_evolve_time = 5 MINUTES
evolution_cost = 30

minimap_icon = "runner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
minimap_icon = "sentinel"

minimum_evolve_time = 5 MINUTES
evolution_cost = 30

/mob/living/carbon/xenomorph/sentinel
caste_type = XENO_CASTE_SENTINEL
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Spitter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
tacklestrength_max = 5

minimum_evolve_time = 9 MINUTES
evolution_cost = 200

minimap_icon = "spitter"

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Warrior.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
heal_resting = 1.4

minimum_evolve_time = 9 MINUTES
evolution_cost = 200

minimap_icon = "warrior"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
var/evolution_allowed = 1
///Threshold to next evolution
var/evolution_threshold = 0
///How much evolution is stored
var/evolution_stored = 0
///How much caste cost in evo points
var/evolution_cost = 0
/// whether they can get evo points without needing an ovi queen
var/evolve_without_queen = FALSE
///This is where you add castes to evolve into. "Separated", "by", "commas"
Expand Down
22 changes: 21 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,31 @@
evolution_stored -= progress_amount
return

if(evolution_stored >= evolution_cost)
if(!got_evolution_message)
early_evolve_message()
got_evolution_message = TRUE

if(ROUND_TIME < XENO_ROUNDSTART_PROGRESS_TIME_2)
evolution_stored += progress_amount
return

if(evolution_stored > evolution_threshold + progress_amount)
evolution_stored -= progress_amount
return

else
evolution_stored += progress_amount

/mob/living/carbon/xenomorph/proc/evolve_message()
to_chat(src, SPAN_XENODANGER("Our carapace crackles and our tendons strengthen. We are ready to <a href='?src=\ref[src];evolve=1;'>evolve</a>!")) //Makes this bold so the Xeno doesn't miss it
to_chat(src, SPAN_XENODANGER("Our carapace crackles and we become matured. We are ready to <a href='?src=\ref[src];evolve=1;'>evolve</a>!")) //Makes this bold so the Xeno doesn't miss it
playsound_client(client, sound('sound/effects/xeno_evolveready.ogg'))

var/datum/action/xeno_action/onclick/evolve/evolve_action = new()
evolve_action.give_to(src)

/mob/living/carbon/xenomorph/proc/early_evolve_message()
to_chat(src, SPAN_XENODANGER("Your tendons strengthen, you can now <a href='?src=\ref[src];evolve=1;'>evolve</a> to young castes!")) //Placeholder evo message, someone can improve it.
playsound_client(client, sound('sound/effects/xeno_evolveready.ogg'))

var/datum/action/xeno_action/onclick/evolve/evolve_action = new()
Expand Down

0 comments on commit 54c87c2

Please sign in to comment.