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
+1 -1
View File
@@ -211,7 +211,7 @@
if(!material.radioactivity)
return
for(var/mob/living/L in range(1,src))
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
L.apply_damage(round(material.radioactivity/3),IRRADIATE, damage_flags = DAM_DISPERSED)
/obj/structure/simple_door/iron/New(var/newloc,var/material_name, var/complexity)
..(newloc, MATERIAL_IRON, complexity)
@@ -157,21 +157,19 @@
var/mob/living/occupant = unbuckle_mob()
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, blocked)
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone, blocked)
occupant.apply_effect(6, STUN)
occupant.apply_effect(6, WEAKEN)
occupant.apply_effect(6, STUTTER)
occupant.apply_damage(10, BRUTE, def_zone)
playsound(src.loc, "punch", 50, 1, -1)
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/victim = A
def_zone = ran_zone()
blocked = victim.run_armor_check(def_zone, "melee")
victim.apply_effect(6, STUN, blocked)
victim.apply_effect(6, WEAKEN, blocked)
victim.apply_effect(6, STUTTER, blocked)
victim.apply_damage(10, BRUTE, def_zone, blocked)
victim.apply_effect(6, STUN)
victim.apply_effect(6, WEAKEN)
victim.apply_effect(6, STUTTER)
victim.apply_damage(10, BRUTE, def_zone)
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
/obj/structure/bed/chair/office/light
@@ -115,8 +115,8 @@
dismantle()
qdel(src)
var/blocked = target.run_armor_check(hit_zone, "melee")
target.Weaken(10 * BLOCKED_MULT(blocked))
var/blocked = target.get_blocked_ratio(hit_zone, BRUTE)
target.Weaken(10 * (1 - blocked))
target.apply_damage(20, BRUTE, hit_zone, blocked, src)
return
@@ -150,21 +150,19 @@
occupant.throw_at(A, 3, propelled)
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, blocked)
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone, blocked)
occupant.apply_effect(6, STUN)
occupant.apply_effect(6, WEAKEN)
occupant.apply_effect(6, STUTTER)
occupant.apply_damage(10, BRUTE, def_zone)
playsound(src.loc, "punch", 50, 1, -1)
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/victim = A
def_zone = ran_zone()
blocked = victim.run_armor_check(def_zone, "melee")
victim.apply_effect(6, STUN, blocked)
victim.apply_effect(6, WEAKEN, blocked)
victim.apply_effect(6, STUTTER, blocked)
victim.apply_damage(10, BRUTE, def_zone, blocked)
victim.apply_effect(6, STUN)
victim.apply_effect(6, WEAKEN)
victim.apply_effect(6, STUTTER)
victim.apply_damage(10, BRUTE, def_zone)
if(pulling)
occupant.visible_message("<span class='danger'>[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!</span>")
+1 -2
View File
@@ -119,8 +119,7 @@
to_chat(user, SPAN_NOTICE("[GM.name] needs to be on the urinal."))
return
user.visible_message(SPAN_DANGER("[user] slams [GM.name] into the [src]!"), SPAN_NOTICE("You slam [GM.name] into the [src]!"))
var/blocked = GM.run_armor_check("melee")
GM.apply_damage(8, def_zone = BP_HEAD, blocked = blocked, used_weapon = "blunt force")
GM.apply_damage(8, def_zone = BP_HEAD, used_weapon = "blunt force")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN * 1.5)
else
to_chat(user, SPAN_NOTICE("You need a tighter grip."))
+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)