mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Adds mercenary sniper rifle
Adds the scoped mercenary sniper rifle and ammunition defines. Does not add syndicate uplink option.
This commit is contained in:
@@ -1338,6 +1338,7 @@
|
||||
#include "code\modules\projectiles\guns\projectile\pistol.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\revolver.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\shotgun.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\sniper.dm"
|
||||
#include "code\modules\projectiles\projectile\animate.dm"
|
||||
#include "code\modules\projectiles\projectile\beams.dm"
|
||||
#include "code\modules\projectiles\projectile\bullets.dm"
|
||||
|
||||
@@ -219,6 +219,20 @@
|
||||
new /obj/item/ammo_casing/shotgun/stunshell(src)
|
||||
new /obj/item/ammo_casing/shotgun/stunshell(src)
|
||||
|
||||
/obj/item/weapon/storage/box/heavysniperammo
|
||||
name = "box of 14.5mm AP shells"
|
||||
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/ammo_casing/a145(src)
|
||||
new /obj/item/ammo_casing/a145(src)
|
||||
new /obj/item/ammo_casing/a145(src)
|
||||
new /obj/item/ammo_casing/a145(src)
|
||||
new /obj/item/ammo_casing/a145(src)
|
||||
new /obj/item/ammo_casing/a145(src)
|
||||
new /obj/item/ammo_casing/a145(src)
|
||||
|
||||
/obj/item/weapon/storage/box/flashbangs
|
||||
name = "box of flashbangs (WARNING)"
|
||||
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
BB = new projectile_type(src)
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, 10)
|
||||
set_dir(pick(cardinal))
|
||||
|
||||
//removes the projectile from the ammo casing
|
||||
/obj/item/ammo_casing/proc/expend()
|
||||
. = BB
|
||||
BB = null
|
||||
set_dir(pick(cardinal)) //spin spent casings
|
||||
update_icon()
|
||||
|
||||
/obj/item/ammo_casing/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -118,6 +118,7 @@
|
||||
user << "<span class='notice'>You empty [src].</span>"
|
||||
for(var/obj/item/ammo_casing/C in stored_ammo)
|
||||
C.loc = user.loc
|
||||
C.set_dir(pick(cardinal))
|
||||
stored_ammo.Cut()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -114,7 +114,9 @@
|
||||
/obj/item/ammo_casing/a145
|
||||
name = "\improper AP shell casing"
|
||||
desc = "A 14.5mm AP shell."
|
||||
icon_state = "slshell"
|
||||
icon_state = "lcasing"
|
||||
spent_icon = "lcasing-spent"
|
||||
caliber = "14.5mm"
|
||||
projectile_type = /obj/item/projectile/bullet/rifle/a145
|
||||
|
||||
/obj/item/ammo_casing/rocket
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
|
||||
user.visible_message("[user] draws back the bolt on [src], clicking it into place.", "<span class='warning'>You draw back the bolt on the [src], loading the spring!</span>")
|
||||
next = darts[1]
|
||||
user.next_move = world.time + 4
|
||||
|
||||
/obj/item/weapon/gun/launcher/syringe/attack_hand(mob/living/user as mob)
|
||||
if(loc == user)
|
||||
|
||||
@@ -9,11 +9,14 @@
|
||||
origin_tech = "combat=8;materials=2;syndicate=8"
|
||||
caliber = "14.5mm"
|
||||
recoil = 2 //extra kickback
|
||||
//fire_sound = 'sound/weapons/sniper.ogg'
|
||||
handle_casings = HOLD_CASINGS
|
||||
load_method = SINGLE_CASING
|
||||
max_shells = 1
|
||||
ammo_type = /obj/item/ammo_casing/a145
|
||||
accuracy = -1 //made this not as bad as the LWAP's penalty because only one shot
|
||||
//+2 accuracy over the LWAP because only one shot
|
||||
accuracy = -1
|
||||
scoped_accuracy = 2
|
||||
var/bolt_open = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/heavysniper/update_icon()
|
||||
@@ -36,11 +39,12 @@
|
||||
else
|
||||
user << "<span class='notice'>You work the bolt closed.</span>"
|
||||
bolt_open = 0
|
||||
user.next_move = world.time + 4 //prevent spam, also makes having to work the bolt more of a drawback
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/heavysniper/special_check(mob/user)
|
||||
if(bolt_open)
|
||||
user << "<span class='warning'>You can't fire [src] with the bolt open!</span>"
|
||||
user << "<span class='warning'>You can't fire [src] while the bolt is open!</span>"
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
@@ -61,8 +65,3 @@
|
||||
|
||||
toggle_scope(2.0)
|
||||
|
||||
//need to override zoom() so that accuracy is properly reset even if we move while zoomed in.
|
||||
/obj/item/weapon/gun/projectile/heavysniper/zoom()
|
||||
..()
|
||||
if(zoom)
|
||||
accuracy -= initial(accuracy) //remove the accuracy penalty if zoomed in
|
||||
@@ -128,7 +128,7 @@
|
||||
xo = new_x - starting_loc.x
|
||||
|
||||
//Called when the projectile intercepts a mob. Returns 1 if the projectile hit the mob, 0 if it missed and should keep flying.
|
||||
/obj/item/projectile/proc/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier = -30)
|
||||
/obj/item/projectile/proc/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier)
|
||||
//accuracy bonus from aiming
|
||||
if (istype(shot_from, /obj/item/weapon/gun)) //If you aim at someone beforehead, it'll hit more often.
|
||||
var/obj/item/weapon/gun/daddy = shot_from //Kinda balanced by fact you need like 2 seconds to aim
|
||||
@@ -137,7 +137,7 @@
|
||||
miss_modifier += -30
|
||||
|
||||
//roll to-hit
|
||||
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, max(miss_modifier + 15*distance, 0))
|
||||
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, max(miss_modifier + 15*(distance-2), 0))
|
||||
if(!hit_zone)
|
||||
visible_message("<span class='notice'>\The [src] misses [target_mob] narrowly!</span>")
|
||||
return 0
|
||||
|
||||
@@ -25,16 +25,17 @@
|
||||
damage *= 0.7 //squishy mobs absorb KE
|
||||
return 1
|
||||
|
||||
if(istype(A, /obj/machinery) || istype(A, /obj/structure))
|
||||
var/chance = 15
|
||||
var/chance = 0
|
||||
if(istype(A, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = A
|
||||
chance = round(damage/W.damage_cap*100)
|
||||
chance = round(damage/W.damage_cap*150)
|
||||
else if(istype(A, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = A
|
||||
chance = round(damage/D.maxhealth*100)
|
||||
else if(istype(A, /obj/structure/girder) || istype(A, /obj/structure/cultgirder))
|
||||
chance = 100
|
||||
else if(istype(A, /obj/machinery) || istype(A, /obj/structure))
|
||||
chance = 15
|
||||
|
||||
if(prob(chance))
|
||||
if(A.opacity)
|
||||
@@ -125,7 +126,9 @@
|
||||
penetrating = 1
|
||||
|
||||
/obj/item/projectile/bullet/rifle/a145
|
||||
damage = 90
|
||||
damage = 80
|
||||
stun = 3
|
||||
weaken = 3
|
||||
penetrating = 5
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 46 KiB |
BIN
sound/weapons/gunshot_smg2.ogg
Normal file
BIN
sound/weapons/gunshot_smg2.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user