Update retaliate.dm
This commit is contained in:
@@ -1,52 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
/mob/living/simple_animal/hostile/retaliate
|
||||
var/list/enemies = list()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/Found(atom/A)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(!L.stat)
|
||||
return L
|
||||
else
|
||||
enemies -= L
|
||||
else if(istype(A, /obj/mecha))
|
||||
var/obj/mecha/M = A
|
||||
if(M.occupant)
|
||||
return A
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/ListTargets()
|
||||
if(!enemies.len)
|
||||
return list()
|
||||
var/list/see = ..()
|
||||
see &= enemies // Remove all entries that aren't in enemies
|
||||
return see
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/proc/Retaliate()
|
||||
var/list/around = view(src, vision_range)
|
||||
|
||||
for(var/atom/movable/A in around)
|
||||
if(A == src)
|
||||
continue
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
if(faction_check_mob(M) && attack_same || !faction_check_mob(M))
|
||||
enemies |= M
|
||||
else if(istype(A, /obj/mecha))
|
||||
var/obj/mecha/M = A
|
||||
if(M.occupant)
|
||||
enemies |= M
|
||||
enemies |= M.occupant
|
||||
|
||||
for(var/mob/living/simple_animal/hostile/retaliate/H in around)
|
||||
if(faction_check_mob(H) && !attack_same && !H.attack_same)
|
||||
H.enemies |= enemies
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
. = ..()
|
||||
if(. > 0 && stat == CONSCIOUS)
|
||||
Retaliate()
|
||||
=======
|
||||
/mob/living/simple_animal/hostile/retaliate
|
||||
var/list/enemies = list()
|
||||
|
||||
@@ -94,4 +45,3 @@
|
||||
. = ..()
|
||||
if(. > 0 && stat == CONSCIOUS)
|
||||
Retaliate()
|
||||
>>>>>>> cc30923... ismecha define (#31192)
|
||||
|
||||
Reference in New Issue
Block a user