New PVE Major Midround: Demonic Incursion (#29053)

* Initial commit. Event.

* Started converting mobs to basic mobs. Migo and Creature. Needs aggressiveness AI

* Makes CI happy

* Fixes some file names

* Ticks files

* Fixes file again

* Update code/modules/events/demon_incursion.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Announcement sound, spawn adjustments

* Reduced spread when portals multiply

* Elite spawns when portal count gets high

* Fixes missing comma

* Converted migo, blank, and most of hellhounds to basic mobs. Added new controllers and behaviors

* Fixes

* Linters!

* Faithless moved to basic mob

* LINTERS

* Makes skeletons basic mobs

* Fixes, Ranged Attacks, Ranged variants of nether mobs

* Handles portal expansion chance

* Linters

* Fixes mobs not breaking shit

* Fixes ranged attacks

* Fixes ranged attacks

* oops

* Another oops. No config changes are needed here

* Twenty percent chance that a nether mob is a grappler

* Dimensional tear fixes

* Adjusts awaken distance for hostile mobs, makes variable melee attack rate for basic mobs

* Variable initial spawns, variable spread rates.

* Whole lot of fixes from merge, hellhound completion

* Updated lavaland winter biodome

* Makes basic mobs able to hurt other mobs

* Makes spawners properly rally basic mobs to beat up the attacker

* Extra line

* Removed comment

* Makes hellhounds stop resting when attacked or when they find a new target

* Fixed initial portal spawn amounts

* Borgs now affected by basic mobs

* Nerfs portal spawn rate, nerfs portal integrity, nerfs portal max mobs

* Grapplers now teleport to missed turfs

* Removes duplicate notices

* Buff portals a small bit

* Makes nether portals no longer RR - the body is now recoverable from the blank it became

* Makes portals layer above mobs

* Removed excess ranged attack var

* Changes list for determining start count to rely on mobs with client instead of all clients

* Nerfs portal max mobs

* Portals can no longer spread to within 3 tiles of another portal except on initial event start

* Adjusts target portal count for big mobs

* Spawners now properly remove nest values of basic mobs

* Portals now glow an evil red. When portals are destroyed, 50% chance per mob to slay the mob

* add prowling and return to home behaviors

* cut this down

* be a tiny bit smarter

* Some code cleanup

* Removes hostile base type, removing excess code

* Gives /obj/ a basic mob attack handler. Fixes turrets

* Gives basic mobs a HUD

* Fixes skeleton death flag

* Adjusted initial spawns

* Incursion portals now slowly convert turfs, up to range 3 of them, to hellish flooring

* Increases reward per destroyed portal

* Makes the final portal of an incursion play a sound on destruction, couple portal fixes

* Fixes basic mob xenobiology interactions

* Non-shit portal sprites

* Adds hostile machine element, mobs now actively target turrets and emitters

* Properly gibs things when they should gib

* Linter fix

* Portals now layer under living mobs but over dead ones

* Adds blackbox checking for demon incursion portal counts

* Increases mob sight range slightly to account for widescreen, adds alt-color for grappler, delays incursion announcement a bit more

* Portals now are more likely to spread the less there are

* Incursion portals now repair themselves after not being damaged for some time

* Grilles now shock basic mobs

* Portals will now clean up basic mob corpses near them by gibbing them

* Portal spread chance is now exponential regression

* Portal mob spawns now linearly scale in time

* Fixes some skeleton oversights in ruin mapping

* Demon incursions no longer can spread to tiles in a space area, such as near brig plating

* Moves corpse cleanup to mobs via component

* Portals now drop bodies that are being eaten when they're destroyed.

* Addresses code review

* Docs some vars

---------

Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
This commit is contained in:
PollardTheDragon
2025-07-15 20:19:23 -04:00
committed by GitHub
parent 3342288f79
commit 05791861b7
50 changed files with 1265 additions and 288 deletions
+54 -2
View File
@@ -20,6 +20,7 @@ RESTRICT_TYPE(/mob/living/basic)
desc = "If you can see this, make an issue report on GitHub."
healable = TRUE
icon = 'icons/mob/animal.dmi'
hud_type = /datum/hud/simple_animal
var/basic_mob_flags
@@ -30,6 +31,8 @@ RESTRICT_TYPE(/mob/living/basic)
var/icon_living
/// Icon when the animal is dead.
var/icon_dead
/// Icon when the animal is resting
var/icon_resting
/// We only try to show a gibbing animation if this exists.
var/icon_gib
/// The sound played on death
@@ -129,14 +132,27 @@ RESTRICT_TYPE(/mob/living/basic)
var/melee_damage_upper = 0
/// How much damage this simple animal does to objects, if any
var/obj_damage = 0
/// What can this mob break?
var/environment_smash = ENVIRONMENT_SMASH_NONE
/// Flat armour reduction, occurs after percentage armour penetration.
var/armour_penetration_flat = 0
/// Percentage armour reduction, happens before flat armour reduction.
var/armour_penetration_percentage = 0
/// Damage type of a simple mob's melee attack, should it do damage.
var/melee_damage_type = BRUTE
/// How often can you melee attack?
var/melee_attack_cooldown = 2 SECONDS
/// Lower bound for melee attack cooldown
var/melee_attack_cooldown_min = 2 SECONDS
/// Upper bound for melee attack cooldown
var/melee_attack_cooldown_max = 2 SECONDS
/// Loot this mob drops on death.
var/list/loot = list()
/// Compatibility with mob spawners
var/datum/component/spawner/nest
/// Footsteps
var/step_type
/mob/living/basic/Initialize(mapload)
. = ..()
@@ -146,6 +162,14 @@ RESTRICT_TYPE(/mob/living/basic)
apply_atmos_requirements()
apply_temperature_requirements()
if(step_type)
AddComponent(/datum/component/footstep, step_type)
/mob/living/basic/Destroy()
if(nest)
nest.spawned_mobs -= src
nest = null
return ..()
/mob/living/basic/movement_delay()
. = speed
@@ -198,6 +222,7 @@ RESTRICT_TYPE(/mob/living/basic)
/mob/living/basic/proc/early_melee_attack(atom/target, list/modifiers, ignore_cooldown = FALSE)
face_atom(target)
if(!ignore_cooldown)
var/melee_attack_cooldown = rand(melee_attack_cooldown_min, melee_attack_cooldown_max)
changeNext_move(melee_attack_cooldown)
if(SEND_SIGNAL(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, target, Adjacent(target), modifiers) & COMPONENT_HOSTILE_NO_ATTACK)
return FALSE
@@ -233,6 +258,10 @@ RESTRICT_TYPE(/mob/living/basic)
. = ..()
if(!.)
return FALSE
if(nest)
nest.spawned_mobs -= src
nest = null
drop_loot()
if(!gibbed)
if(death_sound)
playsound(get_turf(src), death_sound, 200, 1)
@@ -302,6 +331,24 @@ RESTRICT_TYPE(/mob/living/basic)
apply_damage(damage, damagetype, null, getarmor(null, armorcheck))
return TRUE
/mob/living/basic/handle_basic_attack(mob/living/basic/attacker, modifiers)
. = ..()
if(.)
var/damage = rand(attacker.melee_damage_lower, attacker.melee_damage_upper)
return attack_threshold_check(damage, attacker.melee_damage_type)
/mob/living/basic/on_lying_down(new_lying_angle)
..()
if(icon_resting && stat != DEAD)
icon_state = icon_resting
ADD_TRAIT(src, TRAIT_IMMOBILIZED, LYING_DOWN_TRAIT) //simple mobs cannot crawl (unless they can)
/mob/living/basic/on_standing_up()
..()
if(icon_resting && stat != DEAD)
icon_state = icon_living
// Health/Damage adjustment, cribbed straight from simplemobs
/mob/living/basic/adjustHealth(amount, updating_health = TRUE)
@@ -333,3 +380,8 @@ RESTRICT_TYPE(/mob/living/basic)
/mob/living/basic/adjustStaminaLoss(amount, updating_health = TRUE)
if(damage_coeff[STAMINA])
return ..(amount * damage_coeff[STAMINA], updating_health)
/mob/living/basic/proc/drop_loot()
if(length(loot))
for(var/item in loot)
new item(get_turf(src))