diff --git a/code/game/objects/items/granters/crafting/fletching.dm b/code/game/objects/items/granters/crafting/fletching.dm index 482cc2cd33e..7ca308dfd46 100644 --- a/code/game/objects/items/granters/crafting/fletching.dm +++ b/code/game/objects/items/granters/crafting/fletching.dm @@ -4,6 +4,8 @@ desc = "A how-to guide to crafting and maintaining wooden bows, fletching arrows, and... making violins?" crafting_recipe_types = list( /datum/crafting_recipe/arrow, + /datum/crafting_recipe/blunted_arrow,// BUBBER EDIT ADDITION - Nonlethal arrows + /datum/crafting_recipe/taser_arrow,// BUBBER EDIT ADDITION - Nonlethal arrows /datum/crafting_recipe/plastic_arrow, /datum/crafting_recipe/shortbow, /datum/crafting_recipe/holy_arrow, diff --git a/modular_skyrat/modules/mapping/code/mob_spawns.dm b/modular_skyrat/modules/mapping/code/mob_spawns.dm index b37bac43217..1cdbed29d47 100644 --- a/modular_skyrat/modules/mapping/code/mob_spawns.dm +++ b/modular_skyrat/modules/mapping/code/mob_spawns.dm @@ -6,6 +6,8 @@ ADD_TRAIT(spawned_human, TRAIT_NOBREATH, ROUNDSTART_TRAIT) ADD_TRAIT(spawned_human, TRAIT_RESISTCOLD, ROUNDSTART_TRAIT) + spawned_human.mind?.teach_crafting_recipe(/datum/crafting_recipe/bronze_arrow) + /obj/effect/mob_spawn/ghost_role/human/pirate/silverscale/special(mob/living/carbon/human/spawned_human) . = ..() spawned_human.grant_language(/datum/language/common, source = LANGUAGE_SPAWNER) diff --git a/modular_skyrat/modules/primitive_catgirls/code/spawner.dm b/modular_skyrat/modules/primitive_catgirls/code/spawner.dm index 11a3d9d96ce..bea14f9e973 100644 --- a/modular_skyrat/modules/primitive_catgirls/code/spawner.dm +++ b/modular_skyrat/modules/primitive_catgirls/code/spawner.dm @@ -77,6 +77,13 @@ to_chat(user, span_warning("It'd be weird if there were multiple of you in that cave, wouldn't it?")) return FALSE +/obj/effect/mob_spawn/ghost_role/human/primitive_catgirl/special(mob/living/spawned_mob, mob/mob_possessor, apply_prefs) + . = ..() + + if (ishuman(spawned_mob)) + var/mob/living/carbon/human/human_spawned = spawned_mob + human_spawned.mind?.teach_crafting_recipe(/datum/crafting_recipe/bronze_arrow) + // This stuff is put on equip because it turns out /special sometimes just don't get called because skyrat /obj/effect/mob_spawn/ghost_role/human/primitive_catgirl/equip(mob/living/carbon/human/spawned_human) . = ..() diff --git a/modular_skyrat/modules/sec_haul/code/guns/armory_spawns.dm b/modular_skyrat/modules/sec_haul/code/guns/armory_spawns.dm index 03b321a383f..fe37942eb1b 100644 --- a/modular_skyrat/modules/sec_haul/code/guns/armory_spawns.dm +++ b/modular_skyrat/modules/sec_haul/code/guns/armory_spawns.dm @@ -43,8 +43,13 @@ /obj/item/gun/ballistic/shotgun/riot/sol, /obj/item/gun/ballistic/shotgun/riot/sol, /obj/item/gun/ballistic/shotgun/riot/sol, + /obj/item/gun/ballistic/bow/security, ) +/obj/effect/spawner/armory_spawn/shotguns/Initialize(mapload) + . = ..() + new /obj/item/storage/bag/quiver/lesser/security/armory(loc) + /obj/structure/closet/ammunitionlocker/useful/PopulateContents() new /obj/item/storage/box/rubbershot(src) new /obj/item/storage/box/rubbershot(src) diff --git a/modular_skyrat/modules/tribal_extended/code/recipes.dm b/modular_skyrat/modules/tribal_extended/code/recipes.dm index 0266edca53b..d4dc8aedf58 100644 --- a/modular_skyrat/modules/tribal_extended/code/recipes.dm +++ b/modular_skyrat/modules/tribal_extended/code/recipes.dm @@ -47,6 +47,7 @@ ) category = CAT_WEAPON_AMMO non_craftable = TRUE + crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED steps = list("Reinforce the arrowhead with bronze.") /datum/crafting_recipe/goliathshield diff --git a/modular_zubbers/code/game/objects/effects/spawners/random/armory.dm b/modular_zubbers/code/game/objects/effects/spawners/random/armory.dm index 0ae654d520f..252879574b1 100644 --- a/modular_zubbers/code/game/objects/effects/spawners/random/armory.dm +++ b/modular_zubbers/code/game/objects/effects/spawners/random/armory.dm @@ -60,7 +60,7 @@ spawn_all_loot = TRUE /obj/effect/spawner/random/armory/shotgun loot = list( - /obj/item/gun/ballistic/shotgun/riot + /obj/item/gun/ballistic/shotgun/riot, ) spawn_loot_count = 3 diff --git a/modular_zubbers/code/modules/bow_adjustments/arrow.dm b/modular_zubbers/code/modules/bow_adjustments/arrow.dm index 384a267bf69..74e719a9f5f 100644 --- a/modular_zubbers/code/modules/bow_adjustments/arrow.dm +++ b/modular_zubbers/code/modules/bow_adjustments/arrow.dm @@ -12,7 +12,12 @@ wound_bonus = CANT_WOUND range = 16 embed_type = /datum/embedding/arrow - var/tribal_damage_bonus = 20 //If you're an icemoon dweller, or an ashwalker. + /// If you're an icemoon dweller, or an ashwalker, you gain this on top of being more effective against armor. + var/tribal_damage_bonus = 20 + /// Does this arrow benefit from being a tribal? + var/gets_tribal_bonus = TRUE + /// If TRUE, this arrow will not obtain any benefits from being used by tribals or from a powerful bow. + var/already_effective = FALSE faction_bonus_force = 10 //Bonus force dealt against certain factions nemesis_paths = list( /mob/living/simple_animal/hostile/asteroid, @@ -20,17 +25,45 @@ /mob/living/basic/wumborian_fugu, ) +/obj/item/gun/ballistic/bow + /// If this bow counts as being effectively used, which makes arrows not weak to armor and enables wounding. + var/effective = FALSE + +/obj/item/gun/ballistic/bow/divine + effective = TRUE + /obj/projectile/bullet/arrow/prehit_pierce(mob/living/target) + if (already_effective) + return ..() + var/mob/living/carbon/human/user = firer if(isnull(target)) return ..() - if(istype(user?.mind?.assigned_role, /datum/job/ash_walker) || istype(user?.mind?.assigned_role, /datum/job/primitive_catgirl)) + var/effective_usage = FALSE + + if(!isnull(fired_from) && istype(fired_from, /obj/item/gun/ballistic/bow)) + var/obj/item/gun/ballistic/bow/bow = fired_from + if (bow.effective) + effective_usage = TRUE + if(gets_tribal_bonus && istype(user?.mind?.assigned_role, /datum/job/ash_walker) || istype(user?.mind?.assigned_role, /datum/job/primitive_catgirl)) damage += tribal_damage_bonus + effective_usage = TRUE + + if(effective_usage) weak_against_armour = FALSE + if (wound_bonus <= CANT_WOUND) + wound_bonus = -10 return ..() +/obj/projectile/bullet/arrow/poison + damage = 20 + +/obj/projectile/bullet/arrow/sticky + damage = 3 // decrease from 30 - makes it less lethal on initial impact and awful to tear out + stamina = 30 + /obj/projectile/bullet/arrow/holy damage = 25 // Increase from 20 embed_type = /datum/embedding/arrow @@ -54,3 +87,6 @@ wound_bonus = CANT_WOUND faction_bonus_force = 90 embed_type = /datum/embedding/arrow + +/obj/projectile/bullet/arrow/plastic + already_effective = TRUE diff --git a/modular_zubbers/code/modules/cargo/packs/security.dm b/modular_zubbers/code/modules/cargo/packs/security.dm index d268a10b6fb..9219945e1b4 100644 --- a/modular_zubbers/code/modules/cargo/packs/security.dm +++ b/modular_zubbers/code/modules/cargo/packs/security.dm @@ -125,3 +125,54 @@ /obj/item/ammo_box/magazine/recharge/ntusp, /obj/item/ammo_box/magazine/recharge/ntusp) crate_name = "nt-usp crate" + +/datum/supply_pack/security/armory/archery_kit + name = "Archery Crate" + desc = "Two hardlight bows capable of defeating armor, alongside a mix of lethal and non/less-than-lethal arrows." + cost = CARGO_CRATE_VALUE * 6 + contains = list( + /obj/item/gun/ballistic/bow/security, + /obj/item/gun/ballistic/bow/security, + /obj/item/storage/bag/quiver/lesser/security/armory, + /obj/item/storage/bag/quiver/lesser/security/armory, + ) + +/obj/item/storage/bag/quiver/lesser/security/armory + +/obj/item/storage/bag/quiver/lesser/security/armory/PopulateContents() + var/static/items_inside = list( + /obj/item/ammo_casing/arrow/blunt = 3, + /obj/item/ammo_casing/arrow = 6, + /obj/item/ammo_casing/arrow/taser = 1 + ) + + generate_items_inside(items_inside, src) + +/datum/supply_pack/security/armory/lethal_arrows + name = "Arrow Crate" + desc = "Two quivers containing nine normal arrows and one randomly selected specialty arrow." + cost = CARGO_CRATE_VALUE * 3 + contains = list( + /obj/item/storage/bag/quiver/lesser/security/lethal, + /obj/item/storage/bag/quiver/lesser/security/lethal + ) + +/obj/item/storage/bag/quiver/lesser/security/lethal + +/obj/item/storage/bag/quiver/lesser/security/lethal/PopulateContents() + var/static/list/static_items = list( + /obj/item/ammo_casing/arrow = 9 + ) + /// Typepath -> Weight + var/static/list/bonus_items = list( + /obj/item/ammo_casing/arrow/sticky = 10, + /obj/item/ammo_casing/arrow/poison = 10, + /obj/item/ammo_casing/arrow/plastic = 6, + /obj/item/ammo_casing/arrow/bronze = 1, + /obj/item/ammo_casing/arrow/taser = 1, + ) + + var/list/obj/item/ammo_casing/arrow/to_spawn = static_items.Copy() + to_spawn[pick_weight(bonus_items)] = 1 + + generate_items_inside(to_spawn, src) diff --git a/modular_zubbers/code/modules/projectiles/ammunition/ballistic/arrows.dm b/modular_zubbers/code/modules/projectiles/ammunition/ballistic/arrows.dm new file mode 100644 index 00000000000..a2b814a5c9d --- /dev/null +++ b/modular_zubbers/code/modules/projectiles/ammunition/ballistic/arrows.dm @@ -0,0 +1,122 @@ +/datum/crafting_recipe/blunted_arrow + name = "Arrow (Less-lethal)" + result = /obj/item/ammo_casing/arrow/blunt + reqs = list( + /obj/item/stack/sheet/mineral/wood = 1, + /obj/item/stack/sheet/cloth = 1, + /obj/item/stack/sheet/iron = 1, + ) + tool_paths = list( + /obj/item/hatchet, + ) + category = CAT_WEAPON_AMMO + crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED + +/datum/crafting_recipe/blunted_arrow_conversion + name = "Blunt Arrow Conversion" + result = /obj/item/ammo_casing/arrow/blunt + reqs = list( + /obj/item/ammo_casing/arrow = 1, + ) + tool_behaviors = list(TOOL_SAW) + category = CAT_WEAPON_AMMO + non_craftable = TRUE + steps = list("Smooth the arrowhead with the saw.") + +/datum/crafting_recipe/taser_arrow + name = "Arrow (Electric, Non-lethal)" + result = /obj/item/ammo_casing/arrow/taser + reqs = list( + /obj/item/stack/sheet/mineral/wood = 1, + /obj/item/stack/sheet/cloth = 1, + /obj/item/stack/sheet/iron = 1, + /obj/item/stack/cable_coil = 1, + /obj/item/assembly/igniter = 1, + /obj/item/stock_parts/power_store/cell = 1, + ) + tool_paths = list( + /obj/item/hatchet, + ) + category = CAT_WEAPON_AMMO + crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED + +/datum/crafting_recipe/taser_arrow_conversion + name = "Taser Arrow Conversion" + result = /obj/item/ammo_casing/arrow/taser + reqs = list( + /obj/item/ammo_casing/arrow = 1, + /obj/item/stack/cable_coil = 1, + /obj/item/assembly/igniter = 1, + /obj/item/stock_parts/power_store/cell = 1, + ) + blacklist = list( + /obj/item/ammo_casing/arrow/taser + ) + time = 1 SECONDS + tool_behaviors = list(TOOL_SAW) + category = CAT_WEAPON_AMMO + +/obj/item/ammo_casing/arrow/blunt + name = "blunt arrow" + desc = "An arrow with its head reduced to a blunt tip. Suitable for breaking bones and subduing targets without excessive physical damage. Staggers targets on impact." + icon = 'modular_zubbers/icons/obj/weapons/guns/arrows.dmi' + icon_state = "blunt_arrow" + projectile_type = /obj/projectile/bullet/arrow/blunt + +/obj/projectile/bullet/arrow/blunt + name = "blunt arrow" + desc = "A blunted arrow." + damage = 5 // ow + stamina = 40 // its okay + wound_bonus = 35 // will sometimes cause dislocations at close range + gets_tribal_bonus = FALSE // technically a modern arrow + meant to be less lethal + embed_type = null + sharpness = NONE + +/obj/projectile/bullet/arrow/blunt/on_hit(atom/target, blocked, pierce_hit) + . = ..() + + if (pierce_hit) + return + if (. == BULLET_ACT_BLOCK || blocked >= 100 || !isliving(target)) + return + + var/mob/living/living_target = target + var/percent_blocked = blocked / 100 + + living_target.adjust_staggered_up_to(STAGGERED_SLOWDOWN_LENGTH * (1 - percent_blocked), 10 SECONDS) // it hits really hard + +/obj/item/ammo_casing/arrow/taser + name = "taser arrow" + desc = "An arrow, the head removed, replaced with an igniter, and hooked up to a power cell. Negligible damage, but capable of delivering a terrible electric shock.\n\ + Likely to break apart on impact. Ineffective against those insulated against electricity." + icon = 'modular_zubbers/icons/obj/weapons/guns/arrows.dmi' + icon_state = "taser_arrow" + reusable = FALSE + projectile_type = /obj/projectile/bullet/arrow/taser + harmful = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.2, /datum/material/wood = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.1) + +/obj/projectile/bullet/arrow/taser + name = "taser arrow" + desc = "A jury-rigged taser arrow, capable of delivering a terrible electric shock, and not much else." + icon = 'modular_zubbers/icons/obj/weapons/guns/arrows.dmi' + icon_state = "taser_arrow_projectile" + damage = 0 // lol + stamina = 5 + /// Staimna damage to be dealt by the shock. Separate from stamina - insulated individuals might be immune to the shock. + var/shock_damage = 50 //stamcrit in two but any armor at all reduces it to three + gets_tribal_bonus = FALSE // technically a modern arrow + meant to be less lethal + embed_type = null + sharpness = NONE + +/obj/projectile/bullet/arrow/taser/on_hit(atom/target, blocked, pierce_hit) + . = ..() + + if (pierce_hit) + return + do_sparks(3, TRUE, src) + if (. == BULLET_ACT_BLOCK || blocked >= 100 || !isliving(target)) + return + var/mob/living/living_target = target + living_target.electrocute_act(shock_damage, src, 1, SHOCK_ILLUSION|SHOCK_SUPPRESS_MESSAGE|SHOCK_NOGLOVES|SHOCK_KNOCKDOWN) // illusion so it doesnt do damage diff --git a/modular_zubbers/code/modules/projectiles/guns/ballistic/bow.dm b/modular_zubbers/code/modules/projectiles/guns/ballistic/bow.dm new file mode 100644 index 00000000000..4eac33c55b3 --- /dev/null +++ b/modular_zubbers/code/modules/projectiles/guns/ballistic/bow.dm @@ -0,0 +1,10 @@ + +/obj/item/gun/ballistic/bow/security + name = "hardlight bow" + desc = "A classic shortbow design, upgraded with carbon fiber structure and a hardlight bowstring. Elegant to use, though undeniably still a bit antiquated. \ + Offers heightened armor penetration and wounding potential than the older variants." + effective = TRUE + icon = 'modular_zubbers/icons/obj/weapons/guns/bow.dmi' + icon_state = "hardlightbow" + inhand_icon_state = "bow_hardlight" + base_icon_state = "hardlightbow" diff --git a/modular_zubbers/code/modules/security/sec_vouchers_vendor.dm b/modular_zubbers/code/modules/security/sec_vouchers_vendor.dm index 1e22190b392..1f5ef457988 100644 --- a/modular_zubbers/code/modules/security/sec_vouchers_vendor.dm +++ b/modular_zubbers/code/modules/security/sec_vouchers_vendor.dm @@ -66,6 +66,42 @@ /obj/item/shield/riot/flash, ) +/datum/voucher_set/security/primary/archery + name = "Archery Kit" + description = "A powerful bow, a training manual, and a quiver with non/less-than-lethal arrows. You will still need to order the fletching kit from cargo if you want to make lethal arrows." + icon = 'icons/obj/weapons/bows/bows.dmi' + icon_state = "hardlightbow" + set_items = list( + /obj/item/gun/ballistic/bow/security, + /obj/item/storage/bag/quiver/lesser/security, + /obj/item/book/granter/crafting_recipe/fletching/nonlethal, + /obj/item/hatchet, + ) + +/obj/item/storage/bag/quiver/lesser/security + name = "security quiver" + desc = "A lightweight, low-capacity quiver capable of being folded into pockets, but nothing else." + slot_flags = ITEM_SLOT_LPOCKET|ITEM_SLOT_RPOCKET|ITEM_SLOT_BELT + +/obj/item/storage/bag/quiver/lesser/security/PopulateContents() + var/static/items_inside = list( + /obj/item/ammo_casing/arrow/blunt = 7, + /obj/item/ammo_casing/arrow/taser = 3 + ) + + generate_items_inside(items_inside, src) + +/obj/item/book/granter/crafting_recipe/fletching/nonlethal + name = "Aim for the knees, not the eyes!" + desc = "A manual on how to construct sub-lethal bows & arrows, how best to use them... and how to construct violins?" + crafting_recipe_types = list( + /datum/crafting_recipe/shortbow, + /datum/crafting_recipe/blunted_arrow, + /datum/crafting_recipe/taser_arrow, + /datum/crafting_recipe/violin, + ) + uses = 1 + /datum/voucher_set/security/primary/nt_usp name = "NT-USP Pistol" description = "A small pistol that uses hardlight technology to synthesize bullets. Due to its low power, it doesn't have much use besides tiring out criminals." diff --git a/modular_zubbers/icons/obj/weapons/guns/arrows.dmi b/modular_zubbers/icons/obj/weapons/guns/arrows.dmi new file mode 100644 index 00000000000..995a4d563b9 Binary files /dev/null and b/modular_zubbers/icons/obj/weapons/guns/arrows.dmi differ diff --git a/modular_zubbers/icons/obj/weapons/guns/bow.dmi b/modular_zubbers/icons/obj/weapons/guns/bow.dmi new file mode 100644 index 00000000000..b111bc5f993 Binary files /dev/null and b/modular_zubbers/icons/obj/weapons/guns/bow.dmi differ diff --git a/tgstation.dme b/tgstation.dme index c9ebda5e700..54a1f9a0fe5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9794,12 +9794,14 @@ #include "modular_zubbers\code\modules\primitive_catgirls\code\spawner.dm" #include "modular_zubbers\code\modules\privacy_policy\privacy_policy.dm" #include "modular_zubbers\code\modules\projectiles\beams.dm" +#include "modular_zubbers\code\modules\projectiles\ammunition\ballistic\arrows.dm" #include "modular_zubbers\code\modules\projectiles\ammunition\ballistic\pistol.dm" #include "modular_zubbers\code\modules\projectiles\ammunition\ballistic\rifle.dm" #include "modular_zubbers\code\modules\projectiles\ammunition\ballistic\smg.dm" #include "modular_zubbers\code\modules\projectiles\boxes_magazines\external\pistol.dm" #include "modular_zubbers\code\modules\projectiles\boxes_magazines\external\smg.dm" #include "modular_zubbers\code\modules\projectiles\guns\ballistic\automatic.dm" +#include "modular_zubbers\code\modules\projectiles\guns\ballistic\bow.dm" #include "modular_zubbers\code\modules\projectiles\guns\ballistic\pistol.dm" #include "modular_zubbers\code\modules\projectiles\guns\ballistic\rifle.dm" #include "modular_zubbers\code\modules\projectiles\guns\energy\pulse.dm"