Skip to content

Conversation

@CarlosFdez
Copy link
Collaborator

@CarlosFdez CarlosFdez commented Jul 9, 2025

Because whirling swipe isn't in pf2e, and each change in isolation doesn't look relevant until you put them all together, I did it all in one. Let me know if any look fine to split into a new PR.

  1. Include targetItem as a resolvable for item alterations, so that item alterations can refer to sibling properties
  2. phase is now supported for item alterations. This allows traits to be set after CreatureSize REs occur. What phases are allowed depend on the property. Delayed properties (persistent damage dc) were refactored to use the phase property.
  3. WeaponPF2e#reach to mirror MeleePF2e#reach, so that we can actually access it within the item alteration. getReach() now delegates work to the getters. I wouldn't mind a reach.base and reach.attack fields to mirror what we do in the actor's reach data though, either as a getter or as system data, but then we will have to change melee.reach to correspond.

Afterwards, this implements whirling swipe:

{
  "domain": "all",
  "key": "RollOption",
  "option": "whirling-swipe",
  "toggleable": true
}
{
  "key": "ItemAlteration",
  "itemType": "weapon",
  "property": "traits",
  "mode": "add",
  "phase": "beforeDerived",
  "value": {
    "trait": "area-burst",
    "annotation": "max(5, @targetItem.reach)"
  },
  "predicate": [
    "item:melee",
    "item:hands-held:2",
    "whirling-swipe"
  ]
}

@CarlosFdez CarlosFdez marked this pull request as draft July 9, 2025 09:19
@CarlosFdez
Copy link
Collaborator Author

CarlosFdez commented Jul 9, 2025

Going to try to see how difficult it'll be to limit phase by property type. Drafted until then.

@CarlosFdez CarlosFdez marked this pull request as ready for review July 10, 2025 23:15
@CarlosFdez
Copy link
Collaborator Author

Phase is now validated based on the property. Persistent Damage DC only allows afterDerived (which it did before, but it used a different mechanism). Traits allows either applyAEs or beforeDerived.

@CarlosFdez CarlosFdez added the sf2e System issues affecting Starfinder 2e label Aug 7, 2025
@CarlosFdez CarlosFdez force-pushed the whirling-swipe branch 4 times, most recently from acb5c32 to 0543770 Compare August 9, 2025 09:01
@CarlosFdez
Copy link
Collaborator Author

I think for item alteration we can look into value allowing a base trait and value (config?) pair, and allowing value to be resolvable. That would remove the need for being able to resolve math expressions inside {} blocks and cut down on this PR quite a bit.

@CarlosFdez CarlosFdez marked this pull request as draft September 2, 2025 03:24
@CarlosFdez CarlosFdez force-pushed the whirling-swipe branch 2 times, most recently from e10be3a to b052322 Compare September 2, 2025 03:42
@CarlosFdez CarlosFdez marked this pull request as ready for review September 2, 2025 03:44
@CarlosFdez
Copy link
Collaborator Author

This has been updated to make use of the new annotation property in the traits item alteration, allowing me to remove formula support within curly braces. Unless we move when creature size occurs, we still need the phase property.


operableOnSource: boolean;

phases: ItemAlterationPrepPhase[];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple?

Copy link
Collaborator Author

@CarlosFdez CarlosFdez Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the supported ones, not the resolved one. I realize now that its ambiguous, so I renamed it to supportedPhases.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be static, then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its the supported ones for that specific instance, which handles a specific property, not for all handlers. All item alteration properties use the same class but different class instances.

For example, traits in this PR has supported phases ["applyAEs", "beforeDerived"],. Recovery dc alterations has ["afterDerived"],. The other alterations use the default, which is ["applyAEs"]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wack, but ok

@CarlosFdez CarlosFdez force-pushed the whirling-swipe branch 3 times, most recently from 57339bf to f5c035f Compare September 3, 2025 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: enhancement sf2e System issues affecting Starfinder 2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants