Skip to content

Commit

Permalink
Ports explosive arrows from Lonestar (#461)
Browse files Browse the repository at this point in the history
* Ports explosive arrows from Lonestar

* Explosive arrows balance tweaks
  • Loading branch information
biotear authored Mar 27, 2024
1 parent 1dbd40e commit 97665c5
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
16 changes: 16 additions & 0 deletions code/datums/components/crafting/recipes/recipes_primal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,22 @@
)
category = CAT_TRIBAL
tools = list(TOOL_WORKBENCH)

/datum/crafting_recipe/tribalwar/arrowexplode
name = "Explosive Arrow"
result = /obj/item/ammo_casing/caseless/arrow/explosive
time = 15
reqs = list(
/obj/item/stack/rods = 1,
/obj/item/stack/sheet/plasteel = 1,
/obj/item/stack/crafting/goodparts = 1,
/obj/item/stack/crafting/electronicparts = 1,
/obj/item/stack/crafting/metalparts = 2,
/obj/item/stack/cable_coil = 5,
/obj/item/stack/ore/blackpowder = 3
)
category = CAT_TRIBAL
tools = list(TOOL_WORKBENCH)

//MELEE

Expand Down
7 changes: 7 additions & 0 deletions code/modules/projectiles/ammunition/caseless/arrow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,10 @@
desc = "An arrow made of wood, tipped with bronze. The tip is dense enough to provide some armor penetration."
icon_state = "bronzearrow"
projectile_type = /obj/item/projectile/bullet/reusable/arrow/bronze

/obj/item/ammo_casing/caseless/arrow/explosive
name = "explosive arrow"
desc = "An arrow with a pressure-activated explosive charge at the end. Meant for breaching breaching or armored targets, but mildly effective against soft targets. Cannot be reused."
icon = 'icons/fallout/objects/guns/ammo.dmi'
icon_state = "arrow_explosive"
projectile_type = /obj/item/projectile/bullet/reusable/arrow/explosive
21 changes: 21 additions & 0 deletions code/modules/projectiles/projectile/reusable/arrow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,24 @@
armour_penetration = 0.05
damage = 30
ammo_type = /obj/item/ammo_casing/caseless/arrow/serrated

/obj/item/projectile/bullet/reusable/arrow/explosive
name = "explosive arrow"
desc = "An arrow with a pressure-activated explosive charge at the end. Meant for breaching or armored targets, but mildly effective against soft targets. Cannot be reused."
armour_penetration = 0.3
damage = 15
ammo_type = /obj/item/ammo_casing/caseless/arrow/explosive

/obj/item/projectile/bullet/reusable/arrow/explosive/on_hit(atom/target, blocked=0)
. = ..()
if(!isliving(target)) //if the target isn't alive, so is a wall or something
explosion(target, 0, 0, 1, 1)
dropped = TRUE
else
dropped = TRUE
new /obj/effect/temp_visual/explosion(get_turf(target))
return BULLET_ACT_HIT

/obj/item/projectile/bullet/reusable/arrow/explosive/handle_drop()
if(!dropped)
dropped = FALSE
Binary file modified icons/fallout/objects/guns/ammo.dmi
Binary file not shown.

0 comments on commit 97665c5

Please sign in to comment.