Merge remote-tracking branch 'citadel/master' into combat_rework_experimental

This commit is contained in:
silicons
2020-09-19 15:56:13 -07:00
1781 changed files with 68073 additions and 31311 deletions
@@ -36,6 +36,14 @@
if(isgun(fired_from))
var/obj/item/gun/G = fired_from
BB.damage *= G.projectile_damage_multiplier
if(HAS_TRAIT(user, TRAIT_INSANE_AIM))
BB.ricochets_max = max(BB.ricochets_max, 10) //bouncy!
BB.ricochet_chance = max(BB.ricochet_chance, 100) //it wont decay so we can leave it at 100 for always bouncing
BB.ricochet_auto_aim_range = max(BB.ricochet_auto_aim_range, 3)
BB.ricochet_auto_aim_angle = max(BB.ricochet_auto_aim_angle, 360) //it can turn full circle and shoot you in the face because our aim? is insane.
BB.ricochet_decay_chance = 0
BB.ricochet_decay_damage = max(BB.ricochet_decay_damage, 0.1)
BB.ricochet_incidence_leeway = 0
if(reagents && BB.reagents)
reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets
@@ -14,9 +14,13 @@
/obj/item/ammo_casing/a357/match
name = ".357 match bullet casing"
desc = "A .357 bullet casing, manufactured to exceedingly high standards."
caliber = "357"
projectile_type = /obj/item/projectile/bullet/a357/match
/obj/item/ammo_casing/a357/dumdum
name = ".357 DumDum bullet casing"
desc = "A .357 bullet casing. Usage of this ammunition will constitute a war crime in your area."
projectile_type = /obj/item/projectile/bullet/a357/dumdum
// 7.62x38mmR (Nagant Revolver)
/obj/item/ammo_casing/n762
@@ -68,4 +72,4 @@
/obj/item/ammo_casing/c38/dumdum
name = ".38 DumDum bullet casing"
desc = "A .38 DumDum bullet casing."
projectile_type = /obj/item/projectile/bullet/c38/dumdum
projectile_type = /obj/item/projectile/bullet/c38/dumdum
@@ -43,3 +43,17 @@
/obj/item/ammo_casing/magic/locker
projectile_type = /obj/item/projectile/magic/locker
//Spell book ammo casing
/obj/item/ammo_casing/magic/book
projectile_type = /obj/item/projectile/magic/spellcard/book
/obj/item/ammo_casing/magic/book/spark
projectile_type = /obj/item/projectile/magic/spellcard/book/spark
/obj/item/ammo_casing/magic/book/heal
projectile_type = /obj/item/projectile/magic/spellcard/book/heal
harmful = FALSE
/obj/item/ammo_casing/magic/book/shock
projectile_type = /obj/item/projectile/magic/spellcard/book/shock
@@ -16,6 +16,11 @@
name = "speed loader (.357 AP)"
ammo_type = /obj/item/ammo_casing/a357/ap
/obj/item/ammo_box/a357/dumdum
name = "speed loader (.357 DumDum)"
desc = "Designed to quickly reload revolvers. Usage of these rounds will constitute a war crime in your area."
ammo_type = /obj/item/ammo_casing/a357/dumdum
/obj/item/ammo_box/c38
name = "speed loader (.38 rubber)"
desc = "Designed to quickly reload revolvers."
@@ -47,7 +52,7 @@
/obj/item/ammo_box/c38/dumdum
name = "speed loader (.38 DumDum)"
desc = "Designed to quickly reload revolvers. DumDum bullets shatter on impact and shred the target's innards, likely getting caught inside."
desc = "Designed to quickly reload revolvers. These rounds expand on impact, allowing them to shred the target and cause massive bleeding. Very weak against armor and distant targets."
ammo_type = /obj/item/ammo_casing/c38/dumdum
/obj/item/ammo_box/c38/match
@@ -144,6 +149,9 @@
icon = 'icons/obj/ammo.dmi'
icon_state = "shotgunclip"
caliber = "shotgun" // slapped in to allow shell mix n match
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_POCKET
w_class = WEIGHT_CLASS_NORMAL
w_volume = ITEM_VOLUME_STRIPPER_CLIP
ammo_type = /obj/item/ammo_casing/shotgun
max_ammo = 4
var/pixeloffsetx = 4
@@ -1,5 +1,5 @@
/obj/item/ammo_box/magazine/m12g
name = "shotgun magazine (12g buckshot slugs)"
name = "shotgun magazine (12g buckshot)"
desc = "A drum magazine."
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
@@ -17,7 +17,7 @@
/obj/item/ammo_box/magazine/m12g/slug
name = "shotgun magazine (12g slugs)"
icon_state = "m12gb" //this may need an unique sprite
icon_state = "m12gsl"
ammo_type = /obj/item/ammo_casing/shotgun
/obj/item/ammo_box/magazine/m12g/dragon
+38 -27
View File
@@ -29,7 +29,7 @@
trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers
var/sawn_desc = null //description change if weapon is sawn-off
var/sawn_off = FALSE
/// can we be put into a turret
var/can_turret = TRUE
/// can we be put in a circuit
@@ -62,7 +62,8 @@
var/no_pin_required = FALSE //whether the gun can be fired without a pin
var/obj/item/flashlight/gun_light
var/can_flashlight = 0
var/can_flashlight = FALSE
var/gunlight_state = "flight"
var/obj/item/kitchen/knife/bayonet
var/mutable_appearance/knife_overlay
var/can_bayonet = FALSE
@@ -193,7 +194,8 @@
return
if(iscarbon(target))
var/mob/living/carbon/C = target
for(var/datum/wound/W in C.all_wounds)
for(var/i in C.all_wounds)
var/datum/wound/W = i
if(W.try_treating(src, user))
return // another coward cured!
@@ -309,8 +311,6 @@
randomized_gun_spread = rand(0, spread)
else if(burst_size > 1 && burst_spread)
randomized_gun_spread = rand(0, burst_spread)
if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
bonus_spread += 25
var/randomized_bonus_spread = rand(0, bonus_spread)
if(burst_size > 1)
@@ -418,14 +418,7 @@
return
to_chat(user, "<span class='notice'>You attach \the [K] to the front of \the [src].</span>")
bayonet = K
var/state = "bayonet" //Generic state.
if(bayonet.icon_state in icon_states('icons/obj/guns/bayonets.dmi')) //Snowflake state?
state = bayonet.icon_state
var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi'
knife_overlay = mutable_appearance(bayonet_icons, state)
knife_overlay.pixel_x = knife_x_offset
knife_overlay.pixel_y = knife_y_offset
add_overlay(knife_overlay, TRUE)
update_icon()
else if(istype(I, /obj/item/screwdriver))
if(gun_light)
var/obj/item/flashlight/seclite/S = gun_light
@@ -440,8 +433,7 @@
var/obj/item/kitchen/knife/K = bayonet
K.forceMove(get_turf(user))
bayonet = null
cut_overlay(knife_overlay, TRUE)
knife_overlay = null
update_icon()
else
return ..()
@@ -469,22 +461,35 @@
set_light(gun_light.brightness_on, gun_light.flashlight_power, gun_light.light_color)
else
set_light(0)
cut_overlays(flashlight_overlay, TRUE)
var/state = "flight[gun_light.on? "_on":""]" //Generic state.
else
set_light(0)
update_icon()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/gun/update_overlays()
. = ..()
if(gun_light)
var/mutable_appearance/flashlight_overlay
var/state = "[gunlight_state][gun_light.on? "_on":""]" //Generic state.
if(gun_light.icon_state in icon_states('icons/obj/guns/flashlights.dmi')) //Snowflake state?
state = gun_light.icon_state
flashlight_overlay = mutable_appearance('icons/obj/guns/flashlights.dmi', state)
flashlight_overlay.pixel_x = flight_x_offset
flashlight_overlay.pixel_y = flight_y_offset
add_overlay(flashlight_overlay, TRUE)
else
set_light(0)
cut_overlays(flashlight_overlay, TRUE)
flashlight_overlay = null
update_icon(TRUE)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
. += flashlight_overlay
if(bayonet)
var/mutable_appearance/knife_overlay
var/state = "bayonet" //Generic state.
if(bayonet.icon_state in icon_states('icons/obj/guns/bayonets.dmi')) //Snowflake state?
state = bayonet.icon_state
var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi'
knife_overlay = mutable_appearance(bayonet_icons, state)
knife_overlay.pixel_x = knife_x_offset
knife_overlay.pixel_y = knife_y_offset
. += knife_overlay
/obj/item/gun/item_action_slot_check(slot, mob/user, datum/action/A)
if(istype(A, /datum/action/item_action/toggle_scope_zoom) && slot != SLOT_HANDS)
@@ -605,10 +610,16 @@
var/penalty = (last_fire + GUN_AIMING_TIME + fire_delay) - world.time
if(penalty > 0) //Yet we only penalize users firing it multiple times in a haste. fire_delay isn't necessarily cumbersomeness.
aiming_delay = penalty
if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) //To be removed in favor of something less tactless later.
if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE) || HAS_TRAIT(user, TRAIT_INSANE_AIM)) //To be removed in favor of something less tactless later.
base_inaccuracy /= 1.5
if(stamloss > STAMINA_NEAR_SOFTCRIT) //This can null out the above bonus.
base_inaccuracy *= 1 + (stamloss - STAMINA_NEAR_SOFTCRIT)/(STAMINA_NEAR_CRIT - STAMINA_NEAR_SOFTCRIT)*0.5
if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
if(!HAS_TRAIT(user, TRAIT_INSANE_AIM))
bonus_spread += 25
else
//you have both poor aim and insane aim, why?
bonus_spread += rand(0,50)
var/mult = max((GUN_AIMING_TIME + aiming_delay + user.last_click_move - world.time)/GUN_AIMING_TIME, -0.5) //Yes, there is a bonus for taking time aiming.
if(mult < 0) //accurate weapons should provide a proper bonus with negative inaccuracy. the opposite is true too.
mult *= 1/inaccuracy_modifier
@@ -18,13 +18,15 @@
/obj/item/gun/ballistic/automatic/proto/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/update_icon()
..()
/obj/item/gun/ballistic/automatic/update_overlays()
. = ..()
if(automatic_burst_overlay)
if(!select)
add_overlay("[initial(icon_state)]semi")
. += ("[initial(icon_state)]semi")
if(select == 1)
add_overlay("[initial(icon_state)]burst")
. += "[initial(icon_state)]burst"
/obj/item/gun/ballistic/automatic/update_icon_state()
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/attackby(obj/item/A, mob/user, params)
@@ -115,8 +117,7 @@
. = ..()
empty_alarm()
/obj/item/gun/ballistic/automatic/c20r/update_icon()
..()
/obj/item/gun/ballistic/automatic/c20r/update_icon_state()
icon_state = "c20r[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/wt550
@@ -141,9 +142,8 @@
. = ..()
spread = 0
/obj/item/gun/ballistic/automatic/wt550/update_icon()
..()
icon_state = "wt550[magazine ? "-[CEILING(( (get_ammo(FALSE) / magazine.max_ammo) * 20) /4, 1)*4]" : "-0"]" //Sprites only support up to 20.
/obj/item/gun/ballistic/automatic/wt550/update_icon_state()
icon_state = "wt550[magazine ? "-[CEILING(((get_ammo(FALSE) / magazine.max_ammo) * 20) /4, 1)*4]" : "-0"]" //Sprites only support up to 20.
/obj/item/gun/ballistic/automatic/mini_uzi
name = "\improper Type U3 Uzi"
@@ -160,6 +160,7 @@
mag_type = /obj/item/ammo_box/magazine/m556
fire_sound = 'sound/weapons/gunshot_smg.ogg'
can_suppress = FALSE
automatic_burst_overlay = FALSE
var/obj/item/gun/ballistic/revolver/grenadelauncher/underbarrel
burst_size = 3
burst_shot_delay = 2
@@ -191,18 +192,19 @@
underbarrel.attackby(A, user, params)
else
..()
/obj/item/gun/ballistic/automatic/m90/update_icon()
..()
cut_overlays()
/obj/item/gun/ballistic/automatic/m90/update_overlays()
. = ..()
switch(select)
if(0)
add_overlay("[initial(icon_state)]semi")
. += "[initial(icon_state)]semi"
if(1)
add_overlay("[initial(icon_state)]burst")
. += "[initial(icon_state)]burst"
if(2)
add_overlay("[initial(icon_state)]gren")
. += "[initial(icon_state)]gren"
/obj/item/gun/ballistic/automatic/m90/update_icon_state()
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
return
/obj/item/gun/ballistic/automatic/m90/burst_select()
var/mob/living/carbon/human/user = usr
switch(select)
@@ -257,6 +259,7 @@
weapon_weight = WEAPON_MEDIUM
mag_type = /obj/item/ammo_box/magazine/m12g
fire_sound = 'sound/weapons/gunshot.ogg'
automatic_burst_overlay = FALSE
can_suppress = FALSE
burst_size = 1
pin = /obj/item/firing_pin/implant/pindicate
@@ -269,10 +272,13 @@
. = ..()
update_icon()
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_icon()
cut_overlays()
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_icon_state()
return
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_overlays()
. = ..()
if(magazine)
add_overlay("[magazine.icon_state]")
. += "[magazine.icon_state]"
icon_state = "bulldog[chambered ? "" : "-e"]"
/obj/item/gun/ballistic/automatic/shotgun/bulldog/afterattack()
@@ -298,6 +304,7 @@
burst_shot_delay = 1
spread = 7
pin = /obj/item/firing_pin/implant/pindicate
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
pin = /obj/item/firing_pin
@@ -316,7 +323,7 @@
playsound(user, 'sound/weapons/sawclose.ogg', 60, 1)
update_icon()
/obj/item/gun/ballistic/automatic/l6_saw/update_icon()
/obj/item/gun/ballistic/automatic/l6_saw/update_icon_state()
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? CEILING(get_ammo(0)/12.5, 1)*25 : "-empty"][suppressed ? "-suppressed" : ""]"
item_state = "l6[cover_open ? "openmag" : "closedmag"]"
@@ -369,9 +376,10 @@
zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you.
zoom_out_amt = 13
slot_flags = ITEM_SLOT_BACK
automatic_burst_overlay = FALSE
actions_types = list()
/obj/item/gun/ballistic/automatic/sniper_rifle/update_icon()
/obj/item/gun/ballistic/automatic/sniper_rifle/update_icon_state()
if(magazine)
icon_state = "sniper-mag"
else
@@ -397,9 +405,10 @@
can_suppress = TRUE
w_class = WEIGHT_CLASS_HUGE
slot_flags = ITEM_SLOT_BACK
automatic_burst_overlay = FALSE
actions_types = list()
/obj/item/gun/ballistic/automatic/surplus/update_icon()
/obj/item/gun/ballistic/automatic/surplus/update_icon_state()
if(magazine)
icon_state = "surplus"
else
@@ -413,6 +422,7 @@
icon_state = "oldrifle"
item_state = "arg"
mag_type = /obj/item/ammo_box/magazine/recharge
automatic_burst_overlay = FALSE
fire_delay = 2
can_suppress = FALSE
burst_size = 1
@@ -420,7 +430,5 @@
fire_sound = 'sound/weapons/laser.ogg'
casing_ejector = FALSE
/obj/item/gun/ballistic/automatic/laser/update_icon()
..()
/obj/item/gun/ballistic/automatic/laser/update_icon_state()
icon_state = "oldrifle[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""]"
return
@@ -42,8 +42,7 @@
actions_types = list()
casing_ejector = FALSE
/obj/item/gun/ballistic/automatic/gyropistol/update_icon()
..()
/obj/item/gun/ballistic/automatic/gyropistol/update_icon_state()
icon_state = "[initial(icon_state)][magazine ? "loaded" : ""]"
/obj/item/gun/ballistic/automatic/speargun
@@ -54,6 +53,7 @@
w_class = WEIGHT_CLASS_BULKY
force = 10
can_suppress = FALSE
automatic_burst_overlay = FALSE
mag_type = /obj/item/ammo_box/magazine/internal/speargun
fire_sound = 'sound/weapons/grenadelaunch.ogg'
burst_size = 1
@@ -62,8 +62,9 @@
actions_types = list()
casing_ejector = FALSE
/obj/item/gun/ballistic/automatic/speargun/update_icon()
return
/obj/item/gun/ballistic/automatic/speargun/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/gun/ballistic/automatic/speargun/attack_self()
return
@@ -137,7 +138,7 @@
chamber_round()
update_icon()
/obj/item/gun/ballistic/rocketlauncher/update_icon()
/obj/item/gun/ballistic/rocketlauncher/update_icon_state()
icon_state = "[initial(icon_state)]-[chambered ? "1" : "0"]"
/obj/item/gun/ballistic/rocketlauncher/suicide_act(mob/living/user)
@@ -51,11 +51,6 @@
cell.use(shot.energy_cost)
. = ..()
/obj/item/gun/ballistic/automatic/magrifle/emp_act(severity)
. = ..()
if(!(. & EMP_PROTECT_CONTENTS))
cell.use(round(cell.charge / severity))
/obj/item/gun/ballistic/automatic/magrifle/get_cell()
return cell
@@ -75,8 +70,7 @@
recoil = 2
weapon_weight = WEAPON_HEAVY
/obj/item/gun/ballistic/automatic/magrifle/hyperburst/update_icon()
..()
/obj/item/gun/ballistic/automatic/magrifle/hyperburst/update_icon_state()
icon_state = "hyperburst[magazine ? "-[get_ammo()]" : ""][chambered ? "" : "-e"]"
///magpistol///
@@ -92,12 +86,14 @@
fire_delay = 2
inaccuracy_modifier = 0.25
cell_type = /obj/item/stock_parts/cell/magnetic/pistol
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/magrifle/pistol/update_icon()
..()
cut_overlays()
/obj/item/gun/ballistic/automatic/magrifle/pistol/update_overlays()
. = ..()
if(magazine)
add_overlay("magpistol-magazine")
. += "magpistol-magazine"
/obj/item/gun/ballistic/automatic/magrifle/pistol/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
/obj/item/gun/ballistic/automatic/magrifle/pistol/nopin
@@ -8,12 +8,12 @@
burst_size = 1
fire_delay = 0
actions_types = list()
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/pistol/no_mag
spawnwithmagazine = FALSE
/obj/item/gun/ballistic/automatic/pistol/update_icon()
..()
/obj/item/gun/ballistic/automatic/pistol/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/pistol/suppressed/Initialize(mapload)
@@ -28,6 +28,7 @@
icon = 'modular_citadel/icons/obj/guns/cit_guns.dmi'
icon_state = "cde"
can_unsuppress = TRUE
automatic_burst_overlay = FALSE
obj_flags = UNIQUE_RENAME
unique_reskin = list("Default" = "cde",
"N-99" = "n99",
@@ -38,20 +39,18 @@
"PX4 Storm" = "px4"
)
/obj/item/gun/ballistic/automatic/pistol/modular/update_icon()
..()
/obj/item/gun/ballistic/automatic/pistol/modular/update_icon_state()
if(current_skin)
icon_state = "[unique_reskin[current_skin]][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
else
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/pistol/modular/update_overlays()
. = ..()
if(magazine && suppressed)
cut_overlays()
add_overlay("[unique_reskin[current_skin]]-magazine-sup") //Yes, this means the default iconstate can't have a magazine overlay
. += "[unique_reskin[current_skin]]-magazine-sup" //Yes, this means the default iconstate can't have a magazine overlay
else if (magazine)
cut_overlays()
add_overlay("[unique_reskin[current_skin]]-magazine")
else
cut_overlays()
. += "[unique_reskin[current_skin]]-magazine"
/obj/item/gun/ballistic/automatic/pistol/m1911
name = "\improper M1911"
@@ -77,14 +76,14 @@
force = 14
mag_type = /obj/item/ammo_box/magazine/m50
can_suppress = FALSE
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/pistol/deagle/update_icon()
..()
/obj/item/gun/ballistic/automatic/pistol/deagle/update_overlays()
. = ..()
if(magazine)
cut_overlays()
add_overlay("deagle_magazine")
else
cut_overlays()
. += "deagle_magazine"
/obj/item/gun/ballistic/automatic/pistol/deagle/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
/obj/item/gun/ballistic/automatic/pistol/deagle/gold
@@ -142,14 +141,14 @@
actions_types = list()
fire_sound = 'sound/weapons/blastcannon.ogg'
spread = 20 //damn thing has no rifling.
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/pistol/antitank/update_icon()
..()
/obj/item/gun/ballistic/automatic/pistol/antitank/update_overlays()
. = ..()
if(magazine)
cut_overlays()
add_overlay("atp-mag")
else
cut_overlays()
. += "atp-mag"
/obj/item/gun/ballistic/automatic/pistol/antitank/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
/obj/item/gun/ballistic/automatic/pistol/antitank/syndicate
@@ -84,6 +84,11 @@
. = ..()
. += "[get_ammo(0,0)] of those are live rounds."
/obj/item/gun/ballistic/revolver/syndicate
unique_reskin = list("Default" = "revolver",
"Silver" = "russianrevolver",
"Robust" = "revolvercit")
/obj/item/gun/ballistic/revolver/detective
name = "\improper .38 Mars Special"
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
@@ -343,10 +348,10 @@
else
to_chat(user, "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>")
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/update_icon()
..()
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/update_overlays()
. = ..()
if(slung)
icon_state += "sling"
. += "[icon_state]sling"
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/sawoff(mob/user)
. = ..()
@@ -486,4 +491,4 @@
for(var/i = 0, i < ratio, i++)
var/mutable_appearance/charge_bar = mutable_appearance(icon, "[initial(icon_state)]_charge", color = batt_color)
charge_bar.pixel_x = i
. += charge_bar
. += charge_bar
@@ -163,10 +163,10 @@
else
to_chat(user, "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>")
/obj/item/gun/ballistic/shotgun/boltaction/improvised/update_icon()
..()
/obj/item/gun/ballistic/shotgun/boltaction/improvised/update_overlays()
. = ..()
if(slung)
icon_state += "sling"
. += "[icon_state]sling"
/obj/item/gun/ballistic/shotgun/boltaction/enchanted
name = "enchanted bolt action rifle"
@@ -271,7 +271,7 @@
spread = 2
update_icon()
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/update_icon()
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/update_icon_state()
icon_state = "[current_skin ? unique_reskin[current_skin] : "cshotgun"][stock ? "" : "c"]"
//Dual Feed Shotgun
@@ -27,9 +27,9 @@
burst_size = 1
fire_delay = 0
actions_types = list()
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/toy/pistol/update_icon()
..()
/obj/item/gun/ballistic/automatic/toy/pistol/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/toy/pistol/riot
+38 -28
View File
@@ -29,7 +29,6 @@
var/charge_sections = 4
ammo_x_offset = 2
var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail
var/old_ratio = 0 // stores the gun's previous ammo "ratio" to see if it needs an updated icon
var/selfcharge = EGUN_NO_SELFCHARGE // EGUN_SELFCHARGE if true, EGUN_SELFCHARGE_BORG drains the cyborg's cell to recharge its own
var/charge_tick = 0
var/charge_delay = 4
@@ -64,10 +63,20 @@
START_PROCESSING(SSobj, src)
update_icon()
/obj/item/gun/energy/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/gun/energy/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/handle_atom_del(atom/A)
if(A == cell)
cell = null
update_icon()
return ..()
/obj/item/gun/energy/examine(mob/user)
. = ..()
if(!right_click_overridden)
@@ -226,46 +235,47 @@
#undef DECREMENT_OR_WRAP
#undef IS_VALID_INDEX
/obj/item/gun/energy/update_icon(force_update)
if(QDELETED(src))
/obj/item/gun/energy/update_icon_state()
if(initial(item_state))
return
..()
var/ratio = get_charge_ratio()
var/new_item_state = ""
new_item_state = initial(icon_state)
if(modifystate)
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
new_item_state += "[shot.select_name]"
new_item_state += "[ratio]"
item_state = new_item_state
/obj/item/gun/energy/update_overlays()
. = ..()
if(QDELETED(src))
return
if(!automatic_charge_overlays)
return
var/ratio = can_shoot() ? CEILING(clamp(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0
// Sets the ratio to 0 if the gun doesn't have enough charge to fire, or if it's power cell is removed.
// TG issues #5361 & #47908
if(ratio == old_ratio && !force_update)
return
old_ratio = ratio
cut_overlays()
var/iconState = "[icon_state]_charge"
var/itemState = null
if(!initial(item_state))
itemState = icon_state
var/overlay_icon_state = "[icon_state]_charge"
var/ratio = get_charge_ratio()
if (modifystate)
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
add_overlay("[icon_state]_[shot.select_name]")
iconState += "_[shot.select_name]"
if(itemState)
itemState += "[shot.select_name]"
. += "[icon_state]_[shot.select_name]"
overlay_icon_state += "_[shot.select_name]"
if(ratio == 0)
add_overlay("[icon_state]_empty")
. += "[icon_state]_empty"
else
if(!shaded_charge)
var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState)
var/mutable_appearance/charge_overlay = mutable_appearance(icon, overlay_icon_state)
for(var/i = ratio, i >= 1, i--)
charge_overlay.pixel_x = ammo_x_offset * (i - 1)
charge_overlay.pixel_y = ammo_y_offset * (i - 1)
add_overlay(charge_overlay)
. += new /mutable_appearance(charge_overlay)
else
add_overlay("[icon_state]_charge[ratio]")
if(itemState)
itemState += "[ratio]"
item_state = itemState
if(ismob(loc)) //forces inhands to update
var/mob/M = loc
M.update_inv_hands()
. += "[icon_state]_charge[ratio]"
///Used by update_icon_state() and update_overlays()
/obj/item/gun/energy/proc/get_charge_ratio()
return can_shoot() ? CEILING(clamp(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0
// Sets the ratio to 0 if the gun doesn't have enough charge to fire, or if its power cell is removed.
/obj/item/gun/energy/suicide_act(mob/living/user)
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))
@@ -207,12 +207,11 @@
to_chat(user,"<span class='notice'>You switch [src] setting to [setting] mode.</span>")
update_icon()
/obj/item/gun/energy/dueling/update_icon(force_update)
/obj/item/gun/energy/dueling/update_overlays(force_update)
. = ..()
if(setting_overlay)
cut_overlay(setting_overlay)
setting_overlay.icon_state = setting_iconstate()
add_overlay(setting_overlay)
. += setting_overlay
/obj/item/gun/energy/dueling/Destroy()
if(duel)
@@ -363,8 +362,7 @@
STR.max_items = 2
STR.can_hold = typecacheof(/obj/item/gun/energy/dueling)
/obj/item/storage/lockbox/dueling/update_icon()
cut_overlays()
/obj/item/storage/lockbox/dueling/update_icon_state()
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
if(locked)
icon_state = "medalbox+l"
@@ -19,17 +19,13 @@
cell_type = /obj/item/stock_parts/cell{charge = 600; maxcharge = 600}
ammo_x_offset = 2
charge_sections = 3
gunlight_state = "mini-light"
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
/obj/item/gun/energy/e_gun/mini/Initialize()
gun_light = new /obj/item/flashlight/seclite(src)
return ..()
/obj/item/gun/energy/e_gun/mini/update_icon()
..()
if(gun_light && gun_light.on)
add_overlay("mini-light")
/obj/item/gun/energy/e_gun/stun
name = "tactical energy gun"
desc = "Military issue energy gun, is able to fire stun rounds."
@@ -138,15 +134,15 @@
return
fail_chance = min(fail_chance + round(15/severity), 100)
/obj/item/gun/energy/e_gun/nuclear/update_icon()
..()
/obj/item/gun/energy/e_gun/nuclear/update_overlays()
. = ..()
if(crit_fail)
add_overlay("[icon_state]_fail_3")
. += "[icon_state]_fail_3"
else
switch(fail_tick)
if(0)
add_overlay("[icon_state]_fail_0")
. += "[icon_state]_fail_0"
if(1 to 150)
add_overlay("[icon_state]_fail_1")
. += "[icon_state]_fail_1"
if(151 to INFINITY)
add_overlay("[icon_state]_fail_2")
. += "[icon_state]_fail_2"
@@ -46,13 +46,6 @@
range = 4
log_override = TRUE
/obj/item/gun/energy/kinetic_accelerator/premiumka/update_icon()
..()
if(!can_shoot())
add_overlay("[icon_state]_empty")
else
cut_overlays()
/obj/item/gun/energy/kinetic_accelerator/getinaccuracy(mob/living/user, bonus_spread, stamloss)
var/old_fire_delay = fire_delay //It's pretty irrelevant tbh but whatever.
fire_delay = overheat_time
@@ -186,12 +179,10 @@
update_icon()
overheat = FALSE
/obj/item/gun/energy/kinetic_accelerator/update_icon()
..()
/obj/item/gun/energy/kinetic_accelerator/update_overlays()
. = ..()
if(!can_shoot())
add_overlay("[icon_state]_empty")
else
cut_overlays()
. += "[icon_state]_empty"
//Casing
/obj/item/ammo_casing/energy/kinetic
+14 -14
View File
@@ -34,11 +34,11 @@
pin = null
ammo_x_offset = 1
/obj/item/gun/energy/decloner/update_icon()
/obj/item/gun/energy/decloner/update_overlays()
..()
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
add_overlay("decloner_spin")
. += "decloner_spin"
/obj/item/gun/energy/floragun
name = "floral somatoray"
@@ -125,7 +125,7 @@
flags_1 = CONDUCT_1
attack_verb = list("attacked", "slashed", "cut", "sliced")
force = 12
sharpness = IS_SHARP
sharpness = SHARP_EDGED
inaccuracy_modifier = 0.25
can_charge = 0
@@ -134,9 +134,10 @@
tool_behaviour = TOOL_WELDER
toolspeed = 0.7 //plasmacutters can be used as welders, and are faster than standard welders
/obj/item/gun/energy/plasmacutter/Initialize()
/obj/item/gun/energy/plasmacutter/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg')
AddElement(/datum/element/update_icon_blocker)
/obj/item/gun/energy/plasmacutter/examine(mob/user)
. = ..()
@@ -166,9 +167,6 @@
/obj/item/gun/energy/plasmacutter/use(amount)
return cell.use(amount * 100)
/obj/item/gun/energy/plasmacutter/update_icon()
return
/obj/item/gun/energy/plasmacutter/adv
name = "advanced plasma cutter"
icon_state = "adv_plasmacutter"
@@ -183,11 +181,12 @@
icon_state = "wormhole_projector"
pin = null
inaccuracy_modifier = 0.25
automatic_charge_overlays = FALSE
var/obj/effect/portal/p_blue
var/obj/effect/portal/p_orange
var/atmos_link = FALSE
/obj/item/gun/energy/wormhole_projector/update_icon()
/obj/item/gun/energy/wormhole_projector/update_icon_state()
icon_state = "[initial(icon_state)][current_firemode_index]"
item_state = icon_state
@@ -256,8 +255,9 @@
can_charge = 0
use_cyborg_cell = 1
/obj/item/gun/energy/printer/update_icon()
return
/obj/item/gun/energy/printer/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/gun/energy/printer/emp_act()
return
@@ -321,14 +321,14 @@
inaccuracy_modifier = 0.25
cell_type = /obj/item/stock_parts/cell/super
ammo_type = list(/obj/item/ammo_casing/energy/emitter)
automatic_charge_overlays = FALSE
/obj/item/gun/energy/emitter/update_icon()
..()
/obj/item/gun/energy/emitter/update_icon_state()
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
add_overlay("emitter_carbine_empty")
icon_state = "emitter_carbine_empty"
else
add_overlay("emitter_carbine")
icon_state = "emitter_carbine"
//the pickle ray
/obj/item/gun/energy/pickle_gun
@@ -0,0 +1,66 @@
/obj/item/gun/magic/wand/book
name = "blank spellbook"
desc = "It's not just a book, it's a SPELL book!"
ammo_type = /obj/item/ammo_casing/magic
icon = 'icons/obj/library.dmi'
icon_state = "book"
w_class = WEIGHT_CLASS_NORMAL
charges = 10 //We start with max pages
max_charges = 10
variable_charges = FALSE
/obj/item/gun/magic/wand/book/zap_self(mob/living/user)
to_chat(user, "The book has [charges] pages\s remaining.</span>")
/obj/item/gun/magic/wand/book/attackby(obj/item/S, mob/living/user, params)
if(!istype(S, /obj/item/paper))
return ..()
if(charges < max_charges)
charges++
recharge_newshot()
to_chat(user, "You add a new page to [src].</span>")
qdel(S)
update_icon()
process()
else
to_chat(user, "The [src] has no more room for pages!</span>")
//////////////////////
//Spell Book - SPARK//
//////////////////////
/obj/item/gun/magic/wand/book/spark
name = "Spell Book of Spark"
desc = "A spell book that fires burn pages to set the target ablaze!"
ammo_type = /obj/item/ammo_casing/magic/book/spark
icon_state = "spellbook_spark"
//////////////////////
//Spell Book - PAGE///
//////////////////////
/obj/item/gun/magic/wand/book/page
name = "Spell Book of Throw"
desc = "A spell book that throws pages at its target!"
ammo_type = /obj/item/ammo_casing/magic/book
icon_state = "spellbook_page"
//////////////////////
//Spell Book - SHOCK//
//////////////////////
/obj/item/gun/magic/wand/book/shock
name = "Spell Book of Shock"
desc = "A spell book that uses its pages to capture energy in the air and send it in a bolt at its target!"
ammo_type = /obj/item/ammo_casing/magic/book/shock
icon_state = "spellbook_shock"
////////////////////////
//Spell Book - HEALING//
////////////////////////
/obj/item/gun/magic/wand/book/healing
name = "Spell Book of Mending"
desc = "A spell book that uses its pages to heal and repair the target! The back of the book lists what it works on, and it seems to only be of flesh and of metal beings..."
ammo_type = /obj/item/ammo_casing/magic/book/heal
icon_state = "spellbook_healing"
+1 -1
View File
@@ -83,7 +83,7 @@
force = 20
armour_penetration = 75
block_chance = 50
sharpness = IS_SHARP
sharpness = SHARP_EDGED
max_charges = 4
/obj/item/gun/magic/staff/spellblade/Initialize()
@@ -35,6 +35,7 @@
slowdown = 1
item_flags = NO_MAT_REDEMPTION | SLOWS_WHILE_IN_HAND | NEEDS_PERMIT
pin = null
automatic_charge_overlays = FALSE
var/aiming = FALSE
var/aiming_time = 14
var/aiming_time_fire_threshold = 5
@@ -152,13 +153,13 @@
current_zoom_x = 0
current_zoom_y = 0
/obj/item/gun/energy/beam_rifle/update_icon()
cut_overlays()
/obj/item/gun/energy/beam_rifle/update_overlays()
. = ..()
var/obj/item/ammo_casing/energy/primary_ammo = ammo_type[1]
if(!QDELETED(cell) && (cell.charge > primary_ammo.e_cost))
add_overlay(charged_overlay)
. += charged_overlay
else
add_overlay(drained_overlay)
. += drained_overlay
/obj/item/gun/energy/beam_rifle/attack_self(mob/user)
if(!structure_piercing)
@@ -41,18 +41,16 @@
user.put_in_hands(bomb)
user.visible_message("<span class='warning'>[user] detaches [bomb] from [src].</span>")
bomb = null
name = initial(name)
desc = initial(desc)
update_icon()
return ..()
/obj/item/gun/blastcannon/update_icon()
/obj/item/gun/blastcannon/update_icon_state()
if(bomb)
icon_state = icon_state_loaded
name = "blast cannon"
desc = "A makeshift device used to concentrate a bomb's blast energy to a narrow wave."
else
icon_state = initial(icon_state)
name = initial(name)
desc = initial(desc)
/obj/item/gun/blastcannon/attackby(obj/O, mob/user)
if(istype(O, /obj/item/transfer_valve))
@@ -65,6 +63,8 @@
return FALSE
user.visible_message("<span class='warning'>[user] attaches [T] to [src]!</span>")
bomb = T
name = "blast cannon"
desc = "A makeshift device used to concentrate a bomb's blast energy to a narrow wave."
update_icon()
return TRUE
return ..()
+28 -13
View File
@@ -149,19 +149,25 @@
var/temporary_unstoppable_movement = FALSE
///If defined, on hit we create an item of this type then call hitby() on the hit target with this
///If defined, on hit we create an item of this type then call hitby() on the hit target with this, mainly used for embedding items (bullets) in targets
var/shrapnel_type
///If TRUE, hit mobs even if they're on the floor and not our target
var/hit_stunned_targets = FALSE
wound_bonus = CANT_WOUND
///How much we want to drop both wound_bonus and bare_wound_bonus (to a minimum of 0 for the latter) per tile, for falloff purposes
var/wound_falloff_tile
///How much we want to drop the embed_chance value, if we can embed, per tile, for falloff purposes
var/embed_falloff_tile
/// For telling whether we want to roll for bone breaking or lacerations if we're bothering with wounds
sharpness = FALSE
sharpness = SHARP_NONE
/obj/item/projectile/Initialize()
. = ..()
permutated = list()
decayedRange = range
if(embedding)
updateEmbedding()
/**
* Artificially modified to be called at around every world.icon_size pixels of movement.
@@ -169,6 +175,11 @@
*/
/obj/item/projectile/proc/Range()
range--
if(wound_bonus != CANT_WOUND)
wound_bonus += wound_falloff_tile
bare_wound_bonus = max(0, bare_wound_bonus + wound_falloff_tile)
if(embedding)
embedding["embed_chance"] += embed_falloff_tile
if(range <= 0 && loc)
on_range()
@@ -316,16 +327,18 @@
if(!trajectory)
return
var/turf/T = get_turf(A)
if(check_ricochet(A) && A.handle_ricochet(src)) //if you can ricochet, attempt to ricochet off the object
on_ricochet(A) //if allowed, use autoaim to ricochet into someone, otherwise default to ricocheting off the object from above
var/datum/point/pcache = trajectory.copy_to()
if(hitscan)
store_hitscan_collision(pcache)
decayedRange = max(0, decayedRange - reflect_range_decrease)
ricochet_chance *= ricochet_decay_chance
damage *= ricochet_decay_damage
range = decayedRange
return TRUE
if(check_ricochet_flag(A) && check_ricochet(A)) //if you can ricochet, attempt to ricochet off the object
ricochets++
if(A.handle_ricochet(src))
on_ricochet(A) //if allowed, use autoaim to ricochet into someone, otherwise default to ricocheting off the object from above
var/datum/point/pcache = trajectory.copy_to()
if(hitscan)
store_hitscan_collision(pcache)
decayedRange = max(0, decayedRange - reflect_range_decrease)
ricochet_chance *= ricochet_decay_chance
damage *= ricochet_decay_damage
range = decayedRange
return TRUE
var/distance = get_dist(T, starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
if(def_zone && check_zone(def_zone) != BODY_ZONE_CHEST)
@@ -447,6 +460,7 @@
return TRUE //Bullets don't drift in space
/obj/item/projectile/process(wait)
set waitfor = FALSE
if(!loc || !fired || !trajectory)
fired = FALSE
return PROCESS_KILL
@@ -669,7 +683,8 @@
if(!ignore_source_check && firer)
var/mob/M = firer
if((target == firer) || ((target == firer.loc) && ismecha(firer.loc)) || (target in firer.buckled_mobs) || (istype(M) && (M.buckled == target)))
return FALSE
if(!ricochets) //if it has ricocheted, it can hit the firer.
return FALSE
if(!ignore_loc && (loc != target.loc))
return FALSE
if(target in passthrough)
@@ -8,4 +8,12 @@
flag = "bullet"
hitsound_wall = "ricochet"
impact_effect_type = /obj/effect/temp_visual/impact_effect
sharpness = TRUE
sharpness = SHARP_POINTY
shrapnel_type = /obj/item/shrapnel/bullet
embedding = list(embed_chance=15, fall_chance=2, jostle_chance=0, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.5, pain_mult=3, rip_time=10)
wound_falloff_tile = -5
embed_falloff_tile = -5
/obj/item/projectile/bullet/smite
name = "divine retribution"
damage = 10
@@ -25,8 +25,10 @@
/obj/item/projectile/bullet/mm195x129
name = "1.95x129mm bullet"
damage = 45
damage = 40
armour_penetration = 5
wound_bonus = -50
wound_falloff_tile = 0
/obj/item/projectile/bullet/mm195x129_ap
name = "1.95x129mm armor-piercing bullet"
@@ -35,8 +37,12 @@
/obj/item/projectile/bullet/mm195x129_hp
name = "1.95x129mm hollow-point bullet"
damage = 60
damage = 50
armour_penetration = -60
sharpness = SHARP_EDGED
wound_bonus = -40
bare_wound_bonus = 30
wound_falloff_tile = -8
/obj/item/projectile/bullet/incendiary/mm195x129
name = "1.95x129mm incendiary bullet"
@@ -3,11 +3,13 @@
/obj/item/projectile/bullet/c9mm
name = "9mm bullet"
damage = 20
embedding = list(embed_chance=15, fall_chance=3, jostle_chance=4, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=5, jostle_pain_mult=6, rip_time=10)
/obj/item/projectile/bullet/c9mm_ap
name = "9mm armor-piercing bullet"
damage = 15
armour_penetration = 40
embedding = null
/obj/item/projectile/bullet/incendiary/c9mm
name = "9mm incendiary bullet"
@@ -19,8 +19,9 @@
ricochet_chance = 50
ricochet_auto_aim_angle = 10
ricochet_auto_aim_range = 3
wound_bonus = -35
sharpness = TRUE
wound_bonus = -20
bare_wound_bonus = 10
embedding = list(embed_chance=15, fall_chance=2, jostle_chance=2, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=3, jostle_pain_mult=5, rip_time=10)
/obj/item/projectile/bullet/c38/match
name = ".38 Match bullet"
@@ -43,13 +44,21 @@
ricochet_chance = 130
ricochet_decay_damage = 0.8
shrapnel_type = NONE
sharpness = SHARP_NONE
embedding = null
// premium .38 ammo from cargo, weak against armor, lower base damage, but excellent at embedding and causing slice wounds at close range
/obj/item/projectile/bullet/c38/dumdum
name = ".38 DumDum bullet"
damage = 15
armour_penetration = -30
ricochets_max = 0
shrapnel_type = /obj/item/shrapnel/bullet/c38/dumdum
sharpness = SHARP_EDGED
wound_bonus = 20
bare_wound_bonus = 20
embedding = list(embed_chance=75, fall_chance=3, jostle_chance=4, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=5, jostle_pain_mult=6, rip_time=10)
wound_falloff_tile = -5
embed_falloff_tile = -15
/obj/item/projectile/bullet/c38/rubber
name = ".38 rubber bullet"
@@ -102,6 +111,7 @@
/obj/item/projectile/bullet/a357
name = ".357 bullet"
damage = 60
wound_bonus = -70
/obj/item/projectile/bullet/a357/ap
name = ".357 armor-piercing bullet"
@@ -116,4 +126,15 @@
ricochet_auto_aim_angle = 50
ricochet_auto_aim_range = 6
ricochet_incidence_leeway = 80
ricochet_decay_chance = 1
ricochet_decay_chance = 1
/obj/item/projectile/bullet/a357/dumdum
name = ".357 DumDum bullet" // the warcrime bullet
damage = 40
armour_penetration = -20
wound_bonus = 45
bare_wound_bonus = 45
sharpness = SHARP_EDGED
embedding = list(embed_chance=90, fall_chance=2, jostle_chance=5, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=5, jostle_pain_mult=6, rip_time=10)
wound_falloff_tile = -1
embed_falloff_tile = -5
@@ -3,12 +3,15 @@
/obj/item/projectile/bullet/a556
name = "5.56mm bullet"
damage = 35
wound_bonus = -40
// 7.62 (Nagant Rifle)
/obj/item/projectile/bullet/a762
name = "7.62 bullet"
damage = 60
wound_bonus = -35
wound_falloff_tile = 0
/obj/item/projectile/bullet/a762_enchanted
name = "enchanted 7.62 bullet"
@@ -1,23 +1,26 @@
/obj/item/projectile/bullet/shotgun_slug
name = "12g shotgun slug"
damage = 60
damage = 50
sharpness = SHARP_POINTY
wound_bonus = 0
/obj/item/projectile/bullet/shotgun_slug/executioner
name = "executioner slug" // admin only, can dismember limbs
sharpness = TRUE
wound_bonus = 0
sharpness = SHARP_EDGED
wound_bonus = 80
/obj/item/projectile/bullet/shotgun_slug/pulverizer
name = "pulverizer slug" // admin only, can crush bones
sharpness = FALSE
wound_bonus = 0
sharpness = SHARP_NONE
wound_bonus = 80
/obj/item/projectile/bullet/shotgun_beanbag
name = "beanbag slug"
damage = 10
stamina = 70
wound_bonus = 20
sharpness = FALSE
sharpness = SHARP_NONE
embedding = null
/obj/item/projectile/bullet/incendiary/shotgun
name = "incendiary slug"
@@ -83,18 +86,22 @@
return BULLET_ACT_HIT
/obj/item/projectile/bullet/pellet
var/tile_dropoff = 0.75
var/tile_dropoff = 0.45
var/tile_dropoff_s = 1.25
/obj/item/projectile/bullet/pellet/shotgun_buckshot
name = "buckshot pellet"
damage = 12.5
wound_bonus = -10
damage = 7.5
wound_bonus = 5
bare_wound_bonus = 5
wound_falloff_tile = -2.5 // low damage + additional dropoff will already curb wounding potential anything past point blank
/obj/item/projectile/bullet/pellet/shotgun_rubbershot
name = "rubbershot pellet"
damage = 2
stamina = 15
sharpness = SHARP_NONE
embedding = null
/obj/item/projectile/bullet/pellet/Range()
..()
@@ -106,8 +113,10 @@
qdel(src)
/obj/item/projectile/bullet/pellet/shotgun_improvised
tile_dropoff = 0.55 //Come on it does 6 damage don't be like that.
tile_dropoff = 0.35 //Come on it does 6 damage don't be like that.
damage = 6
wound_bonus = 0
bare_wound_bonus = 7.5
/obj/item/projectile/bullet/pellet/shotgun_improvised/Initialize()
. = ..()
@@ -3,6 +3,8 @@
/obj/item/projectile/bullet/c45
name = ".45 bullet"
damage = 30
wound_bonus = -10
wound_falloff_tile = -10
/obj/item/projectile/bullet/c45_cleaning
name = ".45 bullet"
@@ -51,11 +53,15 @@
/obj/item/projectile/bullet/c46x30mm
name = "4.6x30mm bullet"
damage = 15
wound_bonus = -5
bare_wound_bonus = 5
embed_falloff_tile = -4
/obj/item/projectile/bullet/c46x30mm_ap
name = "4.6x30mm armor-piercing bullet"
damage = 12.5
armour_penetration = 40
embedding = null
/obj/item/projectile/bullet/incendiary/c46x30mm
name = "4.6x30mm incendiary bullet"
@@ -4,3 +4,60 @@
icon_state = "spellcard"
damage_type = BURN
damage = 2
/obj/item/projectile/magic/spellcard/book
nodamage = FALSE
name = "enchanted page"
desc = "A piece of paper enchanted to give it extreme durability and stiffness, along with a very hot burn to anyone unfortunate enough to get hit by a charged one."
icon_state = "spellcard"
damage_type = BURN
damage = 12
flag = "magic"
/obj/item/projectile/magic/spellcard/book/spark
damage = 4
var/fire_stacks = 4
/obj/item/projectile/magic/spellcard/book/spark/on_hit(atom/target, blocked = FALSE)
. = ..()
var/mob/living/carbon/M = target
if(ismob(target))
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
return BULLET_ACT_BLOCK
if(iscarbon(target))
M.adjust_fire_stacks(fire_stacks)
M.IgniteMob()
return
else
damage = 20 //If we are a simplemob we deal 5x damage
/obj/item/projectile/magic/spellcard/book/shock
damage = 0
stamina = 11
stutter = 5
jitter = 20
knockdown = 10
/obj/item/projectile/magic/spellcard/book/heal
damage = 0
nodamage = TRUE
/obj/item/projectile/magic/spellcard/book/heal/on_hit(atom/target, blocked = FALSE)
. = ..()
var/mob/living/carbon/M = target
if(ismob(target))
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
return BULLET_ACT_BLOCK
if(iscarbon(target))
M.visible_message("<span class='warning'>[src] mends [target]!</span>")
M.adjustBruteLoss(-5) //HEALS
M.adjustOxyLoss(-5)
M.adjustBruteLoss(-5)
M.adjustFireLoss(-5)
M.adjustToxLoss(-5, TRUE) //heals TOXINLOVERs
M.adjustCloneLoss(-5)
M.adjustStaminaLoss(-5)
return
@@ -2,7 +2,7 @@
name = "plasma blast"
icon_state = "plasmacutter"
damage_type = BRUTE
damage = 20
damage = 10
range = 4
dismemberment = 20
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
@@ -32,12 +32,12 @@
return BULLET_ACT_FORCE_PIERCE
/obj/item/projectile/plasma/adv
damage = 28
damage = 14
range = 5
mine_range = 5
/obj/item/projectile/plasma/adv/mech
damage = 40
damage = 20
range = 9
mine_range = 3
@@ -52,4 +52,4 @@
dismemberment = 0
damage = 10
range = 4
mine_range = 0
mine_range = 0