Tracking Slugs (#10287)

This commit is contained in:
Geeves
2020-10-23 17:22:27 +02:00
committed by GitHub
parent 50d1332a6c
commit 6c55a954c3
12 changed files with 72 additions and 29 deletions

View File

@@ -101,7 +101,7 @@
/obj/item/ammo_casing/shotgun
name = "shotgun slug"
desc = "A 12 gauge slug."
desc = "A 12-gauge slug."
icon_state = "slshell"
spent_icon = "slshell-spent"
caliber = "shotgun"
@@ -111,7 +111,7 @@
/obj/item/ammo_casing/shotgun/pellet
name = "shotgun shell"
desc = "A 12 gauge shell."
desc = "A 12-gauge shell."
icon_state = "gshell"
spent_icon = "gshell-spent"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun
@@ -119,7 +119,7 @@
/obj/item/ammo_casing/shotgun/blank
name = "shotgun shell"
desc = "A blank shell."
desc = "A 12-gauge blank shell."
icon_state = "blshell"
spent_icon = "blshell-spent"
projectile_type = /obj/item/projectile/bullet/blank
@@ -127,7 +127,7 @@
/obj/item/ammo_casing/shotgun/practice
name = "shotgun shell"
desc = "A practice shell."
desc = "A 12-gauge practice shell."
icon_state = "pshell"
spent_icon = "pshell-spent"
projectile_type = /obj/item/projectile/bullet/shotgun/practice
@@ -135,7 +135,7 @@
/obj/item/ammo_casing/shotgun/beanbag
name = "beanbag shell"
desc = "A beanbag shell."
desc = "A 12-gauge beanbag shell."
icon_state = "bshell"
spent_icon = "bshell-spent"
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
@@ -145,7 +145,7 @@
//is blocked by clothing that stops tasers and is vulnerable to EMP
/obj/item/ammo_casing/shotgun/stunshell
name = "stun shell"
desc = "A 12 gauge taser cartridge."
desc = "A 12-gauge taser cartridge."
icon_state = "stunshell"
spent_icon = "stunshell-spent"
projectile_type = /obj/item/projectile/energy/electrode/stunshot
@@ -159,7 +159,7 @@
//Does not stun, only blinds, but has area of effect.
/obj/item/ammo_casing/shotgun/flash
name = "flash shell"
desc = "A chemical shell used to signal distress or provide illumination."
desc = "A 12-gauge chemical shell used to signal distress or provide illumination."
icon_state = "fshell"
spent_icon = "fshell-spent"
projectile_type = /obj/item/projectile/energy/flash/flare
@@ -168,7 +168,7 @@
/obj/item/ammo_casing/shotgun/incendiary
name = "incendiary shell"
desc = "A 12 gauge incendiary shell."
desc = "A 12-gauge incendiary shell."
icon_state = "ishell"
spent_icon = "ishell-spent"
projectile_type = /obj/item/projectile/bullet/shotgun/incendiary
@@ -179,10 +179,17 @@
desc = "A 12-gauge shotgun slug fitted with a single-use ion pulse generator."
icon_state = "empshell"
spent_icon = "empshell-spent"
projectile_type = /obj/item/projectile/ion
projectile_type = /obj/item/projectile/ion
matter = list(DEFAULT_WALL_MATERIAL = 260, MATERIAL_URANIUM = 200)
reload_sound = 'sound/weapons/reload_shell_emp.ogg'
/obj/item/ammo_casing/shotgun/tracking
name = "tracking slug"
desc = "A 12-gauge shotgun slug fitted with a tracking implant, set to activate upon embedding flesh."
icon_state = "trackingshell"
spent_icon = "trackingshell-spent"
projectile_type = /obj/item/projectile/bullet/tracking
/obj/item/ammo_casing/tranq
name = "PPS shell"
desc = "A .50 cal PPS bullet casing."

View File

@@ -46,6 +46,7 @@
var/incinerate = 0
var/embed = 0 // whether or not the projectile can embed itself in the mob
var/embed_chance = 0 // a flat bonus to the % chance to embed
var/shrapnel_type //type of shrapnel the projectile leaves in its target.
var/p_x = 16
@@ -135,6 +136,16 @@
return FALSE
return TRUE
/obj/item/projectile/proc/do_embed(var/obj/item/organ/external/organ)
var/obj/item/SP = new shrapnel_type(organ)
SP.edge = TRUE
SP.sharp = TRUE
SP.name = (name != "shrapnel") ? "[initial(name)] shrapnel" : "shrapnel"
SP.desc += " It looks like it was fired from [shot_from]."
SP.forceMove(organ)
organ.embed(SP)
return SP
/obj/item/projectile/proc/get_structure_damage()
if(damage_type == BRUTE || damage_type == BURN)
return damage

View File

@@ -67,7 +67,6 @@
name = "shrapnel" //'shrapnel' sounds more dangerous (i.e. cooler) than 'pellet'
icon_state = "pellets"
damage = 20
//icon_state = "bullet" //TODO: would be nice to have it's own icon state
var/pellets = 4 //number of pellets
var/range_step = 2 //projectile will lose a fragment each time it travels this distance. Can be a non-integer.
var/base_spread = 90 //lower means the pellets spread more across body parts. If zero then this is considered a shrapnel explosion instead of a shrapnel cone
@@ -164,6 +163,22 @@
sharp = 0
incinerate = 10
/obj/item/projectile/bullet/tracking
name = "tracking shot"
damage = 20
embed_chance = 60 // this thing was designed to embed, so it has a 80% base chance to embed (damage + this flat increase)
agony = 20
shrapnel_type = /obj/item/implant/tracking
/obj/item/projectile/bullet/tracking/do_embed(obj/item/organ/external/organ)
. = ..()
if(.)
var/obj/item/implant/tracking/T = .
T.implanted = TRUE
T.imp_in = organ.owner
T.part = organ
LAZYADD(organ.implants, T)
//Should do about 80 damage at 1 tile distance (adjacent), and 50 damage at 3 tiles distance.
//Overall less damage than slugs in exchange for more damage at very close range and more embedding
/obj/item/projectile/bullet/pellet/shotgun