mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Implements all-species positive and negative traits
This commit is contained in:
@@ -668,6 +668,12 @@
|
||||
if(!isnull(M.accuracy_dispersion))
|
||||
P.dispersion = max(P.dispersion + M.accuracy_dispersion, 0)
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species)
|
||||
P.accuracy += H.species.gun_accuracy_mod
|
||||
P.dispersion = max(P.dispersion + H.species.gun_accuracy_dispersion_mod, 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
|
||||
@@ -804,8 +810,13 @@
|
||||
user.hud_used.remove_ammo_hud(user, src)
|
||||
|
||||
return ..()
|
||||
<<<<<<< HEAD
|
||||
|
||||
/obj/item/weapon/gun/dropped(mob/living/user) // Ditto as above, we remove the HUD. Pending porting TGMC code to clean up this fucking nightmare of spaghetti.
|
||||
=======
|
||||
|
||||
/obj/item/weapon/gun/dropped(mob/living/user) // Ditto as above, we remove the HUD. Pending porting TGMC code to clean up this fucking nightmare of spaghetti.
|
||||
>>>>>>> 4b43b02c06... Merge pull request #13193 from Heroman3003/traitening
|
||||
user.hud_used.remove_ammo_hud(user, src)
|
||||
|
||||
..()
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
combustion = FALSE
|
||||
|
||||
can_miss = FALSE
|
||||
|
||||
muzzle_type = /obj/effect/projectile/muzzle/medigun
|
||||
tracer_type = /obj/effect/projectile/tracer/medigun
|
||||
impact_type = /obj/effect/projectile/impact/medigun
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
var/ricochets = 0
|
||||
var/ricochets_max = 2
|
||||
var/ricochet_chance = 30
|
||||
var/can_miss = TRUE
|
||||
|
||||
//Hitscan
|
||||
var/hitscan = FALSE //Whether this is hitscan. If it is, speed is basically ignored.
|
||||
@@ -139,7 +140,7 @@
|
||||
var/impact_effect_type = null
|
||||
|
||||
var/list/impacted_mobs = list()
|
||||
|
||||
|
||||
// TGMC Ammo HUD Port
|
||||
var/hud_state = "unknown" // What HUD state we use when we have ammunition.
|
||||
var/hud_state_empty = "unknown" // The empty state. DON'T USE _FLASH IN THE NAME OF THE EMPTY STATE STRING, THAT IS ADDED BY THE CODE.
|
||||
@@ -662,8 +663,13 @@
|
||||
return
|
||||
|
||||
//roll to-hit
|
||||
<<<<<<< HEAD
|
||||
miss_modifier = max(miss_modifier + target_mob.get_evasion(), -100) //CHOMPEDIT - removing baymiss
|
||||
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob)) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss
|
||||
=======
|
||||
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
|
||||
>>>>>>> 4b43b02c06... Merge pull request #13193 from Heroman3003/traitening
|
||||
|
||||
var/result = PROJECTILE_FORCE_MISS
|
||||
if(hit_zone)
|
||||
|
||||
Reference in New Issue
Block a user