mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
264 - Action Feature Swap (#265)
* Removed action fields on Adversary/Environment in favor of using Feature Items * Added drag/drop for features onto adversary/environment settings * Added Drag of features from Adversary/Environment settings to anywhere in Foundry * Updated all item types except Class/Subclass * Added for Class/Subclass * Items now copy over their features to Character * Corrected back to actions for right items * Fixed adversary/environment features display * PR Fixes
This commit is contained in:
parent
eac58c1386
commit
e9ad9c539a
58 changed files with 1146 additions and 1114 deletions
29
lang/en.json
29
lang/en.json
|
|
@ -25,7 +25,9 @@
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"adversaryMissing": "The linked adversary doesn't exist in the world.",
|
"adversaryMissing": "The linked adversary doesn't exist in the world.",
|
||||||
"beastformInapplicable": "A beastform can only be applied to a Character.",
|
"beastformInapplicable": "A beastform can only be applied to a Character.",
|
||||||
"beastformAlreadyApplied": "The character already has a beastform applied!"
|
"beastformAlreadyApplied": "The character already has a beastform applied!",
|
||||||
|
"featureIsMissing": "The feature doesn't exist. You should remove it.",
|
||||||
|
"featureIsFull": "You can only have 1 entry of this feature"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Settings": {
|
"Settings": {
|
||||||
|
|
@ -964,29 +966,6 @@
|
||||||
"Description": "This weapon can also be used with these statistics—{characterTrait}, {range}, {damage}."
|
"Description": "This weapon can also be used with these statistics—{characterTrait}, {range}, {damage}."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Feature": {
|
|
||||||
"Type": {
|
|
||||||
"ancestry": "Ancestry",
|
|
||||||
"community": "Community",
|
|
||||||
"class": "Class",
|
|
||||||
"subclass": "Subclass",
|
|
||||||
"classHope": "Class Hope",
|
|
||||||
"domainCard": "Domain Card",
|
|
||||||
"equipment": "Equipment"
|
|
||||||
},
|
|
||||||
"ValueType": {
|
|
||||||
"Normal": "Normal",
|
|
||||||
"Input": "Input",
|
|
||||||
"Dice": "Dice"
|
|
||||||
},
|
|
||||||
"Max": "Max",
|
|
||||||
"NewEffect": "New Effect"
|
|
||||||
},
|
|
||||||
"FeatureType": {
|
|
||||||
"Normal": "Normal",
|
|
||||||
"Input": "Input",
|
|
||||||
"Ticks": "Ticks"
|
|
||||||
},
|
|
||||||
"Application": {
|
"Application": {
|
||||||
"Downtime": {
|
"Downtime": {
|
||||||
"TakeDowntime": "Take Downtime"
|
"TakeDowntime": "Take Downtime"
|
||||||
|
|
@ -1499,7 +1478,7 @@
|
||||||
"Features": "Features",
|
"Features": "Features",
|
||||||
"Effects": "Effects",
|
"Effects": "Effects",
|
||||||
"activeEffects": "Active Effects",
|
"activeEffects": "Active Effects",
|
||||||
"inativeEffects": "Inative Effects"
|
"inactiveEffects": "Inactive Effects"
|
||||||
},
|
},
|
||||||
"DomainCard": {
|
"DomainCard": {
|
||||||
"Type": "Type",
|
"Type": "Type",
|
||||||
|
|
|
||||||
|
|
@ -349,8 +349,8 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
|
||||||
}
|
}
|
||||||
|
|
||||||
static async finish() {
|
static async finish() {
|
||||||
const embeddedAncestries = await this.character.createEmbeddedDocuments('Item', [this.setup.ancestry]);
|
await this.character.createEmbeddedDocuments('Item', [this.setup.ancestry]);
|
||||||
const embeddedCommunities = await this.character.createEmbeddedDocuments('Item', [this.setup.community]);
|
await this.character.createEmbeddedDocuments('Item', [this.setup.community]);
|
||||||
await this.character.createEmbeddedDocuments('Item', [this.setup.class]);
|
await this.character.createEmbeddedDocuments('Item', [this.setup.class]);
|
||||||
await this.character.createEmbeddedDocuments('Item', [this.setup.subclass]);
|
await this.character.createEmbeddedDocuments('Item', [this.setup.subclass]);
|
||||||
await this.character.createEmbeddedDocuments('Item', Object.values(this.setup.domainCards));
|
await this.character.createEmbeddedDocuments('Item', Object.values(this.setup.domainCards));
|
||||||
|
|
@ -379,9 +379,7 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
|
||||||
await this.character.update({
|
await this.character.update({
|
||||||
system: {
|
system: {
|
||||||
traits: this.setup.traits,
|
traits: this.setup.traits,
|
||||||
experiences: this.setup.experiences,
|
experiences: this.setup.experiences
|
||||||
ancestry: embeddedAncestries[0].uuid,
|
|
||||||
community: embeddedCommunities[0].uuid
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
import DHActionConfig from './action-config.mjs';
|
|
||||||
import DHBaseItemSheet from '../sheets/api/base-item.mjs';
|
|
||||||
import { actionsTypes } from '../../data/action/_module.mjs';
|
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
export default class DHAdversarySettings extends HandlebarsApplicationMixin(ApplicationV2) {
|
export default class DHAdversarySettings extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
@ -9,6 +5,7 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
super({});
|
super({});
|
||||||
|
|
||||||
this.actor = actor;
|
this.actor = actor;
|
||||||
|
this._dragDrop = this._createDragDropHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
|
|
@ -26,15 +23,19 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
actions: {
|
actions: {
|
||||||
addExperience: this.#addExperience,
|
addExperience: this.#addExperience,
|
||||||
removeExperience: this.#removeExperience,
|
removeExperience: this.#removeExperience,
|
||||||
addAction: this.#addAction,
|
addFeature: this.#addFeature,
|
||||||
editAction: this.#editAction,
|
editFeature: this.#editFeature,
|
||||||
removeAction: this.#removeAction
|
removeFeature: this.#removeFeature
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
handler: this.updateForm,
|
handler: this.updateForm,
|
||||||
submitOnChange: true,
|
submitOnChange: true,
|
||||||
closeOnSubmit: false
|
closeOnSubmit: false
|
||||||
}
|
},
|
||||||
|
dragDrop: [
|
||||||
|
{ dragSelector: null, dropSelector: '.tab.features' },
|
||||||
|
{ dragSelector: '.feature-item', dropSelector: null }
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
static PARTS = {
|
static PARTS = {
|
||||||
|
|
@ -55,9 +56,9 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
id: 'experiences',
|
id: 'experiences',
|
||||||
template: 'systems/daggerheart/templates/sheets-settings/adversary-settings/experiences.hbs'
|
template: 'systems/daggerheart/templates/sheets-settings/adversary-settings/experiences.hbs'
|
||||||
},
|
},
|
||||||
actions: {
|
features: {
|
||||||
id: 'actions',
|
id: 'features',
|
||||||
template: 'systems/daggerheart/templates/sheets-settings/adversary-settings/actions.hbs'
|
template: 'systems/daggerheart/templates/sheets-settings/adversary-settings/features.hbs'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -86,13 +87,13 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.General.tabs.experiences'
|
label: 'DAGGERHEART.General.tabs.experiences'
|
||||||
},
|
},
|
||||||
actions: {
|
features: {
|
||||||
active: false,
|
active: false,
|
||||||
cssClass: '',
|
cssClass: '',
|
||||||
group: 'primary',
|
group: 'primary',
|
||||||
id: 'actions',
|
id: 'features',
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.General.tabs.actions'
|
label: 'DAGGERHEART.General.tabs.features'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -107,6 +108,22 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_attachPartListeners(partId, htmlElement, options) {
|
||||||
|
super._attachPartListeners(partId, htmlElement, options);
|
||||||
|
|
||||||
|
this._dragDrop.forEach(d => d.bind(htmlElement));
|
||||||
|
}
|
||||||
|
|
||||||
|
_createDragDropHandlers() {
|
||||||
|
return this.options.dragDrop.map(d => {
|
||||||
|
d.callbacks = {
|
||||||
|
dragstart: this._onDragStart.bind(this),
|
||||||
|
drop: this._onDrop.bind(this)
|
||||||
|
};
|
||||||
|
return new foundry.applications.ux.DragDrop.implementation(d);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
_getTabs(tabs) {
|
_getTabs(tabs) {
|
||||||
for (const v of Object.values(tabs)) {
|
for (const v of Object.values(tabs)) {
|
||||||
v.active = this.tabGroups[v.group] ? this.tabGroups[v.group] === v.id : v.active;
|
v.active = this.tabGroups[v.group] ? this.tabGroups[v.group] === v.id : v.active;
|
||||||
|
|
@ -130,46 +147,25 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #addAction(_event, _button) {
|
static async #addFeature(_, _button) {
|
||||||
const actionType = await DHBaseItemSheet.selectActionType();
|
await this.actor.createEmbeddedDocuments('Item', [
|
||||||
if (!actionType) return;
|
{
|
||||||
try {
|
type: 'feature',
|
||||||
const cls = actionsTypes[actionType] ?? actionsTypes.attack,
|
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') }),
|
||||||
action = new cls(
|
img: 'icons/skills/melee/weapons-crossed-swords-black.webp'
|
||||||
{
|
}
|
||||||
_id: foundry.utils.randomID(),
|
]);
|
||||||
type: actionType,
|
this.render();
|
||||||
name: game.i18n.localize(CONFIG.DH.ACTIONS.actionTypes[actionType].name),
|
|
||||||
...cls.getSourceConfig(this.actor)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
parent: this.actor
|
|
||||||
}
|
|
||||||
);
|
|
||||||
await this.actor.update({ 'system.actions': [...this.actor.system.actions, action] });
|
|
||||||
await new DHActionConfig(this.actor.system.actions[this.actor.system.actions.length - 1]).render({
|
|
||||||
force: true
|
|
||||||
});
|
|
||||||
this.render();
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #editAction(event, target) {
|
static async #editFeature(event, target) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const actionIndex = target.dataset.index;
|
this.actor.items.get(target.id).sheet.render(true);
|
||||||
await new DHActionConfig(this.actor.system.actions[actionIndex]).render({
|
|
||||||
force: true
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #removeAction(event, target) {
|
static async #removeFeature(event, target) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const actionIndex = target.dataset.index;
|
await this.actor.deleteEmbeddedDocuments('Item', [target.id]);
|
||||||
await this.actor.update({
|
|
||||||
'system.actions': this.actor.system.actions.filter((_, index) => index !== Number.parseInt(actionIndex))
|
|
||||||
});
|
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,4 +173,26 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
await this.actor.update(formData.object);
|
await this.actor.update(formData.object);
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async _onDragStart(event) {
|
||||||
|
const featureItem = event.currentTarget.closest('.feature-item');
|
||||||
|
|
||||||
|
if (featureItem) {
|
||||||
|
const feature = this.actor.items.get(featureItem.id);
|
||||||
|
const featureData = { type: 'Item', uuid: feature.uuid, fromInternal: true };
|
||||||
|
event.dataTransfer.setData('text/plain', JSON.stringify(featureData));
|
||||||
|
event.dataTransfer.setDragImage(featureItem.querySelector('img'), 60, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async _onDrop(event) {
|
||||||
|
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
||||||
|
if (data.fromInternal) return;
|
||||||
|
|
||||||
|
const item = await fromUuid(data.uuid);
|
||||||
|
if (item.type === 'feature') {
|
||||||
|
await this.actor.createEmbeddedDocuments('Item', [item]);
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
import DHActionConfig from './action-config.mjs';
|
|
||||||
import DHBaseItemSheet from '../sheets/api/base-item.mjs';
|
|
||||||
import { actionsTypes } from '../../data/action/_module.mjs';
|
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(ApplicationV2) {
|
export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
@ -25,9 +21,9 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
||||||
},
|
},
|
||||||
position: { width: 455, height: 'auto' },
|
position: { width: 455, height: 'auto' },
|
||||||
actions: {
|
actions: {
|
||||||
addAction: this.#addAction,
|
addFeature: this.#addFeature,
|
||||||
editAction: this.#editAction,
|
editFeature: this.#editFeature,
|
||||||
removeAction: this.#removeAction,
|
removeFeature: this.#removeFeature,
|
||||||
addCategory: this.#addCategory,
|
addCategory: this.#addCategory,
|
||||||
deleteProperty: this.#deleteProperty,
|
deleteProperty: this.#deleteProperty,
|
||||||
viewAdversary: this.#viewAdversary,
|
viewAdversary: this.#viewAdversary,
|
||||||
|
|
@ -38,7 +34,11 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
||||||
submitOnChange: true,
|
submitOnChange: true,
|
||||||
closeOnSubmit: false
|
closeOnSubmit: false
|
||||||
},
|
},
|
||||||
dragDrop: [{ dragSelector: null, dropSelector: '.category-container' }]
|
dragDrop: [
|
||||||
|
{ dragSelector: null, dropSelector: '.category-container' },
|
||||||
|
{ dragSelector: null, dropSelector: '.tab.features' },
|
||||||
|
{ dragSelector: '.feature-item', dropSelector: null }
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
static PARTS = {
|
static PARTS = {
|
||||||
|
|
@ -51,9 +51,9 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
||||||
id: 'details',
|
id: 'details',
|
||||||
template: 'systems/daggerheart/templates/sheets-settings/environment-settings/details.hbs'
|
template: 'systems/daggerheart/templates/sheets-settings/environment-settings/details.hbs'
|
||||||
},
|
},
|
||||||
actions: {
|
features: {
|
||||||
id: 'actions',
|
id: 'features',
|
||||||
template: 'systems/daggerheart/templates/sheets-settings/environment-settings/actions.hbs'
|
template: 'systems/daggerheart/templates/sheets-settings/environment-settings/features.hbs'
|
||||||
},
|
},
|
||||||
adversaries: {
|
adversaries: {
|
||||||
id: 'adversaries',
|
id: 'adversaries',
|
||||||
|
|
@ -70,13 +70,13 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.General.tabs.details'
|
label: 'DAGGERHEART.General.tabs.details'
|
||||||
},
|
},
|
||||||
actions: {
|
features: {
|
||||||
active: false,
|
active: false,
|
||||||
cssClass: '',
|
cssClass: '',
|
||||||
group: 'primary',
|
group: 'primary',
|
||||||
id: 'actions',
|
id: 'features',
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.General.tabs.actions'
|
label: 'DAGGERHEART.General.tabs.features'
|
||||||
},
|
},
|
||||||
adversaries: {
|
adversaries: {
|
||||||
active: false,
|
active: false,
|
||||||
|
|
@ -107,6 +107,7 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
||||||
_createDragDropHandlers() {
|
_createDragDropHandlers() {
|
||||||
return this.options.dragDrop.map(d => {
|
return this.options.dragDrop.map(d => {
|
||||||
d.callbacks = {
|
d.callbacks = {
|
||||||
|
dragstart: this._onDragStart.bind(this),
|
||||||
drop: this._onDrop.bind(this)
|
drop: this._onDrop.bind(this)
|
||||||
};
|
};
|
||||||
return new foundry.applications.ux.DragDrop.implementation(d);
|
return new foundry.applications.ux.DragDrop.implementation(d);
|
||||||
|
|
@ -122,46 +123,23 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #addAction(_event, _button) {
|
static async #addFeature(_, _button) {
|
||||||
const actionType = await DHBaseItemSheet.selectActionType();
|
await this.actor.createEmbeddedDocuments('Item', [
|
||||||
if (!actionType) return;
|
{
|
||||||
try {
|
type: 'feature',
|
||||||
const cls = actionsTypes[actionType] ?? actionsTypes.attack,
|
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') }),
|
||||||
action = new cls(
|
img: 'icons/magic/perception/orb-crystal-ball-scrying-blue.webp'
|
||||||
{
|
}
|
||||||
_id: foundry.utils.randomID(),
|
]);
|
||||||
type: actionType,
|
this.render();
|
||||||
name: game.i18n.localize(CONFIG.DH.ACTIONS.actionTypes[actionType].name),
|
|
||||||
...cls.getSourceConfig(this.actor)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
parent: this.actor
|
|
||||||
}
|
|
||||||
);
|
|
||||||
await this.actor.update({ 'system.actions': [...this.actor.system.actions, action] });
|
|
||||||
await new DHActionConfig(this.actor.system.actions[this.actor.system.actions.length - 1]).render({
|
|
||||||
force: true
|
|
||||||
});
|
|
||||||
this.render();
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #editAction(event, target) {
|
static async #editFeature(_, target) {
|
||||||
event.stopPropagation();
|
this.actor.items.get(target.id).sheet.render(true);
|
||||||
const actionIndex = target.dataset.index;
|
|
||||||
await new DHActionConfig(this.actor.system.actions[actionIndex]).render({
|
|
||||||
force: true
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #removeAction(event, target) {
|
static async #removeFeature(_, target) {
|
||||||
event.stopPropagation();
|
await this.actor.deleteEmbeddedDocuments('Item', [target.id]);
|
||||||
const actionIndex = target.dataset.index;
|
|
||||||
await this.actor.update({
|
|
||||||
'system.actions': this.actor.system.actions.filter((_, index) => index !== Number.parseInt(actionIndex))
|
|
||||||
});
|
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -199,10 +177,23 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async _onDragStart(event) {
|
||||||
|
const featureItem = event.currentTarget.closest('.feature-item');
|
||||||
|
|
||||||
|
if (featureItem) {
|
||||||
|
const feature = this.actor.items.get(featureItem.id);
|
||||||
|
const featureData = { type: 'Item', uuid: feature.uuid, fromInternal: true };
|
||||||
|
event.dataTransfer.setData('text/plain', JSON.stringify(featureData));
|
||||||
|
event.dataTransfer.setDragImage(featureItem.querySelector('img'), 60, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
||||||
|
if (data.fromInternal) return;
|
||||||
|
|
||||||
const item = await fromUuid(data.uuid);
|
const item = await fromUuid(data.uuid);
|
||||||
if (item.type === 'adversary') {
|
if (item.type === 'adversary' && event.target.closest('.category-container')) {
|
||||||
const target = event.target.closest('.category-container');
|
const target = event.target.closest('.category-container');
|
||||||
const path = `system.potentialAdversaries.${target.dataset.potentialAdversary}.adversaries`;
|
const path = `system.potentialAdversaries.${target.dataset.potentialAdversary}.adversaries`;
|
||||||
const current = foundry.utils.getProperty(this.actor, path).map(x => x.uuid);
|
const current = foundry.utils.getProperty(this.actor, path).map(x => x.uuid);
|
||||||
|
|
@ -210,6 +201,9 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
||||||
[path]: [...current, item.uuid]
|
[path]: [...current, item.uuid]
|
||||||
});
|
});
|
||||||
this.render();
|
this.render();
|
||||||
|
} else if (item.type === 'feature' && event.target.closest('.tab.features')) {
|
||||||
|
await this.actor.createEmbeddedDocuments('Item', [item]);
|
||||||
|
this.render();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,19 +29,19 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
static PARTS = {
|
static PARTS = {
|
||||||
sidebar: { template: 'systems/daggerheart/templates/sheets/actors/adversary/sidebar.hbs' },
|
sidebar: { template: 'systems/daggerheart/templates/sheets/actors/adversary/sidebar.hbs' },
|
||||||
header: { template: 'systems/daggerheart/templates/sheets/actors/adversary/header.hbs' },
|
header: { template: 'systems/daggerheart/templates/sheets/actors/adversary/header.hbs' },
|
||||||
actions: { template: 'systems/daggerheart/templates/sheets/actors/adversary/actions.hbs' },
|
features: { template: 'systems/daggerheart/templates/sheets/actors/adversary/features.hbs' },
|
||||||
notes: { template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs' },
|
notes: { template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs' },
|
||||||
effects: { template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs' }
|
effects: { template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs' }
|
||||||
};
|
};
|
||||||
|
|
||||||
static TABS = {
|
static TABS = {
|
||||||
actions: {
|
features: {
|
||||||
active: true,
|
active: true,
|
||||||
cssClass: '',
|
cssClass: '',
|
||||||
group: 'primary',
|
group: 'primary',
|
||||||
id: 'actions',
|
id: 'features',
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.General.tabs.actions'
|
label: 'DAGGERHEART.General.tabs.features'
|
||||||
},
|
},
|
||||||
notes: {
|
notes: {
|
||||||
active: false,
|
active: false,
|
||||||
|
|
@ -71,9 +71,9 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
getAction(element) {
|
getItem(element) {
|
||||||
const itemId = (element.target ?? element).closest('[data-item-id]').dataset.itemId,
|
const itemId = (element.target ?? element).closest('[data-item-id]').dataset.itemId,
|
||||||
item = this.document.system.actions.find(x => x.id === itemId);
|
item = this.document.items.get(itemId);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async useItem(event) {
|
static async useItem(event) {
|
||||||
const action = this.getAction(event) ?? this.actor.system.attack;
|
const action = this.getItem(event) ?? this.actor.system.attack;
|
||||||
action.use(event);
|
action.use(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -135,7 +135,7 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
|
|
||||||
cls.create(msg.toObject());
|
cls.create(msg.toObject());
|
||||||
} else {
|
} else {
|
||||||
const item = this.getAction(event) ?? this.document.system.attack;
|
const item = this.getItem(event) ?? this.document.system.attack;
|
||||||
item.toChat(this.document.id);
|
item.toChat(this.document.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -307,12 +307,12 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
getItem(element) {
|
getItem(element) {
|
||||||
const listElement = (element.target ?? element).closest('[data-item-id]');
|
const listElement = (element.target ?? element).closest('[data-item-id]');
|
||||||
const itemId = listElement.dataset.itemId;
|
const itemId = listElement.dataset.itemId;
|
||||||
if (listElement.dataset.type === 'effect') {
|
|
||||||
return this.document.effects.get(itemId);
|
switch (listElement.dataset.type) {
|
||||||
} else if (['armor', 'weapon', 'feature', 'consumable', 'miscellaneous'].includes(listElement.dataset.type)) {
|
case 'effect':
|
||||||
return this.document.items.get(itemId);
|
return this.document.effects.get(itemId);
|
||||||
} else {
|
default:
|
||||||
return this.document.system[listElement.dataset.type].system.actions.find(x => x.id === itemId);
|
return this.document.items.get(itemId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) {
|
||||||
|
|
||||||
static PARTS = {
|
static PARTS = {
|
||||||
header: { template: 'systems/daggerheart/templates/sheets/actors/environment/header.hbs' },
|
header: { template: 'systems/daggerheart/templates/sheets/actors/environment/header.hbs' },
|
||||||
actions: { template: 'systems/daggerheart/templates/sheets/actors/environment/actions.hbs' },
|
features: { template: 'systems/daggerheart/templates/sheets/actors/environment/features.hbs' },
|
||||||
potentialAdversaries: {
|
potentialAdversaries: {
|
||||||
template: 'systems/daggerheart/templates/sheets/actors/environment/potentialAdversaries.hbs'
|
template: 'systems/daggerheart/templates/sheets/actors/environment/potentialAdversaries.hbs'
|
||||||
},
|
},
|
||||||
|
|
@ -34,13 +34,13 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) {
|
||||||
};
|
};
|
||||||
|
|
||||||
static TABS = {
|
static TABS = {
|
||||||
actions: {
|
features: {
|
||||||
active: true,
|
active: true,
|
||||||
cssClass: '',
|
cssClass: '',
|
||||||
group: 'primary',
|
group: 'primary',
|
||||||
id: 'actions',
|
id: 'features',
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.General.tabs.actions'
|
label: 'DAGGERHEART.General.tabs.features'
|
||||||
},
|
},
|
||||||
potentialAdversaries: {
|
potentialAdversaries: {
|
||||||
active: false,
|
active: false,
|
||||||
|
|
@ -69,9 +69,9 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) {
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
getAction(element) {
|
getItem(element) {
|
||||||
const itemId = (element.target ?? element).closest('[data-item-id]').dataset.itemId,
|
const itemId = (element.target ?? element).closest('[data-item-id]').dataset.itemId,
|
||||||
item = this.document.system.actions.find(x => x.id === itemId);
|
item = this.document.items.get(itemId);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async useItem(event, button) {
|
static async useItem(event, button) {
|
||||||
const action = this.getAction(event);
|
const action = this.getItem(event);
|
||||||
if (!action) {
|
if (!action) {
|
||||||
await this.viewAdversary(event, button);
|
await this.viewAdversary(event, button);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -123,7 +123,7 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async toChat(event) {
|
static async toChat(event) {
|
||||||
const item = this.getAction(event);
|
const item = this.getItem(event);
|
||||||
item.toChat(this.document.id);
|
item.toChat(this.document.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,12 +128,20 @@ export default function DHApplicationMixin(Base) {
|
||||||
_createDragDropHandlers() {
|
_createDragDropHandlers() {
|
||||||
return this.options.dragDrop.map(d => {
|
return this.options.dragDrop.map(d => {
|
||||||
d.callbacks = {
|
d.callbacks = {
|
||||||
|
dragstart: this._onDragStart.bind(this),
|
||||||
drop: this._onDrop.bind(this)
|
drop: this._onDrop.bind(this)
|
||||||
};
|
};
|
||||||
return new foundry.applications.ux.DragDrop.implementation(d);
|
return new foundry.applications.ux.DragDrop.implementation(d);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle dragStart event.
|
||||||
|
* @param {DragEvent} event
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
_onDragStart(event) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle drop event.
|
* Handle drop event.
|
||||||
* @param {DragEvent} event
|
* @param {DragEvent} event
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import DHApplicationMixin from './application-mixin.mjs';
|
|
||||||
import DHActionConfig from '../../sheets-configs/action-config.mjs';
|
import DHActionConfig from '../../sheets-configs/action-config.mjs';
|
||||||
import { actionsTypes } from '../../../data/action/_module.mjs';
|
import DHApplicationMixin from './application-mixin.mjs';
|
||||||
|
|
||||||
const { ItemSheetV2 } = foundry.applications.sheets;
|
const { ItemSheetV2 } = foundry.applications.sheets;
|
||||||
|
|
||||||
|
|
@ -20,8 +19,15 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
|
||||||
actions: {
|
actions: {
|
||||||
addAction: DHBaseItemSheet.#addAction,
|
addAction: DHBaseItemSheet.#addAction,
|
||||||
editAction: DHBaseItemSheet.#editAction,
|
editAction: DHBaseItemSheet.#editAction,
|
||||||
removeAction: DHBaseItemSheet.#removeAction
|
removeAction: DHBaseItemSheet.#removeAction,
|
||||||
}
|
addFeature: DHBaseItemSheet.#addFeature,
|
||||||
|
editFeature: DHBaseItemSheet.#editFeature,
|
||||||
|
removeFeature: DHBaseItemSheet.#removeFeature
|
||||||
|
},
|
||||||
|
dragDrop: [
|
||||||
|
{ dragSelector: null, dropSelector: '.tab.features .drop-section' },
|
||||||
|
{ dragSelector: '.feature-item', dropSelector: null }
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
@ -93,7 +99,9 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
|
||||||
const actionType = await DHBaseItemSheet.selectActionType();
|
const actionType = await DHBaseItemSheet.selectActionType();
|
||||||
if (!actionType) return;
|
if (!actionType) return;
|
||||||
try {
|
try {
|
||||||
const cls = actionsTypes[actionType] ?? actionsTypes.attack,
|
const cls =
|
||||||
|
game.system.api.models.actions.actionsTypes[actionType] ??
|
||||||
|
game.system.api.models.actions.actionsTypes.attack,
|
||||||
action = new cls(
|
action = new cls(
|
||||||
{
|
{
|
||||||
_id: foundry.utils.randomID(),
|
_id: foundry.utils.randomID(),
|
||||||
|
|
@ -136,4 +144,90 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
|
||||||
'system.actions': this.document.system.actions.filter((_, index) => index !== Number.parseInt(actionIndex))
|
'system.actions': this.document.system.actions.filter((_, index) => index !== Number.parseInt(actionIndex))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new feature to the item, prompting the user for its type.
|
||||||
|
* @param {PointerEvent} _event - The originating click event
|
||||||
|
* @param {HTMLElement} _button - The capturing HTML element which defines the [data-action="addFeature"]
|
||||||
|
*/
|
||||||
|
static async #addFeature(_event, _button) {
|
||||||
|
const feature = await game.items.documentClass.create({
|
||||||
|
type: 'feature',
|
||||||
|
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') })
|
||||||
|
});
|
||||||
|
await this.document.update({
|
||||||
|
'system.features': [...this.document.system.features.filter(x => x).map(x => x.uuid), feature.uuid]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Edit an existing feature on the item
|
||||||
|
* @param {PointerEvent} _event - The originating click event
|
||||||
|
* @param {HTMLElement} button - The capturing HTML element which defines the [data-action="editFeature"]
|
||||||
|
*/
|
||||||
|
static async #editFeature(_event, button) {
|
||||||
|
const target = button.closest('.feature-item');
|
||||||
|
const feature = this.document.system.features.find(x => x?.id === target.id);
|
||||||
|
if (!feature) {
|
||||||
|
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.notifications.featureIsMissing'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
feature.sheet.render(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a feature from the item.
|
||||||
|
* @param {PointerEvent} event - The originating click event
|
||||||
|
* @param {HTMLElement} button - The capturing HTML element which defines the [data-action="removeFeature"]
|
||||||
|
*/
|
||||||
|
static async #removeFeature(event, button) {
|
||||||
|
event.stopPropagation();
|
||||||
|
const target = button.closest('.feature-item');
|
||||||
|
|
||||||
|
await this.document.update({
|
||||||
|
'system.features': this.document.system.features
|
||||||
|
.filter(feature => feature && feature.id !== target.id)
|
||||||
|
.map(x => x.uuid)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Application Drag/Drop */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On dragStart on the item.
|
||||||
|
* @param {DragEvent} event - The drag event
|
||||||
|
*/
|
||||||
|
async _onDragStart(event) {
|
||||||
|
const featureItem = event.currentTarget.closest('.feature-item');
|
||||||
|
|
||||||
|
if (featureItem) {
|
||||||
|
const feature = this.document.system.features.find(x => x?.id === featureItem.id);
|
||||||
|
if (!feature) {
|
||||||
|
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.notifications.featureIsMissing'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const featureData = { type: 'Item', data: { ...feature.toObject(), _id: null }, fromInternal: true };
|
||||||
|
event.dataTransfer.setData('text/plain', JSON.stringify(featureData));
|
||||||
|
event.dataTransfer.setDragImage(featureItem.querySelector('img'), 60, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On drop on the item.
|
||||||
|
* @param {DragEvent} event - The drag event
|
||||||
|
*/
|
||||||
|
async _onDrop(event) {
|
||||||
|
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
||||||
|
if (data.fromInternal) return;
|
||||||
|
|
||||||
|
const item = await fromUuid(data.uuid);
|
||||||
|
if (item?.type === 'feature') {
|
||||||
|
const current = this.document.system.features.map(x => x.uuid);
|
||||||
|
await this.document.update({ 'system.features': [...current, item.uuid] });
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ export default class DHHeritageSheet extends DHBaseItemSheet {
|
||||||
static PARTS = {
|
static PARTS = {
|
||||||
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||||
description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' },
|
description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' },
|
||||||
actions: {
|
feature: {
|
||||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-actions.hbs',
|
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-features.hbs',
|
||||||
scrollable: ['.actions']
|
scrollable: ['.feature']
|
||||||
},
|
},
|
||||||
effects: {
|
effects: {
|
||||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-effects.hbs',
|
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-effects.hbs',
|
||||||
|
|
@ -23,7 +23,7 @@ export default class DHHeritageSheet extends DHBaseItemSheet {
|
||||||
/** @override*/
|
/** @override*/
|
||||||
static TABS = {
|
static TABS = {
|
||||||
primary: {
|
primary: {
|
||||||
tabs: [{ id: 'description' }, { id: 'actions' }, { id: 'effects' }],
|
tabs: [{ id: 'description' }, { id: 'features' }, { id: 'effects' }],
|
||||||
initial: 'description',
|
initial: 'description',
|
||||||
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,7 @@ import DHBaseItemSheet from '../api/base-item.mjs';
|
||||||
export default class BeastformSheet extends DHBaseItemSheet {
|
export default class BeastformSheet extends DHBaseItemSheet {
|
||||||
/**@inheritdoc */
|
/**@inheritdoc */
|
||||||
static DEFAULT_OPTIONS = {
|
static DEFAULT_OPTIONS = {
|
||||||
classes: ['beastform'],
|
classes: ['beastform']
|
||||||
dragDrop: [{ dragSelector: null, dropSelector: '.drop-section' }],
|
|
||||||
actions: {
|
|
||||||
editFeature: this.editFeature,
|
|
||||||
removeFeature: this.removeFeature
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**@override */
|
/**@override */
|
||||||
|
|
@ -40,26 +35,4 @@ export default class BeastformSheet extends DHBaseItemSheet {
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
static editFeature(event) {
|
|
||||||
const target = event.target.closest('[data-action="editFeature"]');
|
|
||||||
const feature = this.document.system.features[target.dataset.index];
|
|
||||||
feature.sheet.render({ force: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
static async removeFeature(_, target) {
|
|
||||||
const current = this.document.system.features.map(x => x.uuid);
|
|
||||||
await this.document.update({
|
|
||||||
'system.features': current.filter((_, index) => index !== Number(target.dataset.index))
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async _onDrop(event) {
|
|
||||||
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
|
||||||
const item = await fromUuid(data.uuid);
|
|
||||||
if (item.type === 'feature') {
|
|
||||||
const current = this.document.system.features.map(x => x.uuid);
|
|
||||||
await this.document.update({ 'system.features': [...current, item.uuid] });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
import DHBaseItemSheet from '../api/base-item.mjs';
|
import DHBaseItemSheet from '../api/base-item.mjs';
|
||||||
import DHActionConfig from '../../sheets-configs/action-config.mjs';
|
|
||||||
import { actionsTypes } from '../../../data/action/_module.mjs';
|
|
||||||
|
|
||||||
const { TextEditor } = foundry.applications.ux;
|
const { TextEditor } = foundry.applications.ux;
|
||||||
|
|
||||||
|
|
@ -169,71 +167,45 @@ export default class ClassSheet extends DHBaseItemSheet {
|
||||||
doc.sheet.render({ force: true });
|
doc.sheet.render({ force: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: redo this
|
|
||||||
async selectActionType() {
|
|
||||||
const content = await foundry.applications.handlebars.renderTemplate(
|
|
||||||
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
|
||||||
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
|
||||||
),
|
|
||||||
title = 'Select Action Type',
|
|
||||||
type = 'form',
|
|
||||||
data = {};
|
|
||||||
return Dialog.prompt({
|
|
||||||
title,
|
|
||||||
label: title,
|
|
||||||
content,
|
|
||||||
type,
|
|
||||||
callback: html => {
|
|
||||||
const form = html[0].querySelector('form'),
|
|
||||||
fd = new foundry.applications.ux.FormDataExtended(form);
|
|
||||||
foundry.utils.mergeObject(data, fd.object, { inplace: true });
|
|
||||||
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
rejectClose: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: redo this
|
|
||||||
getActionPath(type) {
|
getActionPath(type) {
|
||||||
return type === 'hope' ? 'hopeFeatures' : 'classFeatures';
|
return type === 'hope' ? 'hopeFeatures' : 'classFeatures';
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: redo this
|
|
||||||
static async addFeature(_, target) {
|
static async addFeature(_, target) {
|
||||||
const actionPath = this.getActionPath(target.dataset.type);
|
const actionPath = this.getActionPath(target.dataset.type);
|
||||||
const actionType = await this.selectActionType();
|
const feature = await game.items.documentClass.create({
|
||||||
const cls = actionsTypes[actionType?.type] ?? actionsTypes.attack,
|
type: 'feature',
|
||||||
action = new cls(
|
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') })
|
||||||
{
|
});
|
||||||
_id: foundry.utils.randomID(),
|
|
||||||
systemPath: actionPath,
|
|
||||||
type: actionType.type,
|
|
||||||
name: game.i18n.localize(CONFIG.DH.ACTIONS.actionTypes[actionType.type].name),
|
|
||||||
...cls.getSourceConfig(this.document)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
parent: this.document
|
|
||||||
}
|
|
||||||
);
|
|
||||||
await this.document.update({ [`system.${actionPath}`]: [...this.document.system[actionPath], action] });
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: redo this
|
|
||||||
static async editFeature(_, target) {
|
|
||||||
const action = this.document.system[this.getActionPath(target.dataset.type)].find(
|
|
||||||
x => x._id === target.dataset.feature
|
|
||||||
);
|
|
||||||
await new DHActionConfig(action).render(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: redo this
|
|
||||||
static async deleteFeature(_, target) {
|
|
||||||
const actionPath = this.getActionPath(target.dataset.type);
|
|
||||||
await this.document.update({
|
await this.document.update({
|
||||||
[`system.${actionPath}`]: this.document.system[actionPath].filter(
|
[`system.${actionPath}`]: [
|
||||||
action => action._id !== target.dataset.feature
|
...this.document.system[actionPath].filter(x => x).map(x => x.uuid),
|
||||||
)
|
feature.uuid
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
static async editFeature(_, button) {
|
||||||
|
const target = button.closest('.feature-item');
|
||||||
|
const actionPath = this.getActionPath(button.dataset.type);
|
||||||
|
const feature = this.document.system[actionPath].find(x => x?.id === target.dataset.featureId);
|
||||||
|
if (!feature) {
|
||||||
|
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.notifications.featureIsMissing'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
feature.sheet.render(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async deleteFeature(event, button) {
|
||||||
|
event.stopPropagation();
|
||||||
|
const target = button.closest('.feature-item');
|
||||||
|
const actionPath = this.getActionPath(button.dataset.type);
|
||||||
|
|
||||||
|
await this.document.update({
|
||||||
|
[`system.${actionPath}`]: this.document.system[actionPath]
|
||||||
|
.filter(feature => feature && feature.id !== target.dataset.featureId)
|
||||||
|
.map(x => x.uuid)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { actionsTypes } from '../../../data/action/_module.mjs';
|
||||||
|
import DHActionConfig from '../../sheets-configs/action-config.mjs';
|
||||||
import DHBaseItemSheet from '../api/base-item.mjs';
|
import DHBaseItemSheet from '../api/base-item.mjs';
|
||||||
|
|
||||||
export default class FeatureSheet extends DHBaseItemSheet {
|
export default class FeatureSheet extends DHBaseItemSheet {
|
||||||
|
|
@ -6,7 +8,12 @@ export default class FeatureSheet extends DHBaseItemSheet {
|
||||||
id: 'daggerheart-feature',
|
id: 'daggerheart-feature',
|
||||||
classes: ['feature'],
|
classes: ['feature'],
|
||||||
position: { height: 600 },
|
position: { height: 600 },
|
||||||
window: { resizable: true }
|
window: { resizable: true },
|
||||||
|
actions: {
|
||||||
|
addAction: FeatureSheet.#addAction,
|
||||||
|
editAction: FeatureSheet.#editAction,
|
||||||
|
removeAction: FeatureSheet.#removeAction
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**@override */
|
/**@override */
|
||||||
|
|
@ -41,4 +48,83 @@ export default class FeatureSheet extends DHBaseItemSheet {
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Application Clicks Actions */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render a dialog prompting the user to select an action type.
|
||||||
|
*
|
||||||
|
* @returns {Promise<object>} An object containing the selected action type.
|
||||||
|
*/
|
||||||
|
static async selectActionType() {
|
||||||
|
const content = await foundry.applications.handlebars.renderTemplate(
|
||||||
|
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
||||||
|
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
||||||
|
),
|
||||||
|
title = 'Select Action Type';
|
||||||
|
|
||||||
|
return foundry.applications.api.DialogV2.prompt({
|
||||||
|
window: { title },
|
||||||
|
content,
|
||||||
|
ok: {
|
||||||
|
label: title,
|
||||||
|
callback: (event, button, dialog) => button.form.elements.type.value
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new action to the item, prompting the user for its type.
|
||||||
|
* @param {PointerEvent} _event - The originating click event
|
||||||
|
* @param {HTMLElement} _button - The capturing HTML element which defines the [data-action="addAction"]
|
||||||
|
*/
|
||||||
|
static async #addAction(_event, _button) {
|
||||||
|
const actionType = await FeatureSheet.selectActionType();
|
||||||
|
if (!actionType) return;
|
||||||
|
try {
|
||||||
|
const cls = actionsTypes[actionType] ?? actionsTypes.attack,
|
||||||
|
action = new cls(
|
||||||
|
{
|
||||||
|
_id: foundry.utils.randomID(),
|
||||||
|
type: actionType,
|
||||||
|
name: game.i18n.localize(CONFIG.DH.ACTIONS.actionTypes[actionType].name),
|
||||||
|
...cls.getSourceConfig(this.document)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
parent: this.document
|
||||||
|
}
|
||||||
|
);
|
||||||
|
await this.document.update({ 'system.actions': [...this.document.system.actions, action] });
|
||||||
|
await new DHActionConfig(this.document.system.actions[this.document.system.actions.length - 1]).render({
|
||||||
|
force: true
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Edit an existing action on the item
|
||||||
|
* @param {PointerEvent} _event - The originating click event
|
||||||
|
* @param {HTMLElement} button - The capturing HTML element which defines the [data-action="editAction"]
|
||||||
|
*/
|
||||||
|
static async #editAction(_event, button) {
|
||||||
|
const action = this.document.system.actions[button.dataset.index];
|
||||||
|
await new DHActionConfig(action).render({ force: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove an action from the item.
|
||||||
|
* @param {PointerEvent} event - The originating click event
|
||||||
|
* @param {HTMLElement} button - The capturing HTML element which defines the [data-action="removeAction"]
|
||||||
|
*/
|
||||||
|
static async #removeAction(event, button) {
|
||||||
|
event.stopPropagation();
|
||||||
|
const actionIndex = button.closest('[data-index]').dataset.index;
|
||||||
|
await this.document.update({
|
||||||
|
'system.actions': this.document.system.actions.filter((_, index) => index !== Number.parseInt(actionIndex))
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
import DHBaseItemSheet from '../api/base-item.mjs';
|
import DHBaseItemSheet from '../api/base-item.mjs';
|
||||||
import DHActionConfig from '../../sheets-configs/action-config.mjs';
|
|
||||||
import { actionsTypes } from '../../../data/action/_module.mjs';
|
|
||||||
|
|
||||||
export default class SubclassSheet extends DHBaseItemSheet {
|
export default class SubclassSheet extends DHBaseItemSheet {
|
||||||
/**@inheritdoc */
|
/**@inheritdoc */
|
||||||
|
|
@ -39,101 +37,63 @@ export default class SubclassSheet extends DHBaseItemSheet {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//TODO redo everything below this message
|
static async addFeature(_, target) {
|
||||||
|
const feature = await game.items.documentClass.create({
|
||||||
static addFeature(_, target) {
|
type: 'feature',
|
||||||
if (target.dataset.type === 'action') this.addAction(target.dataset.level);
|
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') })
|
||||||
else this.addEffect(target.dataset.level);
|
|
||||||
}
|
|
||||||
|
|
||||||
static async editFeature(_, target) {
|
|
||||||
if (target.dataset.type === 'action') this.editAction(target.dataset.level, target.dataset.feature);
|
|
||||||
else this.editEffect(target.dataset.feature);
|
|
||||||
}
|
|
||||||
|
|
||||||
static async deleteFeature(_, target) {
|
|
||||||
if (target.dataset.type === 'action') this.removeAction(target.dataset.level, target.dataset.feature);
|
|
||||||
else this.removeEffect(target.dataset.level, target.dataset.feature);
|
|
||||||
}
|
|
||||||
|
|
||||||
async #selectActionType() {
|
|
||||||
const content = await foundry.applications.handlebars.renderTemplate(
|
|
||||||
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
|
||||||
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
|
||||||
),
|
|
||||||
title = 'Select Action Type',
|
|
||||||
type = 'form',
|
|
||||||
data = {};
|
|
||||||
return Dialog.prompt({
|
|
||||||
title,
|
|
||||||
label: title,
|
|
||||||
content,
|
|
||||||
type,
|
|
||||||
callback: html => {
|
|
||||||
const form = html[0].querySelector('form'),
|
|
||||||
fd = new foundry.applications.ux.FormDataExtended(form);
|
|
||||||
foundry.utils.mergeObject(data, fd.object, { inplace: true });
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
rejectClose: false
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
async addAction(level) {
|
|
||||||
const actionType = await this.#selectActionType();
|
|
||||||
const cls = actionsTypes[actionType?.type] ?? actionsTypes.attack,
|
|
||||||
action = new cls(
|
|
||||||
{
|
|
||||||
_id: foundry.utils.randomID(),
|
|
||||||
systemPath: `${level}.actions`,
|
|
||||||
type: actionType.type,
|
|
||||||
name: game.i18n.localize(CONFIG.DH.ACTIONS.actionTypes[actionType.type].name),
|
|
||||||
...cls.getSourceConfig(this.document)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
parent: this.document
|
|
||||||
}
|
|
||||||
);
|
|
||||||
await this.document.update({ [`system.${level}.actions`]: [...this.document.system[level].actions, action] });
|
|
||||||
await new DHActionConfig(
|
|
||||||
this.document.system[level].actions[this.document.system[level].actions.length - 1]
|
|
||||||
).render(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
async addEffect(level) {
|
|
||||||
const embeddedItems = await this.document.createEmbeddedDocuments('ActiveEffect', [
|
|
||||||
{ name: game.i18n.localize('DAGGERHEART.Feature.NewEffect') }
|
|
||||||
]);
|
|
||||||
await this.document.update({
|
await this.document.update({
|
||||||
[`system.${level}.effects`]: [
|
[`system.${target.dataset.type}`]: feature.uuid
|
||||||
...this.document.system[level].effects.map(x => x.uuid),
|
|
||||||
embeddedItems[0].uuid
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async editAction(level, id) {
|
static async editFeature(_, button) {
|
||||||
const action = this.document.system[level].actions.find(x => x._id === id);
|
const feature = this.document.system[button.dataset.type];
|
||||||
await new DHActionConfig(action).render(true);
|
if (!feature) {
|
||||||
|
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.notifications.featureIsMissing'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
feature.sheet.render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
async editEffect(id) {
|
static async deleteFeature(event, button) {
|
||||||
const effect = this.document.effects.get(id);
|
event.stopPropagation();
|
||||||
effect.sheet.render(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
async removeAction(level, id) {
|
|
||||||
await this.document.update({
|
await this.document.update({
|
||||||
[`system.${level}.actions`]: this.document.system[level].actions.filter(action => action._id !== id)
|
[`system.${button.dataset.type}`]: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async removeEffect(level, id) {
|
async _onDragStart(event) {
|
||||||
await this.document.effects.get(id).delete();
|
const featureItem = event.currentTarget.closest('.drop-section');
|
||||||
await this.document.update({
|
|
||||||
[`system.${level}.effects`]: this.document.system[level].effects
|
if (featureItem) {
|
||||||
.filter(x => x && x.id !== id)
|
const feature = this.document.system[featureItem.dataset.type];
|
||||||
.map(effect => effect.uuid)
|
if (!feature) {
|
||||||
});
|
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.notifications.featureIsMissing'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const featureData = { type: 'Item', data: { ...feature.toObject(), _id: null }, fromInternal: true };
|
||||||
|
event.dataTransfer.setData('text/plain', JSON.stringify(featureData));
|
||||||
|
event.dataTransfer.setDragImage(featureItem.querySelector('img'), 60, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async _onDrop(event) {
|
||||||
|
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
||||||
|
if (data.fromInternal) return;
|
||||||
|
|
||||||
|
const item = await fromUuid(data.uuid);
|
||||||
|
if (item?.type === 'feature') {
|
||||||
|
const dropSection = event.target.closest('.drop-section');
|
||||||
|
if (this.document.system[dropSection.dataset.type]) {
|
||||||
|
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.notifications.featureIsFull'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.document.update({ [`system.${dropSection.dataset.type}`]: item.uuid });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -156,8 +156,8 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
|
|
||||||
getTargetList = (event, message) => {
|
getTargetList = (event, message) => {
|
||||||
const targetSelection = event.target
|
const targetSelection = event.target
|
||||||
.closest('.message-content')
|
.closest('.message-content')
|
||||||
.querySelector('.button-target-selection.target-selected'),
|
.querySelector('.button-target-selection.target-selected'),
|
||||||
isHit = Boolean(targetSelection.dataset.targetHit);
|
isHit = Boolean(targetSelection.dataset.targetHit);
|
||||||
return {
|
return {
|
||||||
isHit,
|
isHit,
|
||||||
|
|
@ -255,7 +255,6 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle selecting an advantage and disable further selection.
|
* Handle selecting an advantage and disable further selection.
|
||||||
* @param {MouseEvent} event
|
* @param {MouseEvent} event
|
||||||
|
|
@ -277,7 +276,6 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
abilityUseButton = async (event, message) => {
|
abilityUseButton = async (event, message) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -199,11 +199,7 @@ export default class FilterMenu extends foundry.applications.ux.ContextMenu {
|
||||||
|
|
||||||
const sort = arr => game.i18n.sortObjects(arr, 'name');
|
const sort = arr => game.i18n.sortObjects(arr, 'name');
|
||||||
|
|
||||||
return [
|
return [...sort(typesFilters, 'name'), ...sort(burdenFilter, 'name'), ...sort(damageTypeFilter, 'name')];
|
||||||
...sort(typesFilters, 'name'),
|
|
||||||
...sort(burdenFilter, 'name'),
|
|
||||||
...sort(damageTypeFilter, 'name')
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -656,31 +656,47 @@ export const weaponFeatures = {
|
||||||
export const featureTypes = {
|
export const featureTypes = {
|
||||||
ancestry: {
|
ancestry: {
|
||||||
id: 'ancestry',
|
id: 'ancestry',
|
||||||
label: 'DAGGERHEART.Feature.Type.ancestry'
|
label: 'TYPES.Item.ancestry'
|
||||||
},
|
},
|
||||||
community: {
|
community: {
|
||||||
id: 'community',
|
id: 'community',
|
||||||
label: 'DAGGERHEART.Feature.Type.community'
|
label: 'TYPES.Item.community'
|
||||||
|
},
|
||||||
|
companion: {
|
||||||
|
id: 'companion',
|
||||||
|
label: 'TYPES.Actor.companion'
|
||||||
},
|
},
|
||||||
class: {
|
class: {
|
||||||
id: 'class',
|
id: 'class',
|
||||||
label: 'DAGGERHEART.Feature.Type.class'
|
label: 'TYPES.Item.class'
|
||||||
},
|
},
|
||||||
subclass: {
|
subclass: {
|
||||||
id: 'subclass',
|
id: 'subclass',
|
||||||
label: 'DAGGERHEART.Feature.Type.subclass'
|
label: 'TYPES.Item.subclass'
|
||||||
},
|
|
||||||
classHope: {
|
|
||||||
id: 'classHope',
|
|
||||||
label: 'DAGGERHEART.Feature.Type.classHope'
|
|
||||||
},
|
},
|
||||||
domainCard: {
|
domainCard: {
|
||||||
id: 'domainCard',
|
id: 'domainCard',
|
||||||
label: 'DAGGERHEART.Feature.Type.domainCard'
|
label: 'TYPES.Item.domainCard'
|
||||||
},
|
},
|
||||||
equipment: {
|
armor: {
|
||||||
id: 'equipment',
|
id: 'armor',
|
||||||
label: 'DAGGERHEART.Feature.Type.equipment'
|
label: 'TYPES.Item.armor'
|
||||||
|
},
|
||||||
|
weapon: {
|
||||||
|
id: 'weapon',
|
||||||
|
label: 'TYPES.Item.weapon'
|
||||||
|
},
|
||||||
|
consumable: {
|
||||||
|
id: 'consumable',
|
||||||
|
label: 'TYPES.Item.consumable'
|
||||||
|
},
|
||||||
|
miscellaneous: {
|
||||||
|
id: 'miscellaneous',
|
||||||
|
label: 'TYPES.Item.miscellaneous'
|
||||||
|
},
|
||||||
|
beastform: {
|
||||||
|
if: 'beastform',
|
||||||
|
label: 'TYPES.Item.beastform'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ export default class DhpAdversary extends BaseDataActor {
|
||||||
hitPoints: resourceField(),
|
hitPoints: resourceField(),
|
||||||
stress: resourceField()
|
stress: resourceField()
|
||||||
}),
|
}),
|
||||||
actions: new fields.ArrayField(new ActionField()),
|
|
||||||
attack: new ActionField({
|
attack: new ActionField({
|
||||||
initial: {
|
initial: {
|
||||||
name: 'Attack',
|
name: 'Attack',
|
||||||
|
|
@ -86,4 +85,8 @@ export default class DhpAdversary extends BaseDataActor {
|
||||||
get attackBonus() {
|
get attackBonus() {
|
||||||
return this.attack.roll.bonus;
|
return this.attack.roll.bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get features() {
|
||||||
|
return this.parent.items.filter(x => x.type === 'feature');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
value: new ForeignDocumentUUIDField({ type: 'Item', nullable: true }),
|
value: new ForeignDocumentUUIDField({ type: 'Item', nullable: true }),
|
||||||
subclass: new ForeignDocumentUUIDField({ type: 'Item', nullable: true })
|
subclass: new ForeignDocumentUUIDField({ type: 'Item', nullable: true })
|
||||||
}),
|
}),
|
||||||
actions: new fields.ArrayField(new ActionField()),
|
|
||||||
levelData: new fields.EmbeddedDataField(DhLevelData),
|
levelData: new fields.EmbeddedDataField(DhLevelData),
|
||||||
bonuses: new fields.SchemaField({
|
bonuses: new fields.SchemaField({
|
||||||
armorScore: new fields.NumberField({ integer: true, initial: 0 }),
|
armorScore: new fields.NumberField({ integer: true, initial: 0 }),
|
||||||
|
|
@ -198,6 +197,68 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
return this.parent.items.find(x => x.type === 'armor' && x.system.equipped);
|
return this.parent.items.find(x => x.type === 'armor' && x.system.equipped);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get sheetLists() {
|
||||||
|
const ancestryFeatures = [],
|
||||||
|
communityFeatures = [],
|
||||||
|
classFeatures = [],
|
||||||
|
subclassFeatures = [],
|
||||||
|
companionFeatures = [],
|
||||||
|
features = [];
|
||||||
|
|
||||||
|
for (let item of this.parent.items) {
|
||||||
|
if (item.system.type === CONFIG.DH.ITEM.featureTypes.ancestry.id) {
|
||||||
|
ancestryFeatures.push(item);
|
||||||
|
} else if (item.system.type === CONFIG.DH.ITEM.featureTypes.community.id) {
|
||||||
|
communityFeatures.push(item);
|
||||||
|
} else if (item.system.type === CONFIG.DH.ITEM.featureTypes.class.id) {
|
||||||
|
classFeatures.push(item);
|
||||||
|
} else if (item.system.type === CONFIG.DH.ITEM.featureTypes.subclass.id) {
|
||||||
|
const subclassState = this.class.subclass.system.featureState;
|
||||||
|
const identifier = item.system.identifier;
|
||||||
|
if (
|
||||||
|
identifier === 'foundationFeature' ||
|
||||||
|
(identifier === 'specializationFeature' && subclassState >= 2) ||
|
||||||
|
(identifier === 'masterFeature' && subclassState >= 3)
|
||||||
|
) {
|
||||||
|
subclassFeatures.push(item);
|
||||||
|
}
|
||||||
|
} else if (item.system.type === CONFIG.DH.ITEM.featureTypes.companion.id) {
|
||||||
|
companionFeatures.push(item);
|
||||||
|
} else if (item.type === 'feature' && !item.system.type) {
|
||||||
|
features.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
ancestryFeatures: {
|
||||||
|
title: `${game.i18n.localize('TYPES.Item.ancestry')} - ${this.ancestry?.name}`,
|
||||||
|
type: 'ancestry',
|
||||||
|
values: ancestryFeatures
|
||||||
|
},
|
||||||
|
communityFeatures: {
|
||||||
|
title: `${game.i18n.localize('TYPES.Item.community')} - ${this.community?.name}`,
|
||||||
|
type: 'community',
|
||||||
|
values: communityFeatures
|
||||||
|
},
|
||||||
|
classFeatures: {
|
||||||
|
title: `${game.i18n.localize('TYPES.Item.class')} - ${this.class.value?.name}`,
|
||||||
|
type: 'class',
|
||||||
|
values: classFeatures
|
||||||
|
},
|
||||||
|
subclassFeatures: {
|
||||||
|
title: `${game.i18n.localize('TYPES.Item.subclass')} - ${this.class.subclass?.name}`,
|
||||||
|
type: 'subclass',
|
||||||
|
values: subclassFeatures
|
||||||
|
},
|
||||||
|
companionFeatures: {
|
||||||
|
title: game.i18n.localize('DAGGERHEART.Sheets.PC.CompanionFeatures'),
|
||||||
|
type: 'companion',
|
||||||
|
values: companionFeatures
|
||||||
|
},
|
||||||
|
features: { title: game.i18n.localize('DAGGERHEART.Sheets.PC.Features'), type: 'feature', values: features }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
get primaryWeapon() {
|
get primaryWeapon() {
|
||||||
return this.parent.items.find(x => x.type === 'weapon' && x.system.equipped && !x.system.secondary);
|
return this.parent.items.find(x => x.type === 'weapon' && x.system.equipped && !x.system.secondary);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,11 @@ export default class DhEnvironment extends BaseDataActor {
|
||||||
adversaries: new ForeignDocumentUUIDArrayField({ type: 'Actor' })
|
adversaries: new ForeignDocumentUUIDArrayField({ type: 'Actor' })
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
actions: new fields.ArrayField(new ActionField()),
|
|
||||||
notes: new fields.HTMLField()
|
notes: new fields.HTMLField()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get features() {
|
||||||
|
return this.parent.items.filter(x => x.type === 'feature');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import ActionField from '../fields/actionField.mjs';
|
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
|
||||||
import BaseDataItem from './base.mjs';
|
import BaseDataItem from './base.mjs';
|
||||||
|
|
||||||
export default class DHAncestry extends BaseDataItem {
|
export default class DHAncestry extends BaseDataItem {
|
||||||
|
|
@ -13,10 +13,9 @@ export default class DHAncestry extends BaseDataItem {
|
||||||
|
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
static defineSchema() {
|
static defineSchema() {
|
||||||
const fields = foundry.data.fields;
|
|
||||||
return {
|
return {
|
||||||
...super.defineSchema(),
|
...super.defineSchema(),
|
||||||
actions: new fields.ArrayField(new ActionField())
|
features: new ForeignDocumentUUIDArrayField({ type: 'Item' })
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import { actionsTypes } from '../action/_module.mjs';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes metadata about the item data model type
|
* Describes metadata about the item data model type
|
||||||
* @typedef {Object} ItemDataModelMetadata
|
* @typedef {Object} ItemDataModelMetadata
|
||||||
|
|
@ -61,8 +59,8 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
||||||
if (!this.constructor.metadata.hasInitialAction || !foundry.utils.isEmpty(this.actions)) return;
|
if (!this.constructor.metadata.hasInitialAction || !foundry.utils.isEmpty(this.actions)) return;
|
||||||
|
|
||||||
const metadataType = this.constructor.metadata.type;
|
const metadataType = this.constructor.metadata.type;
|
||||||
const actionType = { weapon: "attack" }[metadataType];
|
const actionType = { weapon: 'attack' }[metadataType];
|
||||||
const ActionClass = actionsTypes[actionType];
|
const ActionClass = game.system.api.models.actions.actionsTypes[actionType];
|
||||||
|
|
||||||
const action = new ActionClass(
|
const action = new ActionClass(
|
||||||
{
|
{
|
||||||
|
|
@ -79,4 +77,31 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
||||||
this.updateSource({ actions: [action] });
|
this.updateSource({ actions: [action] });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_onCreate(data) {
|
||||||
|
if (!this.actor || this.actor.type !== 'character' || !this.features) return;
|
||||||
|
|
||||||
|
this.actor.createEmbeddedDocuments(
|
||||||
|
'Item',
|
||||||
|
this.features.map(feature => ({
|
||||||
|
...feature,
|
||||||
|
system: {
|
||||||
|
...feature.system,
|
||||||
|
type: this.parent.type,
|
||||||
|
originId: data._id,
|
||||||
|
identifier: feature.identifier
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async _preDelete() {
|
||||||
|
if (!this.actor || this.actor.type !== 'character') return;
|
||||||
|
|
||||||
|
const items = this.actor.items.filter(item => item.system.originId === this.parent.id);
|
||||||
|
if (items.length > 0)
|
||||||
|
await this.actor.deleteEmbeddedDocuments(
|
||||||
|
'Item',
|
||||||
|
items.map(x => x.id)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,7 @@ export default class DHBeastform extends BaseDataItem {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async _preCreate(data, options, user) {
|
async _preCreate() {
|
||||||
const allowed = await super._preCreate(data, options, user);
|
|
||||||
if (allowed === false) return;
|
|
||||||
|
|
||||||
if (!this.actor) return;
|
if (!this.actor) return;
|
||||||
|
|
||||||
if (this.actor.type !== 'character') {
|
if (this.actor.type !== 'character') {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import BaseDataItem from './base.mjs';
|
import BaseDataItem from './base.mjs';
|
||||||
import ForeignDocumentUUIDField from '../fields/foreignDocumentUUIDField.mjs';
|
import ForeignDocumentUUIDField from '../fields/foreignDocumentUUIDField.mjs';
|
||||||
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
|
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
|
||||||
import ActionField from '../fields/actionField.mjs';
|
|
||||||
|
|
||||||
export default class DHClass extends BaseDataItem {
|
export default class DHClass extends BaseDataItem {
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
|
|
@ -28,8 +27,8 @@ export default class DHClass extends BaseDataItem {
|
||||||
label: 'DAGGERHEART.Sheets.Class.HitPoints'
|
label: 'DAGGERHEART.Sheets.Class.HitPoints'
|
||||||
}),
|
}),
|
||||||
evasion: new fields.NumberField({ initial: 0, integer: true, label: 'DAGGERHEART.Sheets.Class.Evasion' }),
|
evasion: new fields.NumberField({ initial: 0, integer: true, label: 'DAGGERHEART.Sheets.Class.Evasion' }),
|
||||||
hopeFeatures: new foundry.data.fields.ArrayField(new ActionField()),
|
hopeFeatures: new ForeignDocumentUUIDArrayField({ type: 'Item' }),
|
||||||
classFeatures: new foundry.data.fields.ArrayField(new ActionField()),
|
classFeatures: new ForeignDocumentUUIDArrayField({ type: 'Item' }),
|
||||||
subclasses: new ForeignDocumentUUIDArrayField({ type: 'Item', required: false }),
|
subclasses: new ForeignDocumentUUIDArrayField({ type: 'Item', required: false }),
|
||||||
inventory: new fields.SchemaField({
|
inventory: new fields.SchemaField({
|
||||||
take: new ForeignDocumentUUIDArrayField({ type: 'Item', required: false }),
|
take: new ForeignDocumentUUIDArrayField({ type: 'Item', required: false }),
|
||||||
|
|
@ -57,6 +56,10 @@ export default class DHClass extends BaseDataItem {
|
||||||
return this.hopeFeatures.length > 0 ? this.hopeFeatures[0] : null;
|
return this.hopeFeatures.length > 0 ? this.hopeFeatures[0] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get features() {
|
||||||
|
return [...this.hopeFeatures.filter(x => x), ...this.classFeatures.filter(x => x)];
|
||||||
|
}
|
||||||
|
|
||||||
async _preCreate(data, options, user) {
|
async _preCreate(data, options, user) {
|
||||||
const allowed = await super._preCreate(data, options, user);
|
const allowed = await super._preCreate(data, options, user);
|
||||||
if (allowed === false) return;
|
if (allowed === false) return;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import ActionField from '../fields/actionField.mjs';
|
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
|
||||||
import BaseDataItem from './base.mjs';
|
import BaseDataItem from './base.mjs';
|
||||||
|
|
||||||
export default class DHCommunity extends BaseDataItem {
|
export default class DHCommunity extends BaseDataItem {
|
||||||
|
|
@ -16,7 +16,7 @@ export default class DHCommunity extends BaseDataItem {
|
||||||
const fields = foundry.data.fields;
|
const fields = foundry.data.fields;
|
||||||
return {
|
return {
|
||||||
...super.defineSchema(),
|
...super.defineSchema(),
|
||||||
actions: new fields.ArrayField(new ActionField())
|
features: new ForeignDocumentUUIDArrayField({ type: 'Item' })
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ export default class DHFeature extends BaseDataItem {
|
||||||
const fields = foundry.data.fields;
|
const fields = foundry.data.fields;
|
||||||
return {
|
return {
|
||||||
...super.defineSchema(),
|
...super.defineSchema(),
|
||||||
|
type: new fields.StringField({ choices: CONFIG.DH.ITEM.featureTypes, nullable: true, initial: null }),
|
||||||
|
originId: new fields.StringField({ nullable: true, initial: null }),
|
||||||
|
identifier: new fields.StringField(),
|
||||||
actions: new fields.ArrayField(new ActionField())
|
actions: new fields.ArrayField(new ActionField())
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,6 @@
|
||||||
import ActionField from '../fields/actionField.mjs';
|
import ForeignDocumentUUIDField from '../fields/foreignDocumentUUIDField.mjs';
|
||||||
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
|
|
||||||
import BaseDataItem from './base.mjs';
|
import BaseDataItem from './base.mjs';
|
||||||
|
|
||||||
const featureSchema = () => {
|
|
||||||
return new foundry.data.fields.SchemaField({
|
|
||||||
name: new foundry.data.fields.StringField({ required: true }),
|
|
||||||
effects: new ForeignDocumentUUIDArrayField({ type: 'ActiveEffect', required: false }),
|
|
||||||
actions: new foundry.data.fields.ArrayField(new ActionField())
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export default class DHSubclass extends BaseDataItem {
|
export default class DHSubclass extends BaseDataItem {
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
static get metadata() {
|
static get metadata() {
|
||||||
|
|
@ -31,20 +22,20 @@ export default class DHSubclass extends BaseDataItem {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
initial: null
|
initial: null
|
||||||
}),
|
}),
|
||||||
foundationFeature: featureSchema(),
|
foundationFeature: new ForeignDocumentUUIDField({ type: 'Item' }),
|
||||||
specializationFeature: featureSchema(),
|
specializationFeature: new ForeignDocumentUUIDField({ type: 'Item' }),
|
||||||
masteryFeature: featureSchema(),
|
masteryFeature: new ForeignDocumentUUIDField({ type: 'Item' }),
|
||||||
featureState: new fields.NumberField({ required: true, initial: 1, min: 1 }),
|
featureState: new fields.NumberField({ required: true, initial: 1, min: 1 }),
|
||||||
isMulticlass: new fields.BooleanField({ initial: false })
|
isMulticlass: new fields.BooleanField({ initial: false })
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
get features() {
|
get features() {
|
||||||
return {
|
return [
|
||||||
foundation: this.foundationFeature,
|
{ ...this.foundationFeature.toObject(), identifier: 'foundationFeature' },
|
||||||
specialization: this.featureState >= 2 ? this.specializationFeature : null,
|
{ ...this.specializationFeature.toObject(), identifier: 'specializationFeature' },
|
||||||
mastery: this.featureState === 3 ? this.masteryFeature : null
|
{ ...this.masteryFeature.toObject(), identifier: 'masteryFeature' }
|
||||||
};
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
async _preCreate(data, options, user) {
|
async _preCreate(data, options, user) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import BaseDataItem from './base.mjs';
|
import BaseDataItem from './base.mjs';
|
||||||
|
import { actionsTypes } from '../action/_module.mjs';
|
||||||
import ActionField from '../fields/actionField.mjs';
|
import ActionField from '../fields/actionField.mjs';
|
||||||
|
|
||||||
export default class DHWeapon extends BaseDataItem {
|
export default class DHWeapon extends BaseDataItem {
|
||||||
|
|
@ -56,20 +57,20 @@ export default class DHWeapon extends BaseDataItem {
|
||||||
const allowed = await super._preUpdate(changes, options, user);
|
const allowed = await super._preUpdate(changes, options, user);
|
||||||
if (allowed === false) return false;
|
if (allowed === false) return false;
|
||||||
|
|
||||||
if (changes.system.features) {
|
if (changes.system?.features) {
|
||||||
const removed = this.features.filter(x => !changes.system.features.includes(x));
|
const removed = this.features.filter(x => !changes.system.features.includes(x));
|
||||||
const added = changes.system.features.filter(x => !this.features.includes(x));
|
const added = changes.system.features.filter(x => !this.features.includes(x));
|
||||||
|
|
||||||
for (var feature of removed) {
|
for (let weaponFeature of removed) {
|
||||||
for (var effectId of feature.effectIds) {
|
for (var effectId of weaponFeature.effectIds) {
|
||||||
await this.parent.effects.get(effectId).delete();
|
await this.parent.effects.get(effectId).delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
changes.system.actions = this.actions.filter(x => !feature.actionIds.includes(x._id));
|
changes.system.actions = this.actions.filter(x => !weaponFeature.actionIds.includes(x._id));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var feature of added) {
|
for (let weaponFeature of added) {
|
||||||
const featureData = CONFIG.DH.ITEM.weaponFeatures[feature.value];
|
const featureData = CONFIG.DH.ITEM.weaponFeatures[weaponFeature.value];
|
||||||
if (featureData.effects?.length > 0) {
|
if (featureData.effects?.length > 0) {
|
||||||
const embeddedItems = await this.parent.createEmbeddedDocuments('ActiveEffect', [
|
const embeddedItems = await this.parent.createEmbeddedDocuments('ActiveEffect', [
|
||||||
{
|
{
|
||||||
|
|
@ -78,18 +79,18 @@ export default class DHWeapon extends BaseDataItem {
|
||||||
changes: featureData.effects.flatMap(x => x.changes)
|
changes: featureData.effects.flatMap(x => x.changes)
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
feature.effectIds = embeddedItems.map(x => x.id);
|
weaponFeature.effectIds = embeddedItems.map(x => x.id);
|
||||||
}
|
}
|
||||||
if (featureData.actions?.length > 0) {
|
if (featureData.actions?.length > 0) {
|
||||||
const newActions = featureData.actions.map(action => {
|
const newActions = featureData.actions.map(action => {
|
||||||
const cls = CONFIG.DH.ACTIONS.actionsTypes[action.type];
|
const cls = actionsTypes[action.type];
|
||||||
return new cls(
|
return new cls(
|
||||||
{ ...action, _id: foundry.utils.randomID(), name: game.i18n.localize(action.name) },
|
{ ...action, _id: foundry.utils.randomID(), name: game.i18n.localize(action.name) },
|
||||||
{ parent: this }
|
{ parent: this }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
changes.system.actions = [...this.actions, ...newActions];
|
changes.system.actions = [...this.actions, ...newActions];
|
||||||
feature.actionIds = newActions.map(x => x._id);
|
weaponFeature.actionIds = newActions.map(x => x._id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,6 @@ export default class D20Roll extends DHRoll {
|
||||||
: config.roll.advantage == this.ADV_MODE.DISADVANTAGE
|
: config.roll.advantage == this.ADV_MODE.DISADVANTAGE
|
||||||
? false
|
? false
|
||||||
: null;
|
: null;
|
||||||
setDiceSoNiceForDualityRoll(roll, advantageState);
|
|
||||||
this.postEvaluate(roll, config);
|
this.postEvaluate(roll, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export default class RegisterHandlebarsHelpers {
|
||||||
add: this.add,
|
add: this.add,
|
||||||
subtract: this.subtract,
|
subtract: this.subtract,
|
||||||
includes: this.includes,
|
includes: this.includes,
|
||||||
case: this.case,
|
case: this.case
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,12 +34,10 @@ export default class RegisterHandlebarsHelpers {
|
||||||
return (Number.isNaN(aNum) ? 0 : aNum) - (Number.isNaN(bNum) ? 0 : bNum);
|
return (Number.isNaN(aNum) ? 0 : aNum) - (Number.isNaN(bNum) ? 0 : bNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static includes(list, item) {
|
static includes(list, item) {
|
||||||
return list.includes(item);
|
return list.includes(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static case(value, options) {
|
static case(value, options) {
|
||||||
if (value == this.switch_value) {
|
if (value == this.switch_value) {
|
||||||
this.switch_break = true;
|
this.switch_break = true;
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ export const preloadHandlebarsTemplates = async function () {
|
||||||
'systems/daggerheart/templates/sheets/global/partials/action-item.hbs',
|
'systems/daggerheart/templates/sheets/global/partials/action-item.hbs',
|
||||||
'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs',
|
'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs',
|
||||||
'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs',
|
'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs',
|
||||||
'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-features.hbs',
|
|
||||||
'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-feature.hbs',
|
|
||||||
'systems/daggerheart/templates/components/card-preview.hbs',
|
'systems/daggerheart/templates/components/card-preview.hbs',
|
||||||
'systems/daggerheart/templates/levelup/parts/selectable-card-preview.hbs',
|
'systems/daggerheart/templates/levelup/parts/selectable-card-preview.hbs',
|
||||||
'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs',
|
'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs',
|
||||||
|
|
|
||||||
|
|
@ -2099,74 +2099,6 @@ div.daggerheart.views.multiclass {
|
||||||
.daggerheart.views.roll-selection #roll-selection-costSelection footer {
|
.daggerheart.views.roll-selection #roll-selection-costSelection footer {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .disadvantage,
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .advantage {
|
|
||||||
border: 2px solid #708090;
|
|
||||||
border-radius: 6px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 4px;
|
|
||||||
margin-bottom: 6px;
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .disadvantage.selected,
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .advantage.selected {
|
|
||||||
filter: drop-shadow(0px 0px 3px red);
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .disadvantage input,
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .advantage input {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .disadvantage button,
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .advantage button {
|
|
||||||
flex: 0;
|
|
||||||
border-radius: 50%;
|
|
||||||
height: 20px;
|
|
||||||
width: 20px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin: 2px 0 2px 4px;
|
|
||||||
padding: 12px;
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .disadvantage button i,
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .advantage button i {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .roll-dialog-experience-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .roll-dialog-experience-container .roll-dialog-chip {
|
|
||||||
border: 1px solid black;
|
|
||||||
border-radius: 6px;
|
|
||||||
min-width: calc(33% - 2px);
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 4px;
|
|
||||||
background: grey;
|
|
||||||
overflow: hidden;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .roll-dialog-experience-container .roll-dialog-chip.hover {
|
|
||||||
filter: drop-shadow(0 0 3px red);
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .roll-dialog-experience-container .roll-dialog-chip span {
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .roll-dialog-experience-container .roll-dialog-chip.selected {
|
|
||||||
background: green;
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .roll-dialog-experience-container .roll-dialog-chip.selected span {
|
|
||||||
filter: drop-shadow(0 0 3px gold);
|
|
||||||
}
|
|
||||||
.daggerheart.views.roll-selection .roll-dialog-container .hope-container {
|
.daggerheart.views.roll-selection .roll-dialog-container .hope-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
@ -2217,25 +2149,6 @@ div.daggerheart.views.multiclass {
|
||||||
.daggerheart.views.npc-roll-selection .npc-roll-dialog-container .selection-container .dice-container .advantage-container .advantage-button:hover {
|
.daggerheart.views.npc-roll-selection .npc-roll-dialog-container .selection-container .dice-container .advantage-container .advantage-button:hover {
|
||||||
background: var(--button-hover-background-color);
|
background: var(--button-hover-background-color);
|
||||||
}
|
}
|
||||||
.daggerheart.views.npc-roll-selection .npc-roll-dialog-container .roll-dialog-experience-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 4px;
|
|
||||||
flex: 1;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.daggerheart.views.npc-roll-selection .npc-roll-dialog-container .roll-dialog-experience-container .experience-chip {
|
|
||||||
opacity: 0.6;
|
|
||||||
border-radius: 16px;
|
|
||||||
width: calc(50% - 4px);
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.daggerheart.views.npc-roll-selection .npc-roll-dialog-container .roll-dialog-experience-container .experience-chip.active,
|
|
||||||
.daggerheart.views.npc-roll-selection .npc-roll-dialog-container .roll-dialog-experience-container .experience-chip:hover {
|
|
||||||
opacity: 1;
|
|
||||||
background: var(--button-hover-background-color);
|
|
||||||
}
|
|
||||||
.daggerheart.views.multiclass .multiclass-container {
|
.daggerheart.views.multiclass .multiclass-container {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
@ -3708,16 +3621,16 @@ div.daggerheart.views.multiclass {
|
||||||
.daggerheart.dh-style.setting .trait-array-container .trait-array-item input {
|
.daggerheart.dh-style.setting .trait-array-container .trait-array-item input {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.themed.theme-dark .application.sheet.dh-style .character-header-sheet .trait,
|
.themed.theme-dark .application.daggerheart.sheet.dh-style .character-header-sheet .trait,
|
||||||
.themed.theme-dark.application.sheet.dh-style .character-header-sheet .trait,
|
.themed.theme-dark.application.daggerheart.sheet.dh-style .character-header-sheet .trait,
|
||||||
body.theme-dark .application .character-header-sheet .trait,
|
body.theme-dark .application.daggerheart .character-header-sheet .trait,
|
||||||
body.theme-dark.application .character-header-sheet .trait {
|
body.theme-dark.application.daggerheart .character-header-sheet .trait {
|
||||||
background: url(../assets/svg/trait-shield.svg) no-repeat;
|
background: url(../assets/svg/trait-shield.svg) no-repeat;
|
||||||
}
|
}
|
||||||
.themed.theme-light .application.sheet.dh-style .character-header-sheet .trait,
|
.themed.theme-light .application.daggerheart.sheet.dh-style .character-header-sheet .trait,
|
||||||
.themed.theme-light.application.sheet.dh-style .character-header-sheet .trait,
|
.themed.theme-light.application.daggerheart.sheet.dh-style .character-header-sheet .trait,
|
||||||
body.theme-light .application .character-header-sheet .trait,
|
body.theme-light .application.daggerheart .character-header-sheet .trait,
|
||||||
body.theme-light.application .character-header-sheet .trait {
|
body.theme-light.application.daggerheart .character-header-sheet .trait {
|
||||||
background: url('../assets/svg/trait-shield-light.svg') no-repeat;
|
background: url('../assets/svg/trait-shield-light.svg') no-repeat;
|
||||||
}
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet {
|
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet {
|
||||||
|
|
@ -3880,28 +3793,28 @@ body.theme-light.application .character-header-sheet .trait {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.themed.theme-dark .application.sheet.dh-style .character-sidebar-sheet,
|
.themed.theme-dark .application.daggerheart.sheet.dh-style .character-sidebar-sheet,
|
||||||
.themed.theme-dark.application.sheet.dh-style .character-sidebar-sheet,
|
.themed.theme-dark.application.daggerheart.sheet.dh-style .character-sidebar-sheet,
|
||||||
body.theme-dark .application .character-sidebar-sheet,
|
body.theme-dark .application.daggerheart .character-sidebar-sheet,
|
||||||
body.theme-dark.application .character-sidebar-sheet {
|
body.theme-dark.application.daggerheart .character-sidebar-sheet {
|
||||||
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||||
}
|
}
|
||||||
.themed.theme-dark .application.sheet.dh-style .character-sidebar-sheet .experience-value,
|
.themed.theme-dark .application.daggerheart.sheet.dh-style .character-sidebar-sheet .experience-value,
|
||||||
.themed.theme-dark.application.sheet.dh-style .character-sidebar-sheet .experience-value,
|
.themed.theme-dark.application.daggerheart.sheet.dh-style .character-sidebar-sheet .experience-value,
|
||||||
body.theme-dark .application .character-sidebar-sheet .experience-value,
|
body.theme-dark .application.daggerheart .character-sidebar-sheet .experience-value,
|
||||||
body.theme-dark.application .character-sidebar-sheet .experience-value {
|
body.theme-dark.application.daggerheart .character-sidebar-sheet .experience-value {
|
||||||
background: url(../assets/svg/experience-shield.svg) no-repeat;
|
background: url(../assets/svg/experience-shield.svg) no-repeat;
|
||||||
}
|
}
|
||||||
.themed.theme-light .application.sheet.dh-style .character-sidebar-sheet,
|
.themed.theme-light .application.daggerheart.sheet.dh-style .character-sidebar-sheet,
|
||||||
.themed.theme-light.application.sheet.dh-style .character-sidebar-sheet,
|
.themed.theme-light.application.daggerheart.sheet.dh-style .character-sidebar-sheet,
|
||||||
body.theme-light .application .character-sidebar-sheet,
|
body.theme-light .application.daggerheart .character-sidebar-sheet,
|
||||||
body.theme-light.application .character-sidebar-sheet {
|
body.theme-light.application.daggerheart .character-sidebar-sheet {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
.themed.theme-light .application.sheet.dh-style .character-sidebar-sheet .experience-value,
|
.themed.theme-light .application.daggerheart.sheet.dh-style .character-sidebar-sheet .experience-value,
|
||||||
.themed.theme-light.application.sheet.dh-style .character-sidebar-sheet .experience-value,
|
.themed.theme-light.application.daggerheart.sheet.dh-style .character-sidebar-sheet .experience-value,
|
||||||
body.theme-light .application .character-sidebar-sheet .experience-value,
|
body.theme-light .application.daggerheart .character-sidebar-sheet .experience-value,
|
||||||
body.theme-light.application .character-sidebar-sheet .experience-value {
|
body.theme-light.application.daggerheart .character-sidebar-sheet .experience-value {
|
||||||
background: url('../assets/svg/experience-shield-light.svg') no-repeat;
|
background: url('../assets/svg/experience-shield-light.svg') no-repeat;
|
||||||
}
|
}
|
||||||
.application.sheet.dh-style .character-sidebar-sheet {
|
.application.sheet.dh-style .character-sidebar-sheet {
|
||||||
|
|
@ -4825,16 +4738,16 @@ body.theme-light.application .character-sidebar-sheet .experience-value {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
}
|
}
|
||||||
.themed.theme-dark .application.sheet.dh-style.environment,
|
.themed.theme-dark .application.daggerheart.sheet.dh-style.environment,
|
||||||
.themed.theme-dark.application.sheet.dh-style.environment,
|
.themed.theme-dark.application.daggerheart.sheet.dh-style.environment,
|
||||||
body.theme-dark .application.environment,
|
body.theme-dark .application.daggerheart.environment,
|
||||||
body.theme-dark.application.environment {
|
body.theme-dark.application.daggerheart.environment {
|
||||||
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||||
}
|
}
|
||||||
.themed.theme-light .application.sheet.dh-style.environment,
|
.themed.theme-light .application.daggerheart.sheet.dh-style.environment,
|
||||||
.themed.theme-light.application.sheet.dh-style.environment,
|
.themed.theme-light.application.daggerheart.sheet.dh-style.environment,
|
||||||
body.theme-light .application.environment,
|
body.theme-light .application.daggerheart.environment,
|
||||||
body.theme-light.application.environment {
|
body.theme-light.application.daggerheart.environment {
|
||||||
background: url('../assets/parchments/dh-parchment-light.png');
|
background: url('../assets/parchments/dh-parchment-light.png');
|
||||||
}
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.environment .tab {
|
.application.sheet.daggerheart.actor.dh-style.environment .tab {
|
||||||
|
|
@ -4884,122 +4797,78 @@ body.theme-light.application.environment {
|
||||||
.application.daggerheart.dh-style.dialog .tab.experiences .experience-list .experience-item a {
|
.application.daggerheart.dh-style.dialog .tab.experiences .experience-list .experience-item a {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions {
|
.application.daggerheart.dh-style.dialog .tab.features {
|
||||||
max-height: 450px;
|
max-height: 450px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
scrollbar-color: light-dark(#18162e, #f3c267) transparent;
|
scrollbar-color: light-dark(#18162e, #f3c267) transparent;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .add-action-btn {
|
.application.daggerheart.dh-style.dialog .tab.features .add-feature-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .action-list {
|
.application.daggerheart.dh-style.dialog .tab.features .feature-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item {
|
.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 40px 1fr auto;
|
grid-template-columns: 40px 1fr auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item img {
|
.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item img {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label {
|
.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item .label {
|
||||||
font-family: 'Montserrat', sans-serif;
|
font-family: 'Montserrat', sans-serif;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label .tags {
|
.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item .controls {
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label .tags .tag {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 3px 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
background: light-dark(#22222215, #efe6d815);
|
|
||||||
border: 1px solid light-dark(#222, #efe6d8);
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label .tags .label {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .controls {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .controls a {
|
.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item .controls a {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions {
|
.application.daggerheart.dh-style.dialog.environment-settings .tab.features {
|
||||||
max-height: 450px;
|
max-height: 450px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
scrollbar-color: light-dark(#18162e, #f3c267) transparent;
|
scrollbar-color: light-dark(#18162e, #f3c267) transparent;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .add-action-btn {
|
.application.daggerheart.dh-style.dialog.environment-settings .tab.features .add-feature-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list {
|
.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item {
|
.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 40px 1fr auto;
|
grid-template-columns: 40px 1fr auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item img {
|
.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item img {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .label {
|
.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item .label {
|
||||||
font-family: 'Montserrat', sans-serif;
|
font-family: 'Montserrat', sans-serif;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .label .tags {
|
.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item .controls {
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .label .tags .tag {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 3px 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
background: light-dark(#22222215, #efe6d815);
|
|
||||||
border: 1px solid light-dark(#222, #efe6d8);
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .label .tags .label {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .controls {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .controls a {
|
.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item .controls a {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.application.daggerheart.dh-style.dialog .tab.adversaries {
|
.application.daggerheart.dh-style.dialog .tab.adversaries {
|
||||||
|
|
@ -5326,16 +5195,16 @@ body.theme-light.application.environment {
|
||||||
.theme-light .application.sheet.daggerheart.actor.dh-style.companion .experience-list .experience-value {
|
.theme-light .application.sheet.daggerheart.actor.dh-style.companion .experience-list .experience-value {
|
||||||
background: url('../assets/svg/experience-shield-light.svg') no-repeat;
|
background: url('../assets/svg/experience-shield-light.svg') no-repeat;
|
||||||
}
|
}
|
||||||
.themed.theme-dark .application.sheet.dh-style.companion,
|
.themed.theme-dark .application.daggerheart.sheet.dh-style.companion,
|
||||||
.themed.theme-dark.application.sheet.dh-style.companion,
|
.themed.theme-dark.application.daggerheart.sheet.dh-style.companion,
|
||||||
body.theme-dark .application.companion,
|
body.theme-dark .application.daggerheart.companion,
|
||||||
body.theme-dark.application.companion {
|
body.theme-dark.application.daggerheart.companion {
|
||||||
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||||
}
|
}
|
||||||
.themed.theme-light .application.sheet.dh-style.companion,
|
.themed.theme-light .application.daggerheart.sheet.dh-style.companion,
|
||||||
.themed.theme-light.application.sheet.dh-style.companion,
|
.themed.theme-light.application.daggerheart.sheet.dh-style.companion,
|
||||||
body.theme-light .application.companion,
|
body.theme-light .application.daggerheart.companion,
|
||||||
body.theme-light.application.companion {
|
body.theme-light.application.daggerheart.companion {
|
||||||
background: url('../assets/parchments/dh-parchment-light.png');
|
background: url('../assets/parchments/dh-parchment-light.png');
|
||||||
}
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .window-content {
|
.application.sheet.daggerheart.actor.dh-style.adversary .window-content {
|
||||||
|
|
@ -5420,6 +5289,111 @@ body.theme-light.application.companion {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .dices-section {
|
||||||
|
display: flex;
|
||||||
|
gap: 60px;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .dices-section .dice-option {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .dices-section .dice-option .dice-icon {
|
||||||
|
width: 70px;
|
||||||
|
height: 70px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .dices-section .dice-option .dice-select {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .dices-section .dice-option .dice-select .label {
|
||||||
|
font-family: 'Cinzel', serif;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 19px;
|
||||||
|
color: light-dark(#222, #efe6d8);
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .experience-container {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .experience-container .experience-chip {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 5px;
|
||||||
|
width: fit-content;
|
||||||
|
gap: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 5px;
|
||||||
|
background: light-dark(#18162e10, #f3c26710);
|
||||||
|
color: light-dark(#18162e, #f3c267);
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .experience-container .experience-chip .label {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 17px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .experience-container .experience-chip.selected {
|
||||||
|
background: light-dark(#18162e40, #f3c26740);
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .modifier-container .advantage-chip,
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .modifier-container .disadvantage-chip {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 5px;
|
||||||
|
width: fit-content;
|
||||||
|
gap: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 5px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .modifier-container .advantage-chip .label,
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .modifier-container .disadvantage-chip .label {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 17px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .modifier-container .advantage-chip {
|
||||||
|
background: #40a64010;
|
||||||
|
color: #40a640;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .modifier-container .advantage-chip.selected {
|
||||||
|
color: #efe6d8;
|
||||||
|
background: linear-gradient(151.21deg, #40a640 7.21%, #011b01 92.79%);
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .modifier-container .disadvantage-chip {
|
||||||
|
background: #e54e4e10;
|
||||||
|
color: #e54e4e;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .modifier-container .disadvantage-chip.selected {
|
||||||
|
color: #efe6d8;
|
||||||
|
background: linear-gradient(151.21deg, #e54e4e 7.21%, #3c0000 92.79%);
|
||||||
|
}
|
||||||
|
.application.daggerheart.dialog.dh-style.views.roll-selection .roll-dialog-container .formula-label {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 17px;
|
||||||
|
color: light-dark(#222, #efe6d8);
|
||||||
|
}
|
||||||
@keyframes glow {
|
@keyframes glow {
|
||||||
0% {
|
0% {
|
||||||
box-shadow: 0 0 1px 1px #f3c267;
|
box-shadow: 0 0 1px 1px #f3c267;
|
||||||
|
|
@ -5513,17 +5487,17 @@ body.theme-light.application.companion {
|
||||||
* @param {Rules} @darkRules - Styles to apply when `.theme-dark` is present
|
* @param {Rules} @darkRules - Styles to apply when `.theme-dark` is present
|
||||||
* @param {Rules} @lightRules - Styles to apply when `.theme-light` is present
|
* @param {Rules} @lightRules - Styles to apply when `.theme-light` is present
|
||||||
*/
|
*/
|
||||||
.themed.theme-dark .application.sheet.dh-style,
|
.themed.theme-dark .application.daggerheart.sheet.dh-style,
|
||||||
.themed.theme-dark.application.sheet.dh-style,
|
.themed.theme-dark.application.daggerheart.sheet.dh-style,
|
||||||
body.theme-dark .application,
|
body.theme-dark .application.daggerheart,
|
||||||
body.theme-dark.application {
|
body.theme-dark.application.daggerheart {
|
||||||
background: rgba(24, 22, 46, 0.33);
|
background: rgba(24, 22, 46, 0.33);
|
||||||
backdrop-filter: blur(9px);
|
backdrop-filter: blur(9px);
|
||||||
}
|
}
|
||||||
.themed.theme-light .application.sheet.dh-style,
|
.themed.theme-light .application.daggerheart.sheet.dh-style,
|
||||||
.themed.theme-light.application.sheet.dh-style,
|
.themed.theme-light.application.daggerheart.sheet.dh-style,
|
||||||
body.theme-light .application,
|
body.theme-light .application.daggerheart,
|
||||||
body.theme-light.application {
|
body.theme-light.application.daggerheart {
|
||||||
background: url('../assets/parchments/dh-parchment-light.png') no-repeat center;
|
background: url('../assets/parchments/dh-parchment-light.png') no-repeat center;
|
||||||
}
|
}
|
||||||
.application.sheet.dh-style {
|
.application.sheet.dh-style {
|
||||||
|
|
@ -5571,18 +5545,18 @@ body.theme-light.application {
|
||||||
.application.sheet.dh-style:not(.minimized) .window-content {
|
.application.sheet.dh-style:not(.minimized) .window-content {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
.themed.theme-dark .application.sheet.dh-style.dialog,
|
.themed.theme-dark .application.daggerheart.sheet.dh-style.dialog,
|
||||||
.themed.theme-dark.application.sheet.dh-style.dialog,
|
.themed.theme-dark.application.daggerheart.sheet.dh-style.dialog,
|
||||||
body.theme-dark .application.dialog,
|
body.theme-dark .application.daggerheart.dialog,
|
||||||
body.theme-dark.application.dialog {
|
body.theme-dark.application.daggerheart.dialog {
|
||||||
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
.themed.theme-light .application.sheet.dh-style.dialog,
|
.themed.theme-light .application.daggerheart.sheet.dh-style.dialog,
|
||||||
.themed.theme-light.application.sheet.dh-style.dialog,
|
.themed.theme-light.application.daggerheart.sheet.dh-style.dialog,
|
||||||
body.theme-light .application.dialog,
|
body.theme-light .application.daggerheart.dialog,
|
||||||
body.theme-light.application.dialog {
|
body.theme-light.application.daggerheart.dialog {
|
||||||
background-image: url('../assets/parchments/dh-parchment-light.png');
|
background-image: url('../assets/parchments/dh-parchment-light.png');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@
|
||||||
@import './less/applications/header.less';
|
@import './less/applications/header.less';
|
||||||
@import './less/applications/adversary-settings/sheet.less';
|
@import './less/applications/adversary-settings/sheet.less';
|
||||||
@import './less/applications/adversary-settings/experiences.less';
|
@import './less/applications/adversary-settings/experiences.less';
|
||||||
@import './less/applications/adversary-settings/actions.less';
|
@import './less/applications/adversary-settings/features.less';
|
||||||
|
|
||||||
@import './less/applications/environment-settings/actions.less';
|
@import './less/applications/environment-settings/features.less';
|
||||||
@import './less/applications/environment-settings/adversaries.less';
|
@import './less/applications/environment-settings/adversaries.less';
|
||||||
|
|
||||||
@import './less/applications//beastform.less';
|
@import './less/applications//beastform.less';
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
@import '../../utils/colors.less';
|
@import '../../utils/colors.less';
|
||||||
@import '../../utils/fonts.less';
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary {
|
.application.sheet.daggerheart.actor.dh-style.adversary {
|
||||||
.tab.actions {
|
.tab.features {
|
||||||
.action-section {
|
.feature-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
|
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
height: 95%;
|
height: 95%;
|
||||||
|
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
@import '../../utils/colors.less';
|
|
||||||
@import '../../utils/fonts.less';
|
|
||||||
|
|
||||||
.application.daggerheart.dh-style.dialog {
|
|
||||||
.tab.actions {
|
|
||||||
max-height: 450px;
|
|
||||||
overflow-y: auto;
|
|
||||||
scrollbar-width: thin;
|
|
||||||
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
|
||||||
|
|
||||||
.add-action-btn {
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.action-item {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 40px 1fr auto;
|
|
||||||
align-items: center;
|
|
||||||
gap: 5px;
|
|
||||||
border-radius: 3px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
height: 40px;
|
|
||||||
width: 40px;
|
|
||||||
object-fit: cover;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label {
|
|
||||||
font-family: @font-body;
|
|
||||||
|
|
||||||
.tags {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 3px 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
|
|
||||||
background: light-dark(@dark-15, @beige-15);
|
|
||||||
border: 1px solid light-dark(@dark, @beige);
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.controls {
|
|
||||||
display: flex;
|
|
||||||
gap: 5px;
|
|
||||||
a {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
48
styles/less/applications/adversary-settings/features.less
Normal file
48
styles/less/applications/adversary-settings/features.less
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.daggerheart.dh-style.dialog {
|
||||||
|
.tab.features {
|
||||||
|
max-height: 450px;
|
||||||
|
overflow-y: auto;
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||||
|
|
||||||
|
.add-feature-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.feature-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 40px 1fr auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-family: @font-body;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
a {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
@import '../../utils/colors.less';
|
|
||||||
@import '../../utils/fonts.less';
|
|
||||||
|
|
||||||
.application.daggerheart.dh-style.dialog.environment-settings {
|
|
||||||
.tab.actions {
|
|
||||||
max-height: 450px;
|
|
||||||
overflow-y: auto;
|
|
||||||
scrollbar-width: thin;
|
|
||||||
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
|
||||||
|
|
||||||
.add-action-btn {
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.action-item {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 40px 1fr auto;
|
|
||||||
align-items: center;
|
|
||||||
gap: 5px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
height: 40px;
|
|
||||||
width: 40px;
|
|
||||||
object-fit: cover;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label {
|
|
||||||
font-family: @font-body;
|
|
||||||
|
|
||||||
.tags {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 3px 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
|
|
||||||
background: light-dark(@dark-15, @beige-15);
|
|
||||||
border: 1px solid light-dark(@dark, @beige);
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.controls {
|
|
||||||
display: flex;
|
|
||||||
gap: 5px;
|
|
||||||
a {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
48
styles/less/applications/environment-settings/features.less
Normal file
48
styles/less/applications/environment-settings/features.less
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.daggerheart.dh-style.dialog.environment-settings {
|
||||||
|
.tab.features {
|
||||||
|
max-height: 450px;
|
||||||
|
overflow-y: auto;
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||||
|
|
||||||
|
.add-feature-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.feature-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 40px 1fr auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-family: @font-body;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
a {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,128 +1,128 @@
|
||||||
@import '../../utils/colors.less';
|
@import '../../utils/colors.less';
|
||||||
@import '../../utils/fonts.less';
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
.application.daggerheart.dialog.dh-style.views.roll-selection {
|
.application.daggerheart.dialog.dh-style.views.roll-selection {
|
||||||
.roll-dialog-container {
|
.roll-dialog-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
|
||||||
.dices-section {
|
.dices-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 60px;
|
gap: 60px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.dice-option {
|
.dice-option {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|
||||||
.dice-icon {
|
.dice-icon {
|
||||||
width: 70px;
|
width: 70px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
.dice-select {
|
.dice-select {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
font-family: @font-subtitle;
|
font-family: @font-subtitle;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 19px;
|
line-height: 19px;
|
||||||
|
|
||||||
color: light-dark(@dark, @beige);
|
color: light-dark(@dark, @beige);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.experience-container {
|
.experience-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.experience-chip {
|
.experience-chip {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
background: light-dark(@dark-blue-10, @golden-10);
|
background: light-dark(@dark-blue-10, @golden-10);
|
||||||
color: light-dark(@dark-blue, @golden);
|
color: light-dark(@dark-blue, @golden);
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 17px;
|
line-height: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
background: light-dark(@dark-blue-40, @golden-40);
|
background: light-dark(@dark-blue-40, @golden-40);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.modifier-container {
|
.modifier-container {
|
||||||
.advantage-chip,
|
.advantage-chip,
|
||||||
.disadvantage-chip {
|
.disadvantage-chip {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 17px;
|
line-height: 17px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.advantage-chip {
|
.advantage-chip {
|
||||||
background: @green-10;
|
background: @green-10;
|
||||||
color: @green;
|
color: @green;
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
color: @beige;
|
color: @beige;
|
||||||
background: @gradient-green;
|
background: @gradient-green;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.disadvantage-chip {
|
.disadvantage-chip {
|
||||||
background: @red-10;
|
background: @red-10;
|
||||||
color: @red;
|
color: @red;
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
color: @beige;
|
color: @beige;
|
||||||
background: @gradient-red;
|
background: @gradient-red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.formula-label {
|
.formula-label {
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 17px;
|
line-height: 17px;
|
||||||
|
|
||||||
color: light-dark(@dark, @beige);
|
color: light-dark(@dark, @beige);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
|
|
||||||
data-tab='{{tabs.actions.id}}'
|
|
||||||
data-group='{{tabs.actions.group}}'
|
|
||||||
>
|
|
||||||
<button class="add-action-btn" data-action="addAction">
|
|
||||||
New Action
|
|
||||||
</button>
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize tabs.actions.label}}</legend>
|
|
||||||
<ul class="action-list">
|
|
||||||
{{#each document.system.actions as |action index|}}
|
|
||||||
<li class="action-item">
|
|
||||||
<img src="{{action.img}}" alt="">
|
|
||||||
<div class="label">
|
|
||||||
<span>{{action.name}}</span>
|
|
||||||
<div class="tags">
|
|
||||||
<div class="tag">
|
|
||||||
{{localize (concat 'DAGGERHEART.Actions.Types.' action.type '.name')}}
|
|
||||||
</div>
|
|
||||||
<div class="tag">
|
|
||||||
{{localize (concat 'DAGGERHEART.ActionType.' action.actionType)}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="controls">
|
|
||||||
<a data-action="editAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.edit'}}"><i class="fa-solid fa-pen-to-square"></i></a>
|
|
||||||
<a data-action="removeAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.delete'}}"><i class="fa-solid fa-trash"></i></a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</fieldset>
|
|
||||||
</section>
|
|
||||||
26
templates/sheets-settings/adversary-settings/features.hbs
Normal file
26
templates/sheets-settings/adversary-settings/features.hbs
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
|
||||||
|
data-tab='{{tabs.features.id}}'
|
||||||
|
data-group='{{tabs.features.group}}'
|
||||||
|
>
|
||||||
|
<button class="add-feature-btn" data-action="addFeature">
|
||||||
|
{{localize "DOCUMENT.New" type=(localize "TYPES.Item.feature")}}
|
||||||
|
</button>
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize tabs.features.label}}</legend>
|
||||||
|
<ul class="feature-list">
|
||||||
|
{{#each document.system.features as |feature|}}
|
||||||
|
<li class="feature-item" id="{{feature.id}}">
|
||||||
|
<img src="{{feature.img}}" alt="">
|
||||||
|
<div class="label">
|
||||||
|
<span>{{feature.name}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
<a data-action="editFeature" id="{{feature.id}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.edit'}}"><i class="fa-solid fa-pen-to-square"></i></a>
|
||||||
|
<a data-action="removeFeature" id="{{feature.id}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.delete'}}"><i class="fa-solid fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
|
|
||||||
data-tab='{{tabs.actions.id}}'
|
|
||||||
data-group='{{tabs.actions.group}}'
|
|
||||||
>
|
|
||||||
<button class="add-action-btn" data-action="addAction">
|
|
||||||
New Action
|
|
||||||
</button>
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize tabs.actions.label}}</legend>
|
|
||||||
<ul class="action-list">
|
|
||||||
{{#each document.system.actions as |action index|}}
|
|
||||||
<li class="action-item">
|
|
||||||
<img src="{{action.img}}" alt="">
|
|
||||||
<div class="label">
|
|
||||||
<span>{{action.name}}</span>
|
|
||||||
<div class="tags">
|
|
||||||
<div class="tag">
|
|
||||||
{{localize (concat 'DAGGERHEART.Actions.Types.' action.type '.name')}}
|
|
||||||
</div>
|
|
||||||
<div class="tag">
|
|
||||||
{{localize (concat 'DAGGERHEART.ActionType.' action.actionType)}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="controls">
|
|
||||||
<a data-action="editAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.edit'}}"><i class="fa-solid fa-pen-to-square"></i></a>
|
|
||||||
<a data-action="removeAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.delete'}}"><i class="fa-solid fa-trash"></i></a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</fieldset>
|
|
||||||
</section>
|
|
||||||
26
templates/sheets-settings/environment-settings/features.hbs
Normal file
26
templates/sheets-settings/environment-settings/features.hbs
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
|
||||||
|
data-tab='{{tabs.features.id}}'
|
||||||
|
data-group='{{tabs.features.group}}'
|
||||||
|
>
|
||||||
|
<button class="add-feature-btn" data-action="addFeature">
|
||||||
|
{{localize "DOCUMENT.New" type=(localize "TYPES.Item.feature")}}
|
||||||
|
</button>
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize tabs.features.label}}</legend>
|
||||||
|
<ul class="feature-list">
|
||||||
|
{{#each document.system.features as |feature|}}
|
||||||
|
<li class="feature-item" id="{{feature.id}}">
|
||||||
|
<img src="{{feature.img}}" alt="">
|
||||||
|
<div class="label">
|
||||||
|
<span>{{feature.name}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
<a data-action="editFeature" id="{{feature.id}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.edit'}}"><i class="fa-solid fa-pen-to-square"></i></a>
|
||||||
|
<a data-action="removeFeature" id="{{feature.id}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.delete'}}"><i class="fa-solid fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
|
|
||||||
data-tab='{{tabs.actions.id}}'
|
|
||||||
data-group='{{tabs.actions.group}}'
|
|
||||||
>
|
|
||||||
<div class="action-section">
|
|
||||||
{{#if document.system.actions}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.actions.label) type='action'}}
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
@ -4,5 +4,5 @@
|
||||||
data-group='{{tabs.effects.group}}'
|
data-group='{{tabs.effects.group}}'
|
||||||
>
|
>
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.activeEffects') type='effect'}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.activeEffects') type='effect'}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.inativeEffects') type='effect'}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.inactiveEffects') type='effect'}}
|
||||||
</section>
|
</section>
|
||||||
9
templates/sheets/actors/adversary/features.hbs
Normal file
9
templates/sheets/actors/adversary/features.hbs
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
|
||||||
|
data-tab='{{tabs.features.id}}'
|
||||||
|
data-group='{{tabs.features.group}}'
|
||||||
|
>
|
||||||
|
<div class="feature-section">
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.features.label) type='feature' values=document.system.features hideControls=true}}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
@ -4,5 +4,5 @@
|
||||||
data-group='{{tabs.effects.group}}'
|
data-group='{{tabs.effects.group}}'
|
||||||
>
|
>
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.activeEffects') type='effect'}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.activeEffects') type='effect'}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.inativeEffects') type='effect'}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.inactiveEffects') type='effect'}}
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -4,7 +4,12 @@
|
||||||
data-group='{{tabs.features.group}}'
|
data-group='{{tabs.features.group}}'
|
||||||
>
|
>
|
||||||
<div class="features-sections">
|
<div class="features-sections">
|
||||||
{{#if document.system.class.value}}
|
{{#each document.system.sheetLists}}
|
||||||
|
{{#if this.values}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=this.title values=this.values}}
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
|
{{!-- {{#if document.system.class.value}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.class') ' - ' document.system.class.value.name) type='class'}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.class') ' - ' document.system.class.value.name) type='class'}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if document.system.class.subclass}}
|
{{#if document.system.class.subclass}}
|
||||||
|
|
@ -21,6 +26,6 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if document.system.ancestry}}
|
{{#if document.system.ancestry}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.ancestry') ' - ' document.system.ancestry.name) type='ancestry'}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.ancestry') ' - ' document.system.ancestry.name) type='ancestry'}}
|
||||||
{{/if}}
|
{{/if}} --}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -4,5 +4,5 @@
|
||||||
data-group='{{tabs.effects.group}}'
|
data-group='{{tabs.effects.group}}'
|
||||||
>
|
>
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.activeEffects') type='effect'}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.activeEffects') type='effect'}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.inativeEffects') type='effect'}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.inactiveEffects') type='effect'}}
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
|
|
||||||
data-tab='{{tabs.actions.id}}'
|
|
||||||
data-group='{{tabs.actions.group}}'
|
|
||||||
>
|
|
||||||
<div class="action-section">
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.actions.label) type='action'}}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
9
templates/sheets/actors/environment/features.hbs
Normal file
9
templates/sheets/actors/environment/features.hbs
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
|
||||||
|
data-tab='{{tabs.features.id}}'
|
||||||
|
data-group='{{tabs.features.group}}'
|
||||||
|
>
|
||||||
|
<div class="feature-section">
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.features.label) type='feature' values=document.system.features hideControls=true }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
@ -2,51 +2,29 @@
|
||||||
<legend>{{title}}</legend>
|
<legend>{{title}}</legend>
|
||||||
<ul class="items-list">
|
<ul class="items-list">
|
||||||
{{#unless (eq cardView 'card') }}
|
{{#unless (eq cardView 'card') }}
|
||||||
{{#each document.items as |item|}}
|
{{#if (or (eq type 'domainCard') (eq type 'armor') (eq type 'consumable') (eq type 'miscellaneous') (eq type 'weapon'))}}
|
||||||
{{#if (eq item.type ../type)}}
|
{{#each document.items as |item|}}
|
||||||
{{#unless (or (eq ../type 'ancestry') (eq item.type 'class') (eq item.type 'subclass') (and (eq ../type 'domainCard') (or (and item.system.inVault (not ../isVault)) (and (not item.system.inVault) ../isVault))))}}
|
{{#if (eq item.type ../type)}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=item type=../type}}
|
{{#unless (and (eq ../type 'domainCard') (or (and item.system.inVault (not ../isVault)) (and (not item.system.inVault) ../isVault)))}}
|
||||||
{{/unless}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=item type=../type}}
|
||||||
|
{{/unless}}
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
|
{{else}}
|
||||||
|
{{#if (eq type 'effect')}}
|
||||||
|
{{#each document.effects as |effect|}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=effect type=../type}}
|
||||||
|
{{/each}}
|
||||||
|
{{else}}
|
||||||
|
{{#each values}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=this type=../type hideControls=../hideControls }}
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
{{#each adversaries as |adversary|}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=adversary type='adversary' hideControls=true isActor=true categoryAdversary=@../key}}
|
||||||
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/if}}
|
||||||
{{#each document.system.ancestry.system.actions as |action|}}
|
|
||||||
{{#if (or (eq ../type 'ancestry'))}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=action type=../type}}
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
|
||||||
{{#each document.system.class.value.system.classFeatures as |classFeature|}}
|
|
||||||
{{#if (or (eq ../type 'class'))}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=classFeature type=../type}}
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
|
||||||
{{#each document.system.class.value.system.classFeatures as |classFeature|}}
|
|
||||||
{{#if (or (eq ../type 'class'))}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=classFeature type=../type}}
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
|
||||||
{{#each document.appliedEffects as |effect|}}
|
|
||||||
{{#if (or (eq ../type 'effect'))}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=effect type=../type}}
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
|
||||||
{{#each document.system.actions as |action|}}
|
|
||||||
{{#if (or (eq ../type 'action'))}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=action type=../type}}
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
|
||||||
{{#each document.system.features as |feature|}}
|
|
||||||
{{#if (or (eq ../type 'features'))}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=feature}}
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
|
||||||
{{#each document.system.companionFeatures as |feature|}}
|
|
||||||
{{#if (or (eq ../type 'companionFeatures'))}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=feature companion=true}}
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
|
||||||
{{#each adversaries as |adversary|}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=adversary type='adversary' hideControls=true isActor=true categoryAdversary=@../key}}
|
|
||||||
{{/each}}
|
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<li class="inventory-item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-type="{{type}}" data-companion="{{companion}}">
|
<li class="inventory-item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-type="{{type}}">
|
||||||
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" data-action="useItem" {{#if (not noTooltip)}}data-tooltip="{{concat "#item#" item.uuid}}"{{/if}} />
|
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" data-action="useItem" {{#if (not noTooltip)}}data-tooltip="{{concat "#item#" item.uuid}}"{{/if}} />
|
||||||
<div class="item-label">
|
<div class="item-label">
|
||||||
{{#if isCompanion}}
|
{{#if isCompanion}}
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,17 @@
|
||||||
data-group='{{tabs.features.group}}'
|
data-group='{{tabs.features.group}}'
|
||||||
>
|
>
|
||||||
<fieldset class="one-column drop-section">
|
<fieldset class="one-column drop-section">
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Global.Features"}}</legend>
|
<legend>{{localize "DAGGERHEART.Sheets.Global.Features"}} <a><i data-action="addFeature" class="fa-solid fa-plus icon-button"></i></a></legend>
|
||||||
<div class="features-list">
|
<div class="features-list">
|
||||||
{{#each document.system.features as |feature index|}}
|
{{#each document.system.features as |feature|}}
|
||||||
<div class="feature-item"
|
<div class="feature-item"
|
||||||
data-action="editFeature"
|
data-action="editFeature"
|
||||||
data-index="{{index}}"
|
id="{{feature.id}}"
|
||||||
>
|
>
|
||||||
<img class="image" src="{{feature.img}}" />
|
<img class="image" src="{{feature.img}}" />
|
||||||
<span>{{feature.name}}</span>
|
<span>{{feature.name}}</span>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<a data-action="removeFeature" data-index="{{index}}"><i class="fa-solid fa-trash"></i></a>
|
<a data-action="removeFeature" id="{{feature.id}}"><i class="fa-solid fa-trash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Class.HopeFeatures"}} <a><i class="fa-solid fa-plus icon-button" data-type="hope" data-action="addFeature"></i></a></legend>
|
<legend>{{localize "DAGGERHEART.Sheets.Class.HopeFeatures"}} <a><i class="fa-solid fa-plus icon-button" data-type="hope" data-action="addFeature"></i></a></legend>
|
||||||
<div class="feature-list">
|
<div class="feature-list">
|
||||||
{{#each source.system.hopeFeatures as |feature index|}}
|
{{#each source.system.hopeFeatures as |feature|}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='hope' feature=feature}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='hope' feature=feature}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Class.ClassFeatures"}} <a><i class="fa-solid fa-plus icon-button" data-type="class" data-action="addFeature"></i></a></legend>
|
<legend>{{localize "DAGGERHEART.Sheets.Class.ClassFeatures"}} <a><i class="fa-solid fa-plus icon-button" data-type="class" data-action="addFeature"></i></a></legend>
|
||||||
<div class="feature-list">
|
<div class="feature-list">
|
||||||
{{#each source.system.classFeatures as |feature index|}}
|
{{#each source.system.classFeatures as |feature|}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='class' feature=feature}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='class' feature=feature}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,42 @@
|
||||||
data-tab='{{tabs.features.id}}'
|
data-tab='{{tabs.features.id}}'
|
||||||
data-group='{{tabs.features.group}}'
|
data-group='{{tabs.features.group}}'
|
||||||
>
|
>
|
||||||
<fieldset>
|
<fieldset class="drop-section" data-type="foundationFeature">
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Subclass.Tabs.Foundation"}}</legend>
|
<legend>
|
||||||
{{> 'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-features.hbs' level='foundationFeature' feature=source.system.foundationFeature}}
|
{{localize "DAGGERHEART.Sheets.Subclass.Tabs.Foundation"}}
|
||||||
|
<a {{#if source.system.foundationFeature}}disabled{{/if}}><i data-action="addFeature" data-type="foundationFeature" class="fa-solid fa-plus icon-button {{#if source.system.foundationFeature}}disabled{{/if}}"></i></a>
|
||||||
|
</legend>
|
||||||
|
|
||||||
|
<div class="feature-list">
|
||||||
|
{{#if source.system.foundationFeature}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='foundationFeature' feature=source.system.foundationFeature}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset class="drop-section" data-type="specializationFeature">
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Subclass.Tabs.Specialization"}}</legend>
|
<legend>
|
||||||
{{> 'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-features.hbs' level='specializationFeature' feature=source.system.specializationFeature}}
|
{{localize "DAGGERHEART.Sheets.Subclass.Tabs.Specialization"}}
|
||||||
|
<a {{#if source.system.specializationFeature}}disabled{{/if}}><i data-action="addFeature" data-type="specializationFeature" class="fa-solid fa-plus icon-button {{#if source.system.specializationFeature}}disabled{{/if}}"></i></a>
|
||||||
|
</legend>
|
||||||
|
|
||||||
|
<div class="feature-list">
|
||||||
|
{{#if source.system.specializationFeature}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='specializationFeature' feature=source.system.specializationFeature}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset class="drop-section" data-type="masteryFeature">
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Subclass.Tabs.Mastery"}}</legend>
|
<legend>
|
||||||
{{> 'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-features.hbs' level='masteryFeature' feature=source.system.masteryFeature}}
|
{{localize "DAGGERHEART.Sheets.Subclass.Tabs.Mastery"}}
|
||||||
|
<a {{#if source.system.masteryFeature}}disabled{{/if}}><i data-action="addFeature" data-type="masteryFeature" class="fa-solid fa-plus icon-button {{#if source.system.masteryFeature}}disabled{{/if}}"></i></a>
|
||||||
|
</legend>
|
||||||
|
|
||||||
|
<div class="feature-list">
|
||||||
|
{{#if source.system.masteryFeature}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='masteryFeature' feature=source.system.masteryFeature}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
<li class='feature-item'>
|
|
||||||
<div class='feature-line'>
|
|
||||||
<img class='image' src='{{feature.img}}' />
|
|
||||||
<h4>{{feature.name}}</h4>
|
|
||||||
{{#unless hideContrals}}
|
|
||||||
<div class='controls'>
|
|
||||||
<a
|
|
||||||
class='effect-control'
|
|
||||||
data-action='editFeature'
|
|
||||||
data-type="{{type}}"
|
|
||||||
data-level="{{level}}"
|
|
||||||
data-feature='{{id}}'
|
|
||||||
data-tooltip='{{localize "DAGGERHEART.Tooltip.openItemWorld"}}'
|
|
||||||
>
|
|
||||||
<i class="fa-solid fa-globe"></i>
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
class='effect-control'
|
|
||||||
data-action='deleteFeature'
|
|
||||||
data-type="{{type}}"
|
|
||||||
data-level="{{level}}"
|
|
||||||
data-feature='{{id}}'
|
|
||||||
data-tooltip='{{localize "DAGGERHEART.Tooltip.delete"}}'
|
|
||||||
>
|
|
||||||
<i class='fas fa-trash'></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{{/unless}}
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
<div class="two-columns even">
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Subclass.SubclassFeature.Actions"}} <a><i class="fa-solid fa-plus icon-button" data-level="{{level}}" data-type="action" data-action="addFeature"></i></a></legend>
|
|
||||||
|
|
||||||
<div class="feature-list">
|
|
||||||
{{#each feature.actions}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-feature.hbs' level=../level type="action" id=this._id feature=this}}
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Subclass.SubclassFeature.Effects"}} <a><i class="fa-solid fa-plus icon-button" data-level="{{level}}" data-type="effect" data-action="addFeature"></i></a></legend>
|
|
||||||
|
|
||||||
<div class="feature-list">
|
|
||||||
{{#each feature.effects}}
|
|
||||||
{{> 'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-feature.hbs' level=../level type="effect" id=this.id feature=this}}
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue