Perk Event Idea: BOW_DRAWN
Silvertide7 opened this issue ยท 5 comments
Describe the solution you'd like
I'd like to be able to give a player a damage increase when the bow is drawn for a set amount of time. This would also require the delay perk feature implementation to make real use of.
Why is this feature needed
I'd like to give a damage boost if the player takes their time while the bow is drawn. Give them the choice of higher single damage shots vs lower damage but faster shots. This might be kind of hard without temporary stat boosts though since strength effect only effects melee damage. I would also like to give players an effect that outlines nearby mobs when the damage boost triggers, similar to a hunter potion in Terraria, once I can remember what that mods name is.
Describe alternatives you've considered
None
Leaving this as a note for myself. The logic for this is captured via the CONSUME
event which uses the Forge LivingEntityUseItemEvent.Finish
event. The bow fires the same event. However, the CONSUME event is currently limited to food items. Updating this to capture ProjectileWeaponItem
s will allow for other items. I want to explore more use cases before implementing so this feature can be well rounded.
So, the more generic Item finish isn't really ideal for this case. Mainly because a bow is considered finished regardless of how long it's held before released. However, there is a n ArrowLooseEvent
which includes the charge percent. I could add an event specifically for when bows and crossbows fire. My only issue is whether or not to make it still be an "all-firing" event that passes the charge to perks, or an "only-when-fully-charged" event, which will likely result in me making the other event eventually anyways. The problem with the former is the need for a perk that is sensitive to that value. It's doable with CT, but an extra step for pack makers that otherwise kinda makes the event useless other than "congrats you held the bow, here's some XP for being a strong boi"
With CT I guess there could be some more uses for sure. The issue even there is the delay before the perk activates can be abused or accidentally triggered. From my understanding if I set a 3 second delay on something in a CT perk then it will check 3 seconds later and if the requirement is still being met it will activate. So if I pull back the bow and the perk starts and says 3 seconds later if the bow is still pulled back then you get a bonus, you could still fire the bow twice between and then pull it back and it would register that it's still pulled back even though it was fired in between and the perk would activate.
Yeah I see what you mean, I'm definitely okay with not implementing this if it's just kind of funky. My original thought was to use this with that delay perk attribute so that they get a bonus increase after holding the bow at full charge for like 3 seconds. Since that delay attribute isn't going to work out I'm not sure if I would use this personally anyway.