mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Shield Fix (#12074)
This commit is contained in:
@@ -480,8 +480,7 @@
|
||||
else if(grabstate >= GRAB_AGGRESSIVE)
|
||||
damage_mult = 1.5
|
||||
P.damage *= damage_mult
|
||||
//you can't miss at point blank..
|
||||
P.can_miss = 1
|
||||
P.point_blank = TRUE
|
||||
|
||||
/obj/item/gun/proc/process_accuracy(obj/projectile, mob/user, atom/target, acc_mod, dispersion)
|
||||
var/obj/item/projectile/P = projectile
|
||||
|
||||
@@ -274,5 +274,5 @@
|
||||
if(default_parry_check(user, attacker, damage_source) && prob(20))
|
||||
user.visible_message(SPAN_DANGER("\The [user] parries [attack_text] with \the [src]!"))
|
||||
playsound(user.loc, "punchmiss", 50, 1)
|
||||
return TRUE
|
||||
return PROJECTILE_STOPPED
|
||||
return FALSE
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
var/dispersion = 0.0
|
||||
|
||||
//used for shooting at blank range, you shouldn't be able to miss
|
||||
var/can_miss = 0
|
||||
var/point_blank = FALSE
|
||||
|
||||
//Effects
|
||||
var/damage = 10
|
||||
@@ -190,19 +190,26 @@
|
||||
return TRUE
|
||||
result = target_mob.bullet_act(src, def_zone)
|
||||
|
||||
if(result == PROJECTILE_FORCE_MISS && (can_miss == 0)) //if you're shooting at point blank you can't miss.
|
||||
if(!silenced)
|
||||
target_mob.visible_message("<span class='notice'>\The [src] misses [target_mob] narrowly!</span>")
|
||||
playsound(target_mob, /decl/sound_category/bulletflyby_sound, 50, 1)
|
||||
return FALSE
|
||||
|
||||
if(result == PROJECTILE_DODGED)
|
||||
return FALSE
|
||||
switch(result)
|
||||
if(PROJECTILE_FORCE_MISS)
|
||||
if(!point_blank)
|
||||
if(!silenced)
|
||||
target_mob.visible_message("<span class='notice'>\The [src] misses [target_mob] narrowly!</span>")
|
||||
playsound(target_mob, /decl/sound_category/bulletflyby_sound, 50, 1)
|
||||
return FALSE
|
||||
if(PROJECTILE_DODGED)
|
||||
return FALSE
|
||||
if(PROJECTILE_STOPPED)
|
||||
return TRUE
|
||||
|
||||
var/impacted_organ = parse_zone(def_zone)
|
||||
if(istype(target_mob, /mob/living/simple_animal))
|
||||
if(isanimal(target_mob))
|
||||
var/mob/living/simple_animal/SA = target_mob
|
||||
impacted_organ = pick(SA.organ_names)
|
||||
else if(ishuman(target_mob))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/E = H.organs_by_name[impacted_organ]
|
||||
impacted_organ = E.name
|
||||
//hit messages
|
||||
if(silenced)
|
||||
to_chat(target_mob, "<span class='danger'>You've been hit in the [impacted_organ] by \a [src]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user