Merge pull request #9894 from Putnam3145/real-explosion-fix

[TESTMERGE] Explosion/bomb armor rework
This commit is contained in:
BlackMajor
2019-12-13 10:20:33 +13:00
committed by GitHub
@@ -388,43 +388,34 @@
return
var/b_loss = 0
var/f_loss = 0
var/bomb_armor = getarmor(null, "bomb")
var/bomb_armor = max(0,(100-getarmor(null, "bomb"))/100)
switch (severity)
if (1)
if(prob(bomb_armor))
b_loss = 500
if(bomb_armor)
b_loss = 500*bomb_armor
var/atom/throw_target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
throw_at(throw_target, 200, 4)
damage_clothes(400 - bomb_armor, BRUTE, "bomb")
damage_clothes(400*bomb_armor, BRUTE, "bomb")
else
for(var/I in contents)
var/atom/A = I
A.ex_act(severity)
damage_clothes(400,BRUTE,"bomb")
gib()
return
if (2)
b_loss = 60
f_loss = 60
if(bomb_armor)
b_loss = 30*(2 - round(bomb_armor*0.01, 0.05))
f_loss = b_loss
damage_clothes(200 - bomb_armor, BRUTE, "bomb")
b_loss = 60*bomb_armor
f_loss = 60*bomb_armor
damage_clothes(200*bomb_armor, BRUTE, "bomb")
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
adjustEarDamage(30, 120)
if (prob(max(70 - (bomb_armor * 0.5), 0)))
Unconscious(200)
Unconscious(200*bomb_armor)
if(3)
b_loss = 30
if(bomb_armor)
b_loss = 15*(2 - round(bomb_armor*0.01, 0.05))
b_loss = 30*bomb_armor
damage_clothes(max(50 - bomb_armor, 0), BRUTE, "bomb")
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
adjustEarDamage(15,60)
if (prob(max(50 - (bomb_armor * 0.5), 0)))
Unconscious(160)
Unconscious(100*bomb_armor)
take_overall_damage(b_loss,f_loss)