diff --git a/src/module/system/action-macros/piloting/stunt.ts b/src/module/system/action-macros/piloting/stunt.ts new file mode 100644 index 00000000000..61e7572e02a --- /dev/null +++ b/src/module/system/action-macros/piloting/stunt.ts @@ -0,0 +1,110 @@ +import { SingleCheckAction } from "@actor/actions/index.ts"; + +const PREFIX = "SF2E.Actions.Stunt"; + +const stunt = new SingleCheckAction({ + cost: 1, + description: `${PREFIX}.Description`, + name: `${PREFIX}.Title`, + notes: [{ outcome: ["criticalFailure", "failure"], text: `${PREFIX}.Notes.failure` }], + rollOptions: ["action:stunt"], + section: "skill", + slug: "stunt", + statistic: "piloting", + traits: ["manipulate", "move", "reckless"], + variants: [ + { + modifiers: [ + { label: `${PREFIX}.BackOff.Title`, modifier: -1 }, + { label: `${PREFIX}.Modifiers.RecklessPiloting`, modifier: -5, predicate: ["reckless-piloting"] }, + ], + name: `${PREFIX}.BackOff.Title`, + notes: [ + { outcome: ["criticalSuccess", "success"], text: `${PREFIX}.BackOff.Notes.success` }, + { outcome: ["criticalFailure", "failure"], text: `${PREFIX}.Notes.failure` }, + ], + rollOptions: ["action:stunt", "action:stunt:back-off"], + slug: "back-off", + }, + { + modifiers: [ + { label: `${PREFIX}.Evade.Title`, modifier: -1 }, + { label: `${PREFIX}.Modifiers.RecklessPiloting`, modifier: -5, predicate: ["reckless-piloting"] }, + ], + name: `${PREFIX}.Evade.Title`, + notes: [ + { outcome: ["criticalSuccess", "success"], text: `${PREFIX}.Evade.Notes.success` }, + { outcome: ["criticalFailure", "failure"], text: `${PREFIX}.Notes.failure` }, + ], + rollOptions: ["action:stunt", "action:stunt:evade"], + slug: "evade", + }, + { + modifiers: [ + { label: `${PREFIX}.FlipAndBurn.Title`, modifier: -1 }, + { label: `${PREFIX}.Modifiers.RecklessPiloting`, modifier: -5, predicate: ["reckless-piloting"] }, + ], + name: `${PREFIX}.FlipAndBurn.Title`, + notes: [ + { outcome: ["criticalSuccess", "success"], text: `${PREFIX}.FlipAndBurn.Notes.success` }, + { outcome: ["criticalFailure", "failure"], text: `${PREFIX}.Notes.failure` }, + ], + rollOptions: ["action:stunt", "action:stunt:flip-and-burn"], + slug: "flip-and-burn", + }, + { + modifiers: [ + { label: `${PREFIX}.BarrelRoll.Title`, modifier: -2 }, + { label: `${PREFIX}.Modifiers.RecklessPiloting`, modifier: -5, predicate: ["reckless-piloting"] }, + ], + name: `${PREFIX}.BarrelRoll.Title`, + notes: [ + { outcome: ["criticalSuccess", "success"], text: `${PREFIX}.BarrelRoll.Notes.success` }, + { outcome: ["criticalFailure", "failure"], text: `${PREFIX}.Notes.failure` }, + ], + rollOptions: ["action:stunt", "action:stunt:barrel-roll"], + slug: "barrel-roll", + }, + { + modifiers: [ + { label: `${PREFIX}.Flyby.Title`, modifier: -2 }, + { label: `${PREFIX}.Modifiers.RecklessPiloting`, modifier: -5, predicate: ["reckless-piloting"] }, + ], + name: `${PREFIX}.Flyby.Title`, + notes: [ + { outcome: ["criticalSuccess", "success"], text: `${PREFIX}.Flyby.Notes.success` }, + { outcome: ["criticalFailure", "failure"], text: `${PREFIX}.Notes.failure` }, + ], + rollOptions: ["action:stunt", "action:stunt:flyby"], + slug: "flyby", + }, + { + modifiers: [ + { label: `${PREFIX}.Drift.Title`, modifier: -2 }, + { label: `${PREFIX}.Modifiers.RecklessPiloting`, modifier: -5, predicate: ["reckless-piloting"] }, + ], + name: `${PREFIX}.Drift.Title`, + notes: [ + { outcome: ["criticalSuccess", "success"], text: `${PREFIX}.Drift.Notes.success` }, + { outcome: ["criticalFailure", "failure"], text: `${PREFIX}.Notes.failure` }, + ], + rollOptions: ["action:stunt", "action:stunt:drift"], + slug: "drift", + }, + { + modifiers: [ + { label: `${PREFIX}.TurnInPlace.Title`, modifier: -2 }, + { label: `${PREFIX}.Modifiers.RecklessPiloting`, modifier: -5, predicate: ["reckless-piloting"] }, + ], + name: `${PREFIX}.TurnInPlace.Title`, + notes: [ + { outcome: ["criticalSuccess", "success"], text: `${PREFIX}.TurnInPlace.Notes.success` }, + { outcome: ["criticalFailure", "failure"], text: `${PREFIX}.Notes.failure` }, + ], + rollOptions: ["action:stunt", "action:stunt:turn-in-place"], + slug: "turn-in-place", + }, + ], +}); + +export { stunt }; diff --git a/src/scripts/hooks/init.ts b/src/scripts/hooks/init.ts index 179c89005ea..574b8d075e4 100644 --- a/src/scripts/hooks/init.ts +++ b/src/scripts/hooks/init.ts @@ -26,6 +26,7 @@ import { plotCourse } from "@system/action-macros/piloting/plot-course.ts"; 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"; export const Init = { listen: (): void => { @@ -177,7 +178,7 @@ 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].forEach((action) => + [accessInfosphere, drive, hack, navigate, plotCourse, program, runOver, stop, stunt].forEach((action) => game.pf2e.actions.set(action.slug, action), ); } diff --git a/static/lang/action-en.json b/static/lang/action-en.json index b5ccd255d24..e36ca459aef 100644 --- a/static/lang/action-en.json +++ b/static/lang/action-en.json @@ -1120,6 +1120,58 @@ "Stop": { "Description": "
You bring the vehicle to a stop.
", "Title": "Stop" + }, + "Stunt": { + "Description": "You perform a stunt while Driving your vehicle, temporarily improving its effective capabilities at the risk of losing control. Drive your vehicle and choose a stunt. All piloting checks attempted as part of your Stunt receive the listed penalty, including piloting checks made to take a reckless action. If the Drive action and Stunt are both reckless, you must attempt the piloting check to keep control of the vehicle twice.
Stunt | Penalty | Benefit |
---|---|---|
Back Off | -1 | Move half Speed backwards. |
Evade | -1 | Move half Speed to gain a +1 status bonus to AC. |
Flip and Burn | -1 | Move half Speed, then turn and direction. |
Barrel Roll | -2 | Move half Speed to gain a +2 status bonus to AC. |
Flyby | -2 | Move half Speed through an enemy square. |
Drift | -2 | Move half Speed sideways without turning. |
Turn in Place | -2 | Turn, then move full Speed. |