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
@@ -43,7 +43,7 @@
to_chat(user, SPAN_WARNING("You break \the [src] apart, spilling its contents everywhere!"))
fuel = 0
new /obj/effect/decal/cleanable/greenglow(get_turf(user))
user.apply_effect((rand(15,30)),IRRADIATE,blocked = user.getarmor(null, "rad"))
user.apply_damage(rand(15,30), IRRADIATE, damage_flags = DAM_DISPERSED)
qdel(src)
return
@@ -49,9 +49,7 @@
damage_coef -= 0.2
return
var/armor_block = H.run_armor_check(affecting, "melee")
if(H.apply_damage(25 * damage_coef, BRUTE, affecting, armor_block))
if(H.apply_damage(25 * damage_coef, BRUTE, affecting))
H.updatehealth()
if(H.can_feel_pain())
@@ -32,7 +32,9 @@ Protectiveness | Armor %
icon_state = "material_armor"
item_state = "material_armor"
contained_sprite = 1
armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
armor = list(
melee = ARMOR_MELEE_MINOR
)
pocket_slots = 1
/obj/item/clothing/suit/armor/material/makeshift/plasteel
@@ -96,7 +98,9 @@ Protectiveness | Armor %
)
icon_state = "bucket"
item_state = "bucket"
armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
armor = list(
melee = ARMOR_MELEE_MINOR
)
contained_sprite = 1
/obj/item/clothing/head/helmet/bucket/wood
@@ -36,7 +36,7 @@
return 0
/obj/item/material/sword/perform_technique(var/mob/living/carbon/human/target, var/mob/living/carbon/human/user, var/target_zone)
var/armor_reduction = target.run_armor_check(target_zone,"melee")
var/armor_reduction = target.get_blocked_ratio(target_zone, BRUTE, DAM_EDGE|DAM_SHARP, damage = force)*100
var/obj/item/organ/external/affecting = target.get_organ(target_zone)
if(!affecting)
return
@@ -195,10 +195,6 @@
if(status)
deductcharge(hitcost)
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.forcesay(hit_appends)
return 1
/obj/item/melee/baton/emp_act(severity)
@@ -102,9 +102,7 @@
if(user.a_intent == I_DISARM)
if(ishuman(target))
var/mob/living/carbon/human/T = target
var/armor = T.run_armor_check(target_zone,"melee")
T.apply_damage(40, PAIN, target_zone, armor)
T.apply_damage(40, PAIN, target_zone)
return
else
return ..()
+5 -14
View File
@@ -15,7 +15,7 @@
matter = list(DEFAULT_WALL_MATERIAL = 18750)
var/deployed = FALSE
var/time_to_escape = 60
var/ignore_armor = FALSE
var/activated_armor_penetration = 0
/obj/item/trap/proc/can_use(mob/user)
return (user.IsAdvancedToolUser() && !issilicon(user) && !user.stat && !user.restrained())
@@ -98,18 +98,9 @@
else
target_zone = pick(BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG)
if(!ignore_armor)
//armor
var/blocked = L.run_armor_check(target_zone, "melee")
if(blocked >= 100)
return
var/success = L.apply_damage(30, BRUTE, target_zone, blocked, src)
if(!success)
return FALSE
else
var/success = L.apply_damage(30, BRUTE, target_zone, 0, src)
if(!success)
return FALSE
var/success = L.apply_damage(30, BRUTE, target_zone, used_weapon = src, armor_pen = activated_armor_penetration)
if(!success)
return FALSE
var/did_trap = TRUE
if(ishuman(L))
@@ -156,7 +147,7 @@
/obj/item/trap/sharpened
name = "sharpened mechanical trap"
desc_antag = "This device has an even higher chance of penetrating armor and locking foes in place."
ignore_armor = TRUE
activated_armor_penetration = 100
/obj/item/trap/animal
name = "small trap"
@@ -243,7 +243,7 @@
species_restricted = list(BODYTYPE_VAURCA,BODYTYPE_VAURCA_WARFORM)
sprite_sheets = list(
BODYTYPE_VAURCA_WARFORM = 'icons/mob/species/warriorform/shoes.dmi'
)
)
action_button_name = "Toggle the magclaws"
@@ -257,8 +257,13 @@
slowdown = -1
species_restricted = list(BODYTYPE_VAURCA)
armor = list(melee = 50, bullet = 20, laser = 50, energy = 30, bomb = 45, bio = 100, rad = 10)
armor = list(
melee = ARMOR_MELEE_RESISTANT,
bullet = ARMOR_BALLISTIC_SMALL,
laser = ARMOR_LASER_SMALL,
bomb = ARMOR_BOMB_PADDED,
bio = ARMOR_BIO_SHIELDED
)
/obj/item/clothing/head/helmet/space/void/scout
name = "scout helmet"
desc = "A helmet designed for K'laxan scouts, made of lightweight sturdy material that does not restrict movement."
@@ -268,8 +273,13 @@
item_state = "helm_scout"
species_restricted = list(BODYTYPE_VAURCA)
armor = list(melee = 40, bullet = 20, laser = 40, energy = 30, bomb = 45, bio = 100, rad = 10)
armor = list(
melee = ARMOR_MELEE_RESISTANT,
bullet = ARMOR_BALLISTIC_SMALL,
laser = ARMOR_LASER_SMALL,
bomb = ARMOR_BOMB_PADDED,
bio = ARMOR_BIO_SHIELDED
)
light_overlay = "helmet_light_dual_green"
light_color = "#3e7c3e"
@@ -282,8 +292,14 @@
desc = "A design perfected by the Zo'ra, this helmet is commonly used by frontline warriors of a hive. Ablative design deflects lasers away from the body while providing moderate physical protection."
species_restricted = list(BODYTYPE_VAURCA)
armor = list(melee = 40, bullet = 40, laser = 60, energy = 50, bomb = 45, bio = 100, rad = 10)
armor = list(
melee = ARMOR_MELEE_RESISTANT,
bullet = ARMOR_BALLISTIC_RESISTANT,
laser = ARMOR_LASER_MAJOR,
bomb = ARMOR_BOMB_PADDED,
bio = ARMOR_BIO_SHIELDED,
rad = ARMOR_RAD_MINOR
)
/obj/item/clothing/head/helmet/space/void/commando
name = "commando helmet"
desc = "A design perfected by the Zo'ra, this helmet is commonly used by frontline warriors of a hive. Ablative design deflects lasers away from the body while providing moderate physical protection."
@@ -293,7 +309,14 @@
item_state = "helm_commando"
species_restricted = list(BODYTYPE_VAURCA)
armor = list(melee = 30, bullet = 30, laser = 60, energy = 50, bomb = 45, bio = 100, rad = 10)
armor = list(
melee = ARMOR_MELEE_RESISTANT,
bullet = ARMOR_BALLISTIC_RESISTANT,
laser = ARMOR_LASER_MAJOR,
bomb = ARMOR_BOMB_PADDED,
bio = ARMOR_BIO_SHIELDED,
rad = ARMOR_RAD_MINOR
)
light_overlay = "helmet_light_dual_green"
light_color = "#3e7c3e"
@@ -307,7 +330,13 @@
gas_filter_strength = 3
w_class = ITEMSIZE_SMALL
filtered_gases = list(GAS_NITROGEN, GAS_N2O)
armor = list(melee = 25, bullet = 10, laser = 25, energy = 25, bomb = 0, bio = 50, rad = 15)
armor = list(
melee = ARMOR_MELEE_RESISTANT,
bullet = ARMOR_BALLISTIC_MINOR,
laser = ARMOR_LASER_SMALL,
bio = ARMOR_BIO_STRONG,
rad = ARMOR_RAD_MINOR
)
icon = 'icons/obj/vaurca_items.dmi'
icon_state = "m_metalg"
item_state = "m_metalg"