Reworks armor damage reduction + armor components + more goodies. (#11106)

Ports Baystation12/Baystation12#27254 and Baystation12/Baystation12#24787 and everything inbetween I guess.

Note that this PR makes guns and armor overall stronger. Lasers also once again do organ damage.
This commit is contained in:
Matt Atlas
2021-02-14 17:54:45 +02:00
committed by GitHub
parent 3ab59b8ff7
commit c30cd94024
138 changed files with 2187 additions and 848 deletions
+3 -4
View File
@@ -278,22 +278,21 @@
qdel(G) //gotta delete it here because if window breaks, it won't get deleted
var/def_zone = ran_zone(BP_HEAD, 20)
var/blocked = M.run_armor_check(def_zone, "melee")
switch (state)
if(1)
M.visible_message(SPAN_WARNING("[user] slams [M] against \the [src]!"))
M.apply_damage(7, damtype, def_zone, blocked, src)
M.apply_damage(7, damtype, def_zone, used_weapon = src)
hit(10)
if(2)
M.visible_message(SPAN_DANGER("[user] bashes [M] against \the [src]!"))
if (prob(50))
M.Weaken(1)
M.apply_damage(10, damtype, def_zone, blocked, src)
M.apply_damage(10, damtype, def_zone, used_weapon = src)
hit(25)
if(3)
M.visible_message(SPAN_DANGER("<big>[user] crushes [M] against \the [src]!</big>"))
M.Weaken(5)
M.apply_damage(20, damtype, def_zone, blocked, src)
M.apply_damage(20, damtype, def_zone, used_weapon = src)
hit(50)
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)