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

Azata Zippy Magic Superpower with Buffs #18

Closed
birick opened this issue Oct 19, 2022 · 8 comments · Fixed by #24
Closed

Azata Zippy Magic Superpower with Buffs #18

birick opened this issue Oct 19, 2022 · 8 comments · Fixed by #24

Comments

@birick
Copy link

birick commented Oct 19, 2022

Azata Zippy Magic Superpower with Buffs

Spell Ability Description

Wiki Link: Azata Zippy Magic Superpower

Whenever the Azata casts a spell that targets individual creatures, not areas, the spell affects one additional creature within a 30 foot radius from the target. If the target is an enemy, the spell affects one additional enemy; if the target is an ally, the spell affects one additional ally.

Relevance
When casting a single target buff from an Azata who has Zippy Magic, that buff will apply to a second ally. For example, such an Azata casting Mage Armor on one ally will automatically cast Mage Armor on a second ally. It is possible (but tedious) to control which ally receives the buff by moving all other allied characters outside a 30 ft radius.

Desired Solution
The ideal solution would allow the selection of a spell (targeting one character) cast from the main character (Azata with Zippy Magic) to apply to a second character.

A solution should also account for the Azata being a brown fur arcanist, and take Powerful Change and Share Transmutation into consideration.

@birick
Copy link
Author

birick commented Oct 24, 2022

For my current playthrough, my 24-hour buff routine includes over 200 spell casts. I simply can't function without a feature to help manage so much buffing by a team including an Azata Archanist.

So this is a must-have feature for me. Instead of waiting, I went ahead and taught myself how to mod, and implemented this feature. I hope this is helpful to others, and I've submitted a pull request back to this repository so that others may use too.

This pull request adds a new option "Control Azata Zippy Magic Secondary Buff" as seen in screenshot:

image

When this checkbox is checked, an Azata secondary buff using Zippy Magic will no longer be cast on a random ally outside the functioning of the mod. Rather selecting any two characters to receive the buff will only count for 1 spell cast.

For example, in the screenshot, 10 characters are selected to receive the Mage Armor spell. Using the Azata option, this will count for only 5 casts of the spell from my main character. If 9 characters were selected, then 5 casts would be counted. If 8 characters were selected, then 4 casts would be counted. And so on...

If the Azata option is not checked, then 10 casts would be performed as usual. However, your Azata would actually cast the spell 20 times, with half of those being wasted. So the idea in providing this option is to prevent wasting this wonderful Azata superpower.

This pull request also includes updates to the calculation of available spells to accommodate when the Azata option is checked. For example, my main character may cast 14 level 1 spells. With Azata Zippy Magic, if the Azata cast all 14 as buffs, then that would allow for a total of 28 level 1 buffs to be cast. Checking the Azata option, for say Mage Armor + Magic Weapon Primary + Magic Weapon Secondary, will correctly allow for selecting 28 targets to receive those spells from the Azata. The portrait highlights, casting limits, and calculations displayed for each spell should be correct.

I've also tested that this works correctly for both instant buffing and buffing with animations.

I hope this helps! Let me know if any issues in the pull request :)

@birick
Copy link
Author

birick commented Oct 29, 2022

Initially implemented in commit dee33c0.

@birick
Copy link
Author

birick commented Oct 29, 2022

Per advisement improvement implemented in 131102c.

@birick
Copy link
Author

birick commented Oct 29, 2022

Correct bug where arcane reservoir points might not be available for Azata Zippy Magic secondary cast dddaf60.

@birick
Copy link
Author

birick commented Oct 29, 2022

Fix animated casting bug when casting last Azata secondary buff but spell slots are already expended 4b40fb3.

@birick
Copy link
Author

birick commented Oct 29, 2022

IsAOE is not the same as IsMass! Bug fix 9bbaf3a.

@birick
Copy link
Author

birick commented Oct 30, 2022

Here's a test with 250 buffs using the instant engine. Code is looking stable in testing.

image

@birick
Copy link
Author

birick commented Nov 8, 2022

Found and fixed the case when a spell has a material cost and is the secondary buff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant