Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 10 additions & 6 deletions src/module/item/weapon/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,15 +559,19 @@ class WeaponPF2e<TParent extends ActorPF2e | null = ActorPF2e | null> extends Ph
): Promise<RawItemChatData> {
const traits = this.traitChatData(CONFIG.PF2E.weaponTraits);
const chatData = await super.getChatData();
const rangeLabel = createActionRangeLabel(this.range);
const properties = [CONFIG.PF2E.weaponCategories[this.category], this.system.reload.label, rangeLabel].filter(
R.isTruthy,
);

const expendLabel =
typeof this.system.expend === "number" && (this.system.expend !== 1 || SYSTEM_ID === "sf2e")
? _loc("PF2E.Item.Weapon.ExpendN", { n: this.system.expend })
: null;
return this.processChatData(htmlOptions, {
...chatData,
traits,
properties,
properties: [
CONFIG.PF2E.weaponCategories[this.category],
this.system.reload.label,
createActionRangeLabel(this.range),
expendLabel,
].filter(R.isTruthy),
});
}

Expand Down
1 change: 1 addition & 0 deletions static/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3067,6 +3067,7 @@
"Damage": {
"DiceNumber": "Dice Number"
},
"ExpendN": "Expend {n}",
"Forceful": {
"Second": "Forceful 2nd Attack",
"Third": "Forceful 3rd+ Attack"
Expand Down
5 changes: 5 additions & 0 deletions static/templates/actors/character/partials/strike.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@
{{else if action.item.system.range}}
<span class="tag tag_secondary">{{localize "PF2E.Action.Range.IncrementN" n=action.item.system.range}}</span>
{{/if}}
{{#if action.item.system.expend includeZero=true}}
{{#if (or (eq systemId "sf2e") (ne action.item.system.expend 1))}}
<span class="tag tag_secondary">{{localize "PF2E.Item.Weapon.ExpendN" n=action.item.system.expend}}</span>
{{/if}}
{{/if}}
</div>
</div>
</li>
Expand Down
Loading