mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Merge pull request #948 from Giacomand/proj_fix
Changed the projectile code: "accuracy == distance between the target and the shooting location" Fixes #922
This commit is contained in:
@@ -151,21 +151,23 @@ proc/isorgan(A)
|
||||
return zone
|
||||
|
||||
|
||||
/proc/ran_zone(zone, probability)
|
||||
/proc/ran_zone(zone, probability = 80)
|
||||
|
||||
zone = check_zone(zone)
|
||||
if(!probability) probability = 90
|
||||
if(probability == 100) return zone
|
||||
|
||||
if(zone == "chest")
|
||||
if(prob(probability)) return "chest"
|
||||
var/t = rand(1, 9)
|
||||
switch(t)
|
||||
if(1 to 3) return "head"
|
||||
if(4 to 6) return "l_arm"
|
||||
if(7 to 9) return "r_arm"
|
||||
if(prob(probability))
|
||||
return zone
|
||||
|
||||
if(prob(probability * 0.75)) return zone
|
||||
return "chest"
|
||||
var/t = rand(1, 17) // randomly pick a different zone, or maybe the same one
|
||||
switch(t)
|
||||
if(1) return "head"
|
||||
if(2) return "chest"
|
||||
if(3 to 6) return "l_arm"
|
||||
if(7 to 10) return "r_arm"
|
||||
if(10 to 13) return "l_leg"
|
||||
if(14 to 17) return "r_leg"
|
||||
|
||||
return zone
|
||||
|
||||
|
||||
/proc/stars(n, pr)
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
loc = A.loc
|
||||
return 0// nope.avi
|
||||
|
||||
var/distance = get_dist(original,loc)
|
||||
def_zone = ran_zone(def_zone, 100-(5*distance)) //Lower accurancy/longer range tradeoff.
|
||||
var/distance = get_dist(get_turf(A), starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
|
||||
def_zone = ran_zone(def_zone, max(100-(7*distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
|
||||
if(silenced)
|
||||
M << "<span class='userdanger'>You've been shot in the [parse_zone(def_zone)] by [src]!</span>"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user