Merge pull request #7984 from Birdtalon/swarming

AI Damage Sanity check (Prevents swarmers killing it)
This commit is contained in:
Fox McCloud
2017-08-15 22:27:49 -04:00
committed by GitHub
+13 -1
View File
@@ -706,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)