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-16 00:19:23 +00:00
committed by GitHub
co-authored by Luc warriorstar-orion
parent 3342288f79
commit 05791861b7
50 changed files with 1265 additions and 288 deletions
@@ -0,0 +1,16 @@
/datum/component/incursion_mob_death
var/gib_delay = 2 MINUTES
/datum/component/incursion_mob_death/RegisterWithParent()
RegisterSignal(parent, COMSIG_MOB_DEATH, PROC_REF(extra_death_effect))
RegisterSignal(parent, COMSIG_PARENT_QDELETING, PROC_REF(extra_death_effect))
/datum/component/incursion_mob_death/proc/extra_death_effect(datum/source)
SIGNAL_HANDLER
if(prob(95)) // Save some corpses for xenobio
addtimer(CALLBACK(src, PROC_REF(delayed_gib)), gib_delay)
/datum/component/incursion_mob_death/proc/delayed_gib()
var/mob/living/demon = parent
new /obj/effect/temp_visual/demonic_grasp(demon.loc)
demon.gib()
+32 -4
View File
@@ -35,14 +35,17 @@
for(var/mob/living/simple_animal/L in spawned_mobs)
if(L.nest == src)
L.nest = null
for(var/mob/living/basic/L in spawned_mobs)
if(L.nest == src)
L.nest = null
spawned_mobs = null
/datum/component/spawner/proc/try_spawn_mob()
var/atom/P = parent
if(length(spawned_mobs) >= max_mobs)
return 0
return
if(spawn_delay > world.time)
return 0
return
spawn_delay = world.time + spawn_time
var/chosen_mob_type = pick(mob_types)
var/mob/living/simple_animal/L = new chosen_mob_type(P.loc)
@@ -52,6 +55,7 @@
L.faction = src.faction
P.visible_message("<span class='danger'>[L] [spawn_text] [P].</span>")
P.on_mob_spawn(L)
return L
/datum/component/spawner/proc/rally_spawned_mobs(parent, mob/living/target)
SIGNAL_HANDLER // COMSIG_SPAWNER_SET_TARGET
@@ -62,5 +66,29 @@
// start the cooldown first, because a rallied mob might fire on
// ourselves while this is happening, causing confusion
COOLDOWN_START(src, last_rally, 30 SECONDS)
for(var/mob/living/simple_animal/hostile/rallied as anything in spawned_mobs)
INVOKE_ASYNC(rallied, TYPE_PROC_REF(/mob/living/simple_animal/hostile, aggro_fast), target)
for(var/mob/living/rallied as anything in spawned_mobs)
if(istype(rallied, /mob/living/basic))
var/mob/living/basic/basic = rallied
basic.ai_controller.cancel_actions()
basic.ai_controller.set_blackboard_key(BB_BASIC_MOB_CURRENT_TARGET, target)
if(istype(rallied, /mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/simple = rallied
INVOKE_ASYNC(simple, TYPE_PROC_REF(/mob/living/simple_animal/hostile, aggro_fast), target)
/datum/component/spawner/demon_incursion_portal
/datum/component/spawner/demon_incursion_portal/try_spawn_mob()
var/atom/result = ..()
if(result && istype(result.ai_controller))
result.ai_controller.set_blackboard_key(BB_INCURSION_HOME_PORTAL, parent)
return result
/datum/component/spawner/demon_incursion_portal/rally_spawned_mobs(parent, mob/living/target)
if(!(COOLDOWN_FINISHED(src, last_rally)))
return
COOLDOWN_START(src, last_rally, 30 SECONDS)
for(var/mob/living/basic/rallied as anything in spawned_mobs)
rallied.ai_controller.cancel_actions()
rallied.ai_controller.queue_behavior(/datum/ai_behavior/return_home/incursion_portal, BB_INCURSION_HOME_PORTAL)
+1 -1
View File
@@ -82,7 +82,7 @@
return
if(!IS_HORIZONTAL(L) && !can_start_on_stander)
return
if(IS_HORIZONTAL(L) && !on_operable_surface(L) && !isanimal(L))
if(IS_HORIZONTAL(L) && !on_operable_surface(L) && !(isanimal(L) || isbasicmob(L)))
return
if(iscarbon(target))
var/mob/living/carbon/C = target