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

Prevent having two sets of origin options for non-saves #18076

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/module/system/statistic/statistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ class Statistic<TActor extends ActorPF2e = ActorPF2e> extends BaseStatistic<TAct
}

override createRollOptions(domains = this.domains, args: RollOptionConfig = {}): Set<string> {
const { item, extraRollOptions, origin, target } = args;
const { item, extraRollOptions, target } = args;
const origin = args.origin ?? (item?.actor && item.actor.uuid !== this.actor.uuid ? item.actor : null);

const rollOptions: string[] = [];
if (domains.length > 0) {
Expand All @@ -144,9 +145,6 @@ class Statistic<TActor extends ActorPF2e = ActorPF2e> extends BaseStatistic<TAct

if (item) {
rollOptions.push(...item.getRollOptions("item"));
if (item.actor && item.actor.uuid !== this.actor.uuid) {
rollOptions.push(...item.actor.getSelfRollOptions("origin"));
}

// Special cases, traits that modify the action itself universally
// This might change once we've better decided how derivative traits will work
Expand Down
Loading