Bullets can now also miss, even after entering the same tile.

This means that aiming for the head with a gun only makes sense from a short distance or when the target is restrained. Otherwise, you're likely to miss unless aiming for the chest.
This commit is contained in:
cib
2012-12-19 21:18:08 +01:00
parent 596d944414
commit b0289ce66d
4 changed files with 10 additions and 5 deletions

View File

@@ -113,9 +113,10 @@ emp_act
/mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
if(!I || !user) return 0
var/target_zone = get_zone_with_miss_chance(user.zone_sel.selecting)
var/target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, src)
if(!target_zone)
visible_message("\red <B>[user] misses [src] with \the [I]!")
return
var/datum/organ/external/affecting = get_organ(target_zone)
if (!affecting)

View File

@@ -165,12 +165,12 @@ proc/hasorgans(A)
// Emulates targetting a specific body part, and miss chances
// May return null if missed
/proc/get_zone_with_miss_chance(zone, var/mob/target)
/proc/get_zone_with_miss_chance(zone, var/mob/target, var/miss_chance_mod = 0)
zone = check_zone(zone)
// you can only miss if your target is standing and not restrained
if(!target.buckled && !target.lying)
var/miss_chance = 10
var/miss_chance = 10 + miss_chance_mod
switch(zone)
if("head")
miss_chance = 40

View File

@@ -12,7 +12,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"pAI candidate" = 1, // -- TLE // 7
"cultist" = IS_MODE_COMPILED("cult"), // 8
"infested monkey" = IS_MODE_COMPILED("monkey"), // 9
"space ninja" = "true", // 9
"space ninja" = "true", // 10
)
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "Love-Hearts", "Black2", "Grey2", "Stripey", "Kinky", "None") //Curse whoever made male/female underwear diffrent colours

View File

@@ -80,7 +80,11 @@
forcedodge = 1
else
var/distance = get_dist(original,loc)
def_zone = ran_zone(def_zone, 100-(5*distance)) //Lower accurancy/longer range tradeoff.
//Lower accurancy/longer range tradeoff.
def_zone = get_zone_with_miss_chance(def_zone, src, 3*distance)
if(!def_zone)
visible_message("\The [src] misses [M] narrowly.")
if(silenced)
M << "\red You've been shot in the [def_zone] by the [src.name]!"
else