From ed93e9f92730a40d1eea5394686b52a1e7fb2853 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Thu, 13 Feb 2025 00:49:28 -0700 Subject: [PATCH] Add some resources to the relevant combat files --- eslint.config.mjs | 1 + module/Apps/sidebar/CombatTracker.mjs | 0 module/documents/combat.mjs | 26 ++++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 module/Apps/sidebar/CombatTracker.mjs create mode 100644 module/documents/combat.mjs diff --git a/eslint.config.mjs b/eslint.config.mjs index 6fab321..272ca4a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -31,6 +31,7 @@ export default [ renderTemplate: `readonly`, TextEditor: `readonly`, fromUuid: `readonly`, + Combat: `readonly`, }, }, }, diff --git a/module/Apps/sidebar/CombatTracker.mjs b/module/Apps/sidebar/CombatTracker.mjs new file mode 100644 index 0000000..e69de29 diff --git a/module/documents/combat.mjs b/module/documents/combat.mjs new file mode 100644 index 0000000..2a4760c --- /dev/null +++ b/module/documents/combat.mjs @@ -0,0 +1,26 @@ +/* +Resources: +- Combat : https://github.com/foundryvtt/dnd5e/blob/4.3.x/module/documents/combat.mjs +- Combatant : https://github.com/foundryvtt/dnd5e/blob/4.3.x/module/documents/combatant.mjs +- CombatTracker : https://github.com/foundryvtt/dnd5e/blob/4.3.x/module/applications/combat/combat-tracker.mjs +*/ + +export class RipCryptCombat extends Combat { + /** + * @override + * Sorts combatants for the combat tracker in the following way: + * - Distance from the current fate ordinal. (0 -> 3) + * - Coin Flip result (if disposition matches flip result, then 0, otherwise, 0.5) + */ + _sortCombatants(a, b) { + // The distance from fate + }; + + nextTurn() { + // Make it skip all combatants with the same initiative value + }; + + previousTurn() { + // Go back a step + }; +};