Chest -> Torso Targeting Fixes

This commit is contained in:
Novacat
2022-05-08 21:07:08 -04:00
committed by CHOMPStation2
parent 0ccf97a237
commit 24aa127d67
6 changed files with 33 additions and 18 deletions

View File

@@ -151,9 +151,9 @@ Proc for attack log creation, because really why not
/proc/get_exposed_defense_zone(var/atom/movable/target)
var/obj/item/weapon/grab/G = locate() in target
if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people.
return pick("head", "l_hand", "r_hand", "l_foot", "r_foot", "l_arm", "r_arm", "l_leg", "r_leg")
return pick(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG)
else
return pick("chest", "groin")
return pick(BP_TORSO, BP_GROIN)
/proc/do_mob(mob/user , mob/target, time = 30, target_zone = 0, uninterruptible = FALSE, progress = TRUE, ignore_movement = FALSE, exclusive = FALSE)
if(!user || !target)

View File

@@ -240,7 +240,7 @@ HALOGEN COUNTER - Radcount on mobs
continue
// Broken limbs
if(e.status & ORGAN_BROKEN)
if((e.name in list("l_arm", "r_arm", "l_leg", "r_leg", "head", "chest", "groin")) && (!e.splinted))
if((e.name in list(BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG, BP_HEAD, BP_TORSO, BP_GROIN)) && (!e.splinted))
fracture_dat += "<span class='warning'>Unsecured fracture in subject [e.name]. Splinting recommended for transport.</span><br>"
else if(advscan >= 1 && showadvscan == 1)
fracture_dat += "<span class='warning'>Bone fractures detected in subject [e.name].</span><br>"

View File

@@ -206,7 +206,7 @@
var/obj/item/organ/external/E
var/nopain
if(ishuman(victim) && user.zone_sel.selecting != "groin" && user.zone_sel.selecting != "chest")
if(ishuman(victim) && user.zone_sel.selecting != BP_GROIN && user.zone_sel.selecting != BP_TORSO)
var/mob/living/carbon/human/H = victim
E = H.get_organ(user.zone_sel.selecting)
if(!E || E.species.flags & NO_PAIN)

View File

@@ -323,7 +323,7 @@ emp_act
if(!stat)
switch(hit_zone)
if("head")//Harder to score a stun but if you do it lasts a bit longer
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)
visible_message("<span class='danger'>\The [src] has been knocked unconscious!</span>")
@@ -337,7 +337,7 @@ emp_act
if(glasses && prob(33))
glasses.add_blood(src)
update_inv_glasses(0)
if("chest")//Easier to score a stun but lasts less time
if(BP_TORSO)//Easier to score a stun but lasts less time
if(prob(effective_force + 10))
apply_effect(6, WEAKEN, blocked, soaked)
visible_message("<span class='danger'>\The [src] has been knocked down!</span>")

View File

@@ -604,6 +604,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
//The base miss chance for the different defence zones
var/list/global/base_miss_chance = list(
<<<<<<< HEAD
"head" = 40,
"torso" = 10,
"groin" = 20,
@@ -616,21 +617,35 @@ var/list/global/base_miss_chance = list(
"l_foot" = 50,
"r_foot" = 50,
) //CHOMPEDIT - Changed "chest" to "torso", as chest is a typo. How long has this bug been here?
=======
BP_HEAD = 40,
BP_TORSO = 10,
BP_GROIN = 20,
BP_L_LEG = 20,
BP_R_LEG = 20,
BP_L_ARM = 20,
BP_R_ARM = 20,
BP_L_HAND = 50,
BP_R_HAND = 50,
BP_L_FOOT = 50,
BP_R_FOOT = 50,
)
>>>>>>> afd673c6f6... Merge pull request #12934 from KillianKirilenko/kk-hitfixes
//Used to weight organs when an organ is hit randomly (i.e. not a directed, aimed attack).
//Also used to weight the protection value that armour provides for covering that body part when calculating protection from full-body effects.
var/list/global/organ_rel_size = list(
"head" = 25,
"chest" = 70,
"groin" = 30,
"l_leg" = 25,
"r_leg" = 25,
"l_arm" = 25,
"r_arm" = 25,
"l_hand" = 10,
"r_hand" = 10,
"l_foot" = 10,
"r_foot" = 10,
BP_HEAD = 25,
BP_TORSO = 70,
BP_GROIN = 30,
BP_L_LEG = 25,
BP_R_LEG = 25,
BP_L_ARM = 25,
BP_R_ARM = 25,
BP_L_HAND = 10,
BP_R_HAND = 10,
BP_L_FOOT = 10,
BP_R_FOOT = 10,
)
/mob/proc/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)

View File

@@ -33,7 +33,7 @@ If the spell_projectile is seeking, it will update its target every process and
if(istype(projectile, /obj/item/projectile/spell_projectile))
var/obj/item/projectile/spell_projectile/SP = projectile
SP.carried = src //casting is magical
projectile.def_zone = check_zone("chest")
projectile.def_zone = check_zone(BP_TORSO)
projectile.old_style_target(target)
projectile.fire()