[MIRROR] Metal Vore Solid (#9386)

Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com>
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2024-11-02 09:32:45 -07:00
committed by GitHub
parent b00dc5b76c
commit d5be61cc0f
3 changed files with 82 additions and 1 deletions

View File

@@ -98,6 +98,23 @@
step_rand(holder)
holder.face_atom(AM)
// Only attacks you if you're in front of it.
/datum/ai_holder/simple_mob/ranged/guard_limit
guard_limit = TRUE
returns_home = TRUE
/datum/ai_holder/simple_mob/ranged/guard_limit/pointblank
pointblank = TRUE
/datum/ai_holder/simple_mob/ranged/guard_limit/aggressive
pointblank = TRUE
var/closest_distance = 1
/datum/ai_holder/simple_mob/ranged/guard_limit/kiting
pointblank = TRUE // So we don't need to copypaste post_melee_attack().
var/run_if_this_close = 4 // If anything gets within this range, it'll try to move away.
var/moonwalk = TRUE // If true, mob turns to face the target while kiting, otherwise they turn in the direction they moved towards.
// Switches intents based on specific criteria.
// Used for special mobs who do different things based on intents (and aren't slimes).
// Intent switching is generally done in pre_[ranged/special]_attack(), so that the mob can use the right attack for the right time.
@@ -142,6 +159,14 @@
return TRUE // We're out in the open, uncloaked, and our target isn't stunned, so lets flee.
return FALSE
// Can only target people in view range, will return home
/datum/ai_holder/simple_mob/melee/guard_limit
guard_limit = TRUE
returns_home = TRUE
/datum/ai_holder/simple_mob/melee/evasive/guard_limit
guard_limit = TRUE
returns_home = TRUE
// Simple mobs that aren't hostile, but will fight back.
/datum/ai_holder/simple_mob/retaliate
@@ -197,3 +222,7 @@
/datum/ai_holder/simple_mob/passive/speedy
base_wander_delay = 1
// For setting up possible stealth missions
/datum/ai_holder/simple_mob/humanoid/hostile/guard_limit
guard_limit = TRUE

View File

@@ -10,6 +10,7 @@
var/micro_hunt = FALSE // Will target mobs at or under the micro_hunt_size size, requires vore_hostile to be true
var/micro_hunt_size = 0.25
var/belly_attack = TRUE //Mobs attack if they are in a belly!
var/guard_limit = FALSE //Mobs will not acquire targets unless they are in front of them.
var/atom/movable/target = null // The thing (mob or object) we're trying to kill.
var/atom/movable/preferred_target = null// If set, and if given the chance, we will always prefer to target this over other options.
@@ -52,7 +53,10 @@
. = list()
if(!has_targets_list)
possible_targets = list_targets()
for(var/possible_target in possible_targets)
for(var/atom/possible_target as anything in possible_targets)
if(guard_limit)
if((holder.dir == 1 && holder.y >= possible_target.y) || (holder.dir == 2 && holder.y <= possible_target.y) || (holder.dir == 4 && holder.x >= possible_target.x) || (holder.dir == 8 && holder.x <= possible_target.x)) //Ignore targets that are behind you
continue
if(can_attack(possible_target)) // Can we attack it?
. += possible_target

View File

@@ -90,14 +90,23 @@
threaten_delay = 30 SECONDS // Mercs will give you 30 seconds to leave or get shot.
use_astar = TRUE //CHOMPEdit
/datum/ai_holder/simple_mob/merc/guard_limit
guard_limit = TRUE
/datum/ai_holder/simple_mob/merc/ranged
pointblank = TRUE // They get close? Just shoot 'em!
firing_lanes = TRUE // But not your buddies!
conserve_ammo = TRUE // And don't go wasting bullets!
/datum/ai_holder/simple_mob/merc/ranged/guard_limit
guard_limit = TRUE
/datum/ai_holder/simple_mob/merc/ranged/sniper
vision_range = 14 // We're a person with a long-ranged gun.
/datum/ai_holder/simple_mob/merc/ranged/sniper/guard_limit
guard_limit = TRUE
/datum/ai_holder/simple_mob/merc/ranged/sniper/max_range(atom/movable/AM)
return holder.ICheckRangedAttack(AM) ? 14 : 1
@@ -448,3 +457,42 @@
/obj/item/grenade/spawnergrenade/manhacks/mercenary = 50,
/obj/item/grenade/spawnergrenade/manhacks/mercenary = 30
)
////////////////////////////////
// Stealth Mission Mercs
////////////////////////////////
// Most likely to drop a broken weapon matching them, if it's a gun.
/mob/living/simple_mob/humanoid/merc/melee/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/guard_limit
/mob/living/simple_mob/humanoid/merc/melee/sword/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/guard_limit
/mob/living/simple_mob/humanoid/merc/ranged/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/ranged/guard_limit
/mob/living/simple_mob/humanoid/merc/ranged/smg/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/ranged/guard_limit
/mob/living/simple_mob/humanoid/merc/ranged/laser/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/ranged/guard_limit
/mob/living/simple_mob/humanoid/merc/ranged/ionrifle/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/ranged/guard_limit
/mob/living/simple_mob/humanoid/merc/ranged/grenadier/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/ranged/guard_limit
/mob/living/simple_mob/humanoid/merc/ranged/rifle/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/ranged/guard_limit
/mob/living/simple_mob/humanoid/merc/ranged/rifle/mag/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/ranged/guard_limit
/mob/living/simple_mob/humanoid/merc/ranged/technician/poi/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/ranged/guard_limit
/mob/living/simple_mob/humanoid/merc/ranged/sniper/guard_limit
ai_holder_type = /datum/ai_holder/simple_mob/merc/ranged/sniper/guard_limit