Skip to content

Commit

Permalink
Merge branch 'allow-to-add-property-runes-with-ABP-as-fundamental-run…
Browse files Browse the repository at this point in the history
…es' into 'master'

allow to add property runes with ABP as fundamental runes

See merge request hooking/foundry-vtt---pathfinder-2e!6163
  • Loading branch information
stwlam committed Nov 26, 2021
2 parents bc99ea3 + 1fc95ac commit afb0a28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/module/item/weapon/sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ export class WeaponSheetPF2e extends PhysicalItemSheetPF2e<WeaponPF2e> {
propertyRuneSlots?: PropertyRuneSheetSlot[];
} = await super.getData();

const ABPVariant = game.settings.get("pf2e", "automaticBonusVariant");
// Limit shown property-rune slots by potency rune level and a material composition of orichalcum
const potencyRuneValue = sheetData.data.potencyRune.value ?? 0;
const potencyRuneValue = ABPVariant === "ABPFundamentalPotency" ? 4 : sheetData.data.potencyRune.value ?? 0;
const propertyRuneSlots = [
[1, sheetData.data.propertyRune1],
[2, sheetData.data.propertyRune2],
Expand Down
2 changes: 2 additions & 0 deletions static/templates/items/weapon-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ <h3>
{{/each}}
</select>
</div>
{{#unless abpEnabled}}
<div class="form-group">
<label>{{localize "PF2E.PotencyRuneLabel"}}</label>
<select name="data.potencyRune.value" data-dtype="Number">
Expand All @@ -122,6 +123,7 @@ <h3>
{{/select}}
</select>
</div>
{{/unless}}
{{#each propertyRuneSlots as |slot|}}
<div class="form-group">
<label>{{slot.label}}</label>
Expand Down

0 comments on commit afb0a28

Please sign in to comment.