-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial backup of the atlatl and hunter pinpointer The dmi will still need to be made both for the quiver, the spear and for the atlatl itself * Spear quiver initial sprite * Atlatl weapon finalised for initial testing. .dmi files done for items, projectiles, and inhand. * a single checkmark changed * dmis fully finished for atlatl and the spearquiver Code finished after testing for atlatl By all accounts the atlatl is ready for the game now Give the silly goobers on Lavaland one or two I'd say * Sect of the Hunt rites ready for testing altar dmi added for sect of the hunt Tiny update to the code of spearquivers * Silly file not being the correct type. It's a .dm now * Ready for testmerge Pinpointer works dmi updated and sprite added for the prime cut Prey subtype added for the deer, specifically to have one that drops the prime cut * Sanity improvements * Thrown spears can now only be stored in the quiver as intended Thrown spears now deal *5 damage to beasts as intended, same as the hunter slugs * Fixes for testmerge compatibility * Hopefully reset the changes to belt dmis now * Casually 600 commits behind locally. End my pain
- Loading branch information
1 parent
62d8219
commit 31d09e2
Showing
15 changed files
with
321 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters