Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
Reo Lozzot
2025-10-27 02:58:37 -04:00
committed by GitHub
co-authored by Cameron Lennox
parent c42dfc3efc
commit ceb33e3e7d
56 changed files with 75 additions and 497 deletions
+3 -6
View File
@@ -126,16 +126,13 @@ Contains helper procs for airflow, handled in /connection_group.
var/b_loss = airflow_speed * vsc.airflow_damage
var/blocked = run_armor_check(BP_HEAD,"melee")
var/soaked = get_armor_soak(BP_HEAD,"melee")
apply_damage(b_loss/3, BRUTE, BP_HEAD, blocked, soaked, 0)
apply_damage(b_loss/3, BRUTE, BP_HEAD, blocked, 0)
blocked = run_armor_check(BP_TORSO,"melee")
soaked = get_armor_soak(BP_TORSO,"melee")
apply_damage(b_loss/3, BRUTE, BP_TORSO, blocked, soaked, 0)
apply_damage(b_loss/3, BRUTE, BP_TORSO, blocked, 0)
blocked = run_armor_check(BP_GROIN,"melee")
soaked = get_armor_soak(BP_GROIN,"melee")
apply_damage(b_loss/3, BRUTE, BP_GROIN, blocked, soaked, 0)
apply_damage(b_loss/3, BRUTE, BP_GROIN, blocked, 0)
if(airflow_speed > 10)
Paralyse(round(airflow_speed * vsc.airflow_stun))
+7 -7
View File
@@ -426,10 +426,10 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
//Always check these damage procs first if fire damage isn't working. They're probably what's wrong.
apply_damage(2.5*mx*head_exposure, BURN, BP_HEAD, 0, 0)
apply_damage(2.5*mx*chest_exposure, BURN, BP_TORSO, 0, 0)
apply_damage(2.0*mx*groin_exposure, BURN, BP_GROIN, 0, 0)
apply_damage(0.6*mx*legs_exposure, BURN, BP_L_LEG, 0, 0)
apply_damage(0.6*mx*legs_exposure, BURN, BP_R_LEG, 0, 0)
apply_damage(0.4*mx*arms_exposure, BURN, BP_L_ARM, 0, 0)
apply_damage(0.4*mx*arms_exposure, BURN, BP_R_ARM, 0, 0)
apply_damage(2.5*mx*head_exposure, BURN, BP_HEAD, 0)
apply_damage(2.5*mx*chest_exposure, BURN, BP_TORSO, 0)
apply_damage(2.0*mx*groin_exposure, BURN, BP_GROIN, 0)
apply_damage(0.6*mx*legs_exposure, BURN, BP_L_LEG, 0)
apply_damage(0.6*mx*legs_exposure, BURN, BP_R_LEG, 0)
apply_damage(0.4*mx*arms_exposure, BURN, BP_L_ARM, 0)
apply_damage(0.4*mx*arms_exposure, BURN, BP_R_ARM, 0)
@@ -1,13 +1,13 @@
///from base of /mob/verb/pointed: (atom/A)
#define COMSIG_MOB_POINTED "mob_pointed"
/// from /mob/living/proc/apply_damage(): (damage, damagetype, def_zone, blocked, soaked, sharp, edge, used_weapon, projectile)
/// from /mob/living/proc/apply_damage(): (damage, damagetype, def_zone, blocked, sharp, edge, used_weapon, projectile)
/// allows you to add multiplicative damage modifiers to the damage mods argument to adjust incoming damage... UNUSED ATM
/// not sent if the apply damage call was forced
#define COMSIG_MOB_APPLY_DAMAGE_MODIFIERS "mob_apply_damage_modifiers"
/// from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone, blocked, soaked, sharp, edge, used_weapon, projectile)
/// from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone, blocked, sharp, edge, used_weapon, projectile)
#define COMSIG_MOB_APPLY_DAMAGE "mob_apply_damage"
/// from /mob/living/proc/apply_damage(): (damage, damagetype, def_zone, blocked, soaked, sharp, edge, /obj/used_weapon, projectile)
/// from /mob/living/proc/apply_damage(): (damage, damagetype, def_zone, blocked, sharp, edge, /obj/used_weapon, projectile)
/// works like above but after the damage is actually inflicted
#define COMSIG_MOB_AFTER_APPLY_DAMAGE "mob_after_apply_damage"
///from end of revival_healing_action(): ()
+1 -1
View File
@@ -44,7 +44,7 @@
var/covered = H.get_coverage()
for(var/K in damageable)
if(!(K in covered))
H.apply_damage(light_amount * damage_rate, BURN, K, 0, 0)
H.apply_damage(light_amount * damage_rate, BURN, K, 0)
else
owner.take_overall_damage(light_amount * damage_rate,light_amount * damage_rate)
-1
View File
@@ -59,7 +59,6 @@
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
var/canremove = TRUE //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
var/list/armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0)
var/list/armorsoak = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
var/zoomdevicename = null //name used for message when binoculars/scope is used
+1 -1
View File
@@ -195,7 +195,7 @@
H.eye_blurry = max(H.eye_blurry, flash_strength + 5)
H.flash_eyes()
H.adjustHalLoss(halloss_per_flash * (flash_strength / 5)) // Should take four flashes to stun.
H.apply_damage(flash_strength * H.species.flash_burn/5, BURN, BP_HEAD, 0, 0)
H.apply_damage(flash_strength * H.species.flash_burn/5, BURN, BP_HEAD, 0)
else
flashfail = 1
@@ -34,9 +34,8 @@
for(var/mob/living/L in loc)
var/target_zone = ran_zone()
var/blocked = L.run_armor_check(target_zone, "melee")
var/soaked = L.get_armor_soak(target_zone, "melee")
if(!L.apply_damage(35, BRUTE, target_zone, blocked, soaked))
if(!L.apply_damage(35, BRUTE, target_zone, blocked))
break
playsound(src, 'sound/effects/clang2.ogg', 50, 1)
qdel(src)
@@ -89,7 +89,7 @@
if(user.gloves && !protected_hands)
to_chat(user, span_warning("\The [src] partially cuts into your hand through your gloves as you hit \the [target]!"))
user.apply_damage(light_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, 0, src.sharp, src.edge, src) // Ternary to include break damage
user.apply_damage(light_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, src.sharp, src.edge, src) // Ternary to include break damage
else if(!user.gloves)
to_chat(user, span_warning("\The [src] cuts into your hand as you hit \the [target]!"))
+2 -10
View File
@@ -98,15 +98,11 @@
//armour
var/blocked = L.run_armor_check(target_zone, "melee")
var/soaked = L.get_armor_soak(target_zone, "melee")
if(blocked >= 100)
return
if(soaked >= 30)
return
if(!L.apply_damage(30, BRUTE, target_zone, blocked, soaked, used_weapon=src))
if(!L.apply_damage(30, BRUTE, target_zone, blocked, used_weapon=src))
return 0
if(ishuman(L))
@@ -347,14 +343,10 @@
//armour
var/blocked = L.run_armor_check(target_zone, "melee")
var/soaked = L.get_armor_soak(target_zone, "melee")
if(blocked >= 100)
return
if(soaked >= 30)
return
if(L.buckled) //wheelchairs, office chairs, rollerbeds
return
@@ -362,7 +354,7 @@
L.add_modifier(/datum/modifier/entangled, 3 SECONDS)
if(!L.apply_damage(force * (issilicon(L) ? 0.25 : 1), BRUTE, target_zone, blocked, soaked, sharp, edge, src))
if(!L.apply_damage(force * (issilicon(L) ? 0.25 : 1), BRUTE, target_zone, blocked, sharp, edge, src))
return
playsound(src, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
+1 -2
View File
@@ -240,9 +240,8 @@ two tiles on initialization, and which way a cliff is facing may change during m
var/damage = between(20, L.getMaxHealth() * 0.4, 100)
var/target_zone = ran_zone()
var/blocked = L.run_armor_check(target_zone, "melee") * harm
var/soaked = L.get_armor_soak(target_zone, "melee") * harm
L.apply_damage(damage * harm, BRUTE, target_zone, blocked, soaked, used_weapon=src)
L.apply_damage(damage * harm, BRUTE, target_zone, blocked, used_weapon=src)
// Now fall off more cliffs below this one if they exist.
var/obj/structure/cliff/bottom_cliff = locate() in T
@@ -211,22 +211,20 @@
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
var/soaked = occupant.get_armor_soak(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, soaked)
occupant.apply_damage(10, BRUTE, def_zone, blocked)
playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(isliving(A))
var/mob/living/victim = A
def_zone = ran_zone()
blocked = victim.run_armor_check(def_zone, "melee")
soaked = victim.get_armor_soak(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, soaked)
victim.apply_damage(10, BRUTE, def_zone, blocked)
occupant.visible_message(span_danger("[occupant] crashed into \the [A]!"))
/obj/structure/bed/chair/office/light
@@ -190,22 +190,20 @@
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
var/soaked = occupant.get_armor_soak(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, soaked)
occupant.apply_damage(10, BRUTE, def_zone)
playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(isliving(A))
var/mob/living/victim = A
def_zone = ran_zone()
blocked = victim.run_armor_check(def_zone, "melee")
soaked = victim.get_armor_soak(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, soaked)
victim.apply_damage(10, BRUTE, def_zone)
if(pulling)
occupant.visible_message(span_danger("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!"))
@@ -104,14 +104,12 @@
desc = "A mesh armor plate made of steel-reinforced synthetic fibers, great for dealing with small blades. Attaches to a plate carrier."
icon_state = "armor_stab"
armor = list(melee = 30, bullet = 5, laser = 20, energy = 10, bomb = 15, bio = 0, rad = 0)
armorsoak = list(melee = 7, bullet = 5, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/accessory/armor/armorplate/blast
name = "gel armor plate"
desc = "A gel armor plate made of high-grade polymers, great for dealing with localized blasts. Attaches to a plate carrier."
icon_state = "armor_blast"
armor = list(melee = 25, bullet = 25, laser = 10, energy = 0, bomb = 30, bio = 0, rad = 0)
armorsoak = list(melee = 5, bullet = 7, laser = 0, energy = 0, bomb = 40, bio = 0, rad = 0)
/obj/item/clothing/accessory/armor/armorplate/medium
name = "medium armor plate"
@@ -137,7 +135,6 @@
icon_state = "armor_ballistic"
slowdown = 0.5
armor = list(melee = 10, bullet = 70, laser = 10, energy = 10, bomb = 0, bio = 0, rad = 0)
armorsoak = list(melee = 0, bullet = 10, laser = 0, energy = 5, bomb = 0, bio = 0, rad = 0)
siemens_coefficient = 0.7
/obj/item/clothing/accessory/armor/armorplate/riot
@@ -146,7 +143,6 @@
icon_state = "armor_riot"
slowdown = 0.5
armor = list(melee = 70, bullet = 10, laser = 10, energy = 10, bomb = 0, bio = 0, rad = 0)
armorsoak = list(melee = 10, bullet = 0, laser = 0, energy = 5, bomb = 0, bio = 0, rad = 0)
siemens_coefficient = 0.7
/obj/item/clothing/accessory/armor/armorplate/laserproof
@@ -155,7 +151,6 @@
icon_state = "armor_ablative"
slowdown = 0.5
armor = list(melee = 10, bullet = 10, laser = 70, energy = 50, bomb = 0, bio = 0, rad = 0)
armorsoak = list(melee = 0, bullet = 0, laser = 10, energy = 15, bomb = 0, bio = 0, rad = 0)
siemens_coefficient = 0.1
/obj/item/clothing/accessory/armor/armorplate/ablative/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
@@ -161,7 +161,6 @@
piece.permeability_coefficient = permeability_coefficient
piece.unacidable = unacidable
if(islist(armor)) piece.armor = armor.Copy()
if(islist(armorsoak)) piece.armorsoak = armorsoak.Copy()
update_icon(1)
@@ -1143,7 +1143,6 @@
/obj/item/clothing/under/explorer/armored
desc = "A green uniform for operating in hazardous environments. This one looks like it's been modified."
armor = list(melee = 10, bullet = 10, laser = 10,energy = 10, bomb = 10, bio = 10, rad = 30)
armorsoak = list(melee = 5, bullet = 5, laser = 5,energy = 5, bomb = 5, bio = 5, rad = 0)
/obj/item/clothing/under/cohesion
name = "black cohesion suit"
+1 -5
View File
@@ -172,7 +172,6 @@
return TRUE
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting))
var/armor_block = target.run_armor_check(affecting, "melee")
var/armor_soak = target.get_armor_soak(affecting, "melee")
if(HULK in user.mutations)
damage += 5
@@ -181,10 +180,7 @@
target.visible_message(span_bolddanger("[user] has punched [target]!"))
if(armor_soak >= damage)
return TRUE
target.apply_damage(damage, HALLOSS, affecting, armor_block, armor_soak)
target.apply_damage(damage, HALLOSS, affecting, armor_block)
if(damage >= 9)
target.visible_message(span_bolddanger("[user] has weakened [target]!"))
target.apply_effect(4, WEAKEN, armor_block)
+2 -3
View File
@@ -129,7 +129,6 @@
if(!target_limb) target_limb = pick(BP_ALL)
var/blocked = target.run_armor_check(target_limb, "melee")
var/soaked = target.get_armor_soak(target_limb, "melee")
if(blocked >= 100)
return
@@ -143,7 +142,7 @@
if(affecting)
to_chat(target, span_danger("\The [fruit]'s thorns pierce your [affecting.name] greedily!"))
target.apply_damage(damage, BRUTE, target_limb, blocked, soaked, TRUE, has_edge)
target.apply_damage(damage, BRUTE, target_limb, blocked, TRUE, has_edge)
else
to_chat(target, span_danger("\The [fruit]'s thorns pierce your flesh greedily!"))
target.adjustBruteLoss(damage)
@@ -152,7 +151,7 @@
has_edge = prob(get_trait(TRAIT_POTENCY)/5)
if(affecting)
to_chat(target, span_danger("\The [fruit]'s thorns dig deeply into your [affecting.name]!"))
target.apply_damage(damage, BRUTE, target_limb, blocked, soaked, TRUE, has_edge)
target.apply_damage(damage, BRUTE, target_limb, blocked, TRUE, has_edge)
else
to_chat(target, span_danger("\The [fruit]'s thorns dig deeply into your flesh!"))
target.adjustBruteLoss(damage)
-1
View File
@@ -57,7 +57,6 @@
// Note that these are combined with the mob's real armor values additatively. You can also omit specific armor types.
var/list/armor_percent = null // List of armor values to add to the holder when doing armor calculations. This is for percentage based armor. E.g. 50 = half damage.
var/list/armor_flat = null // Same as above but only for flat armor calculations. E.g. 5 = 5 less damage (this comes after percentage).
// Unlike armor, this is multiplicative. Two 50% protection modifiers will be combined into 75% protection (assuming no base protection on the mob).
var/heat_protection = null // Modifies how 'heat' protection is calculated, like wearing a firesuit. 1 = full protection.
var/cold_protection = null // Ditto, but for cold, like wearing a winter coat.
@@ -4,14 +4,10 @@
return null
..()
/mob/living/carbon/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/soaked, var/hit_zone)
/mob/living/carbon/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/hit_zone)
if(!effective_force || blocked >= 100)
return 0
//If the armor soaks all of the damage, it just skips the rest of the checks
if(effective_force <= soaked)
return 0
//Apply weapon damage
var/weapon_sharp = is_sharp(I)
var/weapon_edge = has_edge(I)
@@ -21,7 +17,7 @@
weapon_edge = 0
hit_embed_chance = I.force/(I.w_class*3)
apply_damage(effective_force, I.damtype, hit_zone, blocked, soaked, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I)
apply_damage(effective_force, I.damtype, hit_zone, blocked, weapon_sharp, weapon_edge, I)
//Melee weapon embedded object code.
if (I && I.damtype == BRUTE && !I.anchored && !is_robot_module(I) && I.embed_chance > 0)
@@ -222,11 +222,6 @@
if (prob(50) && !shielded)
Paralyse(10)
var/blastsoak = getsoak(null, "bomb")
b_loss = max(1, b_loss - blastsoak)
f_loss = max(1, f_loss - blastsoak)
var/update = 0
// focus most of the blast on one organ
@@ -399,12 +399,11 @@
real_damage = max(1, real_damage)
var/armour = run_armor_check(hit_zone, "melee")
var/soaked = get_armor_soak(hit_zone, "melee")
// Apply additional unarmed effects.
attack.apply_effects(H, src, armour, rand_damage, hit_zone)
// Finally, apply damage to target
apply_damage(real_damage, hit_dam_type, hit_zone, armour, soaked, sharp=attack.sharp, edge=attack.edge)
apply_damage(real_damage, hit_dam_type, hit_zone, armour, attack.sharp, attack.edge)
/// INTENTS END
@@ -432,8 +431,7 @@
var/dam_zone = pick(organs_by_name)
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor_block = run_armor_check(affecting, armor_type, armor_pen)
var/armor_soak = get_armor_soak(affecting, armor_type, armor_pen)
apply_damage(damage, BRUTE, affecting, armor_block, armor_soak, sharp = a_sharp, edge = a_edge)
apply_damage(damage, BRUTE, affecting, armor_block, a_sharp, a_edge)
updatehealth()
return TRUE
@@ -509,10 +509,10 @@ This function restores all organs.
return organs_by_name[zone]
*/
/mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null, var/projectile = FALSE)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone, blocked, soaked, sharp, edge, used_weapon, projectile)
/mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null, var/projectile = FALSE)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone, blocked, sharp, edge, used_weapon, projectile)
if(GLOB.Debug2)
log_world("## DEBUG: human/apply_damage() was called on [src], with [damage] damage, an armor value of [blocked], and a soak value of [soaked].")
log_world("## DEBUG: human/apply_damage() was called on [src], with [damage] damage, and an armor value of [blocked].")
var/obj/item/organ/external/organ = null
if(isorgan(def_zone))
organ = def_zone
@@ -573,7 +573,7 @@ This function restores all organs.
if((damage > 25 && prob(20)) || (damage > 50 && prob(60)))
if(organ && organ.organ_can_feel_pain() && !isbelly(loc) && !istype(loc, /obj/item/dogborg/sleeper)) //VOREStation Add
emote("scream")
..(damage, damagetype, def_zone, blocked, soaked)
..(damage, damagetype, def_zone, blocked)
return 1
//Handle BRUTE and BURN damage
@@ -582,18 +582,12 @@ This function restores all organs.
if(blocked >= 100)
return 0
if(soaked >= damage)
return 0
if(!organ) return 0
if(blocked)
blocked = (100-blocked)/100
damage = (damage * blocked)
if(soaked)
damage -= soaked
if(GLOB.Debug2)
log_world("## DEBUG: [src] was hit for [damage].")
@@ -636,5 +630,5 @@ This function restores all organs.
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
updatehealth()
BITSET(hud_updateflag, HEALTH_HUD)
SEND_SIGNAL(src, COMSIG_MOB_AFTER_APPLY_DAMAGE, damage, damagetype, def_zone, blocked, soaked, sharp, edge, used_weapon, projectile)
SEND_SIGNAL(src, COMSIG_MOB_AFTER_APPLY_DAMAGE, damage, damagetype, def_zone, blocked, sharp, edge, used_weapon, projectile)
return 1
@@ -111,29 +111,6 @@ emp_act
total += weight
return (armorval/max(total, 1))
//Like getarmor, but the value it returns will be numerical damage reduction
/mob/living/carbon/human/getsoak(var/def_zone, var/type)
var/soakval = 0
var/total = 0
if(def_zone)
if(isorgan(def_zone))
return getsoak_organ(def_zone, type)
var/obj/item/organ/external/affecting = get_organ(def_zone)
if(affecting)
return getsoak_organ(affecting, type)
//If a specific bodypart is targetted, check how that bodypart is protected and return the value.
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
for(var/organ_name in organs_by_name)
if (organ_name in organ_rel_size)
var/obj/item/organ/external/organ = organs_by_name[organ_name]
if(organ)
var/weight = organ_rel_size[organ_name]
soakval += getsoak_organ(organ, type) * weight
total += weight
return (soakval/max(total, 1))
//this proc returns the Siemens coefficient of electrical resistivity for a particular external organ.
/mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/obj/item/organ/external/def_zone)
if (!def_zone)
@@ -199,21 +176,6 @@ emp_act
return protection
/mob/living/carbon/human/proc/getsoak_organ(var/obj/item/organ/external/def_zone, var/type)
if(!type || !def_zone)
return 0
var/soaked = 0
var/list/protective_gear = def_zone.get_covering_clothing()
for(var/obj/item/clothing/gear in protective_gear)
soaked += gear.armorsoak[type]
for(var/datum/modifier/M as anything in modifiers)
var/modifier_armor = LAZYACCESS(M.armor_flat, type)
if(modifier_armor)
soaked += modifier_armor
return soaked
// Checked in borer code
/mob/living/carbon/human/proc/check_head_coverage()
var/obj/item/organ/external/H = organs_by_name[BP_HEAD]
@@ -278,15 +240,13 @@ emp_act
visible_message(span_danger("[src] has been [LAZYLEN(I.attack_verb) ? pick(I.attack_verb) : "attacked"] in the [affecting.name] with [I.name] by [user]!"))
var/soaked = get_armor_soak(hit_zone, "melee", I.armor_penetration)
var/blocked = run_armor_check(hit_zone, "melee", I.armor_penetration, "Your armor has protected your [affecting.name].", "Your armor has softened the blow to your [affecting.name].")
standard_weapon_hit_effects(I, user, effective_force, blocked, soaked, hit_zone)
standard_weapon_hit_effects(I, user, effective_force, blocked, hit_zone)
return blocked
/mob/living/carbon/human/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/soaked, var/hit_zone)
/mob/living/carbon/human/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/hit_zone)
var/obj/item/organ/external/affecting = get_organ(hit_zone)
if(!affecting)
return 0
@@ -297,17 +257,15 @@ emp_act
for(var/obj/item/clothing/C in clothing)
C.clothing_impact(I, effective_force)
if(soaked >= round(effective_force*0.8))
effective_force -= round(effective_force*0.8)
// Handle striking to cripple.
if(user.a_intent == I_DISARM)
effective_force *= 0.5 //reduced effective force...
if(!..(I, user, effective_force, blocked, soaked, hit_zone))
if(!..(I, user, effective_force, blocked, hit_zone))
return 0
//set the dislocate mult less than the effective force mult so that
//dislocating limbs on disarm is a bit easier than breaking limbs on harm
attack_joint(affecting, I, effective_force, 0.75, blocked, soaked) //...but can dislocate joints
attack_joint(affecting, I, effective_force, 0.75, blocked) //...but can dislocate joints
else if(!..())
return 0
@@ -337,7 +295,7 @@ emp_act
switch(hit_zone)
if(BP_HEAD)//Harder to score a stun but if you do it lasts a bit longer
if(prob(effective_force))
apply_effect(20, PARALYZE, blocked, soaked)
apply_effect(20, PARALYZE, blocked)
visible_message(span_danger("\The [src] has been knocked unconscious!"))
if(bloody)//Apply blood
if(wear_mask)
@@ -351,23 +309,20 @@ emp_act
update_inv_glasses(0)
if(BP_TORSO)//Easier to score a stun but lasts less time
if(prob(effective_force + 10))
apply_effect(6, WEAKEN, blocked, soaked)
apply_effect(6, WEAKEN, blocked)
visible_message(span_danger("\The [src] has been knocked down!"))
if(bloody)
bloody_body(src)
return 1
/mob/living/carbon/human/proc/attack_joint(var/obj/item/organ/external/organ, var/obj/item/W, var/effective_force, var/dislocate_mult, var/blocked, var/soaked)
/mob/living/carbon/human/proc/attack_joint(var/obj/item/organ/external/organ, var/obj/item/W, var/effective_force, var/dislocate_mult, var/blocked)
if(!organ || (organ.dislocated == 1) || (organ.dislocated == -1) || blocked >= 100) //VOREStation Edit Bugfix
return 0
if(W.damtype != BRUTE)
return 0
if(soaked >= round(effective_force*0.8))
effective_force -= round(effective_force*0.8)
//want the dislocation chance to be such that the limb is expected to dislocate after dealing a fraction of the damage needed to break the limb
var/dislocate_chance = effective_force/(dislocate_mult * organ.min_broken_damage * CONFIG_GET(number/organ_health_multiplier))*100
if(prob(dislocate_chance * (100 - blocked)/100))
@@ -481,15 +436,9 @@ emp_act
if(ismob(O.thrower))
add_attack_logs(O.thrower,src,"Hit with thrown [O.name]")
//If the armor absorbs all of the damage, skip the rest of the calculations
var/soaked = get_armor_soak(affecting, "melee", O.armor_penetration)
if(soaked >= throw_damage)
to_chat(src, span_warning("Your armor absorbs the force of [O.name]!"))
return
var/armor = run_armor_check(affecting, "melee", O.armor_penetration, "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here
if(armor < 100)
apply_damage(throw_damage, O.damtype, zone, armor, soaked, is_sharp(O), has_edge(O), O)
apply_damage(throw_damage, O.damtype, zone, armor, is_sharp(O), has_edge(O), O)
//thrown weapon embedded object code.
@@ -497,8 +446,6 @@ emp_act
if (!is_robot_module(O))
var/sharp = is_sharp(O)
var/damage = throw_damage
if(soaked)
damage -= soaked
if(armor)
damage /= armor+1
@@ -179,4 +179,4 @@
selfdamagezone=pick(BP_L_ARM, BP_L_HAND)
else
selfdamagezone=pick(BP_R_ARM, BP_R_HAND)
user.apply_damage(selfdamage, BRUTE, selfdamagezone, 0, 0, sharp=FALSE, edge=FALSE)
user.apply_damage(selfdamage, BRUTE, selfdamagezone, 0, FALSE, FALSE)
@@ -124,7 +124,7 @@
else
src.visible_message(span_infoplain(span_red(span_italics("[src] suddenly extends their fangs and plunges them down into [B]'s neck!"))), range = 1)
if(bleed)
B.apply_damage(10, BRUTE, BP_HEAD, blocked = 0, soaked = 0, sharp = TRUE, edge = FALSE)
B.apply_damage(10, BRUTE, BP_HEAD, blocked = 0, sharp = TRUE, edge = FALSE)
var/obj/item/organ/external/E = B.get_organ(BP_HEAD)
if(!(E.status & ORGAN_BLEEDING))
E.status |= ORGAN_BLEEDING //If 10 points of piercing didn't make the organ bleed, we are making it bleed.
+6 -11
View File
@@ -8,8 +8,8 @@
Returns
standard 0 if fail
*/
/mob/living/proc/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null, var/projectile = 0)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone, blocked, soaked, sharp, edge, used_weapon, projectile)
/mob/living/proc/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null, var/projectile = 0)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone, blocked, sharp, edge, used_weapon, projectile)
if(GLOB.Debug2)
log_world("## DEBUG: apply_damage() was called on [src], with [damage] damage, and an armor value of [blocked].")
if(!damage || (blocked >= 100))
@@ -61,11 +61,6 @@
else
damage = damage * M.effective_tox_resistance
continue
if(soaked)
if(soaked >= round(damage*0.8))
damage -= round(damage*0.8)
else
damage -= soaked
var/initial_blocked = blocked
@@ -79,8 +74,8 @@
adjustFireLoss(damage * blocked)
attempt_multishock(SHOCKFLAG_BURNDAMAGE)
if(SEARING)
apply_damage(round(damage / 3), BURN, def_zone, initial_blocked, soaked, sharp, edge, used_weapon)
apply_damage(round(damage / 3 * 2), BRUTE, def_zone, initial_blocked, soaked, sharp, edge, used_weapon)
apply_damage(round(damage / 3), BURN, def_zone, initial_blocked, sharp, edge, used_weapon)
apply_damage(round(damage / 3 * 2), BRUTE, def_zone, initial_blocked, sharp, edge, used_weapon)
if(TOX)
adjustToxLoss(damage * blocked)
if(OXY)
@@ -93,7 +88,7 @@
electrocute_act(damage, used_weapon, 1.0, def_zone)
if(BIOACID)
if(isSynthetic())
apply_damage(damage, BURN, def_zone, initial_blocked, soaked, sharp, edge, used_weapon) // Handle it as normal burn.
apply_damage(damage, BURN, def_zone, initial_blocked, sharp, edge, used_weapon) // Handle it as normal burn.
else
adjustToxLoss(damage * blocked)
if(ELECTROMAG)
@@ -124,7 +119,7 @@
emp_act(4)
flash_weak_pain()
updatehealth()
SEND_SIGNAL(src, COMSIG_MOB_AFTER_APPLY_DAMAGE, damage, damagetype, def_zone, blocked, soaked, sharp, edge, used_weapon, projectile)
SEND_SIGNAL(src, COMSIG_MOB_AFTER_APPLY_DAMAGE, damage, damagetype, def_zone, blocked, sharp, edge, used_weapon, projectile)
return 1
+8 -33
View File
@@ -77,21 +77,10 @@
return 0
*/
//Certain pieces of armor actually absorb flat amounts of damage from income attacks
/mob/living/proc/get_armor_soak(var/def_zone = null, var/attack_flag = "melee", var/armour_pen = 0)
var/soaked = getsoak(def_zone, attack_flag)
//5 points of armor pen negate one point of soak
if(armour_pen)
soaked = max(soaked - (armour_pen/5), 0)
return soaked
//if null is passed for def_zone, then this should return something appropriate for all zones (e.g. area effect damage)
/mob/living/proc/getarmor(var/def_zone, var/type)
return 0
/mob/living/proc/getsoak(var/def_zone, var/type)
return 0
// Clicking with an empty hand
/mob/living/attack_hand(mob/living/L)
..()
@@ -111,15 +100,10 @@
ai_holder.react_to_attack(P.firer)
//Armor
var/soaked = get_armor_soak(def_zone, P.check_armour, P.armor_penetration)
var/absorb = run_armor_check(def_zone, P.check_armour, P.armor_penetration)
var/proj_sharp = is_sharp(P)
var/proj_edge = has_edge(P)
if ((proj_sharp || proj_edge) && (soaked >= round(P.damage*0.8)))
proj_sharp = 0
proj_edge = 0
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.check_armour)))
proj_sharp = 0
proj_edge = 0
@@ -128,13 +112,13 @@
if(P.taser_effect)
stun_effect_act(0, P.agony, def_zone, P, electric = TRUE)
if(!P.nodamage)
apply_damage(P.damage, P.damage_type, def_zone, absorb, soaked, 0, sharp=proj_sharp, edge=proj_edge, used_weapon=P, projectile=TRUE)
apply_damage(P.damage, P.damage_type, def_zone, absorb, proj_sharp, proj_edge, P, TRUE)
qdel(P)
return
if(!P.nodamage)
apply_damage(P.damage, P.damage_type, def_zone, absorb, soaked, 0, sharp=proj_sharp, edge=proj_edge, used_weapon=P, projectile=TRUE)
P.on_hit(src, absorb, soaked, def_zone)
apply_damage(P.damage, P.damage_type, def_zone, absorb, proj_sharp, proj_edge, P, TRUE)
P.on_hit(src, absorb, def_zone)
if(absorb == 100)
return 2
@@ -211,13 +195,12 @@
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
//Armor
var/soaked = get_armor_soak(def_zone, armor_check, armor_pen)
var/absorb = run_armor_check(def_zone, armor_check, armor_pen)
if(ai_holder)
ai_holder.react_to_attack(B)
apply_damage(damage, damage_type, def_zone, absorb, soaked)
apply_damage(damage, damage_type, def_zone, absorb)
/mob/living/proc/resolve_item_attack(obj/item/I, mob/living/user, var/target_zone)
return target_zone
@@ -229,10 +212,9 @@
if(ai_holder)
ai_holder.react_to_attack(user)
var/soaked = get_armor_soak(hit_zone, "melee")
var/blocked = run_armor_check(hit_zone, "melee")
standard_weapon_hit_effects(I, user, effective_force, blocked, soaked, hit_zone)
standard_weapon_hit_effects(I, user, effective_force, blocked, hit_zone)
if(I.damtype == BRUTE && prob(33)) // Added blood for whacking non-humans too
var/turf/simulated/location = get_turf(src)
@@ -241,22 +223,18 @@
return blocked
//returns 0 if the effects failed to apply for some reason, 1 otherwise.
/mob/living/proc/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/soaked, var/hit_zone)
/mob/living/proc/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/hit_zone)
if(!effective_force || blocked >= 100)
return 0
//Apply weapon damage
var/weapon_sharp = is_sharp(I)
var/weapon_edge = has_edge(I)
if(getsoak(hit_zone, "melee",) - (I.armor_penetration/5) > round(effective_force*0.8)) //soaking a hit turns sharp attacks into blunt ones
weapon_sharp = 0
weapon_edge = 0
if(prob(max(getarmor(hit_zone, "melee") - I.armor_penetration, 0))) //melee armour provides a chance to turn sharp/edge weapon attacks into blunt ones
weapon_sharp = 0
weapon_edge = 0
apply_damage(effective_force, I.damtype, hit_zone, blocked, soaked, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I)
apply_damage(effective_force, I.damtype, hit_zone, blocked, weapon_sharp, weapon_edge, I)
return 1
@@ -282,10 +260,9 @@
src.visible_message(span_filter_warning("[span_red("[src] has been hit by [O].")]"))
var/armor = run_armor_check(null, "melee")
var/soaked = get_armor_soak(null, "melee")
apply_damage(throw_damage, dtype, null, armor, soaked, is_sharp(O), has_edge(O), O)
apply_damage(throw_damage, dtype, null, armor, is_sharp(O), has_edge(O), O)
O.throwing = 0 //it hit, so stop moving
@@ -310,8 +287,6 @@
if(!O || !src) return
if(O.sharp) //Projectile is suitable for pinning.
if(soaked >= round(throw_damage*0.8))
return
//Handles embedding for non-humans and simple_animals.
embed(O)
@@ -391,8 +391,7 @@
return
var/armor_block = run_armor_check(T, "melee")
var/armor_soak = get_armor_soak(T, "melee")
T.apply_damage(20, HALLOSS,, armor_block, armor_soak)
T.apply_damage(20, HALLOSS, null, armor_block)
if(prob(75)) //75% chance to stun for 5 seconds, really only going to be 4 bcus click cooldown+animation.
T.apply_effect(5, WEAKEN, armor_block)
@@ -270,18 +270,6 @@
return armorval
/mob/living/simple_mob/getsoak(def_zone, attack_flag)
var/armorval = armor_soak[attack_flag]
if(isnull(armorval))
armorval = 0
for(var/datum/modifier/M as anything in modifiers)
var/modifier_armor = LAZYACCESS(M.armor_flat, attack_flag)
if(modifier_armor)
armorval += modifier_armor
return armorval
// Lightning
/mob/living/simple_mob/lightning_act()
..()
@@ -122,16 +122,6 @@
"bio" = 1000,
"rad" = 1000)
armor_soak = list(
"melee" = 1000,
"bullet" = 1000,
"laser" = 1000,
"energy" = 1000,
"bomb" = 1000,
"bio" = 1000,
"rad" = 1000
)
var/scanner_desc
var/obj/effect/overmap/visitable/simplemob/child_om_marker
var/om_child_type
@@ -140,15 +140,6 @@
"bio" = 100,
"rad" = 100
)
var/list/armor_soak = list( // Values for getsoak() checks.
"melee" = 0,
"bullet" = 0,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
// Protection against heat/cold/electric/water effects.
// 0 is no protection, 1 is total protection. Negative numbers increase vulnerability.
var/heat_resist = 0.0
@@ -472,7 +472,6 @@
H.Weaken(3)
return
var/armor_block = run_armor_check(T, "melee")
var/armor_soak = get_armor_soak(T, "melee")
T.apply_damage(20, HALLOSS,, armor_block, armor_soak)
T.apply_damage(20, HALLOSS, null, armor_block)
if(prob(75))
T.apply_effect(3, WEAKEN, armor_block)
@@ -61,16 +61,6 @@
"bio" = 0,
"rad" = 100)
armor_soak = list(
"melee" = 100,
"bullet" = 100,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 100
)
loot_list = list(/obj/item/ore/diamond = 100, /obj/item/ectoplasm = 3)
speak_emote = list("rumbles")
@@ -175,16 +165,6 @@
"bio" = 0,
"rad" = 100)
armor_soak = list(
"melee" = 100,
"bullet" = 100,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 100
)
speak_emote = list("rumbles")
vore_active = 0
@@ -48,16 +48,6 @@
"bio" = 1000,
"rad" = 1000)
armor_soak = list(
"melee" = 1000,
"bullet" = 1000,
"laser" = 1000,
"energy" = 1000,
"bomb" = 1000,
"bio" = 1000,
"rad" = 1000
)
movement_cooldown = 5
copy_prefs_to_mob = FALSE
player_msg = "The dog accepts you into itself, allowing you to dictate what will happen. The dog occasionally thinks unknowable thoughts, though you can understand some of its needs and desires. The dog shares its experience with you. You can navigate space, 'transition' to certain locations, and you can dine upon some of the space weather. The dog doesn't seem to know how any of this works exactly, this is just how things are for the dog, they come as naturally to the dog as blinking."
@@ -58,16 +58,6 @@
"bio" = 100,
"rad" = 100)
armor_soak = list(
"melee" = 30,
"bullet" = 30,
"laser" = 10,
"energy" = 10,
"bomb" = 0,
"bio" = 100,
"rad" = 100
)
speak_emote = list("rumbles")
say_list_type = /datum/say_list/startreader
@@ -142,16 +132,6 @@
"bomb" = 0,
"bio" = 0,
"rad" = 0)
armor_soak = list(
"melee" = 0,
"bullet" = 0,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
icon_living = "startreader_flipped"
AdjustStunned(flip_cooldown)
else
@@ -163,16 +143,6 @@
"bomb" = 0,
"bio" = 100,
"rad" = 100)
armor_soak = list(
"melee" = 30,
"bullet" = 30,
"laser" = 10,
"energy" = 10,
"bomb" = 0,
"bio" = 100,
"rad" = 100
)
icon_living = "startreader"
SetStunned(0)
@@ -65,17 +65,6 @@
"rad" = 100
)
// The frostfly's body is incredibly cold at all times, natural resistance to things trying to burn it.
armor_soak = list(
"melee" = 0,
"bullet" = 0,
"laser" = 15,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
var/datum/effect/effect/system/smoke_spread/frost/smoke_special
say_list_type = /datum/say_list/frostfly
@@ -37,16 +37,6 @@
"rad" = 0
)
armor_soak = list(
"melee" = 5,
"bullet" = 0,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
movement_cooldown = -1
mob_size = MOB_SMALL
@@ -53,15 +53,6 @@
"bio" = 0,
"rad" = 0
)
armor_soak = list(
"melee" = 10,
"bullet" = 5,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
mob_size = MOB_LARGE
@@ -60,16 +60,6 @@
"rad" = 100
)
armor_soak = list(
"melee" = 5,
"bullet" = 5,
"laser" = 5,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
say_list_type = /datum/say_list/kururak
ai_holder_type = /datum/ai_holder/simple_mob/intentional/kururak
@@ -213,7 +203,7 @@
to_chat(H, span_alien("You are disoriented by \the [src]!"))
H.eye_blurry = max(H.eye_blurry, flash_strength + 5)
H.flash_eyes()
H.apply_damage(flash_strength * H.species.flash_burn/5, BURN, BP_HEAD, 0, 0)
H.apply_damage(flash_strength * H.species.flash_burn/5, BURN, BP_HEAD, 0)
else if(issilicon(L))
if(isrobot(L))
@@ -291,7 +281,7 @@
var/mob/living/L = A
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.apply_damage(damage_to_apply, BRUTE, BP_TORSO, 0, 0)
H.apply_damage(damage_to_apply, BRUTE, BP_TORSO, 0)
else
L.adjustBruteLoss(damage_to_apply)
@@ -81,16 +81,6 @@
"rad" = 100
)
armor_soak = list(
"melee" = 5,
"bullet" = 5,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
say_list_type = /datum/say_list/leech
ai_holder_type = /datum/ai_holder/simple_mob/intentional/leech
@@ -41,15 +41,5 @@
"rad" = 100
)
armor_soak = list(
"melee" = 10,
"bullet" = 0,
"laser" = 10,
"energy" = 10,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
/decl/mob_organ_names/pillbug
hit_zones = list("cephalon", "pereon", "pleon", "left forelegs", "right forelegs", "left hind legs", "right hind legs")
@@ -52,16 +52,6 @@
"rad" = 100
)
armor_soak = list(
"melee" = 2,
"bullet" = 2,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
say_list_type = /datum/say_list/sakimm
ai_holder_type = /datum/ai_holder/simple_mob/retaliate/cooperative/sakimm
@@ -33,15 +33,6 @@
icon = 'icons/jungle.dmi'
maxHealth = 75
armor_soak = list(
"melee" = 5,
"bullet" = 0,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
heat_resist = -0.50
cold_resist = 0.75
movement_cooldown = -1
@@ -67,15 +67,6 @@
"bio" = 100,
"rad" = 100
)
armor_soak = list(
"melee" = 15,
"bullet" = 10,
"laser" = 15,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
/mob/living/simple_mob/mechanical/hivebot/tank/armored/anti_melee
name = "riot hivebot"
@@ -90,15 +81,6 @@
"bio" = 100,
"rad" = 100
)
armor_soak = list(
"melee" = 20,
"bullet" = 0,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
/mob/living/simple_mob/mechanical/hivebot/tank/armored/anti_bullet
name = "bulletproof hivebot"
@@ -113,15 +95,6 @@
"bio" = 100,
"rad" = 100
)
armor_soak = list(
"melee" = 0,
"bullet" = 20,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
/mob/living/simple_mob/mechanical/hivebot/tank/armored/anti_laser
name = "ablative hivebot"
@@ -136,15 +109,6 @@
"bio" = 100,
"rad" = 100
)
armor_soak = list(
"melee" = 0,
"bullet" = 0,
"laser" = 20,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
var/reflect_chance = 40 // Same as regular ablative.
// Ablative Hivebots can reflect lasers just like humans.
@@ -53,7 +53,6 @@
var/projectile_dam_type = P.damage_type
var/incoming_damage = (round(P.damage / damage_mod) - (round((P.damage / damage_mod) * 0.3)))
var/armorcheck = run_armor_check(null, P.check_armour)
var/soakedcheck = get_armor_soak(null, P.check_armour)
if(!(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam)))
visible_message(span_danger("The [P.name] bounces off of [src]'s shell!"), \
span_userdanger("The [P.name] bounces off of [src]'s shell!"))
@@ -61,7 +60,7 @@
if(!(P.damage_type == BRUTE || P.damage_type == BURN))
projectile_dam_type = BRUTE
incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to brute for physical projectiles, though severely decreased.
apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P)
apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, is_sharp(P), has_edge(P), P)
return -1 //Doesn't reflect non-beams or non-energy projectiles. They just smack and drop with little to no effect.
else
visible_message(span_danger("The [P.name] gets reflected by [src]'s shell!"), \
@@ -71,7 +70,7 @@
if(!(P.damage_type == BRUTE || P.damage_type == BURN))
projectile_dam_type = BURN
incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to burn for energy-type projectiles, though severely decreased.
apply_damage(incoming_damage, P.damage_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P)
apply_damage(incoming_damage, P.damage_type, null, armorcheck, is_sharp(P), has_edge(P), P)
// Find a turf near or on the original location to bounce to
if(P.starting)
@@ -57,7 +57,6 @@
var/projectile_dam_type = P.damage_type
var/incoming_damage = (round(P.damage / damage_mod) - (round((P.damage / damage_mod) * 0.3)))
var/armorcheck = run_armor_check(null, P.check_armour)
var/soakedcheck = get_armor_soak(null, P.check_armour)
if(!(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam)))
visible_message(span_danger("The [P.name] bounces off of [src]'s shell!"), \
span_userdanger("The [P.name] bounces off of [src]'s shell!"))
@@ -65,7 +64,7 @@
if(!(P.damage_type == BRUTE || P.damage_type == BURN))
projectile_dam_type = BRUTE
incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to brute for physical projectiles, though severely decreased.
apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P)
apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, is_sharp(P), has_edge(P), P)
return -1 //Doesn't reflect non-beams or non-energy projectiles. They just smack and drop with little to no effect.
else
visible_message(span_danger("The [P.name] gets reflected by [src]'s shell!"), \
@@ -75,7 +74,7 @@
if(!(P.damage_type == BRUTE || P.damage_type == BURN))
projectile_dam_type = BURN
incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to burn for energy-type projectiles, though severely decreased.
apply_damage(incoming_damage, P.damage_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P)
apply_damage(incoming_damage, P.damage_type, null, armorcheck, is_sharp(P), has_edge(P), P)
// Find a turf near or on the original location to bounce to
if(P.starting)
@@ -98,16 +98,6 @@
"rad" = 100
)
armor_soak = list(
"melee" = 5,
"bullet" = 5,
"laser" = 5,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
slime_mutation = list(
/mob/living/simple_mob/slime/xenobio/silver,
/mob/living/simple_mob/slime/xenobio/yellow,
@@ -29,15 +29,6 @@
"bio" = 0,
"rad" = 0
)
armor_soak = list(
"melee" = 80,
"bullet" = 20,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
has_langs = list(LANGUAGE_ANIMAL)
@@ -80,15 +71,6 @@
"bio" = 0,
"rad" = 0
)
armor_soak = list(
"melee" = 80,
"bullet" = 20,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
/mob/living/simple_mob/animal/passive/mimepet/attack_hand(mob/living/user as mob)
if(user.a_intent == I_DISARM)
@@ -228,16 +228,6 @@
"bio" = 0,
"rad" = 0
)
armor_soak = list(
"melee" = 10,
"bullet" = 5,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
/mob/living/simple_mob/clowns/big/chlown
name = "A Clown?"
@@ -228,15 +228,6 @@
"bio" = 0,
"rad" = 0
)
armor_soak = list(
"melee" = 10,
"bullet" = 5,
"laser" = 0,
"energy" = 0,
"bomb" = 0,
"bio" = 0,
"rad" = 0
)
/mob/living/simple_mob/clowns/big/c_shift/chlown
+3 -5
View File
@@ -55,8 +55,7 @@
return
var/armor = target.run_armor_check(target, "melee")
var/soaked = target.get_armor_soak(target, "melee")
if(armor + soaked < 60)
if(armor < 60)
to_chat(target, span_danger("You feel extreme pain!"))
var/max_halloss = round(target.species.total_health * 0.8) //up to 80% of passing out
@@ -98,9 +97,8 @@
damage += hat.force * 3
var/armor = target.run_armor_check(BP_HEAD, "melee")
var/soaked = target.get_armor_soak(BP_HEAD, "melee")
target.apply_damage(damage, BRUTE, BP_HEAD, armor, soaked)
attacker.apply_damage(10, BRUTE, BP_HEAD, attacker.run_armor_check(BP_HEAD), attacker.get_armor_soak(BP_HEAD))
target.apply_damage(damage, BRUTE, BP_HEAD, armor)
attacker.apply_damage(10, BRUTE, BP_HEAD, attacker.run_armor_check(BP_HEAD))
if(!armor && target.headcheck(BP_HEAD) && prob(damage))
target.apply_effect(20, PARALYZE)
+1 -5
View File
@@ -421,7 +421,6 @@ var/datum/planet/sif/planet_sif = null
var/target_zone = pick(BP_ALL)
var/amount_blocked = H.run_armor_check(target_zone, "melee")
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
var/damage = rand(1,3)
@@ -429,10 +428,7 @@ var/datum/planet/sif/planet_sif = null
return // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
if(amount_soaked >= damage)
return // No need to apply damage.
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail")
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, used_weapon = "hail")
if(show_message)
to_chat(H, effect_message)
+1 -5
View File
@@ -416,7 +416,6 @@ var/datum/planet/virgo3b/planet_virgo3b = null
var/target_zone = pick(BP_ALL)
var/amount_blocked = H.run_armor_check(target_zone, "melee")
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
var/damage = rand(1,3)
@@ -424,10 +423,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
return // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
if(amount_soaked >= damage)
return // No need to apply damage.
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked)
H.apply_damage(damage, BRUTE, target_zone, amount_blocked)
if(show_message)
to_chat(H, effect_message)
+1 -5
View File
@@ -406,7 +406,6 @@ var/datum/planet/virgo3c/planet_virgo3c = null
var/target_zone = pick(BP_ALL)
var/amount_blocked = H.run_armor_check(target_zone, "melee")
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
var/damage = rand(1,3)
@@ -414,10 +413,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
return // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
if(amount_soaked >= damage)
return // No need to apply damage.
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked)
H.apply_damage(damage, BRUTE, target_zone, amount_blocked)
if(show_message)
to_chat(H, effect_message)
+1 -5
View File
@@ -390,7 +390,6 @@ var/datum/planet/virgo4/planet_virgo4 = null
var/target_zone = pick(BP_ALL)
var/amount_blocked = H.run_armor_check(target_zone, "melee")
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
var/damage = rand(1,3)
@@ -398,10 +397,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
return // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
if(amount_soaked >= damage)
return // No need to apply damage.
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked)
H.apply_damage(damage, BRUTE, target_zone, amount_blocked)
if(show_message)
to_chat(H, effect_message)
-16
View File
@@ -142,19 +142,3 @@
/datum/unit_test/modifier/percentage_armor/simple_mob
name = "MOB: simple mob percentage armor is calculated correctly"
subject_type = /mob/living/simple_mob
/datum/unit_test/modifier/percentage_flat
name = "MOB: human mob flat armor is calculated correctly"
inputs = list(100, 75, 50, 25, 0)
expected_outputs = list(100, 75, 50, 25, 0)
/datum/unit_test/modifier/percentage_flat/set_tested_variable(datum/modifier/M, new_value)
M.armor_flat = list("melee" = new_value)
/datum/unit_test/modifier/percentage_flat/get_test_value(mob/living/L)
return L.getsoak(null, "melee")
/datum/unit_test/modifier/percentage_flat/simple_mob
name = "MOB: simple mob flat armor is calculated correctly"
subject_type = /mob/living/simple_mob