Skip to content

Commit

Permalink
Add run over action implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaj-a committed Jul 31, 2024
1 parent 39fbc94 commit f65f8c8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/module/system/action-macros/piloting/run-over.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { SingleCheckAction } from "@actor/actions/index.ts";

const PREFIX = "SF2E.Actions.RunOver";

const runOver = new SingleCheckAction({
cost: 3,
description: `${PREFIX}.Description`,
name: `${PREFIX}.Title`,
notes: [{ outcome: ["criticalFailure", "failure"], text: `${PREFIX}.Notes.failure` }],
rollOptions: ["action:run-over"],
section: "skill",
slug: "run-over",
statistic: "piloting",
traits: ["move", "reckless"],
});

export { runOver };
3 changes: 2 additions & 1 deletion src/scripts/hooks/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { hack } from "@system/action-macros/computers/hack.ts";
import { navigate } from "@system/action-macros/piloting/navigate.ts";
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";

export const Init = {
listen: (): void => {
Expand Down Expand Up @@ -175,7 +176,7 @@ export const Init = {
game.pf2e.StatusEffects.initialize();

if (game.modules.get("starfinder-field-test-for-pf2e")?.active) {
[accessInfosphere, drive, hack, navigate, plotCourse, program].forEach((action) =>
[accessInfosphere, drive, hack, navigate, plotCourse, program, runOver].forEach((action) =>
game.pf2e.actions.set(action.slug, action),
);
}
Expand Down
7 changes: 7 additions & 0 deletions static/lang/action-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,13 @@
"success": "<strong>Success</strong> Your attempt is successful. Each additional day spent Programming reduces the materials needed to complete the item by an amount based on your level and your proficiency rank."
},
"Title": "Program"
},
"RunOver": {
"Description": "<p>You try to run over creatures or ram another vehicle with your vehicle. If you maintain control of your vehicle, it moves up to twice its Speed in a straight line at the vehicle's current heading. You attempt to run over any creatures in your path two sizes smaller than the vehicle or smaller, and you can attempt to ram one target creature or object in your path one size smaller than the vehicle or larger.</p><p>Each creature in your path, including a rammed target, takes the vehicle's collision damage (basic Reflex save at vehicle's collision DC). If the rammed target is a vehicle, its pilot can attempt a piloting check in place of this Reflex save, with the same results. If the target of your ram takes damage, you and your vehicle each take collision damage (no save) and your movement ends.</p>",
"Notes": {
"failure": "<strong>Failure</strong> The vehicle moves its Speed in a straight line along its most recent heading, drifting up to 45 degrees at the GM's discretion, and becomes uncontrolled."
},
"Title": "Run Over"
}
}
}
Expand Down

0 comments on commit f65f8c8

Please sign in to comment.