Skip to content

Commit

Permalink
beeboop getting closer
Browse files Browse the repository at this point in the history
  • Loading branch information
Releasethesea committed Mar 30, 2024
1 parent 7521a29 commit d558579
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 25 deletions.
34 changes: 27 additions & 7 deletions code/datums/ammo/bullet/sniper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/datums/elements/bullet_trait/damage_boost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
42 changes: 25 additions & 17 deletions code/modules/projectiles/guns/specialist/sniper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d558579

Please sign in to comment.