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

Separate Fortress Shields from Tower Shield material restrictions #16548

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/module/item/physical/materials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function getMaterialValuationData(item: PhysicalItemPF2e): MaterialGradeData | n
: item.isOfType("shield")
? item.isBuckler
? MATERIAL_DATA.shield.buckler
: item.isTowerShield
: item.isMaterialTowerShield
? MATERIAL_DATA.shield.towerShield
: MATERIAL_DATA.shield.shield
: null;
Expand Down
4 changes: 4 additions & 0 deletions src/module/item/shield/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class ShieldPF2e<TParent extends ActorPF2e | null = ActorPF2e | null> extends Ph
return ["fortress-shield", "tower-shield"].includes(this.system.baseItem ?? "");
}

get isMaterialTowerShield(): boolean {
return ["tower-shield"].includes(this.system.baseItem ?? "");
}

get speedPenalty(): number {
return this.system.speedPenalty || 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/module/item/shield/sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ShieldSheetPF2e extends PhysicalItemSheetPF2e<ShieldPF2e> {
}));
const materialData = shield.isBuckler
? MATERIAL_DATA.shield.buckler
: shield.isTowerShield
: shield.isMaterialTowerShield
? MATERIAL_DATA.shield.towerShield
: MATERIAL_DATA.shield.shield;

Expand Down
Loading