Skip to content

Commit

Permalink
Add identify alchemy action object (foundryvtt#12990)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaj-a committed Jan 13, 2024
1 parent 3ee17e5 commit e02f0b2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/module/system/action-macros/crafting/identify-alchemy.ts
Original file line number Diff line number Diff line change
@@ -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 };
1 change: 1 addition & 0 deletions src/module/system/action-macros/crafting/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { craft } from "./craft.ts";
export { identifyAlchemy } from "./identify-alchemy.ts";
export { repair } from "./repair.ts";
3 changes: 2 additions & 1 deletion src/module/system/action-macros/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -190,6 +190,7 @@ export const SystemActions: Action[] = [
grapple.action,
hide.action,
highJump.action,
identifyAlchemy,
identifyMagic,
impersonate.action,
interact,
Expand Down
9 changes: 9 additions & 0 deletions static/lang/action-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,15 @@
},
"Title": "High Jump"
},
"IdentifyAlchemy": {
"Description": "<p><strong>Requirements</strong> You are holding or wearing an alchemist's toolkit.</p><hr><p>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.</p><p><strong>Success</strong> You identify the item and the means of activating it.</p><p><strong>Failure</strong> You fail to identify the item but can try again.</p><p><strong>Critical Failure</strong> You misidentify the item as another item of the GM's choice.</p>",
"Notes": {
"criticalFailure": "<strong>Critical Failure</strong> You misidentify the magic as something else of the GM's choice.",
"failure": "<strong>Failure</strong> You fail to identify the magic and can't try again for 1 day.",
"success": "<strong>Success</strong> 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": "<p>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.</p><p><strong>Critical Success</strong> 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.</p><p><strong>Success</strong> 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.</p><p><strong>Failure</strong> You fail to identify the magic and can't try again for 1 day.</p><p><strong>Critical Failure</strong> You misidentify the magic as something else of the GM's choice.</p>",
"Notes": {
Expand Down

0 comments on commit e02f0b2

Please sign in to comment.