chest targeting fixes

This commit is contained in:
Killian
2022-05-08 23:13:33 +01:00
parent 5723277219
commit 805ec533c7
6 changed files with 29 additions and 29 deletions

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

@@ -325,7 +325,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>")
@@ -339,7 +339,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

@@ -598,33 +598,33 @@ var/global/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
//The base miss chance for the different defence zones
var/global/list/base_miss_chance = list(
"head" = 40,
"chest" = 10,
"groin" = 20,
"l_leg" = 20,
"r_leg" = 20,
"l_arm" = 20,
"r_arm" = 20,
"l_hand" = 50,
"r_hand" = 50,
"l_foot" = 50,
"r_foot" = 50,
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,
)
//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/global/list/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()