From d5585797c6384509935b7c2c20bb82175f500d9e Mon Sep 17 00:00:00 2001 From: Backsea Date: Sat, 30 Mar 2024 16:11:56 -0500 Subject: [PATCH] beeboop getting closer --- code/datums/ammo/bullet/sniper.dm | 34 +++++++++++---- .../elements/bullet_trait/damage_boost.dm | 2 +- .../projectiles/guns/specialist/sniper.dm | 42 +++++++++++-------- 3 files changed, 53 insertions(+), 25 deletions(-) diff --git a/code/datums/ammo/bullet/sniper.dm b/code/datums/ammo/bullet/sniper.dm index 8a9d689cee53..1c37076dbde3 100644 --- a/code/datums/ammo/bullet/sniper.dm +++ b/code/datums/ammo/bullet/sniper.dm @@ -107,6 +107,14 @@ damage = 100 shell_speed = AMMO_SPEED_TIER_6 +/datum/ammo/bullet/sniper/wallpopper/ + name = "wallpopper sniper bullet" + + shrapnel_chance = 0 // hesh leaves no shrapnel + accuracy = HIT_ACCURACY_TIER_8 + damage = 55 + shell_speed = AMMO_SPEED_TIER_6 + /datum/ammo/bullet/sniper/anti_materiel/on_hit_mob(mob/M,obj/projectile/P) if((P.projectile_flags & PROJECTILE_BULLSEYE) && M == P.original) var/mob/living/L = M @@ -122,13 +130,25 @@ // keeping above for book keeping sake, damage isnt that high anymore, does way less, very similar to normal sniper to_chat(P.firer, SPAN_WARNING("Bullseye!")) -/datum/ammo/bullet/sniper/wallpopper - name = "Wall-Popper bullet" - shrapnel_chance = 0 // its bassically hesh, no shrap from you - accuracy = HIT_ACCURACY_TIER_8 - damage = 55 - shell_speed = AMMO_SPEED_TIER_6 - +/datum/ammo/bullet/sniper/wallpopper/set_bullet_traits() + . = ..() + LAZYADD(traits_to_give, list( + BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff), + // BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 30, GLOB.damage_boost_turfs), //2550, 2 taps colony walls, 4 taps reinforced walls + // BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 0.23, GLOB.damage_boost_turfs_xeno), //2550*0.23 = 586, 2 taps resin walls, 3 taps thick resin + // BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 15, GLOB.damage_boost_breaching), //1275, enough to 1 tap airlocks + // BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 6, GLOB.damage_boost_pylons), //510, 4 shots to take out a pylon + )) + +/datum/ammo/bullet/sniper/anti_materiel/set_bullet_traits() + . = ..() + LAZYADD(traits_to_give, list( + BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff), + BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_penetrating/light), + // BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 3, GLOB.damage_boost_turfs), + // BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 3, GLOB.damage_boost_breaching), //edited to take 5 shots for heavy resin and 3 for normal resin walls, since it wallbangs this shouldnt be a issue i dont think it would be an issue + // BULLET_TRAIT_ENTRY( /datum/element/bullet_trait_damage_boost, 2, GLOB.damage_boost_pylons) //At 200 per shot it'll take 9 to break a Pylon (1800 HP). No Damage Boost vs other xeno structures yet, those will require a whole new list w/ the damage_boost trait. + )) /datum/ammo/bullet/sniper/anti_materiel/vulture damage = 400 // Fully intended to vaporize anything smaller than a mini cooper accurate_range_min = 10 diff --git a/code/datums/elements/bullet_trait/damage_boost.dm b/code/datums/elements/bullet_trait/damage_boost.dm index eee4a8e80f4b..a74f6e5898ad 100644 --- a/code/datums/elements/bullet_trait/damage_boost.dm +++ b/code/datums/elements/bullet_trait/damage_boost.dm @@ -61,7 +61,7 @@ GLOBAL_LIST_INIT(damage_boost_vehicles, typecacheof(/obj/vehicle/multitile)) COMSIG_BULLET_PRE_HANDLE_OBJ, COMSIG_BULLET_PRE_HANDLE_TURF, COMSIG_BULLET_PRE_HANDLE_MOB, - ), PROC_REF(handle_bullet)) + ), PROC_REF(handle_bullet), override = TRUE) /datum/element/bullet_trait_damage_boost/proc/check_type(atom/A) if(istype(A, /obj/structure/machinery/door)) return "door" diff --git a/code/modules/projectiles/guns/specialist/sniper.dm b/code/modules/projectiles/guns/specialist/sniper.dm index a99f8ae3a28c..5c48bcf91490 100644 --- a/code/modules/projectiles/guns/specialist/sniper.dm +++ b/code/modules/projectiles/guns/specialist/sniper.dm @@ -383,23 +383,31 @@ damage_mult = BASE_BULLET_DAMAGE_MULT recoil = RECOIL_AMOUNT_TIER_1 -/obj/item/weapon/gun/rifle/sniper/XM43E1/set_bullet_traits() - if(istype(ammo, /datum/ammo/bullet/sniper/wallpopper)) - LAZYADD(traits_to_give, list( - BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff), - BULLET_TRAIT_ENTRY_ID("turfs", /datum/element/bullet_trait_damage_boost, 30, GLOB.damage_boost_turfs), //2550, 2 taps colony walls, 4 taps reinforced walls - BULLET_TRAIT_ENTRY_ID("xeno turfs", /datum/element/bullet_trait_damage_boost, 0.23, GLOB.damage_boost_turfs_xeno), //2550*0.23 = 586, 2 taps resin walls, 3 taps thick resin - BULLET_TRAIT_ENTRY_ID("breaching", /datum/element/bullet_trait_damage_boost, 15, GLOB.damage_boost_breaching), //1275, enough to 1 tap airlocks - BULLET_TRAIT_ENTRY_ID("pylons", /datum/element/bullet_trait_damage_boost, 6, GLOB.damage_boost_pylons) //510, 4 shots to take out a pylon - )) - if(istype(ammo, /datum/ammo/bullet/sniper/anti_materiel)) - LAZYADD(traits_to_give, list( - BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff), - BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_penetrating/light), - BULLET_TRAIT_ENTRY_ID("turfs", /datum/element/bullet_trait_damage_boost, 3, GLOB.damage_boost_turfs), - BULLET_TRAIT_ENTRY_ID("breaching", /datum/element/bullet_trait_damage_boost, 3, GLOB.damage_boost_breaching), //edited to take 5 shots for heavy resin and 3 for normal resin walls, since it wallbangs this shouldnt be a issue i dont think it would be an issue - BULLET_TRAIT_ENTRY_ID("pylons", /datum/element/bullet_trait_damage_boost, 2, GLOB.damage_boost_pylons) //At 200 per shot it'll take 9 to break a Pylon (1800 HP). No Damage Boost vs other xeno structures yet, those will require a whole new list w/ the damage_boost trait. - )) +/obj/item/weapon/gun/rifle/sniper/XM43E1/replace_magazine(mob/user, obj/item/ammo_magazine/magazine) + . = ..() + set_bullet_trait_type() + +/obj/item/weapon/gun/rifle/sniper/XM43E1/proc/set_bullet_trait_type() + if(istype(current_mag, /obj/item/ammo_magazine/sniper/wallpopper)) + remove_bullet_trait("turfs") + remove_bullet_trait("breaching") + remove_bullet_trait("pylons") + + add_bullet_trait(BULLET_TRAIT_ENTRY_ID("turfs", /datum/element/bullet_trait_damage_boost, 30, GLOB.damage_boost_turfs)) //2550, 2 taps colony walls, 4 taps reinforced walls + add_bullet_trait(BULLET_TRAIT_ENTRY_ID("xeno turfs", /datum/element/bullet_trait_damage_boost, 0.23, GLOB.damage_boost_turfs_xeno)) //2550*0.23 = 586, 2 taps resin walls, 3 taps thick resin + add_bullet_trait(BULLET_TRAIT_ENTRY_ID("breaching", /datum/element/bullet_trait_damage_boost, 15, GLOB.damage_boost_breaching)) //1275, enough to 1 tap airlocks + add_bullet_trait(BULLET_TRAIT_ENTRY_ID("pylons", /datum/element/bullet_trait_damage_boost, 6, GLOB.damage_boost_pylons)) //510, 4 shots to take out a pylon + return + if(istype(current_mag, /obj/item/ammo_magazine/sniper/anti_materiel)) + remove_bullet_trait("turfs") + remove_bullet_trait("xeno turfs") + remove_bullet_trait("breaching") + remove_bullet_trait("pylons") + + add_bullet_trait(BULLET_TRAIT_ENTRY_ID("turfs", /datum/element/bullet_trait_damage_boost, 3, GLOB.damage_boost_turfs)) + add_bullet_trait(BULLET_TRAIT_ENTRY_ID("breaching", /datum/element/bullet_trait_damage_boost, 3, GLOB.damage_boost_breaching)) + + add_bullet_trait(BULLET_TRAIT_ENTRY_ID("pylons", /datum/element/bullet_trait_damage_boost, 2, GLOB.damage_boost_pylons)) /* //Disabled until an identity is better defined. -Kaga