Skip to content

Commit

Permalink
Added finesese override bFlag on creating attacks from items
Browse files Browse the repository at this point in the history
  • Loading branch information
dmrickey committed Jul 4, 2024
1 parent 0365c3c commit 214d595
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,11 @@ function itemAttackFromItem(wrapped, item) {
data.system.flags ||= {};
data.system.flags = mergeObject(data.system.flags, systemFlags);

if (item instanceof pf1.documents.item.ItemWeaponPF && item.system.properties.fin) {
data.system.flags.boolean ||= {};
data.system.flags.boolean['finesse-override'] = true;
}

const flags = item.flags?.[MODULE_NAME] || {};
data.flags ||= {}
data.flags[MODULE_NAME] = mergeObject(flags, data.flags[MODULE_NAME]);
Expand Down
3 changes: 3 additions & 0 deletions types/pf1/pf1.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ declare global {
rank: number;
rt: boolean;
subSkills?: Record<string, SkillData & { journal: string }>;
properties: Record<keyof WeaponProperties, boolean>;
}

declare type SpellbookKey =
Expand Down Expand Up @@ -1767,6 +1768,8 @@ declare global {
prf: 'Performance';
rch: 'Reach';
sct: 'Scatter';
slf: 'Slow-firing';
sma: 'Semi-automatic';
snd: 'Sunder';
spc: 'Special';
thr: 'Thrown';
Expand Down

0 comments on commit 214d595

Please sign in to comment.