mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
Adds accuracy modifier support
This commit is contained in:
@@ -21,9 +21,10 @@
|
|||||||
var/fire_sound_text = "gunshot"
|
var/fire_sound_text = "gunshot"
|
||||||
var/recoil = 0 //screen shake
|
var/recoil = 0 //screen shake
|
||||||
var/silenced = 0
|
var/silenced = 0
|
||||||
|
var/accuracy = 0 //accuracy is measured in tiles. +1 accuracy means that everything is effectively one tile closer for the purpose of miss chance, -1 means the opposite. launchers are not supported, at the moment.
|
||||||
|
|
||||||
var/last_fired = 0
|
var/last_fired = 0
|
||||||
|
|
||||||
//aiming system stuff
|
//aiming system stuff
|
||||||
var/keep_aim = 1 //1 for keep shooting until aim is lowered
|
var/keep_aim = 1 //1 for keep shooting until aim is lowered
|
||||||
//0 for one bullet after tarrget moves and aim is lowered
|
//0 for one bullet after tarrget moves and aim is lowered
|
||||||
|
|||||||
@@ -132,6 +132,7 @@
|
|||||||
//accuracy bonus from aiming
|
//accuracy bonus from aiming
|
||||||
if (istype(shot_from, /obj/item/weapon/gun)) //If you aim at someone beforehead, it'll hit more often.
|
if (istype(shot_from, /obj/item/weapon/gun)) //If you aim at someone beforehead, it'll hit more often.
|
||||||
var/obj/item/weapon/gun/daddy = shot_from //Kinda balanced by fact you need like 2 seconds to aim
|
var/obj/item/weapon/gun/daddy = shot_from //Kinda balanced by fact you need like 2 seconds to aim
|
||||||
|
miss_modifier -= round(15*daddy.accuracy)
|
||||||
if (daddy.aim_targets && original in daddy.aim_targets) //As opposed to no-delay pew pew
|
if (daddy.aim_targets && original in daddy.aim_targets) //As opposed to no-delay pew pew
|
||||||
miss_modifier += -30
|
miss_modifier += -30
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user