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

Spells that can consume "other" item charges should not automatically consume them #658

Closed
aaclayton opened this issue Aug 23, 2020 · 7 comments

Comments

@aaclayton
Copy link
Contributor

Originally in GitLab by @DarKDinDoN

Hello,

Since 0.94 we can configure spells so they can consume another item charge (e.g: consume feat charge).
That's very nice, but casting the spell always consumes the charge. Can you add a checkbox in the spell casting dialog so the player can chose between:

  • Consume a spell slot
  • Consume the own spell charges (if configured)
  • Consume another spell charges (if configured)
@aaclayton
Copy link
Contributor Author

Originally in GitLab by @trioderegion

I'm taking a stab at this one. To make sure I understand the use-case, is this the desired result?
image

@aaclayton
Copy link
Contributor Author

Originally in GitLab by @DarKDinDoN

@trioderegion looks like it.

The "Consume Resource" is used for both use-cases?

  • Consume the own spell charges (if configured)
  • Consume another spell/feat/item charges (if configured)

@aaclayton
Copy link
Contributor Author

Originally in GitLab by @trioderegion

Indeed it does. Here is the configuration dialog for a spell that:

  • Consumes a slot (Consume Spell Slot?)
  • Consumes its own charges or uses (Consume Available Usage?)
  • Consumes a different items's charges or uses (Consume Resource?)
  • Has an AOE effect (Place Measured Template)

image

@aaclayton
Copy link
Contributor Author

Originally in GitLab by @DarKDinDoN

Perfect ❤️

@aaclayton
Copy link
Contributor Author

Originally in GitLab by @trioderegion

One thing to note. I mirrored the logic of resource consumption from other items. During testing, the spell will only be truly "blocked" from casting if you have no spell slots remaining.

If you have slots remaining but are missing either an Available Usage OR a Resource, the spell will still be cast and the uses/resources you do have will be deducted. If either have no uses left, a warning will be shown to the player indicating the item does not have enough of the required charges to use.

E.g.:
You have 1 slot, 1 usage, but are out of the required material component (Resource). If you cast a spell, your resulting state will be -- 0 slots, 0 usages, 0 resources, but the spell will be cast with a warning indicating there wasnt enough Item Usages (from the consumed resource).

@aaclayton
Copy link
Contributor Author

mentioned in commit d0e8b57

@aaclayton
Copy link
Contributor Author

marked this issue as related to #856

@aaclayton aaclayton self-assigned this Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant