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,151 @@
/mob/living/basic/hellhound
// Sprites by FoS: https://www.paradisestation.org/forum/profile/335-fos
name = "lesser hellhound"
desc = "A demonic-looking black canine monster with glowing red eyes and sharp teeth. A firey, lava-like substance drips from it."
icon_state = "hellhound"
icon_living = "hellhound"
icon_dead = "hellhound_dead"
icon_resting = "hellhound_rest"
mob_biotypes = MOB_ORGANIC | MOB_BEAST
melee_damage_lower = 10 // slightly higher than araneus
melee_damage_upper = 30
melee_attack_cooldown_min = 1.5 SECONDS
melee_attack_cooldown_max = 2.5 SECONDS
environment_smash = ENVIRONMENT_SMASH_STRUCTURES
a_intent = INTENT_HARM
speed = 0
maxHealth = 250 // same as sgt araneus
health = 250
obj_damage = 50
attack_verb_continuous = "savages"
attack_verb_simple = "savage"
attack_sound = 'sound/effects/bite.ogg'
speak_emote = list("growls")
see_in_dark = 9
universal_understand = TRUE
ai_controller = /datum/ai_controller/basic_controller/simple/hellhound
step_type = FOOTSTEP_MOB_CLAW
faction = list("nether")
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, STAM = 0, OXY = 1)
gold_core_spawnable = HOSTILE_SPAWN
contains_xeno_organ = TRUE
surgery_container = /datum/xenobiology_surgery_container/hound
/// How many cycles has the hellhound rested
var/life_regen_cycles = 0
/// Trigger number for health regen
var/life_regen_cycle_trigger = 10
/// How much is healed when regenerating
var/life_regen_amount = -10 // negative, because negative = healing
/// When did the hellhound last use smoke
var/smoke_lastuse = 0
/// How often can the hellhound use smoke
var/smoke_freq = 30 SECONDS
/mob/living/basic/hellhound/Initialize(mapload)
. = ..()
AddElement(/datum/element/ai_retaliate)
/mob/living/basic/hellhound/examine(mob/user)
. = ..()
if(stat != DEAD)
var/list/msgs = list()
if(key)
msgs += "<span class='warning'>Its eyes have the spark of intelligence.</span>"
if(health > (maxHealth*0.95))
msgs += "<span class='notice'>It appears to be in excellent health.</span>"
else if(health > (maxHealth*0.75))
msgs += "<span class='notice'>It has a few injuries.</span>"
else if(health > (maxHealth*0.55))
msgs += "<span class='warning'>It has many injuries.</span>"
else if(health > (maxHealth*0.25))
msgs += "<span class='warning'>It is covered in wounds!</span>"
if(IS_HORIZONTAL(src))
if(getBruteLoss() || getFireLoss())
msgs += "<span class='warning'>It is currently licking its wounds, regenerating the damage to its body!</span>"
else
msgs += "<span class='notice'>It is currently resting.</span>"
. += msgs.Join("<BR>")
/mob/living/basic/hellhound/Move(atom/newloc, direct, glide_size_override, update_dir)
. = ..()
if(IS_HORIZONTAL(src))
stand_up()
/mob/living/basic/hellhound/Life(seconds, times_fired)
. = ..()
if(stat != DEAD && (getBruteLoss() || getFireLoss()))
if(IS_HORIZONTAL(src))
if(life_regen_cycles >= life_regen_cycle_trigger)
life_regen_cycles = 0
to_chat(src, "<span class='notice'>You lick your wounds, helping them close.</span>")
adjustBruteLoss(life_regen_amount)
adjustFireLoss(life_regen_amount)
else
life_regen_cycles++
if(ai_controller.blackboard_key_exists(BB_BASIC_MOB_CURRENT_TARGET))
stand_up()
/mob/living/basic/hellhound/apply_damage(damage, damagetype, def_zone, blocked, sharp, used_weapon, spread_damage)
. = ..()
if(stat != DEAD && IS_HORIZONTAL(src))
stand_up()
/mob/living/basic/hellhound/greater
name = "greater hellhound"
desc = "A demonic-looking black canine monster with glowing red eyes and sharp teeth. Greater hounds are far stronger than their lesser kin, and should be engaged with extreme caution."
icon_state = "hellhoundgreater"
icon_living = "hellhoundgreater"
icon_resting = "hellhoundgreater_sit"
maxHealth = 400
health = 400
force_threshold = 5 // no punching
universal_speak = TRUE
smoke_freq = 20 SECONDS
life_regen_cycle_trigger = 5
melee_damage_lower = 20
melee_damage_upper = 30
/mob/living/basic/hellhound/greater/Initialize(mapload)
. = ..()
// Movement
AddSpell(new /datum/spell/ethereal_jaunt/shift)
var/datum/spell/area_teleport/teleport/telespell = new
telespell.clothes_req = FALSE
telespell.invocation_type = "none"
AddSpell(telespell)
var/datum/spell/aoe/knock/knockspell = new
knockspell.invocation_type = "none"
AddSpell(knockspell)
// Defense
var/datum/spell/forcewall/wallspell = new
wallspell.clothes_req = FALSE
wallspell.invocation_type = "none"
AddSpell(wallspell)
// Offense
var/datum/spell/aoe/conjure/creature/summonspell = new
summonspell.base_cooldown = 1
summonspell.invocation_type = "none"
summonspell.summon_type = list(/mob/living/basic/hellhound)
summonspell.summon_amt = 1
AddSpell(summonspell)
/mob/living/basic/hellhound/greater/melee_attack(atom/target, list/modifiers, ignore_cooldown)
. = ..()
if(. && ishuman(target) && (!client || a_intent == INTENT_HARM))
special_aoe()
/mob/living/basic/hellhound/greater/proc/special_aoe()
if(world.time < (smoke_lastuse + smoke_freq))
return
smoke_lastuse = world.time
var/datum/effect_system/smoke_spread/sleeping/smoke = new
smoke.set_up(10, FALSE, loc)
smoke.start()
/mob/living/basic/hellhound/tear
name = "frenzied hellhound"
maxHealth = 300
health = 300
melee_damage_lower = 30
melee_damage_upper = 50
@@ -0,0 +1,45 @@
/datum/ai_controller/basic_controller/simple/hellhound
blackboard = list(
BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
planning_subtrees = list(
/datum/ai_planning_subtree/simple_find_target,
/datum/ai_planning_subtree/attack_obstacle_in_path,
/datum/ai_planning_subtree/basic_melee_attack_subtree,
/datum/ai_planning_subtree/hellhound_rest,
/datum/ai_planning_subtree/find_and_hunt_target/prowl,
/datum/ai_planning_subtree/attack_obstacle_in_path/prowl,
)
/datum/ai_planning_subtree/hellhound_rest/select_behaviors(datum/ai_controller/controller, seconds_per_tick)
var/mob/living/pawn = controller.pawn
if(pawn.stat == DEAD)
return
if(pawn.getBruteLoss() || pawn.getFireLoss())
controller.queue_behavior(/datum/ai_behavior/hellhound_rest)
return SUBTREE_RETURN_FINISH_PLANNING
else
controller.queue_behavior(/datum/ai_behavior/hellhound_stand)
/datum/ai_behavior/hellhound_rest
action_cooldown = 2 SECONDS
/datum/ai_behavior/hellhound_rest/perform(seconds_per_tick, datum/ai_controller/controller, ...)
. = ..()
var/mob/living/basic/hellhound/hound = controller.pawn
if(!IS_HORIZONTAL(hound))
hound.lay_down()
return AI_BEHAVIOR_SUCCEEDED
/datum/ai_behavior/hellhound_stand
action_cooldown = 2 SECONDS
/datum/ai_behavior/hellhound_stand/perform(seconds_per_tick, datum/ai_controller/controller, ...)
. = ..()
var/mob/living/basic/hellhound/hound = controller.pawn
if(IS_HORIZONTAL(hound))
hound.stand_up()
return AI_BEHAVIOR_SUCCEEDED
@@ -0,0 +1,99 @@
/mob/living/basic/skeleton
name = "reanimated skeleton"
desc = "A real bonefied skeleton, doesn't seem like it wants to socialize."
icon = 'icons/mob/simple_human.dmi'
icon_state = "skeleton"
icon_living = "skeleton"
speak_emote = list("rattles")
mob_biotypes = MOB_UNDEAD | MOB_HUMANOID
maxHealth = 40
health = 40
a_intent = INTENT_HARM
melee_damage_lower = 15
melee_damage_upper = 15
harm_intent_damage = 5
obj_damage = 50
melee_attack_cooldown_min = 1.5 SECONDS
melee_attack_cooldown_max = 2.5 SECONDS
environment_smash = ENVIRONMENT_SMASH_STRUCTURES
minimum_survivable_temperature = 0
maximum_survivable_temperature = 1500
healable = FALSE
attack_verb_simple = "slash"
attack_verb_continuous = "slashes"
attack_sound = 'sound/hallucinations/growl1.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, STAM = 0, OXY = 1)
unsuitable_atmos_damage = 10
see_in_dark = 8
faction = list("skeleton")
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
basic_mob_flags = DEL_ON_DEATH
speed = 1
step_type = FOOTSTEP_MOB_SHOE
gold_core_spawnable = HOSTILE_SPAWN
loot = list(/obj/effect/decal/remains/human)
ai_controller = /datum/ai_controller/basic_controller/simple/simple_hostile_obstacles/demonic_incursion
/mob/living/basic/skeleton/Initialize(mapload)
. = ..()
AddElement(/datum/element/ai_retaliate)
/mob/living/basic/skeleton/arctic
name = "undead arctic explorer"
desc = "The reanimated remains of some poor traveler."
icon_state = "arctic_skeleton"
icon_living = "arctic_skeleton"
maxHealth = 55
health = 55
weather_immunities = list("snow")
gold_core_spawnable = NO_SPAWN
melee_damage_lower = 17
melee_damage_upper = 20
death_message = "collapses into a pile of bones, its gear falling to the floor!"
loot = list(/obj/effect/decal/remains/human,
/obj/item/spear,
/obj/item/clothing/shoes/winterboots,
/obj/item/clothing/suit/hooded/wintercoat)
/mob/living/basic/skeleton/warden
name = "skeleton warden"
desc = "The remains of a warden."
icon = 'icons/mob/simple_human.dmi'
icon_state = "skeleton_warden"
icon_living = "skeleton_warden"
loot = list(/obj/effect/decal/cleanable/shreds, /mob/living/basic/skeleton/angered_warden)
maxHealth = 300
health = 300
melee_damage_lower = 15
melee_damage_upper = 15
death_message = null
gold_core_spawnable = NO_SPAWN
ai_controller = /datum/ai_controller/basic_controller/simple/simple_hostile_obstacles/skeleton_warden
/mob/living/basic/skeleton/warden/Process_Spacemove(movement_dir = 0, continuous_move = FALSE)
return TRUE
/mob/living/basic/skeleton/angered_warden
name = "angered skeleton warden" // round 2
desc = "An angry skeleton."
icon = 'icons/mob/simple_human.dmi'
icon_state = "skeleton_warden_alt"
icon_living = "skeleton_warden_alt"
attack_verb_simple = "claw"
attack_verb_continuous = "claws"
attack_sound = 'sound/hallucinations/growl1.ogg'
maxHealth = 200
health = 200
speed = -1
melee_damage_lower = 30
melee_damage_upper = 30
loot = list(/obj/effect/decal/remains/human, /obj/item/clothing/head/warden, /obj/item/card/sec_shuttle_ruin)
gold_core_spawnable = NO_SPAWN
ai_controller = /datum/ai_controller/basic_controller/simple/simple_hostile_obstacles/skeleton_warden
/mob/living/basic/skeleton/angered_warden/Process_Spacemove(movement_dir = 0, continuous_move = FALSE)
return TRUE
/datum/ai_controller/basic_controller/simple/simple_hostile_obstacles/skeleton_warden
idle_behavior = null // Don't idly wander