From d717166b5e34533a9f4d34d2574ffe50b83e86bf Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Mon, 11 Sep 2023 07:37:52 +0200 Subject: [PATCH] Makes gau able to hit resting mobs (#4304) # About the pull request GAU should be able to hit resting mobs, that is just a bug. Copy of a part of Tisx GAU buff that makes GAU able to hit mobs. # Explain why it's good for the game it might make GAU a bit less of a joke. if it is too strong they way to balance it migth be removal of the explosion and spread decreas by one. # Changelog :cl: balance: GAU can hit mobs that are on ground now /:cl: --- code/modules/cm_marines/dropship_ammo.dm | 26 +++++++++++++++--------- code/modules/projectiles/ammo_datums.dm | 5 +++-- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/code/modules/cm_marines/dropship_ammo.dm b/code/modules/cm_marines/dropship_ammo.dm index d3d0266e5982..264400caa0dd 100644 --- a/code/modules/cm_marines/dropship_ammo.dm +++ b/code/modules/cm_marines/dropship_ammo.dm @@ -146,6 +146,8 @@ fire_mission_delay = 2 var/bullet_spread_range = 4 //how far from the real impact turf can bullets land var/shrapnel_type = /datum/ammo/bullet/shrapnel/gau //For siming 30mm bullet impacts. + var/directhit_damage = 105 //how much damage is to be inficted to a mob, this is here so that we can hit resting mobs. + var/penetration = 10 //AP value pretty much /obj/structure/ship_ammo/heavygun/get_examine_text(mob/user) . = ..() @@ -165,25 +167,27 @@ var/soundplaycooldown = 0 var/debriscooldown = 0 for(var/i = 1 to ammo_used_per_firing) - var/turf/U = pick(turf_list) + var/turf/impact_tile = pick(turf_list) sleep(1) var/datum/cause_data/cause_data = create_cause_data(initial(name), source_mob) - U.ex_act(EXPLOSION_THRESHOLD_VLOW, pick(alldirs), cause_data) - create_shrapnel(U,1,0,0,shrapnel_type,cause_data,FALSE,100) //simulates a bullet - for(var/atom/movable/AM in U) - if(iscarbon(AM)) - AM.ex_act(EXPLOSION_THRESHOLD_VLOW, null, cause_data) + impact_tile.ex_act(EXPLOSION_THRESHOLD_VLOW, pick(alldirs), cause_data) + create_shrapnel(impact_tile,1,0,0,shrapnel_type,cause_data,FALSE,100) //simulates a bullet + for(var/atom/movable/explosion_effect in impact_tile) + if(iscarbon(explosion_effect)) + var/mob/living/carbon/bullet_effect = explosion_effect + explosion_effect.ex_act(EXPLOSION_THRESHOLD_VLOW, null, cause_data) + bullet_effect.apply_armoured_damage(directhit_damage,ARMOR_BULLET,BRUTE,null,penetration) else - AM.ex_act(EXPLOSION_THRESHOLD_VLOW) + explosion_effect.ex_act(EXPLOSION_THRESHOLD_VLOW) if(!soundplaycooldown) //so we don't play the same sound 20 times very fast. - playsound(U, 'sound/effects/gauimpact.ogg',40,1,20) + playsound(impact_tile, 'sound/effects/gauimpact.ogg',40,1,20) soundplaycooldown = 3 soundplaycooldown-- if(!debriscooldown) - U.ceiling_debris_check(1) + impact_tile.ceiling_debris_check(1) debriscooldown = 6 debriscooldown-- - new /obj/effect/particle_effect/expl_particles(U) + new /obj/effect/particle_effect/expl_particles(impact_tile) sleep(11) //speed of sound simulation playsound(impact, 'sound/effects/gau.ogg',100,1,60) @@ -200,6 +204,8 @@ point_cost = 325 fire_mission_delay = 2 shrapnel_type = /datum/ammo/bullet/shrapnel/gau/at + directhit_damage = 80 //how much damage is to be inficted to a mob, this is here so that we can hit resting mobs. + penetration = 40 //AP value pretty much //laser battery diff --git a/code/modules/projectiles/ammo_datums.dm b/code/modules/projectiles/ammo_datums.dm index 63daf7ad9a47..449ce574eb2c 100644 --- a/code/modules/projectiles/ammo_datums.dm +++ b/code/modules/projectiles/ammo_datums.dm @@ -3135,7 +3135,8 @@ /datum/ammo/bullet/shrapnel/gau //for the GAU to have a impact bullet instead of firecrackers name = "30mm Multi-Purpose shell" - damage = 115 //More damaging, but 2x less shells and low AP + damage = 1 // ALL DAMAGE IS IN dropship_ammo SO WE CAN DEAL DAMAGE TO RESTING MOBS, these will still remain however so that we can get cause_data and status effects. + damage_type = BRUTE penetration = ARMOR_PENETRATION_TIER_2 accuracy = HIT_ACCURACY_TIER_MAX max_range = 0 @@ -3144,7 +3145,7 @@ /datum/ammo/bullet/shrapnel/gau/at name = "30mm Anti-Tank shell" - damage = 80 //Standard AP vs standard. (more AP for less damage) + damage = 1 // ALL DAMAGE IS IN dropship_ammo SO WE CAN DEAL DAMAGE TO RESTING MOBS, these will still remain however so that we can get cause_data and status effects. penetration = ARMOR_PENETRATION_TIER_8 accuracy = HIT_ACCURACY_TIER_MAX /*