From e02f0b27195c001cf3398f6a9521d3f280fc7e30 Mon Sep 17 00:00:00 2001 From: Nikolaj Andresen Date: Sat, 13 Jan 2024 05:49:29 +0100 Subject: [PATCH] Add identify alchemy action object (#12990) --- .../crafting/identify-alchemy.ts | 20 +++++++++++++++++++ .../system/action-macros/crafting/index.ts | 1 + src/module/system/action-macros/index.ts | 3 ++- static/lang/action-en.json | 9 +++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/module/system/action-macros/crafting/identify-alchemy.ts diff --git a/src/module/system/action-macros/crafting/identify-alchemy.ts b/src/module/system/action-macros/crafting/identify-alchemy.ts new file mode 100644 index 00000000000..10f2f20cc6e --- /dev/null +++ b/src/module/system/action-macros/crafting/identify-alchemy.ts @@ -0,0 +1,20 @@ +import { SingleCheckAction } from "@actor/actions/index.ts"; + +const PREFIX = "PF2E.Actions.IdentifyAlchemy"; + +const action = new SingleCheckAction({ + description: `${PREFIX}.Description`, + name: `${PREFIX}.Title`, + notes: [ + { outcome: ["criticalSuccess", "success"], text: `${PREFIX}.Notes.success` }, + { outcome: ["failure"], text: `${PREFIX}.Notes.failure` }, + { outcome: ["criticalFailure"], text: `${PREFIX}.Notes.criticalFailure` }, + ], + rollOptions: ["action:identify-alchemy"], + section: "skill", + slug: "identify-alchemy", + statistic: "crafting", + traits: ["concentrate", "exploration", "secret"], +}); + +export { action as identifyAlchemy }; diff --git a/src/module/system/action-macros/crafting/index.ts b/src/module/system/action-macros/crafting/index.ts index 7092d557806..c4a1f822251 100644 --- a/src/module/system/action-macros/crafting/index.ts +++ b/src/module/system/action-macros/crafting/index.ts @@ -1,2 +1,3 @@ export { craft } from "./craft.ts"; +export { identifyAlchemy } from "./identify-alchemy.ts"; export { repair } from "./repair.ts"; diff --git a/src/module/system/action-macros/index.ts b/src/module/system/action-macros/index.ts index 5fb093fca7f..6568f5926d5 100644 --- a/src/module/system/action-macros/index.ts +++ b/src/module/system/action-macros/index.ts @@ -30,7 +30,7 @@ import { step } from "./basic/step.ts"; import { stride } from "./basic/stride.ts"; import { takeCover } from "./basic/take-cover.ts"; import { tamper } from "./class/inventor/tamper.ts"; -import { craft, repair } from "./crafting/index.ts"; +import { craft, identifyAlchemy, repair } from "./crafting/index.ts"; import * as createADiversion from "./deception/create-a-diversion.ts"; import * as feint from "./deception/feint.ts"; import * as impersonate from "./deception/impersonate.ts"; @@ -190,6 +190,7 @@ export const SystemActions: Action[] = [ grapple.action, hide.action, highJump.action, + identifyAlchemy, identifyMagic, impersonate.action, interact, diff --git a/static/lang/action-en.json b/static/lang/action-en.json index 5ec6e7b8073..c5df6760cd2 100644 --- a/static/lang/action-en.json +++ b/static/lang/action-en.json @@ -433,6 +433,15 @@ }, "Title": "High Jump" }, + "IdentifyAlchemy": { + "Description": "

Requirements You are holding or wearing an alchemist's toolkit.


You can identify the nature of an alchemical item with 10 minutes of testing using your alchemist's toolkit. If your attempt is interrupted in any way, you must start over.

Success You identify the item and the means of activating it.

Failure You fail to identify the item but can try again.

Critical Failure You misidentify the item as another item of the GM's choice.

", + "Notes": { + "criticalFailure": "Critical Failure You misidentify the magic as something else of the GM's choice.", + "failure": "Failure You fail to identify the magic and can't try again for 1 day.", + "success": "Success For an item or location, you get a sense of what it does and learn any means of activating it. For an ongoing effect (such as a spell with a duration), you learn the effect's name and what it does. You can't try again in hopes of getting a critical success." + }, + "Title": "Identify Alchemy" + }, "IdentifyMagic": { "Description": "

Once you discover that an item, location, or ongoing effect is magical, you can spend 10 minutes to try to identify the particulars of its magic. If your attempt is interrupted, you must start over. The GM sets the DC for your check. Cursed magic or esoteric subjects usually have higher DCs or might even be impossible to identify using this activity alone. Heightening a spell doesn't increase the DC to identify it.

Critical Success You learn all the attributes of the magic, including its name (for an effect), what it does, any means of activating it (for an item or location), and whether it is cursed.

Success For an item or location, you get a sense of what it does and learn any means of activating it. For an ongoing effect (such as a spell with a duration), you learn the effect's name and what it does. You can't try again in hopes of getting a critical success.

Failure You fail to identify the magic and can't try again for 1 day.

Critical Failure You misidentify the magic as something else of the GM's choice.

", "Notes": {