mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 13:47:33 +01:00
[MIRROR] You don't have to fight in the belly if you don't want to (#7032)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
co-authored by
Heroman3003
CHOMPStation2
parent
c98d4d37d2
commit
2e95447d91
@@ -17,6 +17,9 @@
|
||||
if(holder.instasis()) // In a stasis field.
|
||||
ai_log("can_act() : In a stasis field.", AI_LOG_TRACE)
|
||||
return FALSE
|
||||
if(!belly_attack)
|
||||
if(isbelly(holder.loc))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// Test if we should switch to STANCE_DISABLE.
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/vore_hostile = FALSE // The same as hostile, but with vore pref checks
|
||||
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/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.
|
||||
@@ -122,7 +123,9 @@
|
||||
/datum/ai_holder/proc/can_attack(atom/movable/the_target, var/vision_required = TRUE)
|
||||
if(!can_see_target(the_target) && vision_required)
|
||||
return FALSE
|
||||
|
||||
if(!belly_attack)
|
||||
if(isbelly(holder.loc))
|
||||
return FALSE
|
||||
if(isliving(the_target))
|
||||
var/mob/living/L = the_target
|
||||
if(ishuman(L) || issilicon(L))
|
||||
@@ -263,6 +266,9 @@
|
||||
if(!hostile && !retaliate) // Not allowed to defend ourselves.
|
||||
ai_log("react_to_attack() : Was attacked by [attacker], but we are not allowed to attack back.", AI_LOG_TRACE)
|
||||
return FALSE
|
||||
if(!belly_attack)
|
||||
if(isbelly(holder.loc))
|
||||
return FALSE
|
||||
if(holder.IIsAlly(attacker)) // I'll overlook it THIS time...
|
||||
ai_log("react_to_attack() : Was attacked by [attacker], but they were an ally.", AI_LOG_TRACE)
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user