diff --git a/src/module/system/action-macros/piloting/take-control.ts b/src/module/system/action-macros/piloting/take-control.ts new file mode 100644 index 00000000000..ea33aab8fff --- /dev/null +++ b/src/module/system/action-macros/piloting/take-control.ts @@ -0,0 +1,17 @@ +import { SingleCheckAction } from "@actor/actions/index.ts"; + +const PREFIX = "SF2E.Actions.TakeControl"; + +const takeControl = new SingleCheckAction({ + cost: 1, + description: `${PREFIX}.Description`, + name: `${PREFIX}.Title`, + notes: [{ outcome: ["criticalSuccess", "success"], text: `${PREFIX}.Notes.success` }], + rollOptions: ["action:take-control"], + section: "skill", + slug: "take-control", + statistic: "piloting", + traits: ["manipulate"], +}); + +export { takeControl }; diff --git a/src/scripts/hooks/init.ts b/src/scripts/hooks/init.ts index 574b8d075e4..e88b34e8e7c 100644 --- a/src/scripts/hooks/init.ts +++ b/src/scripts/hooks/init.ts @@ -27,6 +27,7 @@ import { program } from "@system/action-macros/computers/program.ts"; import { runOver } from "@system/action-macros/piloting/run-over.ts"; import { stop } from "@system/action-macros/piloting/stop.ts"; import { stunt } from "@system/action-macros/piloting/stunt.ts"; +import { takeControl } from "@system/action-macros/piloting/take-control.ts"; export const Init = { listen: (): void => { @@ -178,9 +179,18 @@ export const Init = { game.pf2e.StatusEffects.initialize(); if (game.modules.get("starfinder-field-test-for-pf2e")?.active) { - [accessInfosphere, drive, hack, navigate, plotCourse, program, runOver, stop, stunt].forEach((action) => - game.pf2e.actions.set(action.slug, action), - ); + [ + accessInfosphere, + drive, + hack, + navigate, + plotCourse, + program, + runOver, + stop, + stunt, + takeControl, + ].forEach((action) => game.pf2e.actions.set(action.slug, action)); } }); }, diff --git a/static/lang/action-en.json b/static/lang/action-en.json index f005a7324a2..e286138a30f 100644 --- a/static/lang/action-en.json +++ b/static/lang/action-en.json @@ -1172,6 +1172,13 @@ }, "Title": "Turn in Place" } + }, + "TakeControl": { + "Description": "
You take control of a vehicle. Attempt a Piloting check; on a success, you become the vehicle's pilot, or regain control of the vehicle if it was uncontrolled. Some vehicles have complicated controls that cause this action to become a multi-action activity, and most vehicles take at least 3 actions if they aren't activated.
", + "Notes": { + "success": "Success You become the vehicle's pilot, or regain control of the vehicle if it was uncontrolled." + }, + "Title": "Take Control" } } }