Skip to content

Commit

Permalink
Moves PvE boss defines and procs out of the xenos
Browse files Browse the repository at this point in the history
This would have 100000% cause issues somewhere down the line, now it is its own thing.
  • Loading branch information
silencer-pl committed Sep 28, 2024
1 parent 4fdb452 commit ca3cc58
Show file tree
Hide file tree
Showing 16 changed files with 249 additions and 317 deletions.
3 changes: 1 addition & 2 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,8 @@
#define XENO_CASTE_HELLHOUND "Hellhound"
#define XENO_SPECIAL_CASTES list(XENO_CASTE_QUEEN, XENO_CASTE_PREDALIEN, XENO_CASTE_HELLHOUND)

#define XENO_CASTE_XENOSURGE_BOSS_BOT "Interceptor"

#define ALL_XENO_CASTES list(XENO_CASTE_LARVA, XENO_CASTE_PREDALIEN_LARVA, XENO_CASTE_FACEHUGGER, XENO_CASTE_LESSER_DRONE, XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_SENTINEL, XENO_CASTE_DEFENDER, XENO_CASTE_BURROWER, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD, XENO_CASTE_LURKER, XENO_CASTE_WARRIOR, XENO_CASTE_SPITTER, XENO_CASTE_BOILER, XENO_CASTE_PRAETORIAN, XENO_CASTE_CRUSHER, XENO_CASTE_RAVAGER, XENO_CASTE_QUEEN, XENO_CASTE_PREDALIEN, XENO_CASTE_HELLHOUND,XENO_CASTE_XENOSURGE_BOSS_BOT)
#define ALL_XENO_CASTES list(XENO_CASTE_LARVA, XENO_CASTE_PREDALIEN_LARVA, XENO_CASTE_FACEHUGGER, XENO_CASTE_LESSER_DRONE, XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_SENTINEL, XENO_CASTE_DEFENDER, XENO_CASTE_BURROWER, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD, XENO_CASTE_LURKER, XENO_CASTE_WARRIOR, XENO_CASTE_SPITTER, XENO_CASTE_BOILER, XENO_CASTE_PRAETORIAN, XENO_CASTE_CRUSHER, XENO_CASTE_RAVAGER, XENO_CASTE_QUEEN, XENO_CASTE_PREDALIEN, XENO_CASTE_HELLHOUND)

// Checks if two hives are allied to each other.
// PARAMETERS:
Expand Down
27 changes: 0 additions & 27 deletions code/datums/ammo/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -394,30 +394,3 @@

/datum/ammo/xeno/oppressor_tail/proc/remove_tail_overlay(mob/overlayed_mob, image/tail_image)
overlayed_mob.overlays -= tail_image


/datum/ammo/xeno/surge_proj

name = "laser beam"
icon = 'icons/Surge/boss_bot/boss_proj.dmi'
icon_state = "laser"
ping = null
flags_ammo_behavior = AMMO_XENO|AMMO_SKIPS_ALIENS|AMMO_IGNORE_ARMOR|AMMO_IGNORE_COVER|AMMO_IGNORE_RESIST
damage_type = BURN
damage = 40
max_range = 20
accuracy = 100
shell_speed = 0.4

/datum/ammo/xeno/dbl_laser
icon = 'icons/Surge/boss_bot/boss_proj.dmi'
icon_state = "twin_laser"
name = "double laser beam"
ping = null
flags_ammo_behavior = AMMO_XENO|AMMO_SKIPS_ALIENS|AMMO_STOPPED_BY_COVER
damage_type = BURN
damage = 15
penetration = 20
max_range = 5
accuracy = 70
shell_speed = 0.8
2 changes: 0 additions & 2 deletions code/game/jobs/role_authority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,6 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
M = /mob/living/carbon/xenomorph/predalien
if(XENO_CASTE_HELLHOUND)
M = /mob/living/carbon/xenomorph/hellhound
if(XENO_CASTE_XENOSURGE_BOSS_BOT)
M = /mob/living/carbon/xenomorph/boss_bot
return M


Expand Down
10 changes: 1 addition & 9 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,6 @@
var/atom/movable/vis_obj/xeno_wounds/wound_icon_holder
var/atom/movable/vis_obj/xeno_pack/backpack_icon_holder

//Xenosurge vars that go here for same reasons as above
var/boss_type = 0
//below should be safely disregarded if type is not set to 1
var/boss_stage = 1
var/explosion_damage = 30
var/aoe_delay = 40
var/missile_storm_missiles = 25

/mob/living/carbon/xenomorph/Initialize(mapload, mob/living/carbon/xenomorph/oldXeno, h_number, ai_hard_off = FALSE)
var/area/A = get_area(src)
if(A && A.statistic_exempt)
Expand Down Expand Up @@ -1062,7 +1054,7 @@
. = ..()
if (. & IGNITE_IGNITED)
RegisterSignal(src, COMSIG_XENO_PRE_HEAL, PROC_REF(cancel_heal))
if(!caste || !(caste.fire_immunity & FIRE_IMMUNITY_NO_DAMAGE) || fire_reagent.fire_penetrating||boss_type == 1)
if(!caste || !(caste.fire_immunity & FIRE_IMMUNITY_NO_DAMAGE) || fire_reagent.fire_penetrating)
INVOKE_ASYNC(src, TYPE_PROC_REF(/mob, emote), "roar")

/mob/living/carbon/xenomorph/ExtinguishMob()
Expand Down

This file was deleted.

This file was deleted.

71 changes: 31 additions & 40 deletions code/modules/mob/living/carbon/xenomorph/damage_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,46 +250,37 @@
var/decal_chance = 50

if(prob(decal_chance))
if(boss_type == 0)
var/obj/effect/decal/cleanable/blood/xeno/decal = locate(/obj/effect/decal/cleanable/blood/xeno) in T
if(!decal) //Let's not stack blood, it just makes lagggggs.
add_splatter_floor(T) //Drop some on the ground first.
else
if(decal.random_icon_states && length(decal.random_icon_states) > 0) //If there's already one, just randomize it so it changes.
decal.icon_state = pick(decal.random_icon_states)
if(boss_type == 1)
var/obj/effect/decal/cleanable/blood/oil/decal = locate(/obj/effect/decal/cleanable/blood/xeno) in T
if(!decal)
add_splatter_floor(T)
else
if(decal.random_icon_states && length(decal.random_icon_states) > 0) //If there's already one, just randomize it so it changes.
decal.icon_state = pick(decal.random_icon_states)
if(boss_type == 0)
var/splash_chance = 40 //Base chance of getting splashed. Decreases with # of victims.
var/i = 0 //Tally up our victims.

for(var/mob/living/carbon/human/victim in orange(radius, src)) //Loop through all nearby victims, including the tile.
splash_chance = 65 - (i * 5)
if(victim.loc == loc)
splash_chance += 30 //Same tile? BURN
if(victim.species?.acid_blood_dodge_chance)
splash_chance -= victim.species.acid_blood_dodge_chance

if(splash_chance > 0 && prob(splash_chance)) //Success!
var/dmg = list("damage" = acid_blood_damage)
if(SEND_SIGNAL(src, COMSIG_XENO_DEAL_ACID_DAMAGE, victim, dmg) & COMPONENT_BLOCK_DAMAGE)
continue
i++
victim.visible_message(SPAN_DANGER("\The [victim] is scalded with hissing green blood!"), \
SPAN_DANGER("You are splattered with sizzling blood! IT BURNS!"))
if(prob(60) && !victim.stat && victim.pain.feels_pain)
INVOKE_ASYNC(victim, TYPE_PROC_REF(/mob, emote), "scream") //Topkek
victim.apply_armoured_damage(dmg["damage"], ARMOR_BIO, BURN) //Sizzledam! This automagically burns a random existing body part.
victim.add_blood(get_blood_color(), BLOOD_BODY)
acid_splash_last = world.time
handle_blood_splatter(get_dir(src, victim), 1 SECONDS)
playsound(victim, "acid_sizzle", 25, TRUE)
animation_flash_color(victim, "#FF0000") //pain hit flicker
var/obj/effect/decal/cleanable/blood/oil/decal = locate(/obj/effect/decal/cleanable/blood/xeno) in T
if(!decal)
add_splatter_floor(T)
else
if(decal.random_icon_states && length(decal.random_icon_states) > 0) //If there's already one, just randomize it so it changes.
decal.icon_state = pick(decal.random_icon_states)
var/splash_chance = 40 //Base chance of getting splashed. Decreases with # of victims.
var/i = 0 //Tally up our victims.

for(var/mob/living/carbon/human/victim in orange(radius, src)) //Loop through all nearby victims, including the tile.
splash_chance = 65 - (i * 5)
if(victim.loc == loc)
splash_chance += 30 //Same tile? BURN
if(victim.species?.acid_blood_dodge_chance)
splash_chance -= victim.species.acid_blood_dodge_chance

if(splash_chance > 0 && prob(splash_chance)) //Success!
var/dmg = list("damage" = acid_blood_damage)
if(SEND_SIGNAL(src, COMSIG_XENO_DEAL_ACID_DAMAGE, victim, dmg) & COMPONENT_BLOCK_DAMAGE)
continue
i++
victim.visible_message(SPAN_DANGER("\The [victim] is scalded with hissing green blood!"), \
SPAN_DANGER("You are splattered with sizzling blood! IT BURNS!"))
if(prob(60) && !victim.stat && victim.pain.feels_pain)
INVOKE_ASYNC(victim, TYPE_PROC_REF(/mob, emote), "scream") //Topkek
victim.apply_armoured_damage(dmg["damage"], ARMOR_BIO, BURN) //Sizzledam! This automagically burns a random existing body part.
victim.add_blood(get_blood_color(), BLOOD_BODY)
acid_splash_last = world.time
handle_blood_splatter(get_dir(src, victim), 1 SECONDS)
playsound(victim, "acid_sizzle", 25, TRUE)
animation_flash_color(victim, "#FF0000") //pain hit flicker

/mob/living/carbon/xenomorph/get_target_lock(access_to_check)
if(isnull(access_to_check))
Expand Down
4 changes: 1 addition & 3 deletions code/modules/mob/living/carbon/xenomorph/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,8 @@
playsound(loc,'sound/voice/predalien_death.ogg', 25, TRUE)
else if(isfacehugger(src))
playsound(loc, 'sound/voice/alien_facehugger_dies.ogg', 25, TRUE)
else if(boss_type == 0)
playsound(loc, prob(50) == 1 ? 'sound/voice/alien_death.ogg' : 'sound/voice/alien_death2.ogg', 25, 1)
else
playsound(loc, 'sound/effects/metal_crash.ogg')
playsound(loc, prob(50) == 1 ? 'sound/voice/alien_death.ogg' : 'sound/voice/alien_death2.ogg', 25, 1)
var/area/A = get_area(src)
if(hive && hive.living_xeno_queen)
xeno_message("Hive: [src] has <b>died</b>[A? " at [sanitize_area(A.name)]":""]! [banished ? "They were banished from the hive." : ""]", death_fontsize, hivenumber)
Expand Down
3 changes: 1 addition & 2 deletions code/modules/mob/living/carbon/xenomorph/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
drop_inv_item_on_ground(G)
if(!caste || !(caste.fire_immunity & FIRE_IMMUNITY_NO_DAMAGE) || fire_reagent.fire_penetrating)
apply_damage(armor_damage_reduction(GLOB.xeno_fire, PASSIVE_BURN_DAM_CALC(fire_reagent.intensityfire, fire_reagent.durationfire, fire_stacks) * caste.fire_vulnerability_mult), BURN)
if(boss_type == 0)
INVOKE_ASYNC(src, TYPE_PROC_REF(/mob, emote), pick("roar", "needhelp"))
INVOKE_ASYNC(src, TYPE_PROC_REF(/mob, emote), pick("roar", "needhelp"))

#undef PASSIVE_BURN_DAM_CALC

Expand Down
2 changes: 0 additions & 2 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,6 @@
var/area/A = get_area(X)
if(!(A.flags_atom & AREA_ALLOW_XENO_JOIN))
continue
if(X.boss_type == 1) //As above, but skips this for bosses.
continue

if(X.caste && X.counts_for_slots)
xeno_counts[X.caste.tier+1][X.caste.caste_type]++
Expand Down
Loading

0 comments on commit ca3cc58

Please sign in to comment.