mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
sanity checking for AI damage
This commit is contained in:
@@ -697,9 +697,6 @@ var/list/ai_verbs_default = list(
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M)
|
||||
if(istype(M, /mob/living/simple_animal/hostile/swarmer)) //Swarmers shouldn't be killing the AI
|
||||
to_chat(M, "<span class='warning'>Your shock has no effect on [src]!</span>")
|
||||
return
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.custom_emote(1, "[M.friendly] [src]")
|
||||
else
|
||||
@@ -709,7 +706,19 @@ var/list/ai_verbs_default = list(
|
||||
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!")
|
||||
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
switch(M.melee_damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage)
|
||||
if(BURN)
|
||||
adjustFireLoss(damage)
|
||||
if(TOX)
|
||||
adjustToxLoss(damage)
|
||||
if(OXY)
|
||||
adjustOxyLoss(damage)
|
||||
if(CLONE)
|
||||
adjustCloneLoss(damage)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/ai/reset_perspective(atom/A)
|
||||
|
||||
Reference in New Issue
Block a user