diff --git a/packs/equipment/crafters-eyepiece-greater.json b/packs/equipment/crafters-eyepiece-greater.json index e7fab92adf3..e5f4556694b 100644 --- a/packs/equipment/crafters-eyepiece-greater.json +++ b/packs/equipment/crafters-eyepiece-greater.json @@ -40,6 +40,25 @@ "selector": "crafting", "type": "item", "value": 2 + }, + { + "key": "ActiveEffectLike", + "mode": "add", + "path": "system.crafting.repairValue", + "value": 5 + }, + { + "key": "Note", + "text": "PF2E.SpecificRule.CraftersEyepiece.Note", + "title": "{item|name}", + "selector": "crafting-check", + "outcome": [ + "success", + "criticalSuccess" + ], + "predicate": [ + "action:repair" + ] } ], "size": "med", diff --git a/packs/equipment/crafters-eyepiece.json b/packs/equipment/crafters-eyepiece.json index 0cd61060a39..227e16c4c5d 100644 --- a/packs/equipment/crafters-eyepiece.json +++ b/packs/equipment/crafters-eyepiece.json @@ -40,6 +40,25 @@ "selector": "crafting", "type": "item", "value": 1 + }, + { + "key": "ActiveEffectLike", + "mode": "add", + "path": "system.crafting.repairValue", + "value": 5 + }, + { + "key": "Note", + "text": "PF2E.SpecificRule.CraftersEyepiece.Note", + "title": "{item|name}", + "selector": "crafting-check", + "outcome": [ + "success", + "criticalSuccess" + ], + "predicate": [ + "action:repair" + ] } ], "size": "med", diff --git a/src/module/actor/character/data.ts b/src/module/actor/character/data.ts index c8709dccba0..4f5550d7ac6 100644 --- a/src/module/actor/character/data.ts +++ b/src/module/actor/character/data.ts @@ -404,6 +404,7 @@ interface VersatileWeaponOption { interface CharacterCraftingData { formulas: CraftingFormulaData[]; entries: Record>; + repairValue: 5; } interface CharacterResources extends CreatureResources { diff --git a/src/module/actor/character/document.ts b/src/module/actor/character/document.ts index 019f5bdfac0..94c3f15b2ba 100644 --- a/src/module/actor/character/document.ts +++ b/src/module/actor/character/document.ts @@ -456,7 +456,7 @@ class CharacterPF2e { callback: async (result) => { // react to check result by posting a chat message with appropriate follow-up options const { actor } = result; - if (item && result.message instanceof ChatMessagePF2e && actor.isOfType("creature")) { + if (item && result.message instanceof ChatMessagePF2e && actor.isOfType("character")) { const messageSource = result.message.toObject(); const flavor = await (async () => { const proficiencyRank = actor.skills.crafting.rank ?? 0; + const repairValue = actor.system.crafting.repairValue; if ("criticalSuccess" === result.outcome) { const label = "PF2E.Actions.Repair.Labels.RestoreItemHitPoints"; - const restored = String(10 + proficiencyRank * 10); + const restored = String(repairValue + 5 + proficiencyRank * (repairValue + 5)); return renderRepairResult(item, "restore", label, restored); } else if ("success" === result.outcome) { const label = "PF2E.Actions.Repair.Labels.RestoreItemHitPoints"; - const restored = String(5 + proficiencyRank * 5); + const restored = String(repairValue + proficiencyRank * repairValue); return renderRepairResult(item, "restore", label, restored); } else if ("criticalFailure" === result.outcome) { const label = "PF2E.Actions.Repair.Labels.RollItemDamage"; diff --git a/static/lang/re-en.json b/static/lang/re-en.json index c5599ef8d09..a8ff2704949 100644 --- a/static/lang/re-en.json +++ b/static/lang/re-en.json @@ -2320,6 +2320,9 @@ "Prone": "Prone", "Standard": "Standard" }, + "CraftersEyepiece":{ + "Note":"When you Repair an item, increase the Hit Points restored to 10 + 10 per proficiency rank on a success or 15 + 15 per proficiency rank on a critical success." + }, "CriticalDeck": { "Effect": { "Label": "Critical Effect"