Get most of the custom Initiative sorting stuff through the door
This commit is contained in:
parent
ed93e9f927
commit
e302b56a4e
10 changed files with 142 additions and 14 deletions
|
|
@ -6,6 +6,24 @@ Resources:
|
|||
*/
|
||||
|
||||
export class RipCryptCombat extends Combat {
|
||||
|
||||
get groups() {
|
||||
let groups = new Map();
|
||||
|
||||
for (const combatant of this.combatants) {
|
||||
const groupKey = combatant.groupKey;
|
||||
if (!groupKey) { continue };
|
||||
|
||||
if (groups.has(groupKey)) {
|
||||
groups.get(groupKey).push(combatant);
|
||||
} else {
|
||||
groups.set(groupKey, [combatant]);
|
||||
};
|
||||
};
|
||||
|
||||
return groups;
|
||||
};
|
||||
|
||||
/**
|
||||
* @override
|
||||
* Sorts combatants for the combat tracker in the following way:
|
||||
|
|
@ -14,13 +32,14 @@ export class RipCryptCombat extends Combat {
|
|||
*/
|
||||
_sortCombatants(a, b) {
|
||||
// The distance from fate
|
||||
return super._sortCombatants(a, b) * -1;
|
||||
};
|
||||
|
||||
nextTurn() {
|
||||
// Make it skip all combatants with the same initiative value
|
||||
};
|
||||
// nextTurn() {
|
||||
// // Make it skip all combatants with the same initiative value
|
||||
// };
|
||||
|
||||
previousTurn() {
|
||||
// Go back a step
|
||||
};
|
||||
// previousTurn() {
|
||||
// // Go back a step
|
||||
// };
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue