mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
Removes baymiss. Mostly. (#17340)
* Removes baymiss. Mostly. Goodbye Baymiss * early return * Fixes zoomed accuracy being lost upon gunfire * yeah this works better * clarificaction, user->attacker * these as well
This commit is contained in:
@@ -417,7 +417,8 @@
|
||||
if(one_handed_penalty >= 20)
|
||||
to_chat(user, span_warning("You struggle to keep \the [src] pointed at the correct position with just one hand!"))
|
||||
|
||||
accuracy = initial(accuracy) //Reset our accuracy
|
||||
if(!zoom) //If we're not zoomed, reset our accuracy to our initial accuracy.
|
||||
accuracy = initial(accuracy) //Reset our accuracy
|
||||
last_shot = world.time
|
||||
user.hud_used.update_ammo_hud(user, src)
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
@@ -742,7 +743,7 @@
|
||||
mouthshoot = 0
|
||||
return
|
||||
|
||||
/obj/item/gun/proc/toggle_scope(var/zoom_amount=2.0)
|
||||
/obj/item/gun/proc/toggle_scope(zoom_amount=2.0)
|
||||
//looking through a scope limits your periphereal vision
|
||||
//still, increase the view size by a tiny amount so that sniping isn't too restricted to NSEW
|
||||
var/zoom_offset = round(world.view * zoom_amount)
|
||||
|
||||
@@ -689,9 +689,13 @@
|
||||
if(target_mob in impacted_mobs)
|
||||
return
|
||||
|
||||
//roll to-hit
|
||||
miss_modifier = max(15*(distance-2) - accuracy + miss_modifier + target_mob.get_evasion(), -100)
|
||||
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob), force_hit = !can_miss) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss
|
||||
// Accuracy here is inverted as accuracy is being applied as a negative miss_chance_mod.
|
||||
// This means that, accuracy negates evasion 1:1 when it comes to PvP combat (or for PvE combat if you give a mob natural evasion)
|
||||
// Things that affect accuracy: gun_accuracy_mod species var (Bad Shot/Eagle Eye), Fear, Gun Accuracy.
|
||||
// +accuracy = higher chance to hit through evasion. -accuracy = lower chance to hit through evasion.
|
||||
// These ONLY matter if the mob you are attacking has evasion.
|
||||
// The get_zone_with_miss_chance() proc is HIGHLY variable and can be changed server to server with multiple simple var switches built in without having to do specialty code or multiple edits.
|
||||
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, -accuracy, ranged_attack=(distance > 1 || original != target_mob), force_hit = !can_miss, attacker = firer) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss
|
||||
|
||||
var/result = PROJECTILE_FORCE_MISS
|
||||
if(hit_zone)
|
||||
|
||||
Reference in New Issue
Block a user