mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-11 03:27:08 +01:00
Compare commits
No commits in common. "c42f876d4f8028a111e98c6be831d5e475208865" and "bdb89973248dc0001814a3e393697c850c528446" have entirely different histories.
c42f876d4f
...
bdb8997324
40 changed files with 75 additions and 975 deletions
|
|
@ -58,9 +58,6 @@ CONFIG.Canvas.layers.tokens.layerClass = DhTokenLayer;
|
||||||
|
|
||||||
CONFIG.MeasuredTemplate.objectClass = placeables.DhMeasuredTemplate;
|
CONFIG.MeasuredTemplate.objectClass = placeables.DhMeasuredTemplate;
|
||||||
|
|
||||||
CONFIG.RollTable.documentClass = documents.DhRollTable;
|
|
||||||
CONFIG.RollTable.resultTemplate = 'systems/daggerheart/templates/ui/chat/table-result.hbs';
|
|
||||||
|
|
||||||
CONFIG.Scene.documentClass = documents.DhScene;
|
CONFIG.Scene.documentClass = documents.DhScene;
|
||||||
|
|
||||||
CONFIG.Token.documentClass = documents.DhToken;
|
CONFIG.Token.documentClass = documents.DhToken;
|
||||||
|
|
@ -108,7 +105,7 @@ Hooks.once('init', () => {
|
||||||
type: game.i18n.localize(typePath)
|
type: game.i18n.localize(typePath)
|
||||||
});
|
});
|
||||||
|
|
||||||
const { Items, Actors, RollTables } = foundry.documents.collections;
|
const { Items, Actors } = foundry.documents.collections;
|
||||||
Items.unregisterSheet('core', foundry.applications.sheets.ItemSheetV2);
|
Items.unregisterSheet('core', foundry.applications.sheets.ItemSheetV2);
|
||||||
Items.registerSheet(SYSTEM.id, applications.sheets.items.Ancestry, {
|
Items.registerSheet(SYSTEM.id, applications.sheets.items.Ancestry, {
|
||||||
types: ['ancestry'],
|
types: ['ancestry'],
|
||||||
|
|
@ -193,12 +190,6 @@ Hooks.once('init', () => {
|
||||||
label: sheetLabel('TYPES.Actor.party')
|
label: sheetLabel('TYPES.Actor.party')
|
||||||
});
|
});
|
||||||
|
|
||||||
RollTables.unregisterSheet('core', foundry.applications.sheets.RollTableSheet);
|
|
||||||
RollTables.registerSheet(SYSTEM.id, applications.sheets.rollTables.RollTableSheet, {
|
|
||||||
types: ['base'],
|
|
||||||
makeDefault: true
|
|
||||||
});
|
|
||||||
|
|
||||||
DocumentSheetConfig.unregisterSheet(
|
DocumentSheetConfig.unregisterSheet(
|
||||||
CONFIG.ActiveEffect.documentClass,
|
CONFIG.ActiveEffect.documentClass,
|
||||||
'core',
|
'core',
|
||||||
|
|
|
||||||
10
lang/en.json
10
lang/en.json
|
|
@ -488,9 +488,7 @@
|
||||||
"tokenHUD": {
|
"tokenHUD": {
|
||||||
"genericEffects": "Foundry Effects",
|
"genericEffects": "Foundry Effects",
|
||||||
"depositPartyTokens": "Deposit Party Tokens",
|
"depositPartyTokens": "Deposit Party Tokens",
|
||||||
"retrievePartyTokens": "Retrieve Party Tokens",
|
"retrievePartyTokens": "Retrieve Party Tokens"
|
||||||
"depositCompanionTokens": "Deposit Companion Token",
|
|
||||||
"retrieveCompanionTokens": "Retrieve Companion Token"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ImageSelect": {
|
"ImageSelect": {
|
||||||
|
|
@ -2383,12 +2381,6 @@
|
||||||
"secondaryWeapon": "Secondary Weapon"
|
"secondaryWeapon": "Secondary Weapon"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ROLLTABLES": {
|
|
||||||
"FIELDS": {
|
|
||||||
"formulaName": { "label": "Formula Name" }
|
|
||||||
},
|
|
||||||
"formula": "Formula"
|
|
||||||
},
|
|
||||||
"SETTINGS": {
|
"SETTINGS": {
|
||||||
"Appearance": {
|
"Appearance": {
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
|
|
|
||||||
|
|
@ -109,17 +109,11 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
context.roll = this.roll;
|
context.roll = this.roll;
|
||||||
context.rollType = this.roll?.constructor.name;
|
context.rollType = this.roll?.constructor.name;
|
||||||
context.rallyDie = this.roll.rallyChoices;
|
context.rallyDie = this.roll.rallyChoices;
|
||||||
|
const experiences = this.config.data?.system?.experiences || {};
|
||||||
const actorExperiences = this.config.data?.system?.experiences || {};
|
|
||||||
const companionExperiences = this.config.roll.companionRoll
|
|
||||||
? (this.config.data?.companion?.system.experiences ?? {})
|
|
||||||
: null;
|
|
||||||
const experiences = companionExperiences ?? actorExperiences;
|
|
||||||
context.experiences = Object.keys(experiences).map(id => ({
|
context.experiences = Object.keys(experiences).map(id => ({
|
||||||
id,
|
id,
|
||||||
...experiences[id]
|
...experiences[id]
|
||||||
}));
|
}));
|
||||||
|
|
||||||
context.selectedExperiences = this.config.experiences;
|
context.selectedExperiences = this.config.experiences;
|
||||||
context.advantage = this.config.roll?.advantage;
|
context.advantage = this.config.roll?.advantage;
|
||||||
context.disadvantage = this.config.roll?.disadvantage;
|
context.disadvantage = this.config.roll?.disadvantage;
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@ export default class DHTokenHUD extends foundry.applications.hud.TokenHUD {
|
||||||
classes: ['daggerheart'],
|
classes: ['daggerheart'],
|
||||||
actions: {
|
actions: {
|
||||||
combat: DHTokenHUD.#onToggleCombat,
|
combat: DHTokenHUD.#onToggleCombat,
|
||||||
togglePartyTokens: DHTokenHUD.#togglePartyTokens,
|
togglePartyTokens: DHTokenHUD.#togglePartyTokens
|
||||||
toggleCompanions: DHTokenHUD.#toggleCompanions
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -27,7 +26,7 @@ export default class DHTokenHUD extends foundry.applications.hud.TokenHUD {
|
||||||
context.partyOnCanvas =
|
context.partyOnCanvas =
|
||||||
this.actor.type === 'party' &&
|
this.actor.type === 'party' &&
|
||||||
this.actor.system.partyMembers.some(member => member.getActiveTokens().length > 0);
|
this.actor.system.partyMembers.some(member => member.getActiveTokens().length > 0);
|
||||||
context.icons.toggleClowncar = 'systems/daggerheart/assets/icons/arrow-dunk.png';
|
context.icons.toggleParty = 'systems/daggerheart/assets/icons/arrow-dunk.png';
|
||||||
context.actorType = this.actor.type;
|
context.actorType = this.actor.type;
|
||||||
context.usesEffects = this.actor.type !== 'party';
|
context.usesEffects = this.actor.type !== 'party';
|
||||||
context.canToggleCombat = DHTokenHUD.#nonCombatTypes.includes(this.actor.type)
|
context.canToggleCombat = DHTokenHUD.#nonCombatTypes.includes(this.actor.type)
|
||||||
|
|
@ -57,9 +56,6 @@ export default class DHTokenHUD extends foundry.applications.hud.TokenHUD {
|
||||||
}, {})
|
}, {})
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
context.hasCompanion = this.actor.system.companion;
|
|
||||||
context.companionOnCanvas = context.hasCompanion && this.actor.system.companion.getActiveTokens().length > 0;
|
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,24 +101,8 @@ export default class DHTokenHUD extends foundry.applications.hud.TokenHUD {
|
||||||
: 'DAGGERHEART.APPLICATIONS.HUD.tokenHUD.depositPartyTokens'
|
: 'DAGGERHEART.APPLICATIONS.HUD.tokenHUD.depositPartyTokens'
|
||||||
);
|
);
|
||||||
|
|
||||||
await this.toggleClowncar(this.actor.system.partyMembers);
|
|
||||||
}
|
|
||||||
|
|
||||||
static async #toggleCompanions(_, button) {
|
|
||||||
const icon = button.querySelector('img');
|
|
||||||
icon.classList.toggle('flipped');
|
|
||||||
button.dataset.tooltip = game.i18n.localize(
|
|
||||||
icon.classList.contains('flipped')
|
|
||||||
? 'DAGGERHEART.APPLICATIONS.HUD.tokenHUD.retrieveCompanionTokens'
|
|
||||||
: 'DAGGERHEART.APPLICATIONS.HUD.tokenHUD.depositCompanionTokens'
|
|
||||||
);
|
|
||||||
|
|
||||||
await this.toggleClowncar([this.actor.system.companion]);
|
|
||||||
}
|
|
||||||
|
|
||||||
async toggleClowncar(actors) {
|
|
||||||
const animationDuration = 500;
|
const animationDuration = 500;
|
||||||
const activeTokens = actors.flatMap(member => member.getActiveTokens());
|
const activeTokens = this.actor.system.partyMembers.flatMap(member => member.getActiveTokens());
|
||||||
const { x: actorX, y: actorY } = this.document;
|
const { x: actorX, y: actorY } = this.document;
|
||||||
if (activeTokens.length > 0) {
|
if (activeTokens.length > 0) {
|
||||||
for (let token of activeTokens) {
|
for (let token of activeTokens) {
|
||||||
|
|
@ -134,15 +114,14 @@ export default class DHTokenHUD extends foundry.applications.hud.TokenHUD {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const activeScene = game.scenes.find(x => x.id === game.user.viewedScene);
|
const activeScene = game.scenes.find(x => x.id === game.user.viewedScene);
|
||||||
const tokenData = [];
|
const partyTokenData = [];
|
||||||
for (let member of actors) {
|
for (let member of this.actor.system.partyMembers) {
|
||||||
const data = await member.getTokenDocument();
|
const data = await member.getTokenDocument();
|
||||||
tokenData.push(data.toObject());
|
partyTokenData.push(data.toObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
const newTokens = await activeScene.createEmbeddedDocuments(
|
const newTokens = await activeScene.createEmbeddedDocuments(
|
||||||
'Token',
|
'Token',
|
||||||
tokenData.map(tokenData => ({
|
partyTokenData.map(tokenData => ({
|
||||||
...tokenData,
|
...tokenData,
|
||||||
alpha: 0,
|
alpha: 0,
|
||||||
x: actorX,
|
x: actorX,
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,6 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2)
|
||||||
async _prepareContext(_options) {
|
async _prepareContext(_options) {
|
||||||
const context = await super._prepareContext(_options, 'action');
|
const context = await super._prepareContext(_options, 'action');
|
||||||
context.source = this.action.toObject(true);
|
context.source = this.action.toObject(true);
|
||||||
context.action = this.action;
|
|
||||||
|
|
||||||
context.summons = [];
|
context.summons = [];
|
||||||
for (const summon of context.source.summon ?? []) {
|
for (const summon of context.source.summon ?? []) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
export * as actors from './actors/_module.mjs';
|
export * as actors from './actors/_module.mjs';
|
||||||
export * as api from './api/_modules.mjs';
|
export * as api from './api/_modules.mjs';
|
||||||
export * as items from './items/_module.mjs';
|
export * as items from './items/_module.mjs';
|
||||||
export * as rollTables from './rollTables/_module.mjs';
|
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,10 @@ export default class DhCompanionSheet extends DHBaseActorSheet {
|
||||||
title: `${game.i18n.localize('DAGGERHEART.GENERAL.Roll.action')}: ${this.actor.name}`,
|
title: `${game.i18n.localize('DAGGERHEART.GENERAL.Roll.action')}: ${this.actor.name}`,
|
||||||
headerTitle: `Companion ${game.i18n.localize('DAGGERHEART.GENERAL.Roll.action')}`,
|
headerTitle: `Companion ${game.i18n.localize('DAGGERHEART.GENERAL.Roll.action')}`,
|
||||||
roll: {
|
roll: {
|
||||||
trait: partner.system.spellcastModifierTrait?.key,
|
trait: partner.system.spellcastModifierTrait?.key
|
||||||
companionRoll: true
|
|
||||||
},
|
},
|
||||||
hasRoll: true
|
hasRoll: true,
|
||||||
|
data: partner.getRollData()
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await partner.diceRoll(config);
|
const result = await partner.diceRoll(config);
|
||||||
|
|
|
||||||
|
|
@ -600,7 +600,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
{
|
{
|
||||||
relativeTo: isAction ? doc.parent : doc,
|
relativeTo: isAction ? doc.parent : doc,
|
||||||
rollData: doc.getRollData?.(),
|
rollData: doc.getRollData?.(),
|
||||||
secrets: isAction ? doc.parent.parent.isOwner : doc.isOwner
|
secrets: isAction ? doc.parent.isOwner : doc.isOwner
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { default as RollTableSheet } from './rollTable.mjs';
|
|
||||||
|
|
@ -1,191 +0,0 @@
|
||||||
export default class DhRollTableSheet extends foundry.applications.sheets.RollTableSheet {
|
|
||||||
static DEFAULT_OPTIONS = {
|
|
||||||
...super.DEFAULT_OPTIONS,
|
|
||||||
actions: {
|
|
||||||
changeMode: DhRollTableSheet.#onChangeMode,
|
|
||||||
drawResult: DhRollTableSheet.#onDrawResult,
|
|
||||||
resetResults: DhRollTableSheet.#onResetResults,
|
|
||||||
addFormula: DhRollTableSheet.#addFormula,
|
|
||||||
removeFormula: DhRollTableSheet.#removeFormula
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static buildParts() {
|
|
||||||
const { footer, header, sheet, results, ...parts } = super.PARTS;
|
|
||||||
return {
|
|
||||||
sheet: {
|
|
||||||
...sheet,
|
|
||||||
template: 'systems/daggerheart/templates/sheets/rollTable/sheet.hbs'
|
|
||||||
},
|
|
||||||
header: { template: 'systems/daggerheart/templates/sheets/rollTable/header.hbs' },
|
|
||||||
...parts,
|
|
||||||
results: {
|
|
||||||
template: 'systems/daggerheart/templates/sheets/rollTable/results.hbs',
|
|
||||||
templates: ['templates/sheets/roll-table/result-details.hbs'],
|
|
||||||
scrollable: ['table[data-results] tbody']
|
|
||||||
},
|
|
||||||
summary: { template: 'systems/daggerheart/templates/sheets/rollTable/summary.hbs' },
|
|
||||||
footer
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static PARTS = DhRollTableSheet.buildParts();
|
|
||||||
|
|
||||||
async _preRender(context, options) {
|
|
||||||
await super._preRender(context, options);
|
|
||||||
|
|
||||||
if (!options.internalRefresh)
|
|
||||||
this.daggerheartFlag = new game.system.api.data.DhRollTable(this.document.flags.daggerheart);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* root PART has a blank element on _attachPartListeners, so it cannot be used to set the eventListeners for the view mode */
|
|
||||||
async _onRender(context, options) {
|
|
||||||
super._onRender(context, options);
|
|
||||||
|
|
||||||
for (const element of this.element.querySelectorAll('.system-update-field'))
|
|
||||||
element.addEventListener('change', this.updateSystemField.bind(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
async _preparePartContext(partId, context, options) {
|
|
||||||
context = await super._preparePartContext(partId, context, options);
|
|
||||||
|
|
||||||
switch (partId) {
|
|
||||||
case 'sheet':
|
|
||||||
context.altFormula = this.daggerheartFlag.altFormula;
|
|
||||||
context.usesAltFormula = Object.keys(this.daggerheartFlag.altFormula).length > 0;
|
|
||||||
context.altFormulaOptions = {
|
|
||||||
'': { name: this.daggerheartFlag.formulaName },
|
|
||||||
...this.daggerheartFlag.altFormula
|
|
||||||
};
|
|
||||||
context.activeAltFormula = this.daggerheartFlag.activeAltFormula;
|
|
||||||
context.selectedFormula = this.daggerheartFlag.getActiveFormula(this.document.formula);
|
|
||||||
context.results = this.getExtendedResults(context.results);
|
|
||||||
break;
|
|
||||||
case 'header':
|
|
||||||
context.altFormula = this.daggerheartFlag.altFormula;
|
|
||||||
context.usesAltFormula = Object.keys(this.daggerheartFlag.altFormula).length > 0;
|
|
||||||
context.altFormulaOptions = {
|
|
||||||
'': { name: this.daggerheartFlag.formulaName },
|
|
||||||
...this.daggerheartFlag.altFormula
|
|
||||||
};
|
|
||||||
context.activeAltFormula = this.daggerheartFlag.activeAltFormula;
|
|
||||||
break;
|
|
||||||
case 'summary':
|
|
||||||
context.systemFields = this.daggerheartFlag.schema.fields;
|
|
||||||
context.altFormula = this.daggerheartFlag.altFormula;
|
|
||||||
context.formulaName = this.daggerheartFlag.formulaName;
|
|
||||||
break;
|
|
||||||
case 'results':
|
|
||||||
context.results = this.getExtendedResults(context.results);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
|
|
||||||
getExtendedResults(results) {
|
|
||||||
const bodyDarkMode = document.body.classList.contains('theme-dark');
|
|
||||||
const elementLightMode = this.element.classList.contains('theme-light');
|
|
||||||
const elementDarkMode = this.element.classList.contains('theme-dark');
|
|
||||||
const isDarkMode = elementDarkMode || (!elementLightMode && bodyDarkMode);
|
|
||||||
|
|
||||||
return results.map(x => ({
|
|
||||||
...x,
|
|
||||||
displayImg: isDarkMode && x.img === 'icons/svg/d20-black.svg' ? 'icons/svg/d20.svg' : x.img
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
/* Flag SystemData update methods */
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
|
|
||||||
async updateSystemField(event) {
|
|
||||||
const { dataset, value } = event.target;
|
|
||||||
await this.daggerheartFlag.updateSource({ [dataset.path]: value });
|
|
||||||
this.render({ internalRefresh: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
getSystemFlagUpdate() {
|
|
||||||
const deleteUpdate = Object.keys(this.document._source.flags.daggerheart?.altFormula ?? {}).reduce(
|
|
||||||
(acc, formulaKey) => {
|
|
||||||
if (!this.daggerheartFlag.altFormula[formulaKey]) acc.altFormula[`-=${formulaKey}`] = null;
|
|
||||||
|
|
||||||
return acc;
|
|
||||||
},
|
|
||||||
{ altFormula: {} }
|
|
||||||
);
|
|
||||||
|
|
||||||
return { ['flags.daggerheart']: foundry.utils.mergeObject(this.daggerheartFlag.toObject(), deleteUpdate) };
|
|
||||||
}
|
|
||||||
|
|
||||||
static async #addFormula() {
|
|
||||||
await this.daggerheartFlag.updateSource({
|
|
||||||
[`altFormula.${foundry.utils.randomID()}`]: game.system.api.data.DhRollTable.getDefaultFormula()
|
|
||||||
});
|
|
||||||
this.render({ internalRefresh: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
static async #removeFormula(_event, target) {
|
|
||||||
await this.daggerheartFlag.updateSource({
|
|
||||||
[`altFormula.-=${target.dataset.key}`]: null
|
|
||||||
});
|
|
||||||
this.render({ internalRefresh: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
/* Extended RollTable methods */
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Alternate between view and edit modes.
|
|
||||||
* @this {RollTableSheet}
|
|
||||||
* @type {ApplicationClickAction}
|
|
||||||
*/
|
|
||||||
static async #onChangeMode() {
|
|
||||||
this.mode = this.isEditMode ? 'view' : 'edit';
|
|
||||||
await this.document.update(this.getSystemFlagUpdate());
|
|
||||||
await this.render({ internalRefresh: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @inheritdoc */
|
|
||||||
async _processSubmitData(event, form, submitData, options) {
|
|
||||||
/* RollTable sends an empty dummy event when swapping from view/edit first time */
|
|
||||||
if (Object.keys(submitData).length) {
|
|
||||||
if (!submitData.flags) submitData.flags = { daggerheart: {} };
|
|
||||||
submitData.flags.daggerheart = this.getSystemFlagUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
super._processSubmitData(event, form, submitData, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @inheritdoc */
|
|
||||||
static async #onResetResults() {
|
|
||||||
await this.document.update(this.getSystemFlagUpdate());
|
|
||||||
await this.document.resetResults();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Roll and draw a TableResult.
|
|
||||||
* @this {RollTableSheet}
|
|
||||||
* @type {ApplicationClickAction}
|
|
||||||
*/
|
|
||||||
static async #onDrawResult(_event, button) {
|
|
||||||
if (this.form) await this.submit({ operation: { render: false } });
|
|
||||||
button.disabled = true;
|
|
||||||
const table = this.document;
|
|
||||||
|
|
||||||
await this.document.update(this.getSystemFlagUpdate());
|
|
||||||
|
|
||||||
/* Sending in the currently selectd activeFormula to table.roll to use as the formula */
|
|
||||||
const selectedFormula = this.daggerheartFlag.getActiveFormula(this.document.formula);
|
|
||||||
const tableRoll = await table.roll({ selectedFormula });
|
|
||||||
const draws = table.getResultsForRoll(tableRoll.roll.total);
|
|
||||||
if (draws.length > 0) {
|
|
||||||
if (game.settings.get('core', 'animateRollTable')) await this._animateRoll(draws);
|
|
||||||
await table.draw(tableRoll);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reenable the button if drawing with replacement since the draw won't trigger a sheet re-render
|
|
||||||
if (table.replacement) button.disabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
export { default as DhCombat } from './combat.mjs';
|
export { default as DhCombat } from './combat.mjs';
|
||||||
export { default as DhCombatant } from './combatant.mjs';
|
export { default as DhCombatant } from './combatant.mjs';
|
||||||
export { default as DhTagTeamRoll } from './tagTeamRoll.mjs';
|
export { default as DhTagTeamRoll } from './tagTeamRoll.mjs';
|
||||||
export { default as DhRollTable } from './rollTable.mjs';
|
|
||||||
export { default as RegisteredTriggers } from './registeredTriggers.mjs';
|
export { default as RegisteredTriggers } from './registeredTriggers.mjs';
|
||||||
|
|
||||||
export * as countdowns from './countdowns.mjs';
|
export * as countdowns from './countdowns.mjs';
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const resistanceField = (resistanceLabel, immunityLabel, reductionLabel) =>
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Common rules applying to Characters and Adversaries */
|
/* Common rules applying to Characters and Adversaries */
|
||||||
export const commonActorRules = (extendedData = { damageReduction: {}, attack: { damage: {} } }) => ({
|
export const commonActorRules = (extendedData = { damageReduction: {} }) => ({
|
||||||
conditionImmunities: new fields.SchemaField({
|
conditionImmunities: new fields.SchemaField({
|
||||||
hidden: new fields.BooleanField({ initial: false }),
|
hidden: new fields.BooleanField({ initial: false }),
|
||||||
restrained: new fields.BooleanField({ initial: false }),
|
restrained: new fields.BooleanField({ initial: false }),
|
||||||
|
|
@ -41,23 +41,7 @@ export const commonActorRules = (extendedData = { damageReduction: {}, attack: {
|
||||||
magical: new fields.NumberField({ initial: 0, min: 0 }),
|
magical: new fields.NumberField({ initial: 0, min: 0 }),
|
||||||
physical: new fields.NumberField({ initial: 0, min: 0 })
|
physical: new fields.NumberField({ initial: 0, min: 0 })
|
||||||
}),
|
}),
|
||||||
...(extendedData.damageReduction ?? {})
|
...extendedData.damageReduction
|
||||||
}),
|
|
||||||
attack: new fields.SchemaField({
|
|
||||||
...extendedData.attack,
|
|
||||||
damage: new fields.SchemaField({
|
|
||||||
hpDamageMultiplier: new fields.NumberField({
|
|
||||||
required: true,
|
|
||||||
nullable: false,
|
|
||||||
initial: 1
|
|
||||||
}),
|
|
||||||
hpDamageTakenMultiplier: new fields.NumberField({
|
|
||||||
required: true,
|
|
||||||
nullable: false,
|
|
||||||
initial: 1
|
|
||||||
}),
|
|
||||||
...(extendedData.attack?.damage ?? {})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -253,35 +253,35 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
hint: 'DAGGERHEART.GENERAL.Rules.damageReduction.increasePerArmorMark.hint'
|
hint: 'DAGGERHEART.GENERAL.Rules.damageReduction.increasePerArmorMark.hint'
|
||||||
}),
|
}),
|
||||||
disabledArmor: new fields.BooleanField({ intial: false })
|
disabledArmor: new fields.BooleanField({ intial: false })
|
||||||
},
|
|
||||||
attack: {
|
|
||||||
damage: {
|
|
||||||
diceIndex: new fields.NumberField({
|
|
||||||
integer: true,
|
|
||||||
min: 0,
|
|
||||||
max: 5,
|
|
||||||
initial: 0,
|
|
||||||
label: 'DAGGERHEART.GENERAL.Rules.attack.damage.dice.label',
|
|
||||||
hint: 'DAGGERHEART.GENERAL.Rules.attack.damage.dice.hint'
|
|
||||||
}),
|
|
||||||
bonus: new fields.NumberField({
|
|
||||||
required: true,
|
|
||||||
initial: 0,
|
|
||||||
min: 0,
|
|
||||||
label: 'DAGGERHEART.GENERAL.Rules.attack.damage.bonus.label'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
roll: new fields.SchemaField({
|
|
||||||
trait: new fields.StringField({
|
|
||||||
required: true,
|
|
||||||
choices: CONFIG.DH.ACTOR.abilities,
|
|
||||||
nullable: true,
|
|
||||||
initial: null,
|
|
||||||
label: 'DAGGERHEART.GENERAL.Rules.attack.roll.trait.label'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
attack: new fields.SchemaField({
|
||||||
|
damage: new fields.SchemaField({
|
||||||
|
diceIndex: new fields.NumberField({
|
||||||
|
integer: true,
|
||||||
|
min: 0,
|
||||||
|
max: 5,
|
||||||
|
initial: 0,
|
||||||
|
label: 'DAGGERHEART.GENERAL.Rules.attack.damage.dice.label',
|
||||||
|
hint: 'DAGGERHEART.GENERAL.Rules.attack.damage.dice.hint'
|
||||||
|
}),
|
||||||
|
bonus: new fields.NumberField({
|
||||||
|
required: true,
|
||||||
|
initial: 0,
|
||||||
|
min: 0,
|
||||||
|
label: 'DAGGERHEART.GENERAL.Rules.attack.damage.bonus.label'
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
roll: new fields.SchemaField({
|
||||||
|
trait: new fields.StringField({
|
||||||
|
required: true,
|
||||||
|
choices: CONFIG.DH.ACTOR.abilities,
|
||||||
|
nullable: true,
|
||||||
|
initial: null,
|
||||||
|
label: 'DAGGERHEART.GENERAL.Rules.attack.roll.trait.label'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}),
|
||||||
dualityRoll: new fields.SchemaField({
|
dualityRoll: new fields.SchemaField({
|
||||||
defaultHopeDice: new fields.NumberField({
|
defaultHopeDice: new fields.NumberField({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
|
|
@ -368,7 +368,7 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
const modifiers = subClasses
|
const modifiers = subClasses
|
||||||
?.map(sc => ({ ...this.traits[sc.system.spellcastingTrait], key: sc.system.spellcastingTrait }))
|
?.map(sc => ({ ...this.traits[sc.system.spellcastingTrait], key: sc.system.spellcastingTrait }))
|
||||||
.filter(x => x);
|
.filter(x => x);
|
||||||
return modifiers.sort((a, b) => (b.value ?? 0) - (a.value ?? 0))[0];
|
return modifiers.sort((a, b) => a.value - b.value)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
get spellcastModifier() {
|
get spellcastModifier() {
|
||||||
|
|
@ -677,8 +677,6 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.companion.system.attack.roll.bonus = this.traits.instinct.value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.resources.hope.value = Math.min(baseHope, this.resources.hope.max);
|
this.resources.hope.value = Math.min(baseHope, this.resources.hope.max);
|
||||||
|
|
|
||||||
|
|
@ -105,22 +105,12 @@ export default class DamageField extends fields.SchemaField {
|
||||||
damagePromises.push(
|
damagePromises.push(
|
||||||
actor.takeHealing(config.damage).then(updates => targetDamage.push({ token, updates }))
|
actor.takeHealing(config.damage).then(updates => targetDamage.push({ token, updates }))
|
||||||
);
|
);
|
||||||
else {
|
else
|
||||||
const configDamage = foundry.utils.deepClone(config.damage);
|
|
||||||
const hpDamageMultiplier = config.actionActor?.system.rules.attack.damage.hpDamageMultiplier ?? 1;
|
|
||||||
const hpDamageTakenMultiplier = actor.system.rules.attack.damage.hpDamageTakenMultiplier;
|
|
||||||
if (configDamage.hitPoints) {
|
|
||||||
for (const part of configDamage.hitPoints.parts) {
|
|
||||||
part.total = Math.ceil(part.total * hpDamageMultiplier * hpDamageTakenMultiplier);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
damagePromises.push(
|
damagePromises.push(
|
||||||
actor
|
actor
|
||||||
.takeDamage(configDamage, config.isDirect)
|
.takeDamage(config.damage, config.isDirect)
|
||||||
.then(updates => targetDamage.push({ token, updates }))
|
.then(updates => targetDamage.push({ token, updates }))
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Promise.all(damagePromises).then(async _ => {
|
Promise.all(damagePromises).then(async _ => {
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
||||||
return await foundry.applications.ux.TextEditor.implementation.enrichHTML(fullDescription, {
|
return await foundry.applications.ux.TextEditor.implementation.enrichHTML(fullDescription, {
|
||||||
relativeTo: this,
|
relativeTo: this,
|
||||||
rollData: this.getRollData(),
|
rollData: this.getRollData(),
|
||||||
secrets: this.parent.isOwner
|
secrets: this.isOwner
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
import FormulaField from './fields/formulaField.mjs';
|
|
||||||
|
|
||||||
//Extra definitions for RollTable
|
|
||||||
export default class DhRollTable extends foundry.abstract.TypeDataModel {
|
|
||||||
static defineSchema() {
|
|
||||||
const fields = foundry.data.fields;
|
|
||||||
|
|
||||||
return {
|
|
||||||
formulaName: new fields.StringField({
|
|
||||||
required: true,
|
|
||||||
nullable: false,
|
|
||||||
initial: 'Roll Formula',
|
|
||||||
label: 'DAGGERHEART.ROLLTABLES.FIELDS.formulaName.label'
|
|
||||||
}),
|
|
||||||
altFormula: new fields.TypedObjectField(
|
|
||||||
new fields.SchemaField({
|
|
||||||
name: new fields.StringField({
|
|
||||||
required: true,
|
|
||||||
nullable: false,
|
|
||||||
initial: 'Roll Formula',
|
|
||||||
label: 'DAGGERHEART.ROLLTABLES.FIELDS.formulaName.label'
|
|
||||||
}),
|
|
||||||
formula: new FormulaField({ label: 'Formula Roll', initial: '1d20' })
|
|
||||||
})
|
|
||||||
),
|
|
||||||
activeAltFormula: new fields.StringField({ nullable: true, initial: null })
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
getActiveFormula(baseFormula) {
|
|
||||||
return this.activeAltFormula ? (this.altFormula[this.activeAltFormula]?.formula ?? baseFormula) : baseFormula;
|
|
||||||
}
|
|
||||||
|
|
||||||
static getDefaultFormula = () => ({
|
|
||||||
name: game.i18n.localize('Roll Formula'),
|
|
||||||
formula: '1d20'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
@ -99,14 +99,11 @@ export default class D20Roll extends DHRoll {
|
||||||
|
|
||||||
this.options.roll.modifiers = this.applyBaseBonus();
|
this.options.roll.modifiers = this.applyBaseBonus();
|
||||||
|
|
||||||
const actorExperiences = this.options.roll.companionRoll
|
|
||||||
? (this.options.data?.companion?.system.experiences ?? {})
|
|
||||||
: (this.options.data.system?.experiences ?? {});
|
|
||||||
this.options.experiences?.forEach(m => {
|
this.options.experiences?.forEach(m => {
|
||||||
if (actorExperiences[m])
|
if (this.options.data.system?.experiences?.[m])
|
||||||
this.options.roll.modifiers.push({
|
this.options.roll.modifiers.push({
|
||||||
label: actorExperiences[m].name,
|
label: this.options.data.system.experiences[m].name,
|
||||||
value: actorExperiences[m].value
|
value: this.options.data.system.experiences[m].value
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ export { default as DhpCombat } from './combat.mjs';
|
||||||
export { default as DHCombatant } from './combatant.mjs';
|
export { default as DHCombatant } from './combatant.mjs';
|
||||||
export { default as DhActiveEffect } from './activeEffect.mjs';
|
export { default as DhActiveEffect } from './activeEffect.mjs';
|
||||||
export { default as DhChatMessage } from './chatMessage.mjs';
|
export { default as DhChatMessage } from './chatMessage.mjs';
|
||||||
export { default as DhRollTable } from './rollTable.mjs';
|
|
||||||
export { default as DhScene } from './scene.mjs';
|
export { default as DhScene } from './scene.mjs';
|
||||||
export { default as DhToken } from './token.mjs';
|
export { default as DhToken } from './token.mjs';
|
||||||
export { default as DhTooltipManager } from './tooltipManager.mjs';
|
export { default as DhTooltipManager } from './tooltipManager.mjs';
|
||||||
|
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
||||||
export default class DhRollTable extends foundry.documents.RollTable {
|
|
||||||
async roll({ selectedFormula, roll, recursive = true, _depth = 0 } = {}) {
|
|
||||||
// Prevent excessive recursion
|
|
||||||
if (_depth > 5) {
|
|
||||||
throw new Error(`Maximum recursion depth exceeded when attempting to draw from RollTable ${this.id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const formula = selectedFormula ?? this.formula;
|
|
||||||
|
|
||||||
// If there is no formula, automatically calculate an even distribution
|
|
||||||
if (!this.formula) {
|
|
||||||
await this.normalize();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reference the provided roll formula
|
|
||||||
roll = roll instanceof Roll ? roll : Roll.create(formula);
|
|
||||||
let results = [];
|
|
||||||
|
|
||||||
// Ensure that at least one non-drawn result remains
|
|
||||||
const available = this.results.filter(r => !r.drawn);
|
|
||||||
if (!available.length) {
|
|
||||||
ui.notifications.warn(game.i18n.localize('TABLE.NoAvailableResults'));
|
|
||||||
return { roll, results };
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure that results are available within the minimum/maximum range
|
|
||||||
const minRoll = (await roll.reroll({ minimize: true })).total;
|
|
||||||
const maxRoll = (await roll.reroll({ maximize: true })).total;
|
|
||||||
const availableRange = available.reduce(
|
|
||||||
(range, result) => {
|
|
||||||
const r = result.range;
|
|
||||||
if (!range[0] || r[0] < range[0]) range[0] = r[0];
|
|
||||||
if (!range[1] || r[1] > range[1]) range[1] = r[1];
|
|
||||||
return range;
|
|
||||||
},
|
|
||||||
[null, null]
|
|
||||||
);
|
|
||||||
if (availableRange[0] > maxRoll || availableRange[1] < minRoll) {
|
|
||||||
ui.notifications.warn('No results can possibly be drawn from this table and formula.');
|
|
||||||
return { roll, results };
|
|
||||||
}
|
|
||||||
|
|
||||||
// Continue rolling until one or more results are recovered
|
|
||||||
let iter = 0;
|
|
||||||
while (!results.length) {
|
|
||||||
if (iter >= 10000) {
|
|
||||||
ui.notifications.error(
|
|
||||||
`Failed to draw an available entry from Table ${this.name}, maximum iteration reached`
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
roll = await roll.reroll();
|
|
||||||
results = this.getResultsForRoll(roll.total);
|
|
||||||
iter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw results recursively from any inner Roll Tables
|
|
||||||
if (recursive) {
|
|
||||||
const inner = [];
|
|
||||||
for (const result of results) {
|
|
||||||
const { type, documentUuid } = result;
|
|
||||||
const documentName = foundry.utils.parseUuid(documentUuid)?.type;
|
|
||||||
if (type === 'document' && documentName === 'RollTable') {
|
|
||||||
const innerTable = await fromUuid(documentUuid);
|
|
||||||
if (innerTable) {
|
|
||||||
const innerRoll = await innerTable.roll({ _depth: _depth + 1 });
|
|
||||||
inner.push(...innerRoll.results);
|
|
||||||
}
|
|
||||||
} else inner.push(result);
|
|
||||||
}
|
|
||||||
results = inner;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the Roll and the results
|
|
||||||
return { roll, results };
|
|
||||||
}
|
|
||||||
|
|
||||||
async toMessage(results, { roll, messageData = {}, messageOptions = {} } = {}) {
|
|
||||||
messageOptions.rollMode ??= game.settings.get('core', 'rollMode');
|
|
||||||
|
|
||||||
// Construct chat data
|
|
||||||
messageData = foundry.utils.mergeObject(
|
|
||||||
{
|
|
||||||
author: game.user.id,
|
|
||||||
speaker: foundry.documents.ChatMessage.implementation.getSpeaker(),
|
|
||||||
rolls: [],
|
|
||||||
sound: roll ? CONFIG.sounds.dice : null,
|
|
||||||
flags: { 'core.RollTable': this.id }
|
|
||||||
},
|
|
||||||
messageData
|
|
||||||
);
|
|
||||||
if (roll) messageData.rolls.push(roll);
|
|
||||||
|
|
||||||
// Render the chat card which combines the dice roll with the drawn results
|
|
||||||
const detailsPromises = await Promise.allSettled(results.map(r => r.getHTML()));
|
|
||||||
const flavorKey = `TABLE.DrawFlavor${results.length > 1 ? 'Plural' : ''}`;
|
|
||||||
const flavor = game.i18n.format(flavorKey, {
|
|
||||||
number: results.length,
|
|
||||||
name: foundry.utils.escapeHTML(this.name)
|
|
||||||
});
|
|
||||||
messageData.content = await foundry.applications.handlebars.renderTemplate(CONFIG.RollTable.resultTemplate, {
|
|
||||||
description: await TextEditor.implementation.enrichHTML(this.description, {
|
|
||||||
documents: true,
|
|
||||||
secrets: this.isOwner
|
|
||||||
}),
|
|
||||||
flavor: flavor,
|
|
||||||
results: results.map((result, i) => {
|
|
||||||
const r = result.toObject(false);
|
|
||||||
r.details = detailsPromises[i].value ?? '';
|
|
||||||
const useTableIcon =
|
|
||||||
result.icon === CONFIG.RollTable.resultIcon && this.img !== this.constructor.DEFAULT_ICON;
|
|
||||||
r.icon = useTableIcon ? this.img : result.icon;
|
|
||||||
return r;
|
|
||||||
}),
|
|
||||||
rollHTML: this.displayRoll && roll ? await roll.render() : null,
|
|
||||||
table: this
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create the chat message
|
|
||||||
return foundry.documents.ChatMessage.implementation.create(messageData, messageOptions);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -107,7 +107,6 @@ export const enrichedDualityRoll = async (
|
||||||
|
|
||||||
if (target) {
|
if (target) {
|
||||||
const result = await target.diceRoll(config);
|
const result = await target.diceRoll(config);
|
||||||
if (!result) return;
|
|
||||||
result.resourceUpdates.updateResources();
|
result.resourceUpdates.updateResources();
|
||||||
} else {
|
} else {
|
||||||
// For no target, call DualityRoll directly with basic data
|
// For no target, call DualityRoll directly with basic data
|
||||||
|
|
|
||||||
|
|
@ -235,51 +235,7 @@
|
||||||
},
|
},
|
||||||
"_id": "2ESeh4tPhr6DI5ty",
|
"_id": "2ESeh4tPhr6DI5ty",
|
||||||
"img": "icons/magic/death/skull-horned-worn-fire-blue.webp",
|
"img": "icons/magic/death/skull-horned-worn-fire-blue.webp",
|
||||||
"effects": [
|
"effects": [],
|
||||||
{
|
|
||||||
"name": "Depths Of Despair",
|
|
||||||
"type": "base",
|
|
||||||
"system": {
|
|
||||||
"rangeDependence": {
|
|
||||||
"enabled": false,
|
|
||||||
"type": "withinRange",
|
|
||||||
"target": "hostile",
|
|
||||||
"range": "melee"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"_id": "nofxm1vGZ2TmceA2",
|
|
||||||
"img": "icons/magic/death/skull-horned-worn-fire-blue.webp",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"key": "system.rules.attack.damage.hpDamageMultiplier",
|
|
||||||
"mode": 5,
|
|
||||||
"value": "2",
|
|
||||||
"priority": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"disabled": true,
|
|
||||||
"duration": {
|
|
||||||
"startTime": null,
|
|
||||||
"combat": null,
|
|
||||||
"seconds": null,
|
|
||||||
"rounds": null,
|
|
||||||
"turns": null,
|
|
||||||
"startRound": null,
|
|
||||||
"startTurn": null
|
|
||||||
},
|
|
||||||
"description": "<p><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">The </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif;color:rgb(239, 230, 216);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">Demon of Despair</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\"> deals double damage to PCs with 0 Hope.</span></p>",
|
|
||||||
"origin": null,
|
|
||||||
"tint": "#ffffff",
|
|
||||||
"transfer": true,
|
|
||||||
"statuses": [],
|
|
||||||
"sort": 0,
|
|
||||||
"flags": {},
|
|
||||||
"_stats": {
|
|
||||||
"compendiumSource": null
|
|
||||||
},
|
|
||||||
"_key": "!actors.items.effects!kE4dfhqmIQpNd44e.2ESeh4tPhr6DI5ty.nofxm1vGZ2TmceA2"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"folder": null,
|
"folder": null,
|
||||||
"sort": 0,
|
"sort": 0,
|
||||||
"ownership": {
|
"ownership": {
|
||||||
|
|
|
||||||
|
|
@ -304,51 +304,7 @@
|
||||||
},
|
},
|
||||||
"_id": "1fE6xo8yIOmZkGNE",
|
"_id": "1fE6xo8yIOmZkGNE",
|
||||||
"img": "icons/skills/melee/strike-slashes-orange.webp",
|
"img": "icons/skills/melee/strike-slashes-orange.webp",
|
||||||
"effects": [
|
"effects": [],
|
||||||
{
|
|
||||||
"name": "Overwhelm",
|
|
||||||
"type": "base",
|
|
||||||
"system": {
|
|
||||||
"rangeDependence": {
|
|
||||||
"enabled": false,
|
|
||||||
"type": "withinRange",
|
|
||||||
"target": "hostile",
|
|
||||||
"range": "melee"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"_id": "eGB9G0ljYCcdGbOx",
|
|
||||||
"img": "icons/skills/melee/strike-slashes-orange.webp",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"key": "system.rules.attack.damage.hpDamageMultiplier",
|
|
||||||
"mode": 5,
|
|
||||||
"value": "2",
|
|
||||||
"priority": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"disabled": true,
|
|
||||||
"duration": {
|
|
||||||
"startTime": null,
|
|
||||||
"combat": null,
|
|
||||||
"seconds": null,
|
|
||||||
"rounds": null,
|
|
||||||
"turns": null,
|
|
||||||
"startRound": null,
|
|
||||||
"startTurn": null
|
|
||||||
},
|
|
||||||
"description": "<p><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">When a target the </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif;color:rgb(239, 230, 216);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">Failed Experiment</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\"> attacks has other adversaries within Very Close range, the </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif;color:rgb(239, 230, 216);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">Failed Experiment</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\"> deals double damage.</span></p>",
|
|
||||||
"origin": null,
|
|
||||||
"tint": "#ffffff",
|
|
||||||
"transfer": true,
|
|
||||||
"statuses": [],
|
|
||||||
"sort": 0,
|
|
||||||
"flags": {},
|
|
||||||
"_stats": {
|
|
||||||
"compendiumSource": null
|
|
||||||
},
|
|
||||||
"_key": "!actors.items.effects!ChwwVqowFw8hJQwT.1fE6xo8yIOmZkGNE.eGB9G0ljYCcdGbOx"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"folder": null,
|
"folder": null,
|
||||||
"sort": 0,
|
"sort": 0,
|
||||||
"ownership": {
|
"ownership": {
|
||||||
|
|
|
||||||
|
|
@ -229,51 +229,7 @@
|
||||||
},
|
},
|
||||||
"_id": "FGJTAeL38zTVd4fA",
|
"_id": "FGJTAeL38zTVd4fA",
|
||||||
"img": "icons/magic/control/buff-flight-wings-runes-red-yellow.webp",
|
"img": "icons/magic/control/buff-flight-wings-runes-red-yellow.webp",
|
||||||
"effects": [
|
"effects": [],
|
||||||
{
|
|
||||||
"name": "Punish the Guilty",
|
|
||||||
"type": "base",
|
|
||||||
"system": {
|
|
||||||
"rangeDependence": {
|
|
||||||
"enabled": false,
|
|
||||||
"type": "withinRange",
|
|
||||||
"target": "hostile",
|
|
||||||
"range": "melee"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"_id": "ID85zoIa5GfhNMti",
|
|
||||||
"img": "icons/magic/control/buff-flight-wings-runes-red-yellow.webp",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"key": "system.rules.attack.damage.hpDamageMultiplier",
|
|
||||||
"mode": 5,
|
|
||||||
"value": "2",
|
|
||||||
"priority": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"disabled": true,
|
|
||||||
"duration": {
|
|
||||||
"startTime": null,
|
|
||||||
"combat": null,
|
|
||||||
"seconds": null,
|
|
||||||
"rounds": null,
|
|
||||||
"turns": null,
|
|
||||||
"startRound": null,
|
|
||||||
"startTurn": null
|
|
||||||
},
|
|
||||||
"description": "<p><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">The </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif;color:rgb(239, 230, 216);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">Hallowed Archer</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\"> deals double damage to targets marked Guilty by a High Seraph.</span></p>",
|
|
||||||
"origin": null,
|
|
||||||
"tint": "#ffffff",
|
|
||||||
"transfer": true,
|
|
||||||
"statuses": [],
|
|
||||||
"sort": 0,
|
|
||||||
"flags": {},
|
|
||||||
"_stats": {
|
|
||||||
"compendiumSource": null
|
|
||||||
},
|
|
||||||
"_key": "!actors.items.effects!kabueAo6BALApWqp.FGJTAeL38zTVd4fA.ID85zoIa5GfhNMti"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"folder": null,
|
"folder": null,
|
||||||
"sort": 0,
|
"sort": 0,
|
||||||
"ownership": {
|
"ownership": {
|
||||||
|
|
|
||||||
|
|
@ -336,14 +336,7 @@
|
||||||
"range": "melee"
|
"range": "melee"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changes": [
|
"changes": [],
|
||||||
{
|
|
||||||
"key": "system.rules.attack.damage.hpDamageTakenMultiplier",
|
|
||||||
"mode": 5,
|
|
||||||
"value": "2",
|
|
||||||
"priority": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"disabled": false,
|
"disabled": false,
|
||||||
"duration": {
|
"duration": {
|
||||||
"startTime": null,
|
"startTime": null,
|
||||||
|
|
@ -357,8 +350,8 @@
|
||||||
"description": "",
|
"description": "",
|
||||||
"tint": "#ffffff",
|
"tint": "#ffffff",
|
||||||
"statuses": [
|
"statuses": [
|
||||||
"vulnerable",
|
"restrained",
|
||||||
"restrained"
|
"vulnerable"
|
||||||
],
|
],
|
||||||
"sort": 0,
|
"sort": 0,
|
||||||
"flags": {},
|
"flags": {},
|
||||||
|
|
|
||||||
|
|
@ -230,51 +230,7 @@
|
||||||
"subType": null,
|
"subType": null,
|
||||||
"originId": null
|
"originId": null
|
||||||
},
|
},
|
||||||
"effects": [
|
"effects": [],
|
||||||
{
|
|
||||||
"name": "Opportunist",
|
|
||||||
"type": "base",
|
|
||||||
"system": {
|
|
||||||
"rangeDependence": {
|
|
||||||
"enabled": false,
|
|
||||||
"type": "withinRange",
|
|
||||||
"target": "hostile",
|
|
||||||
"range": "melee"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"_id": "O03vYbyNLO3YPZGo",
|
|
||||||
"img": "icons/skills/targeting/crosshair-triple-strike-orange.webp",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"key": "system.rules.attack.damage.hpDamageMultiplier",
|
|
||||||
"mode": 5,
|
|
||||||
"value": "2",
|
|
||||||
"priority": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"disabled": true,
|
|
||||||
"duration": {
|
|
||||||
"startTime": null,
|
|
||||||
"combat": null,
|
|
||||||
"seconds": null,
|
|
||||||
"rounds": null,
|
|
||||||
"turns": null,
|
|
||||||
"startRound": null,
|
|
||||||
"startTurn": null
|
|
||||||
},
|
|
||||||
"description": "<p><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">When two or more adversaries are within Very Close range of a creature, all damage the </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif;color:rgb(239, 230, 216);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">Skeleton Archer</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.565);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\"> deals to that creature is doubled.</span></p>",
|
|
||||||
"origin": null,
|
|
||||||
"tint": "#ffffff",
|
|
||||||
"transfer": true,
|
|
||||||
"statuses": [],
|
|
||||||
"sort": 0,
|
|
||||||
"flags": {},
|
|
||||||
"_stats": {
|
|
||||||
"compendiumSource": null
|
|
||||||
},
|
|
||||||
"_key": "!actors.items.effects!7X5q7a6ueeHs5oA9.6mL2FQ9pQdfoDNzG.O03vYbyNLO3YPZGo"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"folder": null,
|
"folder": null,
|
||||||
"sort": 0,
|
"sort": 0,
|
||||||
"ownership": {
|
"ownership": {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "Consumables",
|
"name": "Consumables",
|
||||||
"img": "icons/consumables/potions/bottle-corked-red.webp",
|
"img": "icons/consumables/potions/bottle-corked-red.webp",
|
||||||
"description": "",
|
"description": "<p>To generate a random consumable, choose a rarity, roll the designated dice, and match the total to the item in the table:</p><ul><li><p>Common: 1d12 or 2d12</p></li><li><p>Uncommon: 2d12 or 3d12</p></li><li><p>Rare: 3d12 or 4d12</p></li><li><p>Legendary: 4d12 or 5d12</p></li></ul>",
|
||||||
"results": [
|
"results": [
|
||||||
{
|
{
|
||||||
"type": "document",
|
"type": "document",
|
||||||
|
|
@ -1511,27 +1511,8 @@
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"Bgvu4A6AMkRFOTGR": 3
|
"Bgvu4A6AMkRFOTGR": 3
|
||||||
},
|
},
|
||||||
"flags": {
|
"flags": {},
|
||||||
"daggerheart": {
|
"formula": "1d60",
|
||||||
"activeAltFormula": "",
|
|
||||||
"formulaName": "Common",
|
|
||||||
"altFormula": {
|
|
||||||
"uoUn5fRTUkyg6U2G": {
|
|
||||||
"name": "Uncommon",
|
|
||||||
"formula": "3d12"
|
|
||||||
},
|
|
||||||
"FGxM2yoxUUUd9Eov": {
|
|
||||||
"name": "Rare",
|
|
||||||
"formula": "4d12"
|
|
||||||
},
|
|
||||||
"HZ2hRBxu0k8IW0jC": {
|
|
||||||
"name": "Legendary",
|
|
||||||
"formula": "5d12"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"formula": "2d12",
|
|
||||||
"_id": "tF04P02yVN1YDVel",
|
"_id": "tF04P02yVN1YDVel",
|
||||||
"sort": 300000,
|
"sort": 300000,
|
||||||
"_key": "!tables!tF04P02yVN1YDVel"
|
"_key": "!tables!tF04P02yVN1YDVel"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "Loot",
|
"name": "Loot",
|
||||||
"img": "icons/commodities/treasure/brooch-gold-ruby.webp",
|
"img": "icons/commodities/treasure/brooch-gold-ruby.webp",
|
||||||
"description": "",
|
"description": "<p>To generate a random item, choose a rarity, roll the designated dice, and match the total to the item in the table: </p><ul><li><p> Common: 1d12 or 2d12 </p></li><li><p>Uncommon: 2d12 or 3d12 </p></li><li><p>Rare: 3d12 or 4d12 </p></li><li><p>Legendary: 4d12 or 5d12</p></li></ul>",
|
||||||
"results": [
|
"results": [
|
||||||
{
|
{
|
||||||
"type": "document",
|
"type": "document",
|
||||||
|
|
@ -1511,27 +1511,8 @@
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"Bgvu4A6AMkRFOTGR": 3
|
"Bgvu4A6AMkRFOTGR": 3
|
||||||
},
|
},
|
||||||
"flags": {
|
"flags": {},
|
||||||
"daggerheart": {
|
"formula": "1d60",
|
||||||
"activeAltFormula": "",
|
|
||||||
"formulaName": "Common",
|
|
||||||
"altFormula": {
|
|
||||||
"hJJtajaMk14bYM4X": {
|
|
||||||
"name": "Uncommon",
|
|
||||||
"formula": "3d12"
|
|
||||||
},
|
|
||||||
"yDVeXdKpG7LzjHWa": {
|
|
||||||
"name": "Rare",
|
|
||||||
"formula": "4d12"
|
|
||||||
},
|
|
||||||
"qPHNIuUgWAHauI6V": {
|
|
||||||
"name": "Legendary",
|
|
||||||
"formula": "5d12"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"formula": "2d12",
|
|
||||||
"_id": "S61Shlt2I5CbLRjz",
|
"_id": "S61Shlt2I5CbLRjz",
|
||||||
"sort": 200000,
|
"sort": 200000,
|
||||||
"_key": "!tables!S61Shlt2I5CbLRjz"
|
"_key": "!tables!S61Shlt2I5CbLRjz"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "Random Objectives",
|
"name": "Table of Random Objectives",
|
||||||
"img": "icons/sundries/documents/document-torn-diagram-tan.webp",
|
"img": "icons/sundries/documents/document-torn-diagram-tan.webp",
|
||||||
"description": "",
|
"description": "<p>Layering Goals Other than Attrition into Combat</p>",
|
||||||
"results": [
|
"results": [
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
|
@ -311,20 +311,7 @@
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"Bgvu4A6AMkRFOTGR": 3
|
"Bgvu4A6AMkRFOTGR": 3
|
||||||
},
|
},
|
||||||
"flags": {
|
"flags": {},
|
||||||
"daggerheart": {
|
|
||||||
"formulaName": "Roll Formula",
|
|
||||||
"altFormula": {},
|
|
||||||
"activeAltFormula": null,
|
|
||||||
"flags": {
|
|
||||||
"daggerheart": {
|
|
||||||
"formulaName": "Roll Formula",
|
|
||||||
"altFormula": {},
|
|
||||||
"activeAltFormula": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"formula": "1d12",
|
"formula": "1d12",
|
||||||
"_id": "I5L1dlgxXTNrCCkL",
|
"_id": "I5L1dlgxXTNrCCkL",
|
||||||
"sort": 400000,
|
"sort": 400000,
|
||||||
|
|
@ -15,14 +15,6 @@
|
||||||
.message-header .message-header-main .message-sub-header-container h4 {
|
.message-header .message-header-main .message-sub-header-container h4 {
|
||||||
color: @dark-blue;
|
color: @dark-blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-content {
|
|
||||||
.table-draw {
|
|
||||||
.table-description {
|
|
||||||
color: @dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -91,7 +83,6 @@
|
||||||
|
|
||||||
.message-content {
|
.message-content {
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
|
|
||||||
.flavor-text {
|
.flavor-text {
|
||||||
font-size: var(--font-size-12);
|
font-size: var(--font-size-12);
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
|
@ -99,33 +90,6 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-draw {
|
|
||||||
.table-flavor {
|
|
||||||
padding-top: 5px;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
font-size: var(--font-size-12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-description {
|
|
||||||
color: @beige;
|
|
||||||
font-style: italic;
|
|
||||||
|
|
||||||
&.flavor-spaced {
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-results {
|
|
||||||
.description {
|
|
||||||
flex-basis: min-content;
|
|
||||||
|
|
||||||
> p:first-of-type {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,13 +24,13 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.clown-car img {
|
.clown-car img {
|
||||||
transition: 0.5s;
|
transition: 0.5s;
|
||||||
|
|
||||||
&.flipped {
|
&.flipped {
|
||||||
transform: scaleX(-1);
|
transform: scaleX(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,5 +40,4 @@
|
||||||
@import './items/heritage.less';
|
@import './items/heritage.less';
|
||||||
@import './items/item-sheet-shared.less';
|
@import './items/item-sheet-shared.less';
|
||||||
|
|
||||||
@import './rollTables/sheet.less';
|
|
||||||
@import './actions/actions.less';
|
@import './actions/actions.less';
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
.application.sheet.roll-table-sheet {
|
|
||||||
.formulas-section {
|
|
||||||
legend {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.formulas-container {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr 40px;
|
|
||||||
gap: 10px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.formula-button {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.roll-table-view-formula-container {
|
|
||||||
width: fit-content;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -11,11 +11,6 @@
|
||||||
<button type="button" class="control-icon" data-action="sort" data-direction="down" data-tooltip="HUD.ToBack">
|
<button type="button" class="control-icon" data-action="sort" data-direction="down" data-tooltip="HUD.ToBack">
|
||||||
<img src="{{icons.down}}">
|
<img src="{{icons.down}}">
|
||||||
</button>
|
</button>
|
||||||
{{#if hasCompanion}}
|
|
||||||
<button type="button" class="control-icon clown-car" data-action="toggleCompanions" data-tooltip="{{#if companionOnCanvas}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.retrieveCompanionTokens"}}{{else}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.depositCompanionTokens"}}{{/if}}">
|
|
||||||
<img {{#if companionOnCanvas}}class="flipped"{{/if}} src="{{icons.toggleClowncar}}">
|
|
||||||
</button>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if canConfigure}}
|
{{#if canConfigure}}
|
||||||
<button type="button" class="control-icon" data-action="config" data-tooltip="HUD.OpenConfig">
|
<button type="button" class="control-icon" data-action="config" data-tooltip="HUD.OpenConfig">
|
||||||
|
|
@ -81,7 +76,7 @@
|
||||||
|
|
||||||
{{#if (eq actorType 'party')}}
|
{{#if (eq actorType 'party')}}
|
||||||
<button type="button" class="control-icon clown-car" data-action="togglePartyTokens" data-tooltip="{{#if partyOnCanvas}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.retrievePartyTokens"}}{{else}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.depositPartyTokens"}}{{/if}}">
|
<button type="button" class="control-icon clown-car" data-action="togglePartyTokens" data-tooltip="{{#if partyOnCanvas}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.retrievePartyTokens"}}{{else}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.depositPartyTokens"}}{{/if}}">
|
||||||
<img {{#if partyOnCanvas}}class="flipped"{{/if}} src="{{icons.toggleClowncar}}">
|
<img {{#if partyOnCanvas}}class="flipped"{{/if}} src="{{icons.toggleParty}}">
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,6 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="action-category">
|
<fieldset class="action-category">
|
||||||
<legend>{{localize "DAGGERHEART.GENERAL.description"}}</legend>
|
<legend>{{localize "DAGGERHEART.GENERAL.description"}}</legend>
|
||||||
{{formInput fields.description value=source.description enriched=action.description name="description" toggled=true }}
|
{{formInput fields.description value=source.description enriched=source.description name="description" toggled=true }}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<aside class="character-sidebar-sheet">
|
<aside class="character-sidebar-sheet">
|
||||||
<div class="portrait {{#if isDeath}}death-roll{{/if}}">
|
<div class="portrait {{#if isDeath}}death-roll{{/if}}">
|
||||||
<img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
<img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
||||||
{{#if document.system.spellcastModifierTrait.key}}
|
{{#if document.system.class.subclass.system.spellcastingTrait}}
|
||||||
<div class="icons-list">
|
<div class="icons-list">
|
||||||
<span class="spellcast-icon {{#if isDeath}}no-label{{/if}}">
|
<span class="spellcast-icon {{#if isDeath}}no-label{{/if}}">
|
||||||
<span class="spellcast-label">
|
<span class="spellcast-label">
|
||||||
{{localize "DAGGERHEART.ITEMS.Subclass.spellcastingTrait"}}:
|
{{localize "DAGGERHEART.ITEMS.Subclass.spellcastingTrait"}}:
|
||||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' document.system.spellcastModifierTrait.key '.short')}}
|
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' document.system.class.subclass.system.spellcastingTrait '.short')}}
|
||||||
</span>
|
</span>
|
||||||
<i class="fa-solid fa-wand-sparkles"></i>
|
<i class="fa-solid fa-wand-sparkles"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
<header class="sheet-header img-name">
|
|
||||||
<img src="{{source.img}}" data-action="editImage" data-edit="img" alt="{{localize "DOCUMENT.FIELDS.img.label"}}">
|
|
||||||
|
|
||||||
<input type="text" name="name" value="{{source.name}}" placeholder="{{localize "DOCUMENT.FIELDS.name.label"}}" aria-label="{{localize "DOCUMENT.FIELDS.name.label"}}">
|
|
||||||
{{#if usesAltFormula}}
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "Formula"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<select class="system-update-field" data-path="activeAltFormula">
|
|
||||||
{{selectOptions this.altFormulaOptions selected=this.activeAltFormula labelAttr="name"}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<button data-action="changeMode">
|
|
||||||
<i class="fa-solid fa-eye" inert></i>
|
|
||||||
<span>{{localize "TABLE.ACTIONS.ChangeMode.View"}}</span>
|
|
||||||
</button>
|
|
||||||
</header>
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
<section class="tab{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
|
||||||
<table class="flexcol" data-results>
|
|
||||||
<thead>
|
|
||||||
<tr class="flexrow">
|
|
||||||
<th class="image flexrow">
|
|
||||||
<button class="inline-control icon fa-solid fa-plus" data-action="createResult"
|
|
||||||
data-tooltip aria-label="{{localize "TABLE.ACTIONS.CreateResult"}}"></button>
|
|
||||||
</th>
|
|
||||||
<th class="details flexrow">{{localize "TABLE_RESULT.Details"}}</th>
|
|
||||||
<th class="weight flexrow">{{localize "TABLE_RESULT.FIELDS.weight.label"}}</th>
|
|
||||||
<th class="range flexrow">{{localize "TABLE_RESULT.FIELDS.range.label"}}</th>
|
|
||||||
<th class="controls flexrow">
|
|
||||||
<button class="inline-control icon fa-solid fa-scale-balanced" data-action="normalizeResults"
|
|
||||||
data-tooltip aria-label="{{localize "TABLE.ACTIONS.NormalizeResults"}}"></button>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="scrollable">
|
|
||||||
{{#each results as |result i|}}
|
|
||||||
<tr class="flexrow{{#if result.drawn}} drawn{{/if}}" data-result-id="{{result.id}}">
|
|
||||||
<td class="image flexrow">
|
|
||||||
<img src="{{result.displayImg}}" data-action="editImage" data-edit="results.{{i}}.img"
|
|
||||||
alt="{{localize "TABLE_RESULT.FIELDS.img.label"}}" loading="lazy">
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="details">
|
|
||||||
{{> "templates/sheets/roll-table/result-details.hbs" result=result}}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="weight flexrow">
|
|
||||||
<input type="number" name="results.{{i}}.weight" value="{{result.weight}}" placeholder="1">
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="range flexrow">
|
|
||||||
<input type="number" name="results.{{i}}.range.0" value="{{result.range.[0]}}" placeholder="L">
|
|
||||||
<span class="dash">–</span>
|
|
||||||
<input type="number" name="results.{{i}}.range.1" value="{{result.range.[1]}}" placeholder="H">
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="controls flexrow">
|
|
||||||
<button class="inline-control icon fa-solid fa-file-pen" data-action="openResultSheet"
|
|
||||||
data-tooltip aria-label="{{localize "TABLE.ACTIONS.OpenResultConfig"}}"></button>
|
|
||||||
<button class="inline-control icon fa-solid fa-lock{{#unless result.drawn}}-open{{/unless}}"
|
|
||||||
data-action="lockResult"
|
|
||||||
data-tooltip aria-label="{{localize "TABLE.ACTIONS.ToggleDrawn"}}"></button>
|
|
||||||
<button class="inline-control icon fa-solid fa-trash" data-action="deleteResult"
|
|
||||||
data-tooltip aria-label="{{localize "TABLE.ACTIONS.DeleteResult"}}"></button>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<input type="hidden" name="results.{{i}}._id" value="{{result.id}}">
|
|
||||||
</tr>
|
|
||||||
{{/each}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
<header class="sheet-header flexrow">
|
|
||||||
<img src="{{document.img}}" alt="{{localize "DOCUMENT.FIELDS.img.label"}}">
|
|
||||||
<h1>{{document.name}}</h1>
|
|
||||||
<div class="roll-table-view-formula-container">
|
|
||||||
{{#if usesAltFormula}}
|
|
||||||
<select class="system-update-field" data-path="activeAltFormula">
|
|
||||||
{{selectOptions this.altFormulaOptions selected=this.activeAltFormula labelAttr="name"}}
|
|
||||||
</select>
|
|
||||||
{{/if}}
|
|
||||||
<h4>{{selectedFormula}}</h4>
|
|
||||||
</div>
|
|
||||||
<button data-action="changeMode">
|
|
||||||
<i class="fa-solid fa-pen" inert></i>
|
|
||||||
<span>{{localize "TABLE.ACTIONS.ChangeMode.Edit"}}</span>
|
|
||||||
</button>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{{{descriptionHTML}}}
|
|
||||||
|
|
||||||
<table class="flexcol" data-results>
|
|
||||||
<thead>
|
|
||||||
<tr class="flexrow">
|
|
||||||
<th class="image flexrow"></th>
|
|
||||||
<th class="range flexrow">{{localize "TABLE_RESULT.FIELDS.range.label"}}</th>
|
|
||||||
<th class="details flexrow">{{localize "TABLE_RESULT.Details"}}</th>
|
|
||||||
<th class="controls flexrow"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="scrollable">
|
|
||||||
{{#each results as |result i|}}
|
|
||||||
<tr class="flexrow{{#if result.drawn}} drawn{{/if}}" data-result-id="{{result.id}}">
|
|
||||||
<td class="image">
|
|
||||||
<img src="{{result.displayImg}}" alt="{{localize "TABLE_RESULT.FIELDS.img.label"}}" loading="lazy">
|
|
||||||
</td>
|
|
||||||
<td class="range">{{result.range}}</td>
|
|
||||||
<td class="details">
|
|
||||||
{{> "templates/sheets/roll-table/result-details.hbs" result=result}}
|
|
||||||
</td>
|
|
||||||
<td class="controls flexrow">
|
|
||||||
<button class="inline-control icon fa-solid fa-lock{{#unless result.drawn}}-open{{/unless}}"
|
|
||||||
data-action="lockResult"
|
|
||||||
data-tooltip aria-label="{{localize "TABLE.ACTIONS.ToggleDrawn"}}"></button>
|
|
||||||
<button class="inline-control icon fa-solid fa-up-from-bracket" data-action="drawSpecificResult"
|
|
||||||
data-tooltip aria-label="{{localize "TABLE.ACTIONS.DrawSpecificResult"}}"></button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{/each}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
<section class="tab{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
|
||||||
{{formGroup fields.description value=source.description rootId=rootId}}
|
|
||||||
<fieldset class="formulas-section">
|
|
||||||
<legend>{{localize "DAGGERHEART.ROLLTABLES.formula"}}</legend>
|
|
||||||
|
|
||||||
<div class="formulas-container">
|
|
||||||
<span>{{localize "DAGGERHEART.ROLLTABLES.FIELDS.formulaName.label"}}</span>
|
|
||||||
<span>{{localize "Formula Roll"}}</span>
|
|
||||||
<span></span>
|
|
||||||
<input type="text" value="{{@root.formulaName}}" class="system-update-field" data-path="formulaName" />
|
|
||||||
{{formInput fields.formula value=source.formula placeholder=formulaPlaceholder rootId=rootId}}
|
|
||||||
<button class="formula-button" data-action="addFormula"><i class="fa-solid fa-plus"></i></button>
|
|
||||||
{{#each @root.altFormula as | formula key |}}
|
|
||||||
<input type="text" value="{{formula.name}}" class="system-update-field" data-path="{{concat "altFormula." key ".name"}}" />
|
|
||||||
<input type="text" value="{{formula.formula}}" class="system-update-field" data-path="{{concat "altFormula." key ".formula"}}" />
|
|
||||||
<a class="formula-button" data-action="removeFormula" data-key="{{key}}"><i class="fa-solid fa-trash"></i></a>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
{{formGroup fields.replacement value=source.replacement rootId=rootId}}
|
|
||||||
{{formGroup fields.displayRoll value=source.displayRoll rootId=rootId}}
|
|
||||||
</section>
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
<div class="table-draw" data-table-id="{{table.id}}">
|
|
||||||
{{#if flavor}}<div class="table-flavor">{{flavor}}</div>{{/if}}
|
|
||||||
|
|
||||||
{{#if description}}
|
|
||||||
<div class="table-description {{#if flavor}}flavor-spaced{{/if}}">{{{description}}}</div>
|
|
||||||
{{/if}}
|
|
||||||
{{{rollHTML}}}
|
|
||||||
|
|
||||||
<ul class="table-results">
|
|
||||||
{{#each results as |result|}}
|
|
||||||
<li class="flexrow" data-result-id="{{result.id}}">
|
|
||||||
<img src="{{result.icon}}">
|
|
||||||
{{{result.details}}}
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue