mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-04 14:33:30 +00:00
Fixes throwing miss chance using min instead of max
Also adjusted slightly to make throwing a bit more distinct from projectile weapons. Throwing is worse with range but better up close.
This commit is contained in:
@@ -315,11 +315,11 @@ emp_act
|
||||
zone = ran_zone("chest",75) //Hits a random part of the body, geared towards the chest
|
||||
|
||||
//check if we hit
|
||||
var/miss_chance = 15
|
||||
if (O.throw_source)
|
||||
var/distance = get_dist(O.throw_source, loc)
|
||||
zone = get_zone_with_miss_chance(zone, src, min(15*(distance-2), 0))
|
||||
else
|
||||
zone = get_zone_with_miss_chance(zone, src, 15)
|
||||
miss_chance = max(15*(distance-2), 0)
|
||||
zone = get_zone_with_miss_chance(zone, src, miss_chance)
|
||||
|
||||
if(!zone)
|
||||
visible_message("\blue \The [O] misses [src] narrowly!")
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
var/miss_chance = 15
|
||||
if (O.throw_source)
|
||||
var/distance = get_dist(O.throw_source, loc)
|
||||
miss_chance = min(15*(distance-2), 0)
|
||||
miss_chance = max(15*(distance-2), 0)
|
||||
|
||||
if (prob(miss_chance))
|
||||
visible_message("\blue \The [O] misses [src] narrowly!")
|
||||
|
||||
Reference in New Issue
Block a user