Skip to content

Commit

Permalink
balance: Xenomorphs up (ss220-space#3963)
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidPotroh authored and Etrnlmelancholy committed Jan 3, 2024
1 parent a171cb1 commit 6826e3e
Show file tree
Hide file tree
Showing 27 changed files with 272 additions and 170 deletions.
47 changes: 35 additions & 12 deletions code/datums/spells/alien_spells/evolve.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#define LIVING_PLAYERS_COUNT_FOR_1_PRAETORIAN 25

/obj/effect/proc_holder/spell/alien_spell/evolve
desc = "Evolve into reporting this issue."
action_icon_state = "larva2"
action_icon = 'icons/mob/alien.dmi'
action_icon_state = "AlienMMI"
plasma_cost = 500
var/queen_check = FALSE
var/evolution_path = /mob/living/carbon/alien/larva

Expand All @@ -27,26 +28,48 @@
return new /datum/spell_targeting/self


/obj/effect/proc_holder/spell/alien_spell/evolve/cast(list/targets, mob/living/carbon/user)
/obj/effect/proc_holder/spell/alien_spell/evolve/cast(list/targets, mob/living/carbon/alien/user)
if(!user.can_evolve)
to_chat(user, span_warning("We have nowhere to evolve further!"))
return

if(queen_check)
for(var/mob/living/carbon/alien/humanoid/queen/living_queen in GLOB.alive_mob_list)
if(living_queen.key && living_queen.get_int_organ(/obj/item/organ/internal/brain)) // We do a once over to check the queen didn't end up going away into the magic land of semi-dead
to_chat(user, "<span class='notice'>We already have an alive queen.</span>")
return
if(user.evolution_points < user.max_evolution_points)
to_chat(user, span_warning("We are not ready to evolve yet!"))
return

if(user.has_brain_worms())
to_chat(user, "<span class='warning'>We cannot perform this ability at the present time!</span>")
revert_cast(user)
to_chat(user, span_warning("We cannot perform this ability at the present time!"))
return

// If there is no queen, that means we can evolve
to_chat(user, "<span class='noticealien'>You begin to evolve!</span>")
user.visible_message("<span class='alertalien'>[user] begins to twist and contort!</span>")
if(queen_check)
if(user.queen_count >= user.queen_maximum)
to_chat(user, span_warning("We already have a queen."))
return
else
user.queen_count++

to_chat(user, span_noticealien("You begin to evolve!"))
user.visible_message(span_alertalien("[user] begins to twist and contort!"))
var/mob/living/carbon/alien/new_xeno = new evolution_path(user.loc)
user.mind.transfer_to(new_xeno)
new_xeno.mind.name = new_xeno.name
playsound_xenobuild(user.loc)
SSblackbox.record_feedback("tally", "alien_growth", 1, "[new_xeno]")
qdel(user)

/obj/effect/proc_holder/spell/alien_spell/evolve/praetorian/cast(list/targets, mob/living/carbon/user)
var/mob/living/carbon/alien/spell_owner = user
if(!istype(spell_owner))
return

var/living_players_count = 0
for(var/mob/living/player in GLOB.player_list)
if(player.client && player.stat != DEAD)
living_players_count++

if(spell_owner.praetorian_count < (living_players_count/LIVING_PLAYERS_COUNT_FOR_1_PRAETORIAN))
..()
else
to_chat(user, span_warning("We have too many praetorians."))

#undef LIVING_PLAYERS_COUNT_FOR_1_PRAETORIAN
2 changes: 1 addition & 1 deletion code/datums/spells/alien_spells/larva_evolve.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
to_chat(user, "<span class='warning'>You cannot evolve when you are cuffed.</span>")
return

if(user.amount_grown < user.max_grown)
if(user.evolution_points < user.max_evolution_points)
to_chat(user, "<span class='warning'>You are not fully grown.</span>")
return
//green is impossible to read, so i made these blue and changed the formatting slightly
Expand Down
8 changes: 7 additions & 1 deletion code/datums/spells/alien_spells/neurotoxin_spit.dm
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
/obj/effect/proc_holder/spell/alien_spell/neurotoxin
name = "Neurotoxin spit"
desc = "This ability allows you to fire some neurotoxin. Knocks down anyone you hit, applies a small amount of stamina damage as well."
base_cooldown = 0.5 SECONDS
base_cooldown = 1 SECONDS
plasma_cost = 50
selection_activated_message = span_noticealien("<B>Your prepare some neurotoxin!</B>")
selection_deactivated_message = span_noticealien("<B>You swallow your prepared neurotoxin.</B>")
var/neurotoxin_type = /obj/item/projectile/bullet/neurotoxin
action_icon_state = "alien_neurotoxin_0"
sound = 'sound/creatures/terrorspiders/spit2.ogg'

/obj/effect/proc_holder/spell/alien_spell/neurotoxin/sentinel
base_cooldown = 0.5 SECONDS

/obj/effect/proc_holder/spell/alien_spell/neurotoxin/create_new_targeting()
return new /datum/spell_targeting/clicked_atom
Expand Down Expand Up @@ -38,6 +40,10 @@

return TRUE

/obj/effect/proc_holder/spell/alien_spell/neurotoxin/after_cast(list/targets, mob/user)
. = ..()
if(should_remove_click_intercept(user))
remove_ranged_ability(user)

/obj/effect/proc_holder/spell/alien_spell/neurotoxin/should_remove_click_intercept(mob/living/carbon/user)
if(user.get_plasma() < plasma_cost)
Expand Down
36 changes: 24 additions & 12 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1350,24 +1350,36 @@ About the new airlock wires panel:
if(isElectrified())
shock(user, 100) //Mmm, fried xeno!
return
if(!density) //Already open

if(operating)
return
if(locked || welded) //Extremely generic, as aliens only understand the basics of how airlocks work.
to_chat(user, span_warning("[src] refuses to budge!"))

if(locked || welded)
return ..()

var/is_opening = density
if(allowed(user))
if(is_opening)
open(TRUE)
else
close(TRUE)
return
user.visible_message(span_warning("[user] begins prying open [src]."),\
span_noticealien("You begin digging your claws into [src] with all your might!"),\
span_warning("You hear groaning metal..."))
var/time_to_open = 0.2 SECONDS

var/time_to_action = 0.2 SECONDS
if(arePowerSystemsOn())
time_to_open = user.time_to_open_doors
if(time_to_open > 3 SECONDS)
time_to_action = user.time_to_open_doors
if(time_to_action > 3 SECONDS)
playsound(src, 'sound/machines/airlock_alien_prying.ogg', 100, TRUE)

user.visible_message(span_warning("[user] begins prying [is_opening ? "open":"close"] [src]."),\
span_noticealien("You begin digging your claws into [src] with all your might!"),\
span_warning("You hear groaning metal..."))

if(do_after(user, time_to_action, TRUE, src))
var/returns = is_opening ? open(TRUE) : close(TRUE)
if(!returns) //The airlock is still closed, but something prevented it opening. (Another player noticed and bolted/welded the airlock in time!)
to_chat(user, span_warning("Despite your efforts, [src] managed to resist your attempts!"))

if(do_after(user, time_to_open, TRUE, src))
if(density && !open(2)) //The airlock is still closed, but something prevented it opening. (Another player noticed and bolted/welded the airlock in time!)
to_chat(user, span_warning("Despite your efforts, [src] managed to resist your attempts to open it!"))

/obj/machinery/door/airlock/power_change() //putting this is obj/machinery/door itself makes non-airlock doors turn invisible for some reason
..()
Expand Down
3 changes: 1 addition & 2 deletions code/game/machinery/doors/firedoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@
/obj/machinery/door/firedoor/attack_alien(mob/user)
add_fingerprint(user)
if(welded)
to_chat(user, span_warning("[src] refuses to budge!"))
return
return ..()
open()

/obj/machinery/door/firedoor/attack_animal(mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@
log_message("Attack by alien. Attacker - [user].", TRUE)
add_attack_logs(user, OCCUPANT_LOGGING, "Alien attacked mech [src]")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, TRUE)
attack_generic(user, user.attack_damage, BRUTE, "melee", 0, user.armour_penetration)
attack_generic(user, user.obj_damage, BRUTE, MELEE, 0, user.armour_penetration)

/obj/mecha/attack_animal(mob/living/simple_animal/user)
log_message("Attack by simple animal. Attacker - [user].")
Expand Down
29 changes: 17 additions & 12 deletions code/game/objects/structures/aliens.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,17 @@
return !density

/obj/structure/alien/resin/attack_alien(mob/living/carbon/alien/humanoid/A)
var/damage = 0
switch(A.caste)
if("d") //drone breaks wall in 2 hits
damage = max_integrity/2/ALIEN_RESIN_BRUTE_MOD
if("q") //queen breaks wall in 1 hit
damage = max_integrity/ALIEN_RESIN_BRUTE_MOD
else
return ..()
if(attack_generic(A, damage, BRUTE, "melee", 0, 100))
playsound(loc, 'sound/effects/attackblob.ogg', 50, TRUE)
if(A.a_intent == INTENT_HARM)
var/damage = 0
switch(A.caste)
if("d") //drone breaks wall in 2 hits
damage = max_integrity/2/ALIEN_RESIN_BRUTE_MOD
if("q") //queen breaks wall in 1 hit
damage = max_integrity/ALIEN_RESIN_BRUTE_MOD
else
return ..()
if(attack_generic(A, damage, BRUTE, "melee", 0, 100))
playsound(loc, 'sound/effects/attackblob.ogg', 50, TRUE)


#define RESIN_DOOR_CLOSED 0
Expand Down Expand Up @@ -421,6 +422,10 @@
/obj/structure/alien/weeds/node/New()
..(loc, src)

/obj/structure/alien/weeds/attack_alien(mob/living/carbon/alien/humanoid/A)
if(A.a_intent == INTENT_HARM)
return ..()

#undef NODERANGE


Expand All @@ -433,8 +438,8 @@
#define BURSTING 1
#define GROWING 2
#define GROWN 3
#define MIN_GROWTH_TIME 1800 //time it takes to grow a hugger
#define MAX_GROWTH_TIME 3000
#define MIN_GROWTH_TIME 1200 //time it takes to grow a hugger
#define MAX_GROWTH_TIME 1800

/obj/structure/alien/egg
name = "egg"
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/grille.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
//height=42
icon='icons/obj/fence-ns.dmi'

/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir, armour_penetration)
. = ..()
update_icon()

Expand Down Expand Up @@ -130,7 +130,7 @@
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='warning'>[user] mangles [src].</span>")
if(!shock(user, 70))
take_damage(user.obj_damage, BRUTE, "melee", 1)
take_damage(user.obj_damage, BRUTE, MELEE, 1, armour_penetration = user.armour_penetration)


/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
Expand Down
14 changes: 13 additions & 1 deletion code/modules/events/alien_infestation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,20 @@
if(playercount >= ALIEN_HIGHPOP_TRIGGER) //spawn with 4 if highpop
spawncount = 4
var/list/candidates = SSghost_spawns.poll_candidates("Вы хотите сыграть за Чужого?", ROLE_ALIEN, TRUE, source = /mob/living/carbon/alien/larva)
var/first_spawn = TRUE
while(spawncount && length(vents) && length(candidates))
var/obj/vent = pick_n_take(vents)
var/mob/C = pick_n_take(candidates)
if(C)
GLOB.respawnable_list -= C.client
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
new_xeno.amount_grown += (0.75 * new_xeno.max_grown) //event spawned larva start off almost ready to evolve.
new_xeno.evolution_points += (0.75 * new_xeno.max_evolution_points) //event spawned larva start off almost ready to evolve.
new_xeno.key = C.key

if(first_spawn)
new_xeno.queen_maximum++
first_spawn = FALSE

if(SSticker && SSticker.mode)
SSticker.mode.xenos += new_xeno.mind

Expand All @@ -49,13 +55,19 @@
/datum/event/alien_infestation/proc/spawn_vectors(list/vents, playercount)
spawncount = 1
var/list/candidates = SSghost_spawns.poll_candidates("Вы хотите сыграть за Чужого Вектора?", ROLE_ALIEN, TRUE, source = /mob/living/carbon/alien/humanoid/hunter/vector)
var/first_spawn = TRUE
while(spawncount && length(vents) && length(candidates))
var/obj/vent = pick_n_take(vents)
var/mob/C = pick_n_take(candidates)
if(C)
GLOB.respawnable_list -= C.client
var/mob/living/carbon/alien/humanoid/hunter/vector/new_xeno = new(vent.loc)
new_xeno.key = C.key

if(first_spawn)
new_xeno.queen_maximum++
first_spawn = FALSE

if(SSticker && SSticker.mode)
SSticker.mode.xenos += new_xeno.mind

Expand Down
29 changes: 24 additions & 5 deletions code/modules/mob/living/carbon/alien/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

var/obj/item/card/id/wear_id = null // Fix for station bounced radios -- Skie
var/has_fine_manipulation = FALSE
var/move_delay_add = FALSE // movement delay to add
var/move_delay_add = 0 // movement delay to add
var/caste_movement_delay = 0

status_flags = CANPARALYSE|CANPUSH
var/heal_rate = 5

var/attack_damage = 20
var/armour_penetration = 20
Expand All @@ -35,11 +35,19 @@
var/leaping = FALSE
dirslash_enabled = TRUE
ventcrawler = 1

var/can_evolve = FALSE
var/evolution_points = 0
var/max_evolution_points = 200

/// See [/proc/genderize_decode] for more info.
var/death_message = "изда%(ет,ют)% тихий гортанный звук, зелёная кровь пузырится из %(его,её,его,их)% пасти..."
var/death_sound = 'sound/voice/hiss6.ogg'

var/datum/action/innate/alien_nightvision_toggle/night_vision_action
var/static/praetorian_count = 0
var/static/queen_count = 0
var/static/queen_maximum = 0


/mob/living/carbon/alien/New()
Expand Down Expand Up @@ -72,6 +80,11 @@
/obj/item/organ/internal/ears
)

/mob/living/carbon/alien/Stat()
..()
if(can_evolve)
stat(null, "Evolution progress: [evolution_points]/[max_evolution_points]")


/mob/living/carbon/alien/get_default_language()
if(default_language)
Expand Down Expand Up @@ -169,15 +182,21 @@
stat(null, "Move Mode: [m_intent]")
show_stat_emergency_shuttle_eta()

/mob/living/carbon/alien/Weaken(amount, ignore_canweaken)
..()
if(!(status_flags & CANWEAKEN) && amount && !large)
// add some movement delay
move_delay_add = min(move_delay_add + round(amount / 5), 10)

/mob/living/carbon/alien/SetWeakened(amount, ignore_canweaken)
..()
if(!(status_flags & CANWEAKEN) && amount)
if(!(status_flags & CANWEAKEN) && amount && !large)
// add some movement delay
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
move_delay_add = min(move_delay_add + round(amount / 5), 10)

/mob/living/carbon/alien/movement_delay()
. = ..()
. += move_delay_add + CONFIG_GET(number/alien_delay) //move_delay_add is used to slow aliens with stuns
. += move_delay_add + caste_movement_delay + CONFIG_GET(number/alien_delay) //move_delay_add is used to slow aliens with stuns

/mob/living/carbon/alien/getDNA()
return null
Expand Down
Loading

0 comments on commit 6826e3e

Please sign in to comment.