-
Notifications
You must be signed in to change notification settings - Fork 377
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
Extend bulk
ItemAlteration to allow for further mode
s
#18163
base: master
Are you sure you want to change the base?
Extend bulk
ItemAlteration to allow for further mode
s
#18163
Conversation
Previously, if a later value failed, all earlier values would still be committed to the flags.
I think we just need the bulk one out of this. Effect level is propagated via different workflows, and flags just aren't going to happen with that RE. |
required: true, | ||
nullable: false, | ||
choices: [0, 0.1, ...Array.fromRange(100, 1)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll an additional check here to ensure the resulting value is valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already round the resulting value to 1/10ths, but I can add a check for it to be nonnegative, at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.1 (L) is also the only valid non-integer value since Light bulk isn't a countable unit of measurement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically correct, in practice, the system can actually handle values like "9L" or "3; 4L".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
level
and flags
as ItemAlteration, extend bulk
ItemAlterationbulk
ItemAlteration to allow for further mode
s
This is a reworked / extended version of PR #18126.
This PR adds or changes the following ItemAlterations:
bulk
is changed to be able to accept most of the modes. It'sadd
andsubtract
that's especially noteworthy -- SF2's Soldier can subtract from an armour's Bulk, and PF2 has a few things that add to an item's bulk, like Eyecatcher, Subtle Armour, and the Fortification rune.level
has been added to change an item's level. This will prove more useful as part of GrantItem, I believe, especially for effects that grant other effects. I personally ran into a use case with the Wand of Hawthorn, where I wanted to make an effect that grant Oaken Resilience at a given rank, and adds a note about the thorns on being struck with an unarmed attack.flags
would just be useful for homebrewing and there is no real justification for it from the system's standpoint (because the system is the system, and the system can just implement shit in code that it needs). The format for the value here is that it must be an object, for example:With a mode ofoverride
, this would make the ItemAlteration add these flags to the item(s), unless of course the types of the values mismatch (for example, if"a" = "test"
, it couldn't be overwritten by a number). The default location of these flags isflags.pf2e
. With a mode ofadd
, and theb.d
removed, we could add 1 toa
, and 2 tob.c
at the same time.Ultimately, I separate the three into their own commits, so if one is not accepted, so be it, I can revert it.