Skip to content

Commit

Permalink
Further Infestation Updates (#523)
Browse files Browse the repository at this point in the history
* Adds pike burrow structure

* Minor fixes

* Processing + Cooldown fixes

* Tweaks

* More tweaks

Added infestation exo event, AI targeting tweaks

* Chemical tweaks, adds new painkiller using grauel

* Blood color helper

* Replaces pike burrow's process with recursive(?) proc call

* Actually uses pike burrow's attack delay var

* Fix

* Tweaks the ISC bunker

Fixes the type of heart of the hive, adds a pike burrow, other minor stuff

* Runtime fix

* Some balance, lurker code

* Tiny fix
  • Loading branch information
EgorDinamit authored Feb 29, 2024
1 parent 4feecb6 commit d883ffc
Show file tree
Hide file tree
Showing 34 changed files with 442 additions and 79 deletions.
3 changes: 3 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2447,10 +2447,13 @@
#include "code\modules\mob\living\simple_animal\hostile\infestation\eviscerator.dm"
#include "code\modules\mob\living\simple_animal\hostile\infestation\floatfly.dm"
#include "code\modules\mob\living\simple_animal\hostile\infestation\larva.dm"
#include "code\modules\mob\living\simple_animal\hostile\infestation\lurker.dm"
#include "code\modules\mob\living\simple_animal\hostile\infestation\meatchip.dm"
#include "code\modules\mob\living\simple_animal\hostile\infestation\rhino.dm"
#include "code\modules\mob\living\simple_animal\hostile\infestation\spitter.dm"
#include "code\modules\mob\living\simple_animal\hostile\infestation\structures\_infestation_structure.dm"
#include "code\modules\mob\living\simple_animal\hostile\infestation\structures\hive_heart.dm"
#include "code\modules\mob\living\simple_animal\hostile\infestation\structures\pike_burrow.dm"
#include "code\modules\mob\living\simple_animal\hostile\megafauna\_megafauna.dm"
#include "code\modules\mob\living\simple_animal\hostile\megafauna\abnormality\all_around_helper.dm"
#include "code\modules\mob\living\simple_animal\hostile\megafauna\abnormality\white_night.dm"
Expand Down
1 change: 1 addition & 0 deletions code/__defines/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define IS_SLIME 5
#define IS_NABBER 6
#define IS_MANTID 7
#define IS_ABOMINATION 8

#define CE_STABLE "stable" // Inaprovaline
#define CE_ANTIBIOTIC "antibiotic" // Spaceacilin
Expand Down
13 changes: 12 additions & 1 deletion code/modules/ai/ai_holder_targeting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
. = ohearers(vision_range, holder)
. -= GLOB.dview_mob // Not the dview mob!

var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /mob/living/exosuit, /obj/effect/blob))
var/static/hostile_machines = typecacheof(list(
/obj/machinery/porta_turret,
/mob/living/exosuit,
/obj/effect/blob,
/obj/infestation_structure/pike_burrow,
))

for (var/HM in typecache_filter_list(range(vision_range, holder), hostile_machines))
if (can_see(holder, HM, vision_range))
Expand Down Expand Up @@ -149,6 +154,12 @@
return FALSE // Turrets won't get hurt if they're still in their cover.
return TRUE

if(istype(the_target, /obj/infestation_structure))
var/obj/infestation_structure/IS = the_target
if(IS.faction == holder.faction)
return FALSE
return TRUE

return TRUE

/// 'Soft' loss of target. They may still exist, we still have some info about them maybe.
Expand Down
28 changes: 28 additions & 0 deletions code/modules/events/exo_awakening/_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
var/spawn_near_chance = 20 ///chance a mob spawns near a player
var/delay_time = 600 ///Amount of time between the event starting and mobs beginning spawns

/datum/mob_list/major/infestation
mobs = list(
list(/mob/living/simple_animal/hostile/infestation/broodling, 35),
list(/mob/living/simple_animal/hostile/infestation/floatfly, 25),
list(/mob/living/simple_animal/hostile/infestation/spitter, 20),
list(/mob/living/simple_animal/hostile/infestation/eviscerator, 15),
list(/mob/living/simple_animal/hostile/infestation/assembler, 10),
list(/mob/living/simple_animal/hostile/infestation/rhino, 5)
)
arrival_message = "A giant creature wails somewhere in space as the planet starts to shake violently. Something is burrowing from the ground..."
arrival_sound = 'sound/simple_mob/abominable_infestation/leviathan/wail1-long.ogg'
limit = 35
spawn_near_chance = 20

/datum/mob_list/major/meat
mobs = list(
list(/mob/living/simple_animal/hostile/meat/abomination, 10),
Expand Down Expand Up @@ -48,6 +62,20 @@
length = 50
spawn_near_chance = 10

/datum/mob_list/moderate/infestation
mobs = list(
list(/mob/living/simple_animal/hostile/infestation/broodling, 50),
list(/mob/living/simple_animal/hostile/infestation/floatfly, 25),
list(/mob/living/simple_animal/hostile/infestation/larva, 25),
list(/mob/living/simple_animal/hostile/infestation/spitter, 15),
list(/mob/living/simple_animal/hostile/infestation/eviscerator, 5),
list(/mob/living/simple_animal/hostile/infestation/assembler, 2)
)
arrival_message = "A giant creature wails somewhere in space as something begins to burrow from the ground..."
arrival_sound = 'sound/simple_mob/abominable_infestation/leviathan/wail1.ogg'
limit = 15
spawn_near_chance = 10

/datum/mob_list/moderate/spiders
mobs = list(
list(/mob/living/simple_animal/hostile/giant_spider/guard, 60),
Expand Down
2 changes: 1 addition & 1 deletion code/modules/events/leviathan_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
if(!istype(T))
T = pick_area_turf_in_single_z_level(list(/proc/is_not_space_area), list(/proc/not_turf_contains_dense_objects, /proc/is_not_open_space, /proc/is_not_space_turf), pick(affecting_z))

new /obj/effect/hive_heart(T)
new /obj/infestation_structure/hive_heart(T)
new /datum/bubble_effect/infestation(T.x, T.y, T.z, 1, 1)
var/list/valid_spawns = list()
for(var/turf/TT in oview(T, 3))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)), rand(1,3), round(30/I.w_class))

..(species.gibbed_anim)
gibs(loc, dna, null, species.get_flesh_colour(src), species.get_blood_colour(src))
gibs(loc, dna, null, species.get_flesh_colour(src), GetBloodColor())

/mob/living/carbon/human/dust()
if(species)
Expand Down
5 changes: 5 additions & 0 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,11 @@

new /obj/effect/temp_visual/bloodsplatter(loc, hit_dir, species.blood_color)

/mob/living/carbon/human/GetBloodColor()
if(istype(species))
return species.get_blood_colour(src)
return COLOR_BLOOD_HUMAN

/mob/living/carbon/human/proc/dream()
dream_timer = null
if (!sleeping)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -962,3 +962,6 @@ default behaviour is:
play_sound = TRUE
if(play_sound)
playsound(get_turf(src), 'sound/magic/blind.ogg', 50, TRUE)

/mob/living/proc/GetBloodColor()
return COLOR_BLOOD_HUMAN
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
var/transformation_target_type = null
/// If TRUE - will evolve despite having a target mob
var/ignore_combat = FALSE
/// Speed buff when on flesh turfs
var/flesh_movement_bonus = 0.3

/mob/living/simple_animal/hostile/infestation/Life()
. = ..()
Expand Down Expand Up @@ -61,6 +63,16 @@
QDEL_IN(src, (5 SECONDS))
return ..()

// Infestation moves faster on their territory
/mob/living/simple_animal/hostile/infestation/movement_delay()
. = ..()
var/turf/simulated/floor/F = get_turf(src)
if(!istype(F))
return

if(istype(F, /turf/simulated/floor/exoplanet/flesh) || istype(F.flooring, /decl/flooring/flesh))
. -= flesh_movement_bonus

// While they are "resistant" to high temperatures, they are specifically weak to fire
/mob/living/simple_animal/hostile/infestation/fire_burn_temperature()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Enormous damage, Very high health, Very low mobility.
// Spawns small "meat chips" when damaged.
// Constantly regenerates health.
// Recommended strategy is using flamethrower and stay AT LEAST 4-5 tiles away from it.
// DO NOT stop fighting it, as it will inevitably regenerate all health if you leave it alone for too long.
/mob/living/simple_animal/hostile/infestation/aggregate
name = "aggregate"
desc = "A repulsive mass of flesh that is constantly regenerating itself."
Expand All @@ -8,7 +13,7 @@
mob_size = MOB_LARGE
default_pixel_x = -8
pixel_x = -8
movement_cooldown = 7
movement_cooldown = 8

// A giant fuck-off bite attack; Don't come close to this thing
natural_weapon = /obj/item/natural_weapon/bite/aggregate
Expand All @@ -29,7 +34,7 @@
var/regeneration_speed = 0.005
/// How much health should we have before throwing a new meatchip
var/spawn_health = 0
/// How much percents of max HP is reduced from damage_to_spawn on each new meatchip spawn
/// How much percents of max HP is reduced from spawn_health on each new meatchip spawn
var/spawn_health_reduction = 0.03

/obj/item/natural_weapon/bite/aggregate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

natural_weapon = /obj/item/natural_weapon/assembler

health = 200
maxHealth = 200
health = 250
maxHealth = 250

movement_cooldown = 4

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Medium damage, Low health, Very high mobility
// Medium damage, Low health, Very high mobility.
// Ignores gravity and can "fly", temporarily turning non-dense
// When attacked, can change its pixel position slightly, making it more difficult to hit

Expand All @@ -9,7 +9,7 @@
icon_living = "fly"
icon_dead = "fly_dead"
mob_size = MOB_SMALL
movement_cooldown = 2.5
movement_cooldown = 2.7

natural_weapon = /obj/item/natural_weapon/claws/floatfly

Expand Down Expand Up @@ -47,9 +47,15 @@
animate(src, pixel_z = 0, time = 3)
return ..()

/mob/living/simple_animal/hostile/infestation/floatfly/movement_delay()
. = ..()
// Faster while flying
if(!density)
. -= 0.5

/mob/living/simple_animal/hostile/infestation/floatfly/adjustBruteLoss(amount)
. = ..()
if(world.time > fly_cooldown && prob(amount * 5))
if(!stat && world.time > fly_cooldown && prob(amount * 5))
animate(src, pixel_x = default_pixel_x + rand(-10, 10), pixel_y = default_pixel_y + rand(-10, 10), time = 2)

/mob/living/simple_animal/hostile/infestation/floatfly/Process_Spacemove()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

transformation_types = list(
/mob/living/simple_animal/hostile/infestation/broodling = 30 SECONDS,
/mob/living/simple_animal/hostile/infestation/floatfly = 40 SECONDS,
/mob/living/simple_animal/hostile/infestation/spitter = 45 SECONDS,
/mob/living/simple_animal/hostile/infestation/eviscerator = 60 SECONDS,
/mob/living/simple_animal/hostile/infestation/assembler = 75 SECONDS,
Expand Down Expand Up @@ -112,6 +113,8 @@
/mob/living/simple_animal/hostile/infestation/larva/implant/implanter/attack_target(atom/A)
if(!ishuman(A))
return
if(on_fire)
return
var/mob/living/carbon/human/H = A
var/list/valid_organs = list()
for(var/obj/item/organ/external/O in H.organs)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// High ranged damage, Medium health, Low mobility.
// Recommended strategy is to rush it, as its melee damage is subpar and has no armor penetration.
/mob/living/simple_animal/hostile/infestation/lurker
name = "lurker"
desc = "A spider-like creature with multiple spikes protruding from its \"legs\"."
icon = 'icons/mob/simple_animal/abominable_infestation/48x48.dmi'
// !!!! I am not a very good spriter, please update it later !!!!
icon_state = "eviscerator"
icon_living = "eviscerator"
icon_dead = "eviscerator_dead"
mob_size = MOB_MEDIUM
movement_cooldown = 5

natural_weapon = /obj/item/natural_weapon/claws/abomination_lurker

base_attack_cooldown = 1 SECONDS
ranged_attack_cooldown = 3 SECONDS

special_attack_min_range = 2
special_attack_max_range = 6
special_attack_cooldown = 2 SECONDS

health = 400
maxHealth = 400

meat_type = /obj/item/reagent_containers/food/snacks/abominationmeat
meat_amount = 6
skin_material = MATERIAL_SKIN_CHITIN
skin_amount = 4
bone_material = MATERIAL_BONE_CARTILAGE
bone_amount = 10

ai_holder_type = /datum/ai_holder/simple_animal/infestation/lurker
say_list_type = /datum/say_list/infestation_lurker
death_sounds = list('sound/simple_mob/abominable_infestation/lurker/death.ogg')

var/spike_damage = 35
/// Sleep time between each new spike
var/spike_delay = 1.5

/obj/item/natural_weapon/claws/abomination_lurker
force = 10
armor_penetration = 10
hitsound = 'sound/simple_mob/abominable_infestation/eviscerator/attack.ogg'

/datum/say_list/infestation_lurker
emote_hear = list("gurgles")

emote_hear_sounds = list(
'sound/simple_mob/abominable_infestation/lurker/ambient_1.ogg',
)

/datum/ai_holder/simple_animal/infestation/lurker
returns_home = FALSE
home_low_priority = TRUE
speak_chance = 2
wander = TRUE
base_wander_delay = 15

/datum/ai_holder/simple_animal/infestation/lurker/closest_distance(atom/movable/AM)
return holder.special_attack_min_range

/datum/ai_holder/simple_animal/infestation/lurker/max_range(atom/movable/AM)
return holder.special_attack_max_range

/mob/living/simple_animal/hostile/infestation/lurker/do_special_attack(atom/A)
set waitfor = FALSE
set_AI_busy(TRUE)
face_atom(A)

var/list/attack_line = getline(get_step(src, get_dir(src, A)), A)
for(var/turf/T in attack_line)
sleep(spike_delay)
SpikeTurf(T)

set_AI_busy(FALSE)

/mob/living/simple_animal/hostile/infestation/lurker/proc/SpikeTurf(turf/T)
if(QDELETED(src))
return FALSE

new /obj/effect/temp_visual/infestation_spike(T, get_dir(src, T), spike_damage)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// The tiny and fast annoying enemies spawned by aggregate
// The tiny and fast annoying enemies spawned by aggregate.
// Their hilariously low health means they will most likely die in one tick of fire damage.
/mob/living/simple_animal/hostile/infestation/meatchip
name = "meatchip"
desc = "A tiny, digusting creature."
Expand All @@ -13,8 +14,8 @@
natural_weapon = /obj/item/natural_weapon/claws/meatchip
melee_attack_delay = 0

health = 30
maxHealth = 30
health = 20
maxHealth = 20

meat_type = /obj/item/reagent_containers/food/snacks/abominationmeat
meat_amount = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// High damage, High health, Medium mobility
// Temporarily increases movement speed when attacked/targeting someone, which has a big-ish cooldown.
// Recommended strategy is to wait out the rage period and then kite it with guns or other ranged weapons.
/mob/living/simple_animal/hostile/infestation/rhino
name = "rhino"
desc = "A large heavily-armored monster."
Expand All @@ -11,8 +14,8 @@

natural_weapon = /obj/item/natural_weapon/hooves/rhino

health = 850
maxHealth = 850
health = 750
maxHealth = 750
resistance = 12
maxbodytemp = 1200 // Can survive harsh environments

Expand All @@ -33,7 +36,7 @@
var/enraged = FALSE
var/enraged_end_time
var/enraged_cooldown
var/enraged_cooldown_time = 20 SECONDS
var/enraged_cooldown_time = 30 SECONDS
var/enraged_movement_sound = 'sound/simple_mob/abominable_infestation/rhino/step_angry.ogg'

/obj/item/natural_weapon/hooves/rhino
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Medium damage, Low health, Medium mobility.
// Recommended strategy is to rush it, as its melee damage is subpar and has no armor penetration.
/mob/living/simple_animal/hostile/infestation/spitter
name = "spitter"
desc = "A weird wriggling creature. Some sort of corrosive substance is dripping from its maw."
Expand Down
Loading

0 comments on commit d883ffc

Please sign in to comment.