mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 20:11:56 +00:00
## About The Pull Request ### Divine Archer 🏹  Adds a new chaplain weapon and suit of armor, the divine archer. It's an orderable set of armor, but provides less armor than the rest, but you get more pieces of armor (boots, bracer, undersuit). The divine bow comes with a quiver that holds holy arrows. The holy arrows come with bane support, dealing critical damage to revenants. ### Bow Features ⭐ - arrows can now be dipped in poison ### Bow Improvements 🔧 - bows now drop their arrow when you put them on your back while nocking a bow - bows give feedback for trying to draw without a nocked arrow - codewise, bows support subtypes much better. They still have hard-sprited loaded arrows, but one day that'll change. ## Why It's Good For The Game Yeah, we could add null rod #2342 that does almost the same as the others, or we could have a unique bow weapon! Player Dev Project thread: https://discord.com/channels/326822144233439242/1093521091957370940/1093521091957370940 ## Changelog 🆑 tralezab code, Drag for the commission and player project, cre#0484 for their spritework add: Divine Archer Armor and Weapon qol: Bows give more feedback when you're doing something wrong, like trying to draw without a nocked arrow code: Sorted files, cleaned bow code up to allow subtypes /🆑
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
/**
|
|
* Venomous element; which makes the attacks of the simplemob attached poison the enemy.
|
|
*
|
|
* Used for spiders, frogs, and bees!
|
|
*/
|
|
/datum/element/venomous
|
|
element_flags = ELEMENT_BESPOKE
|
|
argument_hash_start_idx = 2
|
|
///Path of the reagent added
|
|
var/poison_type
|
|
///How much of the reagent added. if it's a list, it'll pick a range with the range being list(lower_value, upper_value)
|
|
var/list/amount_added
|
|
|
|
/datum/element/venomous/Attach(datum/target, poison_type, amount_added)
|
|
. = ..()
|
|
src.poison_type = poison_type
|
|
src.amount_added = amount_added
|
|
target.AddComponent(/datum/component/on_hit_effect, CALLBACK(src, PROC_REF(do_venom)))
|
|
|
|
/datum/element/venomous/Detach(datum/target)
|
|
qdel(target.GetComponent(/datum/component/on_hit_effect))
|
|
return ..()
|
|
|
|
/datum/element/venomous/proc/do_venom(datum/element_owner, atom/venom_source, mob/living/target, hit_zone)
|
|
if(!istype(target))
|
|
return
|
|
if(target.stat == DEAD)
|
|
return
|
|
var/final_amount_added
|
|
if(islist(amount_added))
|
|
final_amount_added = rand(amount_added[1], amount_added[2])
|
|
else
|
|
final_amount_added = amount_added
|
|
target.reagents?.add_reagent(poison_type, final_amount_added)
|