mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
[V14] TagTeamRoll Rework (#1732)
* Initial rolls working * Fixed reroll * more * More work * Added results section * . * Visual improvements * . * Removed traces of old TagTeamRoll * Added initiator handling * Added updating for other players * Fixed sync start * Completed finish method * Damage reroll * Fixed localization * Fixed crit damage * Fixes * Added visual of advantage and disadvantage dice
This commit is contained in:
parent
a7eda31aec
commit
3031531b14
46 changed files with 1301 additions and 738 deletions
|
|
@ -39,6 +39,7 @@ export const preloadHandlebarsTemplates = async function () {
|
|||
'systems/daggerheart/templates/ui/tooltip/parts/tooltipChips.hbs',
|
||||
'systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs',
|
||||
'systems/daggerheart/templates/dialogs/downtime/activities.hbs',
|
||||
'systems/daggerheart/templates/dialogs/tagTeamDialog/parts/tagTeamDamageParts.hbs',
|
||||
'systems/daggerheart/templates/dialogs/dice-roll/costSelection.hbs',
|
||||
'systems/daggerheart/templates/ui/chat/parts/roll-part.hbs',
|
||||
'systems/daggerheart/templates/ui/chat/parts/description-part.hbs',
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ export async function runMigrations() {
|
|||
}
|
||||
|
||||
if (foundry.utils.isNewerVersion('1.2.7', lastMigrationVersion)) {
|
||||
const tagTeam = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.TagTeamRoll);
|
||||
const tagTeam = game.settings.get(CONFIG.DH.id, 'TagTeamRoll');
|
||||
const initatorMissing = tagTeam.initiator && !game.actors.some(actor => actor.id === tagTeam.initiator);
|
||||
const missingMembers = Object.keys(tagTeam.members).reduce((acc, id) => {
|
||||
if (!game.actors.some(actor => actor.id === id)) {
|
||||
|
|
@ -206,7 +206,7 @@ export async function runMigrations() {
|
|||
initiator: initatorMissing ? null : tagTeam.initiator,
|
||||
members: missingMembers
|
||||
});
|
||||
await game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.TagTeamRoll, tagTeam);
|
||||
await game.settings.set(CONFIG.DH.id, 'TagTeamRoll', tagTeam);
|
||||
|
||||
lastMigrationVersion = '1.2.7';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import {
|
|||
DhMetagamingSettings,
|
||||
DhVariantRuleSettings
|
||||
} from '../applications/settings/_module.mjs';
|
||||
import { CompendiumBrowserSettings, DhTagTeamRoll } from '../data/_module.mjs';
|
||||
import { CompendiumBrowserSettings } from '../data/_module.mjs';
|
||||
|
||||
export const registerDHSettings = () => {
|
||||
registerMenuSettings();
|
||||
|
|
@ -157,12 +157,6 @@ const registerNonConfigSettings = () => {
|
|||
type: DhCountdowns
|
||||
});
|
||||
|
||||
game.settings.register(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.TagTeamRoll, {
|
||||
scope: 'world',
|
||||
config: false,
|
||||
type: DhTagTeamRoll
|
||||
});
|
||||
|
||||
game.settings.register(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.CompendiumBrowserSettings, {
|
||||
scope: 'world',
|
||||
config: false,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ export function handleSocketEvent({ action = null, data = {} } = {}) {
|
|||
case socketEvent.DowntimeTrigger:
|
||||
Party.downtimeMoveQuery(data);
|
||||
break;
|
||||
case socketEvent.TagTeamStart:
|
||||
Hooks.callAll(CONFIG.DH.HOOKS.hooksConfig.tagTeamStart, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -22,7 +25,8 @@ export const socketEvent = {
|
|||
GMUpdate: 'DhGMUpdate',
|
||||
Refresh: 'DhRefresh',
|
||||
DhpFearUpdate: 'DhFearUpdate',
|
||||
DowntimeTrigger: 'DowntimeTrigger'
|
||||
DowntimeTrigger: 'DowntimeTrigger',
|
||||
TagTeamStart: 'DhTagTeamStart'
|
||||
};
|
||||
|
||||
export const GMUpdateEvent = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue