Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sect of the hunt #4057

Merged
merged 27 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
91e0481
Initial backup of the atlatl and hunter pinpointer
MissClassyPineapple Nov 1, 2024
fafa984
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 1, 2024
8157943
Spear quiver initial sprite
MissClassyPineapple Nov 2, 2024
f5f5d2b
Merge branch 'Sect-of-the-Hunt' of https://github.com/MissClassyPinea…
MissClassyPineapple Nov 2, 2024
4bd58d6
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 2, 2024
d53357d
Atlatl weapon finalised for initial testing.
MissClassyPineapple Nov 2, 2024
43ac484
a single checkmark changed
MissClassyPineapple Nov 2, 2024
c1c3250
dmis fully finished for atlatl and the spearquiver
MissClassyPineapple Nov 3, 2024
cffe40b
Sect of the Hunt rites ready for testing
MissClassyPineapple Nov 4, 2024
b51ca31
Silly file not being the correct type.
MissClassyPineapple Nov 4, 2024
f4d404a
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 4, 2024
71daa01
Ready for testmerge
MissClassyPineapple Nov 5, 2024
dace2fc
Merge branch 'Sect-of-the-Hunt' of https://github.com/MissClassyPinea…
MissClassyPineapple Nov 5, 2024
ba862ec
Sanity improvements
MissClassyPineapple Nov 5, 2024
c9da0e5
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 6, 2024
c6d7a9e
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 9, 2024
ce0e43f
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 10, 2024
d6f564e
Thrown spears can now only be stored in the quiver as intended
MissClassyPineapple Nov 10, 2024
27c7502
Merge branch 'Sect-of-the-Hunt' of https://github.com/MissClassyPinea…
MissClassyPineapple Nov 10, 2024
4a8f7ba
Fixes for testmerge compatibility
MissClassyPineapple Nov 12, 2024
4381bf5
Hopefully reset the changes to belt dmis now
MissClassyPineapple Nov 12, 2024
f6a0a87
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 12, 2024
bc6e68e
Casually 600 commits behind locally. End my pain
MissClassyPineapple Nov 12, 2024
8851aaf
Merge branch 'Sect-of-the-Hunt' of https://github.com/MissClassyPinea…
MissClassyPineapple Nov 12, 2024
8308b98
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 13, 2024
2d85c29
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 15, 2024
18475c2
Merge branch 'Monkestation:master' into Sect-of-the-Hunt
MissClassyPineapple Nov 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion code/__DEFINES/projectiles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Delete self without hitting
#define PROJECTILE_DELETE_WITHOUT_HITTING 3

// Caliber defines: (current count stands at 24)
// Caliber defines: (current count stands at 27)
/// The caliber used by the [L6 SAW][/obj/item/gun/ballistic/automatic/l6_saw].
#define CALIBER_712X82MM "mm71282"
/// The caliber used by the [security auto-rifle][/obj/item/gun/ballistic/automatic/wt550].
Expand Down Expand Up @@ -59,6 +59,8 @@
#define CALIBER_A223 "a223"
/// The caliber used by bolt action rifles.
#define CALIBER_STRILKA310 ".310_strilka"
/// The caliber used by the atlatl spear thrower
#define CALIBER_SPEAR "throwing spear"

/// For gunpoints, how many tiles around the target the shooter can roam without losing their shot
#define GUNPOINT_SHOOTER_STRAY_RANGE 2
Expand Down
134 changes: 134 additions & 0 deletions code/modules/religion/hunt/atlatl.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/obj/item/gun/ballistic/atlatl
desc = "An ancient type of spear thrower used by the chosen hunters"
name = "hunter's atlatl"
icon = 'icons/obj/weapons/guns/atlatl/atlatl.dmi'
lefthand_file = 'icons/mob/inhands/weapons/atlatl_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/atlatl_righthand.dmi'
icon_state = "atlatl"
inhand_icon_state = "atlatl"
//uncomment when ready to merge fully, sprites for belt and belt_mirror is in atlatl.dmi
// worn_icon_state = "atlatl"
load_sound = null
fire_sound = null
accepted_magazine_type = /obj/item/ammo_box/magazine/internal/atlatl
force = 25
attack_verb_continuous = list("strikes", "cracks", "beats")
attack_verb_simple = list("strike", "crack", "beat")
weapon_weight = WEAPON_MEDIUM
w_class = WEIGHT_CLASS_BULKY
internal_magazine = TRUE
cartridge_wording = "spear"
bolt_type = BOLT_TYPE_NO_BOLT
slot_flags = ITEM_SLOT_BELT

/obj/item/gun/ballistic/atlatl/update_icon_state()
. = ..()
icon_state = chambered ? "atlatl_notched" : "atlatl"

/obj/item/gun/ballistic/atlatl/proc/drop_spear()
if(chambered)
chambered.forceMove(drop_location())
magazine.get_round(keep = FALSE)
chambered = null
update_appearance()


/obj/item/gun/ballistic/atlatl/equipped(mob/user, slot, initial)
. = ..()
if((slot == ITEM_SLOT_BELT && chambered) || (slot == ITEM_SLOT_SUITSTORE && chambered))
balloon_alert(user, "the spear falls off!")
drop_spear()
update_appearance()

/obj/item/gun/ballistic/atlatl/afterattack(atom/target, mob/living/user, flag, params, passthrough = FALSE)
. |= AFTERATTACK_PROCESSED_ITEM
if(!chambered)
return
. = ..() //fires, removing the spear
update_appearance()

/obj/item/gun/ballistic/atlatl/shoot_with_empty_chamber(mob/living/user)
return //no clicking sounds please


/obj/item/ammo_box/magazine/internal/atlatl
name = "notch"
ammo_type = /obj/item/ammo_casing/caseless/thrownspear
max_ammo = 1
start_empty = TRUE
caliber = CALIBER_SPEAR

/obj/item/ammo_casing/caseless/thrownspear
name = "throwing spear"
desc = "A light spear made for throwing from an atlatl"
icon = 'icons/obj/weapons/guns/atlatl/thrownspear.dmi'
icon_state = "thrownspear"
custom_materials = "wood"
inhand_icon_state = null
projectile_type = /obj/projectile/bullet/reusable/thrownspear
flags_1 = NONE
throwforce = 25
w_class = WEIGHT_CLASS_BULKY
firing_effect_type = null
caliber = CALIBER_SPEAR
heavy_metal = FALSE

/obj/item/ammo_casing/caseless/thrownspear/Initialize(mapload)
. = ..()
AddComponent(/datum/element/envenomable_casing)


/obj/projectile/bullet/reusable/thrownspear
name = "thrown spear"
desc = "Beasts be felled!"
icon = 'icons/obj/weapons/guns/atlatl/thrownspear.dmi'
icon_state = "spear_projectile"
ammo_type = /obj/item/ammo_casing/caseless/thrownspear
damage = 75
speed = 1.5
range = 20
/// How much the damage is multiplied by when we hit a mob with the correct biotype
var/biotype_damage_multiplier = 5
/// What biotype we look for
var/biotype_we_look_for = MOB_BEAST

/obj/projectile/bullet/reusable/thrownspear/on_hit(atom/target, blocked, pierce_hit)
if(ismineralturf(target))
var/turf/closed/mineral/mineral_turf = target
mineral_turf.gets_drilled(firer, FALSE)
if(range > 0)
return BULLET_ACT_FORCE_PIERCE
return ..()
if(!isliving(target) || (damage > initial(damage)))
return ..()
var/mob/living/target_mob = target
if(target_mob.mob_biotypes & biotype_we_look_for || istype(target_mob, /mob/living/simple_animal/hostile/megafauna))
damage *= biotype_damage_multiplier
return ..()


/obj/item/storage/bag/spearquiver
name = "large quiver"
desc = "A large quiver to hold a few spears for your atlatl"
slot_flags = ITEM_SLOT_BACK
w_class = WEIGHT_CLASS_BULKY
icon = 'icons/obj/weapons/guns/atlatl/spearquivers.dmi'
icon_state = "spearquiver"
inhand_icon_state = null
worn_icon_state = "spearquiver"
/// type of arrow the quiver should hold
var/arrow_path = /obj/item/ammo_casing/caseless/thrownspear

/obj/item/storage/bag/spearquiver/Initialize(mapload)
. = ..()
atom_storage.max_specific_storage = WEIGHT_CLASS_BULKY
atom_storage.max_slots = 5
atom_storage.max_total_storage = 100
atom_storage.set_holdable(list(
/obj/item/ammo_casing/caseless/thrownspear,
))

/obj/item/storage/bag/spearquiver/PopulateContents()
. = ..()
for(var/i in 1 to 3)
new arrow_path(src)
41 changes: 41 additions & 0 deletions code/modules/religion/hunt/hunter_pinpointer.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#define HUNTER_MINIMUM_RANGE 5
#define HUNTER_MAXIMUM_RANGE 200
#define HUNTER_PING_TIME (5 SECONDS)
#define HUNTER_FUZZ_FACTOR 5



/atom/movable/screen/alert/status_effect/agent_pinpointer/hunters_sense
name = "Hunter's Instincts"
desc = "Your powerful instincts allow you to easily track your prey"


/datum/status_effect/agent_pinpointer/hunters_sense
id = "agent_pinpointer"
alert_type = /atom/movable/screen/alert/status_effect/agent_pinpointer/hunters_sense
minimum_range = HUNTER_MINIMUM_RANGE
tick_interval = HUNTER_PING_TIME
duration = -1
range_fuzz_factor = HUNTER_FUZZ_FACTOR

///Attempting to locate a nearby target to scan and point towards.
/datum/status_effect/agent_pinpointer/hunters_sense/scan_for_target()

scan_target = null
if(!owner && !owner.mind)
return
var/dist = 1000
var/mob/living/basic/deer/prey/chosen_prey
for(var/mob/living/basic/deer/prey/located as anything in GLOB.sect_of_the_hunt_preys)
if(get_dist(owner, located) < dist)
dist = get_dist(owner, located)
chosen_prey = located
if(QDELETED(chosen_prey))
return
scan_target = chosen_prey


#undef HUNTER_MINIMUM_RANGE
#undef HUNTER_MAXIMUM_RANGE
#undef HUNTER_PING_TIME
#undef HUNTER_FUZZ_FACTOR
94 changes: 94 additions & 0 deletions code/modules/religion/hunt/hunting_rites.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
GLOBAL_LIST_EMPTY(sect_of_the_hunt_preys)
/datum/religion_rites/initiate_hunter
name = "Initiate Hunter"
desc = "Awakens the hunter's instincts and lets them hear the Call of the Hunt. Buckle a human to awaken them, otherwise it will awaken you."
ritual_length = 20 SECONDS
ritual_invocations = list("By the grace and speed of our god ...",
"... We call upon you, that beasts may be slain ...")
invoke_msg = "... Awaken Hunter. Awaken and heed the call of the Hunt!!"
favor_cost = -1

/datum/religion_rites/initiate_hunter/perform_rite(mob/living/user, atom/religious_tool)
if(!ismovable(religious_tool))
to_chat(user, span_warning("This rite requires a religious device that individuals can be buckled to."))
return FALSE
var/atom/movable/movable_reltool = religious_tool
if(!movable_reltool)
return FALSE
if(LAZYLEN(movable_reltool.buckled_mobs))
to_chat(user, span_warning("You're going to awaken the one buckled on [movable_reltool]."))
else
if(!movable_reltool.can_buckle) //yes, if you have somehow managed to have someone buckled to something that now cannot buckle, we will still let you perform the rite!
to_chat(user, span_warning("This rite requires a religious device that individuals can be buckled to."))
return FALSE
if(user.has_status_effect(/datum/status_effect/agent_pinpointer/hunters_sense))
to_chat(user, span_warning("You've already awakened yourself. To awaken others, they must be buckled to [movable_reltool]."))
return FALSE
to_chat(user, span_warning("You're going to awaken yourself with this ritual."))
return ..()


/datum/religion_rites/initiate_hunter/invoke_effect(mob/living/user, atom/religious_tool)
..()
if(!ismovable(religious_tool))
CRASH("[name]'s perform_rite had a movable atom that has somehow turned into a non-movable!")
var/atom/movable/movable_reltool = religious_tool
var/mob/living/carbon/human/rite_target
if(!movable_reltool?.buckled_mobs?.len)
rite_target = user
else
for(var/buckled in movable_reltool.buckled_mobs)
if(ishuman(buckled))
rite_target = buckled
break
if(!rite_target)
return FALSE
rite_target.apply_status_effect(/datum/status_effect/agent_pinpointer/hunters_sense)
rite_target.visible_message(span_notice("[rite_target] has awakened their instincts!"))
return TRUE

/datum/religion_rites/call_the_hunt
name = "Call the Hunt"
desc = "Call upon the Great Hunt and Seek your Prey"
ritual_length = 30 SECONDS
ritual_invocations = list("We call now upon the most holy ...",
"... By the will of our god ...",
"... And by divine decree ...")
invoke_msg = "... There is prey to be felled!!"
favor_cost = 0


/datum/religion_rites/call_the_hunt/invoke_effect(mob/living/user, atom/religious_tool)
. = ..()

var/turf/prey_location = get_safe_random_station_turf()
GLOB.sect_of_the_hunt_preys += new /mob/living/basic/deer/prey(prey_location)


/datum/religion_rites/craft_hunters_atlatl
name = "Craft Hunter's Atlatl"
desc = "With holy will and divine grace create a hunter's atlatl and a quiver of throwing spears"
ritual_length = 15 SECONDS
ritual_invocations = list("By grace and instinct ...",
"... We are blessed with holy weapons ...")
invoke_msg = "... May we strike true!"
favor_cost = 5

/datum/religion_rites/craft_hunters_atlatl/invoke_effect(mob/living/user, atom/movable/religious_tool)
. = ..()
var/altar_turf = get_turf(religious_tool)
new /obj/item/gun/ballistic/atlatl(altar_turf)
new /obj/item/storage/bag/spearquiver(altar_turf)

/datum/religion_rites/carve_spears
name = "Carve throwing spears"
desc = "Carve blessed spears of the Hunt so that more prey be slain"
ritual_length = 10 SECONDS
invoke_msg = "There's always more prey. The Hunt continues!"
favor_cost = 3

/datum/religion_rites/carve_spears/invoke_effect(mob/living/user, atom/movable/religious_tool)
..()
var/altar_turf = get_turf(religious_tool)
for (var/i in 1 to 3)
new /obj/item/ammo_casing/caseless/thrownspear(altar_turf)
17 changes: 17 additions & 0 deletions code/modules/religion/hunt/prey.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/obj/item/food/meat/religioustrophy
name = "Prime Cut"
desc = "A bloody trophy taken as proof of a successful hunt. It's still oozing blood"
icon_state = "primecut"
bite_consumption = 5
food_reagents = list(
/datum/reagent/consumable/nutriment/protein = 15,
/datum/reagent/water/holywater = 10,
)
tastes = list("Holy Purpose" = 5)
foodtypes = MEAT | RAW | GORE


/mob/living/basic/deer/prey
name = "Prey of the Hunt"
desc = "A hapless deer, chosen as prey for the Great Hunt"
butcher_results = list(/obj/item/food/meat/slab = 3, /obj/item/food/meat/religioustrophy = 1)
28 changes: 28 additions & 0 deletions code/modules/religion/religion_sects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -425,3 +425,31 @@
/datum/religion_sect/music/on_conversion(mob/living/chap)
. = ..()
new /obj/item/choice_beacon/music(get_turf(chap))


/datum/religion_sect/hunt
name = "God of the Hunt"
desc = "Hunt for the sake of the Hunt. The cycle of predator and prey will always continue"
quote = "Go my Hunters! There is prey to be felled"
tgui_icon = "leaf"
altar_icon_state = "convertaltar-hunt"
alignment = ALIGNMENT_NEUT
candle_overlay = FALSE
desired_items = list(/obj/item/food/meat/religioustrophy)
max_favor = 25
rites_list = list(
/datum/religion_rites/initiate_hunter,
/datum/religion_rites/call_the_hunt,
/datum/religion_rites/craft_hunters_atlatl,
/datum/religion_rites/carve_spears,
)

/datum/religion_sect/hunt/on_conversion(mob/living/chap)
. = ..()
new /obj/item/knife/hunting(get_turf(chap))

/datum/religion_sect/hunt/on_sacrifice(obj/item/I, mob/living/user)
to_chat(user, span_notice("A worthy offering for [GLOB.deity]. You have done well Hunter"))
adjust_favor(3, user)
qdel(I)
return TRUE
Binary file modified icons/mob/clothing/back.dmi
Binary file not shown.
Binary file added icons/mob/inhands/weapons/atlatl_lefthand.dmi
Binary file not shown.
Binary file added icons/mob/inhands/weapons/atlatl_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/food/meat.dmi
Binary file not shown.
Binary file modified icons/obj/hand_of_god_structures.dmi
Binary file not shown.
Binary file added icons/obj/weapons/guns/atlatl/atlatl.dmi
Binary file not shown.
Binary file added icons/obj/weapons/guns/atlatl/spearquivers.dmi
Binary file not shown.
Binary file added icons/obj/weapons/guns/atlatl/thrownspear.dmi
Binary file not shown.
4 changes: 4 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5305,6 +5305,10 @@
#include "code\modules\religion\festival\instrument_rites.dm"
#include "code\modules\religion\honorbound\honorbound_rites.dm"
#include "code\modules\religion\honorbound\honorbound_trauma.dm"
#include "code\modules\religion\hunt\atlatl.dm"
#include "code\modules\religion\hunt\hunter_pinpointer.dm"
#include "code\modules\religion\hunt\hunting_rites.dm"
#include "code\modules\religion\hunt\prey.dm"
#include "code\modules\religion\sparring\ceremonial_gear.dm"
#include "code\modules\religion\sparring\sparring_contract.dm"
#include "code\modules\religion\sparring\sparring_datum.dm"
Expand Down
Loading