mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Adds a Trait system (#4048)
* Works on trait system, wip. * Finalizes traits. Fixes a few bugs with medical machines assuming a max health of 100.
This commit is contained in:
@@ -480,7 +480,7 @@
|
||||
damage_mult = 1.5
|
||||
P.damage *= damage_mult
|
||||
|
||||
/obj/item/weapon/gun/proc/process_accuracy(obj/projectile, mob/user, atom/target, acc_mod, dispersion)
|
||||
/obj/item/weapon/gun/proc/process_accuracy(obj/projectile, mob/living/user, atom/target, acc_mod, dispersion)
|
||||
var/obj/item/projectile/P = projectile
|
||||
if(!istype(P))
|
||||
return //default behaviour only applies to true projectiles
|
||||
@@ -504,6 +504,13 @@
|
||||
//As opposed to no-delay pew pew
|
||||
P.accuracy += 2
|
||||
|
||||
// Some modifiers make it harder or easier to hit things.
|
||||
for(var/datum/modifier/M in user.modifiers)
|
||||
if(!isnull(M.accuracy))
|
||||
P.accuracy += M.accuracy
|
||||
if(!isnull(M.accuracy_dispersion))
|
||||
P.dispersion = max(P.dispersion + M.accuracy_dispersion, 0)
|
||||
|
||||
//does the actual launching of the projectile
|
||||
/obj/item/weapon/gun/proc/process_projectile(obj/projectile, mob/user, atom/target, var/target_zone, var/params=null)
|
||||
var/obj/item/projectile/P = projectile
|
||||
|
||||
Reference in New Issue
Block a user