Merged with main

This commit is contained in:
WBHarry 2025-08-24 21:31:57 +02:00
commit 990c73987e
65 changed files with 567 additions and 424 deletions

View file

@ -1,6 +1,6 @@
--- ---
name: Feature report name: Feature request
about: Create a feature report for suggestions on improving the system about: Create a feature request for suggestions on improving the system
title: "[Feature] <Insert Title here> " title: "[Feature] <Insert Title here> "
labels: enhancement, discussion, maybe labels: enhancement, discussion, maybe
type: feature type: feature

View file

@ -1926,6 +1926,7 @@
"amount": "Amount", "amount": "Amount",
"any": "Any", "any": "Any",
"armor": "Armor", "armor": "Armor",
"armors": "Armors",
"armorScore": "Armor Score", "armorScore": "Armor Score",
"activeEffects": "Active Effects", "activeEffects": "Active Effects",
"armorSlots": "Armor Slots", "armorSlots": "Armor Slots",
@ -1978,6 +1979,7 @@
"inactiveEffects": "Inactive Effects", "inactiveEffects": "Inactive Effects",
"inventory": "Inventory", "inventory": "Inventory",
"itemResource": "Item Resource", "itemResource": "Item Resource",
"items": "Items",
"label": "Label", "label": "Label",
"level": "Level", "level": "Level",
"levelShort": "Lv", "levelShort": "Lv",
@ -1989,6 +1991,7 @@
"plural": "Miss" "plural": "Miss"
}, },
"maxWithThing": "Max {thing}", "maxWithThing": "Max {thing}",
"missingDragDropThing": "Drop {thing} here",
"multiclass": "Multiclass", "multiclass": "Multiclass",
"newCategory": "New Category", "newCategory": "New Category",
"none": "None", "none": "None",
@ -2010,6 +2013,7 @@
"scalable": "Scalable", "scalable": "Scalable",
"situationalBonus": "Situational Bonus", "situationalBonus": "Situational Bonus",
"stress": "Stress", "stress": "Stress",
"subclasses": "Subclasses",
"success": "Success", "success": "Success",
"take": "Take", "take": "Take",
"Target": { "Target": {
@ -2027,6 +2031,7 @@
"used": "Used", "used": "Used",
"uses": "Uses", "uses": "Uses",
"value": "Value", "value": "Value",
"weapons": "Weapons",
"withThing": "With {thing}" "withThing": "With {thing}"
}, },
"ITEMS": { "ITEMS": {
@ -2460,7 +2465,8 @@
"actionNoUsesRemaining": "That action doesn't have remaining uses.", "actionNoUsesRemaining": "That action doesn't have remaining uses.",
"multiclassAlreadyPresent": "You already have a class and multiclass", "multiclassAlreadyPresent": "You already have a class and multiclass",
"subclassesAlreadyPresent": "You already have a class and multiclass subclass", "subclassesAlreadyPresent": "You already have a class and multiclass subclass",
"noDiceSystem": "Your selected dice {system} does not have a {faces} dice" "noDiceSystem": "Your selected dice {system} does not have a {faces} dice",
"subclassAlreadyLinked": "{name} is already a subclass in the class {class}. Remove it from there if you want it to be a subclass to this class."
}, },
"Tooltip": { "Tooltip": {
"disableEffect": "Disable Effect", "disableEffect": "Disable Effect",

View file

@ -432,12 +432,17 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
} }
}; };
if (type == 'domains') if (type === 'domains')
presets.filter = { presets.filter = {
'level.max': { key: 'level.max', value: 1 }, 'level.max': { key: 'level.max', value: 1 },
'system.domain': { key: 'system.domain', value: this.setup.class?.system.domains ?? null } 'system.domain': { key: 'system.domain', value: this.setup.class?.system.domains ?? null }
}; };
if (type === 'subclasses')
presets.filter = {
'system.linkedClass.uuid': { key: 'system.linkedClass.uuid', value: this.setup.class?.uuid }
};
if (equipment.includes(type)) if (equipment.includes(type))
presets.filter = { presets.filter = {
'system.tier': { key: 'system.tier', value: 1 }, 'system.tier': { key: 'system.tier', value: 1 },

View file

@ -119,6 +119,15 @@ export default class ClassSheet extends DHBaseItemSheet {
const itemType = data.data ? data.type : item.type; const itemType = data.data ? data.type : item.type;
const target = event.target.closest('fieldset.drop-section'); const target = event.target.closest('fieldset.drop-section');
if (itemType === 'subclass') { if (itemType === 'subclass') {
if (item.system.linkedClass) {
return ui.notifications.warn(
game.i18n.format('DAGGERHEART.UI.Notifications.subclassAlreadyLinked', {
name: item.name,
class: this.document.name
})
);
}
await item.update({ 'system.linkedClass': this.document.uuid });
await this.document.update({ await this.document.update({
'system.subclasses': [...this.document.system.subclasses.map(x => x.uuid), item.uuid] 'system.subclasses': [...this.document.system.subclasses.map(x => x.uuid), item.uuid]
}); });
@ -181,6 +190,12 @@ export default class ClassSheet extends DHBaseItemSheet {
static async #removeItemFromCollection(_event, element) { static async #removeItemFromCollection(_event, element) {
const { uuid, target } = element.dataset; const { uuid, target } = element.dataset;
const prop = foundry.utils.getProperty(this.document.system, target); const prop = foundry.utils.getProperty(this.document.system, target);
if (target === 'subclasses') {
const subclass = await foundry.utils.fromUuid(uuid);
await subclass.update({ 'system.linkedClass': null });
}
await this.document.update({ [`system.${target}`]: prop.filter(i => i.uuid !== uuid).map(x => x.uuid) }); await this.document.update({ [`system.${target}`]: prop.filter(i => i.uuid !== uuid).map(x => x.uuid) });
} }

View file

@ -124,11 +124,11 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
_attachPartListeners(partId, htmlElement, options) { _attachPartListeners(partId, htmlElement, options) {
super._attachPartListeners(partId, htmlElement, options); super._attachPartListeners(partId, htmlElement, options);
htmlElement htmlElement.querySelectorAll('[data-action="selectFolder"]').forEach(element =>
.querySelectorAll('[data-action="selectFolder"]') element.addEventListener('contextmenu', event => {
.forEach(element => element.addEventListener("contextmenu", (event) => {
event.target.classList.toggle('expanded'); event.target.classList.toggle('expanded');
})) })
);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -195,8 +195,11 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
this.items = ItemBrowser.sortBy(items, 'name'); this.items = ItemBrowser.sortBy(items, 'name');
if(target) { if (target) {
target.closest('.compendium-sidebar').querySelectorAll('[data-action="selectFolder"]').forEach(element => element.classList.remove("is-selected")) target
.closest('.compendium-sidebar')
.querySelectorAll('[data-action="selectFolder"]')
.forEach(element => element.classList.remove('is-selected'));
target.classList.add('is-selected'); target.classList.add('is-selected');
} }
@ -204,7 +207,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
} }
_replaceHTML(result, content, options) { _replaceHTML(result, content, options) {
if(!options.isFirstRender) delete result.sidebar; if (!options.isFirstRender) delete result.sidebar;
super._replaceHTML(result, content, options); super._replaceHTML(result, content, options);
} }
@ -240,7 +243,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
filters.forEach(f => { filters.forEach(f => {
if (typeof f.field === 'string') f.field = foundry.utils.getProperty(game, f.field); if (typeof f.field === 'string') f.field = foundry.utils.getProperty(game, f.field);
else if (typeof f.choices === 'function') { else if (typeof f.choices === 'function') {
f.choices = f.choices(); f.choices = f.choices(this.items);
} }
// Clear field label so template uses our custom label parameter // Clear field label so template uses our custom label parameter
@ -259,11 +262,8 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
/* -------------------------------------------- */ /* -------------------------------------------- */
/** /**
* Create and initialize search filter instances for the inventory and loadout sections. * Create and initialize search filter instance.
* *
* Sets up two {@link foundry.applications.ux.SearchFilter} instances:
* - One for the inventory, which filters items in the inventory grid.
* - One for the loadout, which filters items in the loadout/card grid.
* @private * @private
*/ */
_createSearchFilter() { _createSearchFilter() {

View file

@ -2,270 +2,278 @@ export const typeConfig = {
adversaries: { adversaries: {
columns: [ columns: [
{ {
key: "system.tier", key: 'system.tier',
label: "DAGGERHEART.GENERAL.Tiers.singular" label: 'DAGGERHEART.GENERAL.Tiers.singular'
}, },
{ {
key: "system.type", key: 'system.type',
label: "DAGGERHEART.GENERAL.type" label: 'DAGGERHEART.GENERAL.type'
} }
], ],
filters: [ filters: [
{ {
key: "system.tier", key: 'system.tier',
label: "DAGGERHEART.GENERAL.Tiers.singular", label: 'DAGGERHEART.GENERAL.Tiers.singular',
field: 'system.api.models.actors.DhAdversary.schema.fields.tier' field: 'system.api.models.actors.DhAdversary.schema.fields.tier'
}, },
{ {
key: "system.type", key: 'system.type',
label: "DAGGERHEART.GENERAL.type", label: 'DAGGERHEART.GENERAL.type',
field: 'system.api.models.actors.DhAdversary.schema.fields.type' field: 'system.api.models.actors.DhAdversary.schema.fields.type'
}, },
{ {
key: "system.difficulty", key: 'system.difficulty',
name: "difficulty.min", name: 'difficulty.min',
label: "DAGGERHEART.UI.ItemBrowser.difficultyMin", label: 'DAGGERHEART.UI.ItemBrowser.difficultyMin',
field: 'system.api.models.actors.DhAdversary.schema.fields.difficulty', field: 'system.api.models.actors.DhAdversary.schema.fields.difficulty',
operator: "gte" operator: 'gte'
}, },
{ {
key: "system.difficulty", key: 'system.difficulty',
name: "difficulty.max", name: 'difficulty.max',
label: "DAGGERHEART.UI.ItemBrowser.difficultyMax", label: 'DAGGERHEART.UI.ItemBrowser.difficultyMax',
field: 'system.api.models.actors.DhAdversary.schema.fields.difficulty', field: 'system.api.models.actors.DhAdversary.schema.fields.difficulty',
operator: "lte" operator: 'lte'
}, },
{ {
key: "system.resources.hitPoints.max", key: 'system.resources.hitPoints.max',
name: "hp.min", name: 'hp.min',
label: "DAGGERHEART.UI.ItemBrowser.hitPointsMin", label: 'DAGGERHEART.UI.ItemBrowser.hitPointsMin',
field: 'system.api.models.actors.DhAdversary.schema.fields.resources.fields.hitPoints.fields.max', field: 'system.api.models.actors.DhAdversary.schema.fields.resources.fields.hitPoints.fields.max',
operator: "gte" operator: 'gte'
}, },
{ {
key: "system.resources.hitPoints.max", key: 'system.resources.hitPoints.max',
name: "hp.max", name: 'hp.max',
label: "DAGGERHEART.UI.ItemBrowser.hitPointsMax", label: 'DAGGERHEART.UI.ItemBrowser.hitPointsMax',
field: 'system.api.models.actors.DhAdversary.schema.fields.resources.fields.hitPoints.fields.max', field: 'system.api.models.actors.DhAdversary.schema.fields.resources.fields.hitPoints.fields.max',
operator: "lte" operator: 'lte'
}, },
{ {
key: "system.resources.stress.max", key: 'system.resources.stress.max',
name: "stress.min", name: 'stress.min',
label: "DAGGERHEART.UI.ItemBrowser.stressMin", label: 'DAGGERHEART.UI.ItemBrowser.stressMin',
field: 'system.api.models.actors.DhAdversary.schema.fields.resources.fields.stress.fields.max', field: 'system.api.models.actors.DhAdversary.schema.fields.resources.fields.stress.fields.max',
operator: "gte" operator: 'gte'
}, },
{ {
key: "system.resources.stress.max", key: 'system.resources.stress.max',
name: "stress.max", name: 'stress.max',
label: "DAGGERHEART.UI.ItemBrowser.stressMax", label: 'DAGGERHEART.UI.ItemBrowser.stressMax',
field: 'system.api.models.actors.DhAdversary.schema.fields.resources.fields.stress.fields.max', field: 'system.api.models.actors.DhAdversary.schema.fields.resources.fields.stress.fields.max',
operator: "lte" operator: 'lte'
}, }
] ]
}, },
items: { items: {
columns: [ columns: [
{ {
key: "type", key: 'type',
label: "DAGGERHEART.GENERAL.type" label: 'DAGGERHEART.GENERAL.type'
}, },
{ {
key: "system.secondary", key: 'system.secondary',
label: "DAGGERHEART.UI.ItemBrowser.subtype", label: 'DAGGERHEART.UI.ItemBrowser.subtype',
format: (isSecondary) => isSecondary ? "secondary" : (isSecondary === false ? "primary" : '-') format: isSecondary => (isSecondary ? 'secondary' : isSecondary === false ? 'primary' : '-')
}, },
{ {
key: "system.tier", key: 'system.tier',
label: "DAGGERHEART.GENERAL.Tiers.singular" label: 'DAGGERHEART.GENERAL.Tiers.singular'
} }
], ],
filters: [ filters: [
{ {
key: "type", key: 'type',
label: "DAGGERHEART.GENERAL.type", label: 'DAGGERHEART.GENERAL.type',
choices: () => CONFIG.Item.documentClass.TYPES.filter(t => ["armor", "weapon", "consumable", "loot"].includes(t)).map(t => ({ value: t, label: t })) choices: () =>
CONFIG.Item.documentClass.TYPES.filter(t =>
['armor', 'weapon', 'consumable', 'loot'].includes(t)
).map(t => ({ value: t, label: t }))
}, },
{ {
key: "system.secondary", key: 'system.secondary',
label: "DAGGERHEART.UI.ItemBrowser.subtype", label: 'DAGGERHEART.UI.ItemBrowser.subtype',
choices: [ choices: [
{ value: false, label: "DAGGERHEART.ITEMS.Weapon.primaryWeapon" }, { value: false, label: 'DAGGERHEART.ITEMS.Weapon.primaryWeapon' },
{ value: true, label: "DAGGERHEART.ITEMS.Weapon.secondaryWeapon" } { value: true, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon' }
] ]
}, },
{ {
key: "system.tier", key: 'system.tier',
label: "DAGGERHEART.GENERAL.Tiers.singular", label: 'DAGGERHEART.GENERAL.Tiers.singular',
choices: [{ value: "1", label: "1" }, { value: "2", label: "2" }, { value: "3", label: "3" }, { value: "4", label: "4" }] choices: [
{ value: '1', label: '1' },
{ value: '2', label: '2' },
{ value: '3', label: '3' },
{ value: '4', label: '4' }
]
}, },
{ {
key: "system.burden", key: 'system.burden',
label: "DAGGERHEART.GENERAL.burden", label: 'DAGGERHEART.GENERAL.burden',
field: 'system.api.models.items.DHWeapon.schema.fields.burden' field: 'system.api.models.items.DHWeapon.schema.fields.burden'
}, },
{ {
key: "system.attack.roll.trait", key: 'system.attack.roll.trait',
label: "DAGGERHEART.GENERAL.Trait.single", label: 'DAGGERHEART.GENERAL.Trait.single',
field: 'system.api.models.actions.actionsTypes.attack.schema.fields.roll.fields.trait' field: 'system.api.models.actions.actionsTypes.attack.schema.fields.roll.fields.trait'
}, },
{ {
key: "system.attack.range", key: 'system.attack.range',
label: "DAGGERHEART.GENERAL.range", label: 'DAGGERHEART.GENERAL.range',
field: 'system.api.models.actions.actionsTypes.attack.schema.fields.range' field: 'system.api.models.actions.actionsTypes.attack.schema.fields.range'
}, },
{ {
key: "system.baseScore", key: 'system.baseScore',
name: "armor.min", name: 'armor.min',
label: "DAGGERHEART.UI.ItemBrowser.armorScoreMin", label: 'DAGGERHEART.UI.ItemBrowser.armorScoreMin',
field: 'system.api.models.items.DHArmor.schema.fields.baseScore', field: 'system.api.models.items.DHArmor.schema.fields.baseScore',
operator: "gte" operator: 'gte'
}, },
{ {
key: "system.baseScore", key: 'system.baseScore',
name: "armor.max", name: 'armor.max',
label: "DAGGERHEART.UI.ItemBrowser.armorScoreMax", label: 'DAGGERHEART.UI.ItemBrowser.armorScoreMax',
field: 'system.api.models.items.DHArmor.schema.fields.baseScore', field: 'system.api.models.items.DHArmor.schema.fields.baseScore',
operator: "lte" operator: 'lte'
}, },
{ {
key: "system.itemFeatures", key: 'system.itemFeatures',
label: "DAGGERHEART.GENERAL.features", label: 'DAGGERHEART.GENERAL.features',
choices: () => [...Object.entries(CONFIG.DH.ITEM.weaponFeatures), ...Object.entries(CONFIG.DH.ITEM.armorFeatures)].map(([k, v]) => ({ value: k, label: v.label })), choices: () =>
operator: "contains3" [
...Object.entries(CONFIG.DH.ITEM.weaponFeatures),
...Object.entries(CONFIG.DH.ITEM.armorFeatures)
].map(([k, v]) => ({ value: k, label: v.label })),
operator: 'contains3'
} }
] ]
}, },
features: { features: {
columns: [ columns: [],
filters: []
],
filters: [
]
}, },
cards: { cards: {
columns: [ columns: [
{ {
key: "system.type", key: 'system.type',
label: "DAGGERHEART.GENERAL.type" label: 'DAGGERHEART.GENERAL.type'
}, },
{ {
key: "system.domain", key: 'system.domain',
label: "DAGGERHEART.GENERAL.Domain.single" label: 'DAGGERHEART.GENERAL.Domain.single'
}, },
{ {
key: "system.level", key: 'system.level',
label: "DAGGERHEART.GENERAL.level" label: 'DAGGERHEART.GENERAL.level'
} }
], ],
filters: [ filters: [
{ {
key: "system.type", key: 'system.type',
label: "DAGGERHEART.GENERAL.type", label: 'DAGGERHEART.GENERAL.type',
field: 'system.api.models.items.DHDomainCard.schema.fields.type' field: 'system.api.models.items.DHDomainCard.schema.fields.type'
}, },
{ {
key: "system.domain", key: 'system.domain',
label: "DAGGERHEART.GENERAL.Domain.single", label: 'DAGGERHEART.GENERAL.Domain.single',
field: 'system.api.models.items.DHDomainCard.schema.fields.domain', field: 'system.api.models.items.DHDomainCard.schema.fields.domain',
operator: "contains2" operator: 'contains2'
}, },
{ {
key: "system.level", key: 'system.level',
name: "level.min", name: 'level.min',
label: "DAGGERHEART.UI.ItemBrowser.levelMin", label: 'DAGGERHEART.UI.ItemBrowser.levelMin',
field: 'system.api.models.items.DHDomainCard.schema.fields.level', field: 'system.api.models.items.DHDomainCard.schema.fields.level',
operator: "gte" operator: 'gte'
}, },
{ {
key: "system.level", key: 'system.level',
name: "level.max", name: 'level.max',
label: "DAGGERHEART.UI.ItemBrowser.levelMax", label: 'DAGGERHEART.UI.ItemBrowser.levelMax',
field: 'system.api.models.items.DHDomainCard.schema.fields.level', field: 'system.api.models.items.DHDomainCard.schema.fields.level',
operator: "lte" operator: 'lte'
}, },
{ {
key: "system.recallCost", key: 'system.recallCost',
name: "recall.min", name: 'recall.min',
label: "DAGGERHEART.UI.ItemBrowser.recallCostMin", label: 'DAGGERHEART.UI.ItemBrowser.recallCostMin',
field: 'system.api.models.items.DHDomainCard.schema.fields.recallCost', field: 'system.api.models.items.DHDomainCard.schema.fields.recallCost',
operator: "gte" operator: 'gte'
}, },
{ {
key: "system.recallCost", key: 'system.recallCost',
name: "recall.max", name: 'recall.max',
label: "DAGGERHEART.UI.ItemBrowser.recallCostMax", label: 'DAGGERHEART.UI.ItemBrowser.recallCostMax',
field: 'system.api.models.items.DHDomainCard.schema.fields.recallCost', field: 'system.api.models.items.DHDomainCard.schema.fields.recallCost',
operator: "lte" operator: 'lte'
} }
] ]
}, },
classes: { classes: {
columns: [ columns: [
{ {
key: "system.evasion", key: 'system.evasion',
label: "DAGGERHEART.GENERAL.evasion" label: 'DAGGERHEART.GENERAL.evasion'
}, },
{ {
key: "system.hitPoints", key: 'system.hitPoints',
label: "DAGGERHEART.GENERAL.HitPoints.plural" label: 'DAGGERHEART.GENERAL.HitPoints.plural'
}, },
{ {
key: "system.domains", key: 'system.domains',
label: "DAGGERHEART.GENERAL.Domain.plural" label: 'DAGGERHEART.GENERAL.Domain.plural'
} }
], ],
filters: [ filters: [
{ {
key: "system.evasion", key: 'system.evasion',
name: "evasion.min", name: 'evasion.min',
label: "DAGGERHEART.UI.ItemBrowser.evasionMin", label: 'DAGGERHEART.UI.ItemBrowser.evasionMin',
field: 'system.api.models.items.DHClass.schema.fields.evasion', field: 'system.api.models.items.DHClass.schema.fields.evasion',
operator: "gte" operator: 'gte'
}, },
{ {
key: "system.evasion", key: 'system.evasion',
name: "evasion.max", name: 'evasion.max',
label: "DAGGERHEART.UI.ItemBrowser.evasionMax", label: 'DAGGERHEART.UI.ItemBrowser.evasionMax',
field: 'system.api.models.items.DHClass.schema.fields.evasion', field: 'system.api.models.items.DHClass.schema.fields.evasion',
operator: "lte" operator: 'lte'
}, },
{ {
key: "system.hitPoints", key: 'system.hitPoints',
name: "hp.min", name: 'hp.min',
label: "DAGGERHEART.UI.ItemBrowser.hitPointsMin", label: 'DAGGERHEART.UI.ItemBrowser.hitPointsMin',
field: 'system.api.models.items.DHClass.schema.fields.hitPoints', field: 'system.api.models.items.DHClass.schema.fields.hitPoints',
operator: "gte" operator: 'gte'
}, },
{ {
key: "system.hitPoints", key: 'system.hitPoints',
name: "hp.max", name: 'hp.max',
label: "DAGGERHEART.UI.ItemBrowser.hitPointsMax", label: 'DAGGERHEART.UI.ItemBrowser.hitPointsMax',
field: 'system.api.models.items.DHClass.schema.fields.hitPoints', field: 'system.api.models.items.DHClass.schema.fields.hitPoints',
operator: "lte" operator: 'lte'
}, },
{ {
key: "system.domains", key: 'system.domains',
label: "DAGGERHEART.GENERAL.Domain.plural", label: 'DAGGERHEART.GENERAL.Domain.plural',
choices: () => Object.values(CONFIG.DH.DOMAIN.domains).map(d => ({ value: d.id, label: d.label })), choices: () => Object.values(CONFIG.DH.DOMAIN.domains).map(d => ({ value: d.id, label: d.label })),
operator: "contains2" operator: 'contains2'
} }
] ]
}, },
subclasses: { subclasses: {
columns: [ columns: [
{ {
key: "id", key: 'id',
label: "TYPES.Item.class", label: 'TYPES.Item.class',
format: (id) => { format: id => {
return ""; return '';
} }
}, },
{ {
key: "system.spellcastingTrait", key: 'system.spellcastingTrait',
label: "DAGGERHEART.ITEMS.Subclass.spellcastingTrait" label: 'DAGGERHEART.ITEMS.Subclass.spellcastingTrait'
} }
], ],
filters: [] filters: []
@ -273,133 +281,133 @@ export const typeConfig = {
beastforms: { beastforms: {
columns: [ columns: [
{ {
key: "system.tier", key: 'system.tier',
label: "DAGGERHEART.GENERAL.Tiers.singular" label: 'DAGGERHEART.GENERAL.Tiers.singular'
}, },
{ {
key: "system.mainTrait", key: 'system.mainTrait',
label: "DAGGERHEART.GENERAL.Trait.single" label: 'DAGGERHEART.GENERAL.Trait.single'
} }
], ],
filters: [ filters: [
{ {
key: "system.tier", key: 'system.tier',
label: "DAGGERHEART.GENERAL.Tiers.singular", label: 'DAGGERHEART.GENERAL.Tiers.singular',
field: 'system.api.models.items.DHBeastform.schema.fields.tier' field: 'system.api.models.items.DHBeastform.schema.fields.tier'
}, },
{ {
key: "system.mainTrait", key: 'system.mainTrait',
label: "DAGGERHEART.GENERAL.Trait.single", label: 'DAGGERHEART.GENERAL.Trait.single',
field: 'system.api.models.items.DHBeastform.schema.fields.mainTrait' field: 'system.api.models.items.DHBeastform.schema.fields.mainTrait'
} }
] ]
} }
} };
export const compendiumConfig = { export const compendiumConfig = {
"daggerheart": { daggerheart: {
id: "daggerheart", id: 'daggerheart',
label: "DAGGERHEART", label: 'DAGGERHEART',
folders: { folders: {
"adversaries": { adversaries: {
id: "adversaries", id: 'adversaries',
keys: ["adversaries"], keys: ['adversaries'],
label: "DAGGERHEART.UI.ItemBrowser.folders.adversaries", label: 'DAGGERHEART.UI.ItemBrowser.folders.adversaries',
type: ["adversary"], type: ['adversary'],
listType: "adversaries" listType: 'adversaries'
}, },
"ancestries": { ancestries: {
id: "ancestries", id: 'ancestries',
keys: ["ancestries"], keys: ['ancestries'],
label: "DAGGERHEART.UI.ItemBrowser.folders.ancestries", label: 'DAGGERHEART.UI.ItemBrowser.folders.ancestries',
type: ["ancestry"], type: ['ancestry'],
folders: { folders: {
"features": { features: {
id: "features", id: 'features',
keys: ["ancestries"], keys: ['ancestries'],
label: "DAGGERHEART.UI.ItemBrowser.folders.features", label: 'DAGGERHEART.UI.ItemBrowser.folders.features',
type: ["feature"] type: ['feature']
} }
} }
}, },
"equipments": { equipments: {
id: "equipments", id: 'equipments',
keys: ["armors", "weapons", "consumables", "loot"], keys: ['armors', 'weapons', 'consumables', 'loot'],
label: "DAGGERHEART.UI.ItemBrowser.folders.equipment", label: 'DAGGERHEART.UI.ItemBrowser.folders.equipment',
type: ["armor", "weapon", "consumable", "loot"], type: ['armor', 'weapon', 'consumable', 'loot'],
listType: "items" listType: 'items'
}, },
"classes": { classes: {
id: "classes", id: 'classes',
keys: ["classes"], keys: ['classes'],
label: "DAGGERHEART.UI.ItemBrowser.folders.classes", label: 'DAGGERHEART.UI.ItemBrowser.folders.classes',
type: ["class"], type: ['class'],
folders: { folders: {
"features": { features: {
id: "features", id: 'features',
keys: ["classes"], keys: ['classes'],
label: "DAGGERHEART.UI.ItemBrowser.folders.features", label: 'DAGGERHEART.UI.ItemBrowser.folders.features',
type: ["feature"] type: ['feature']
}, },
"items": { items: {
id: "items", id: 'items',
keys: ["classes"], keys: ['classes'],
label: "DAGGERHEART.UI.ItemBrowser.folders.items", label: 'DAGGERHEART.UI.ItemBrowser.folders.items',
type: ["armor", "weapon", "consumable", "loot"], type: ['armor', 'weapon', 'consumable', 'loot'],
listType: "items" listType: 'items'
} }
}, },
listType: "classes" listType: 'classes'
}, },
"subclasses": { subclasses: {
id: "subclasses", id: 'subclasses',
keys: ["subclasses"], keys: ['subclasses'],
label: "DAGGERHEART.UI.ItemBrowser.folders.subclasses", label: 'DAGGERHEART.UI.ItemBrowser.folders.subclasses',
type: ["subclass"], type: ['subclass'],
listType: "subclasses" listType: 'subclasses'
}, },
"domains": { domains: {
id: "domains", id: 'domains',
keys: ["domains"], keys: ['domains'],
label: "DAGGERHEART.UI.ItemBrowser.folders.domainCards", label: 'DAGGERHEART.UI.ItemBrowser.folders.domainCards',
type: ["domainCard"], type: ['domainCard'],
listType: "cards" listType: 'cards'
}, },
"communities": { communities: {
id: "communities", id: 'communities',
keys: ["communities"], keys: ['communities'],
label: "DAGGERHEART.UI.ItemBrowser.folders.communities", label: 'DAGGERHEART.UI.ItemBrowser.folders.communities',
type: ["community"], type: ['community'],
folders: { folders: {
"features": { features: {
id: "features", id: 'features',
keys: ["communities"], keys: ['communities'],
label: "DAGGERHEART.UI.ItemBrowser.folders.features", label: 'DAGGERHEART.UI.ItemBrowser.folders.features',
type: ["feature"] type: ['feature']
} }
} }
}, },
"environments": { environments: {
id: "environments", id: 'environments',
keys: ["environments"], keys: ['environments'],
label: "DAGGERHEART.UI.ItemBrowser.folders.environments", label: 'DAGGERHEART.UI.ItemBrowser.folders.environments',
type: ["environment"] type: ['environment']
}, },
"beastforms": { beastforms: {
id: "beastforms", id: 'beastforms',
keys: ["beastforms"], keys: ['beastforms'],
label: "DAGGERHEART.UI.ItemBrowser.folders.beastforms", label: 'DAGGERHEART.UI.ItemBrowser.folders.beastforms',
type: ["beastform"], type: ['beastform'],
listType: "beastforms", listType: 'beastforms',
folders: { folders: {
"features": { features: {
id: "features", id: 'features',
keys: ["beastforms"], keys: ['beastforms'],
label: "DAGGERHEART.UI.ItemBrowser.folders.features", label: 'DAGGERHEART.UI.ItemBrowser.folders.features',
type: ["feature"] type: ['feature']
} }
} }
} }
} }
} }
} };

View file

@ -51,11 +51,13 @@ export default class DHAttackAction extends DHDamageAction {
const labels = []; const labels = [];
const { roll, range, damage } = this; const { roll, range, damage } = this;
if (roll.trait) labels.push(game.i18n.localize(`DAGGERHEART.CONFIG.Traits.${roll.trait}.short`)) if (roll.trait) labels.push(game.i18n.localize(`DAGGERHEART.CONFIG.Traits.${roll.trait}.short`));
if (range) labels.push(game.i18n.localize(`DAGGERHEART.CONFIG.Range.${range}.short`)); if (range) labels.push(game.i18n.localize(`DAGGERHEART.CONFIG.Range.${range}.short`));
for (const { value, type } of damage.parts) { const useAltDamage = this.actor?.effects?.find(x => x.type === 'horde')?.active;
const str = Roll.replaceFormulaData(value.getFormula(), this.actor?.getRollData() ?? {}); for (const { value, valueAlt, type } of damage.parts) {
const usedValue = useAltDamage ? valueAlt : value;
const str = Roll.replaceFormulaData(usedValue.getFormula(), this.actor?.getRollData() ?? {});
const icons = Array.from(type) const icons = Array.from(type)
.map(t => CONFIG.DH.GENERAL.damageTypes[t]?.icon) .map(t => CONFIG.DH.GENERAL.damageTypes[t]?.icon)

View file

@ -172,7 +172,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
dialog: { dialog: {
configure: hasRoll configure: hasRoll
}, },
type: this.type, type: this.roll?.type ?? this.type,
hasRoll: hasRoll, hasRoll: hasRoll,
hasDamage: this.damage?.parts?.length && this.type !== 'healing', hasDamage: this.damage?.parts?.length && this.type !== 'healing',
hasHealing: this.damage?.parts?.length && this.type === 'healing', hasHealing: this.damage?.parts?.length && this.type === 'healing',

View file

@ -130,7 +130,7 @@ export default class DhpAdversary extends BaseDataActor {
CONFIG.DH.id, CONFIG.DH.id,
CONFIG.DH.SETTINGS.gameSettings.Automation CONFIG.DH.SETTINGS.gameSettings.Automation
).hordeDamage; ).hordeDamage;
if (autoHordeDamage && changes.system?.resources?.hitPoints?.value) { if (autoHordeDamage && changes.system?.resources?.hitPoints?.value !== undefined) {
const hordeActiveEffect = this.parent.effects.find(x => x.type === 'horde'); const hordeActiveEffect = this.parent.effects.find(x => x.type === 'horde');
if (hordeActiveEffect) { if (hordeActiveEffect) {
const halfHP = Math.ceil(this.resources.hitPoints.max / 2); const halfHP = Math.ceil(this.resources.hitPoints.max / 2);

View file

@ -130,11 +130,16 @@ export default class BaseDataActor extends foundry.abstract.TypeDataModel {
const typeForDefeated = ['character', 'adversary', 'companion'].find(x => x === this.parent.type); const typeForDefeated = ['character', 'adversary', 'companion'].find(x => x === this.parent.type);
if (defeatedSettings.enabled && typeForDefeated) { if (defeatedSettings.enabled && typeForDefeated) {
const resource = typeForDefeated === 'companion' ? 'stress' : 'hitPoints'; const resource = typeForDefeated === 'companion' ? 'stress' : 'hitPoints';
if (changes.system.resources[resource]) { const resourceValue = changes.system.resources[resource];
const becameMax = changes.system.resources[resource].value === this.resources[resource].max; if (
resourceValue &&
this.resources[resource].max &&
resourceValue.value !== this.resources[resource].value
) {
const becameMax = resourceValue.value === this.resources[resource].max;
const wasMax = const wasMax =
this.resources[resource].value === this.resources[resource].max && this.resources[resource].value === this.resources[resource].max &&
this.resources[resource].value !== changes.system.resources[resource].value; this.resources[resource].value !== resourceValue.value;
if (becameMax) { if (becameMax) {
this.parent.toggleDefeated(true); this.parent.toggleDefeated(true);
} else if (wasMax) { } else if (wasMax) {

View file

@ -317,7 +317,7 @@ export default class DhCharacter extends BaseDataActor {
} }
get multiclass() { get multiclass() {
const value = this.parent.items.find(x => x.type === 'Class' && x.system.isMulticlass); const value = this.parent.items.find(x => x.type === 'class' && x.system.isMulticlass);
const subclass = this.parent.items.find(x => x.type === 'subclass' && x.system.isMulticlass); const subclass = this.parent.items.find(x => x.type === 'subclass' && x.system.isMulticlass);
return { return {
@ -443,7 +443,9 @@ export default class DhCharacter extends BaseDataActor {
classFeatures.push(item); classFeatures.push(item);
} else if (item.system.originItemType === CONFIG.DH.ITEM.featureTypes.subclass.id) { } else if (item.system.originItemType === CONFIG.DH.ITEM.featureTypes.subclass.id) {
if (this.class.subclass) { if (this.class.subclass) {
const subclassState = this.class.subclass.system.featureState; const prop = item.system.multiclassOrigin ? 'multiclass' : 'class';
const subclassState = this[prop].subclass?.system?.featureState;
if (!subclassState) continue;
if ( if (
item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.foundation || item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.foundation ||

View file

@ -113,7 +113,7 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
this.currentTargets = this.getTargetList(); this.currentTargets = this.getTargetList();
// this.registerTargetHook(); // this.registerTargetHook();
if (this.targetMode === true && this.hasRoll) { if (this.hasRoll) {
this.targetShort = this.targets.reduce( this.targetShort = this.targets.reduce(
(a, c) => { (a, c) => {
if (c.hit) a.hit += 1; if (c.hit) a.hit += 1;
@ -127,7 +127,8 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
} }
this.canViewSecret = this.parent.speakerActor?.testUserPermission(game.user, 'OBSERVER'); this.canViewSecret = this.parent.speakerActor?.testUserPermission(game.user, 'OBSERVER');
this.canButtonApply = game.user.isGM; this.canButtonApply = game.user.isGM; //temp
this.isGM = game.user.isGM; //temp
} }
getTargetList() { getTargetList() {

View file

@ -162,7 +162,6 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
for (let f of this.features) { for (let f of this.features) {
const fBase = f.item ?? f; const fBase = f.item ?? f;
const feature = fBase.system ? fBase : await foundry.utils.fromUuid(fBase.uuid); const feature = fBase.system ? fBase : await foundry.utils.fromUuid(fBase.uuid);
const multiclass = this.isMulticlass ? 'multiclass' : null;
features.push( features.push(
foundry.utils.mergeObject( foundry.utils.mergeObject(
feature.toObject(), feature.toObject(),
@ -170,7 +169,8 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
_stats: { compendiumSource: fBase.uuid }, _stats: { compendiumSource: fBase.uuid },
system: { system: {
originItemType: this.parent.type, originItemType: this.parent.type,
identifier: multiclass ?? (f.item ? f.type : null) identifier: f.item ? f.type : null,
multiclassOrigin: this.isMulticlass
} }
}, },
{ inplace: false } { inplace: false }

View file

@ -29,6 +29,7 @@ export default class DHFeature extends BaseDataItem {
nullable: true, nullable: true,
initial: null initial: null
}), }),
multiclassOrigin: new fields.BooleanField({ initial: false }),
identifier: new fields.StringField() identifier: new fields.StringField()
}; };
} }

View file

@ -1,3 +1,4 @@
import ForeignDocumentUUIDField from '../fields/foreignDocumentUUIDField.mjs';
import ItemLinkFields from '../fields/itemLinkFields.mjs'; import ItemLinkFields from '../fields/itemLinkFields.mjs';
import BaseDataItem from './base.mjs'; import BaseDataItem from './base.mjs';
@ -25,7 +26,8 @@ export default class DHSubclass extends BaseDataItem {
}), }),
features: new ItemLinkFields(), features: new ItemLinkFields(),
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 }),
linkedClass: new ForeignDocumentUUIDField({ type: 'Item', nullable: true, initial: null })
}; };
} }

View file

@ -167,13 +167,11 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
if (subclass) { if (subclass) {
const featureState = subclass.system.featureState; const featureState = subclass.system.featureState;
const featureType = subclass
? (subclass.system.features.find(x => x.item?.uuid === this.parent.uuid)?.type ?? null)
: null;
if ( if (
(featureType === CONFIG.DH.ITEM.featureSubTypes.specialization && featureState < 2) || (this.parent.system.identifier === CONFIG.DH.ITEM.featureSubTypes.specialization &&
(featureType === CONFIG.DH.ITEM.featureSubTypes.mastery && featureState < 3) featureState < 2) ||
(this.parent.system.identifier === CONFIG.DH.ITEM.featureSubTypes.mastery && featureState < 3)
) { ) {
this.transfer = false; this.transfer = false;
} }

View file

@ -1,7 +1,7 @@
import { emitAsGM, GMUpdateEvent } from '../systemRegistration/socket.mjs'; import { emitAsGM, GMUpdateEvent } from '../systemRegistration/socket.mjs';
import { LevelOptionType } from '../data/levelTier.mjs'; import { LevelOptionType } from '../data/levelTier.mjs';
import DHFeature from '../data/item/feature.mjs'; import DHFeature from '../data/item/feature.mjs';
import { createScrollText, damageKeyToNumber, versionCompare } from '../helpers/utils.mjs'; import { createScrollText, damageKeyToNumber } from '../helpers/utils.mjs';
import DhCompanionLevelUp from '../applications/levelup/companionLevelup.mjs'; import DhCompanionLevelUp from '../applications/levelup/companionLevelup.mjs';
export default class DhpActor extends Actor { export default class DhpActor extends Actor {
@ -167,10 +167,10 @@ export default class DhpActor extends Actor {
if (multiclass) { if (multiclass) {
const multiclassItem = this.items.find(x => x.uuid === multiclass.itemUuid); const multiclassItem = this.items.find(x => x.uuid === multiclass.itemUuid);
const multiclassFeatures = this.items.filter( const multiclassFeatures = this.items.filter(
x => x.system.originItemType === 'class' && x.system.identifier === 'multiclass' x => x.system.originItemType === 'class' && x.system.multiclassOrigin
); );
const subclassFeatures = this.items.filter( const subclassFeatures = this.items.filter(
x => x.system.originItemType === 'subclass' && x.system.identifier === 'multiclass' x => x.system.originItemType === 'subclass' && x.system.multiclassOrigin
); );
this.deleteEmbeddedDocuments( this.deleteEmbeddedDocuments(
@ -782,7 +782,7 @@ export default class DhpActor extends Actor {
} }
const parsedJSON = JSON.parse(json); const parsedJSON = JSON.parse(json);
if (versionCompare(parsedJSON._stats.systemVersion, '1.1.0')) { if (foundry.utils.isNewerVersion('1.1.0', parsedJSON._stats.systemVersion)) {
const confirmed = await foundry.applications.api.DialogV2.confirm({ const confirmed = await foundry.applications.api.DialogV2.confirm({
window: { window: {
title: game.i18n.localize('DAGGERHEART.ACTORS.Character.InvalidOldCharacterImportTitle') title: game.i18n.localize('DAGGERHEART.ACTORS.Character.InvalidOldCharacterImportTitle')

View file

@ -2,7 +2,8 @@ export default function DhDamageEnricher(match, _options) {
const parts = match[1].split('|').map(x => x.trim()); const parts = match[1].split('|').map(x => x.trim());
let value = null, let value = null,
type = null; type = null,
inline = false;
parts.forEach(part => { parts.forEach(part => {
const split = part.split(':').map(x => x.toLowerCase().trim()); const split = part.split(':').map(x => x.toLowerCase().trim());
@ -14,16 +15,19 @@ export default function DhDamageEnricher(match, _options) {
case 'type': case 'type':
type = split[1]; type = split[1];
break; break;
case 'inline':
inline = true;
break;
} }
} }
}); });
if (!value || !value) return match[0]; if (!value || !value) return match[0];
return getDamageMessage(value, type, match[0]); return getDamageMessage(value, type, inline, match[0]);
} }
function getDamageMessage(damage, type, defaultElement) { function getDamageMessage(damage, type, inline, defaultElement) {
const typeIcons = type const typeIcons = type
.replace('[', '') .replace('[', '')
.replace(']', '') .replace(']', '')
@ -40,7 +44,7 @@ function getDamageMessage(damage, type, defaultElement) {
const dualityElement = document.createElement('span'); const dualityElement = document.createElement('span');
dualityElement.innerHTML = ` dualityElement.innerHTML = `
<button class="enriched-damage-button" <button class="enriched-damage-button${inline ? ' inline' : ''}"
data-value="${damage}" data-value="${damage}"
data-type="${type}" data-type="${type}"
data-tooltip="${game.i18n.localize('DAGGERHEART.GENERAL.damage')}" data-tooltip="${game.i18n.localize('DAGGERHEART.GENERAL.damage')}"

View file

@ -36,7 +36,7 @@ function getDualityMessage(roll, flavor) {
const dualityElement = document.createElement('span'); const dualityElement = document.createElement('span');
dualityElement.innerHTML = ` dualityElement.innerHTML = `
<button class="duality-roll-button" <button class="duality-roll-button${roll.inline ? ' inline' : ''}"
data-title="${label}" data-title="${label}"
data-label="${dataLabel}" data-label="${dataLabel}"
data-reaction="${roll.reaction ? 'true' : 'false'}" data-reaction="${roll.reaction ? 'true' : 'false'}"

View file

@ -2,7 +2,8 @@ export default function DhTemplateEnricher(match, _options) {
const parts = match[1].split('|').map(x => x.trim()); const parts = match[1].split('|').map(x => x.trim());
let type = null, let type = null,
range = null; range = null,
inline = false;
parts.forEach(part => { parts.forEach(part => {
const split = part.split(':').map(x => x.toLowerCase().trim()); const split = part.split(':').map(x => x.toLowerCase().trim());
@ -20,6 +21,9 @@ export default function DhTemplateEnricher(match, _options) {
); );
range = matchedRange?.id; range = matchedRange?.id;
break; break;
case 'inline':
inline = true;
break;
} }
} }
}); });
@ -30,7 +34,7 @@ export default function DhTemplateEnricher(match, _options) {
const templateElement = document.createElement('span'); const templateElement = document.createElement('span');
templateElement.innerHTML = ` templateElement.innerHTML = `
<button class="measured-template-button" data-type="${type}" data-range="${range}"> <button class="measured-template-button${inline ? ' inline' : ''}" data-type="${type}" data-range="${range}">
${label} - ${game.i18n.localize(`DAGGERHEART.CONFIG.Range.${range}.name`)} ${label} - ${game.i18n.localize(`DAGGERHEART.CONFIG.Range.${range}.name`)}
</button> </button>
`; `;

View file

@ -418,14 +418,3 @@ export async function createEmbeddedItemsWithEffects(actor, baseData) {
export const slugify = name => { export const slugify = name => {
return name.toLowerCase().replaceAll(' ', '-').replaceAll('.', ''); return name.toLowerCase().replaceAll(' ', '-').replaceAll('.', '');
}; };
export const versionCompare = (current, target) => {
const currentSplit = current.split('.').map(x => Number.parseInt(x));
const targetSplit = target.split('.').map(x => Number.parseInt(x));
for (var i = 0; i < currentSplit.length; i++) {
if (currentSplit[i] < targetSplit[i]) return true;
if (currentSplit[i] > targetSplit[i]) return false;
}
return false;
};

View file

@ -1,12 +1,15 @@
import { versionCompare } from '../helpers/utils.mjs';
export async function runMigrations() { export async function runMigrations() {
let lastMigrationVersion = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LastMigrationVersion); let lastMigrationVersion = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LastMigrationVersion);
if (!lastMigrationVersion) lastMigrationVersion = '1.0.6'; if (!lastMigrationVersion) lastMigrationVersion = '1.0.6';
if (versionCompare(lastMigrationVersion, '1.1.0')) { if (foundry.utils.isNewerVersion('1.1.0', lastMigrationVersion)) {
const lockedPacks = [];
const compendiumActors = []; const compendiumActors = [];
for (let pack of game.packs) { for (let pack of game.packs) {
if (pack.locked) {
lockedPacks.push(pack.collection);
await pack.configure({ locked: false });
}
const documents = await pack.getDocuments(); const documents = await pack.getDocuments();
compendiumActors.push(...documents.filter(x => x.type === 'character')); compendiumActors.push(...documents.filter(x => x.type === 'character'));
} }
@ -34,8 +37,64 @@ export async function runMigrations() {
actor.updateEmbeddedDocuments('Item', items); actor.updateEmbeddedDocuments('Item', items);
}); });
for (let packId of lockedPacks) {
const pack = game.packs.get(packId);
await pack.configure({ locked: true });
}
lastMigrationVersion = '1.1.0'; lastMigrationVersion = '1.1.0';
} }
if (foundry.utils.isNewerVersion('1.1.1', lastMigrationVersion)) {
const lockedPacks = [];
const compendiumClasses = [];
const compendiumActors = [];
for (let pack of game.packs) {
if (pack.locked) {
lockedPacks.push(pack.collection);
await pack.configure({ locked: false });
}
const documents = await pack.getDocuments();
compendiumClasses.push(...documents.filter(x => x.type === 'class'));
compendiumActors.push(...documents.filter(x => x.type === 'character'));
}
[...compendiumActors, ...game.actors.filter(x => x.type === 'character')].forEach(char => {
const multiclass = char.items.find(x => x.type === 'class' && x.system.isMulticlass);
const multiclassSubclass =
multiclass?.system?.subclasses?.length > 0 ? multiclass.system.subclasses[0] : null;
char.items.forEach(item => {
if (item.type === 'feature' && item.system.identifier === 'multiclass') {
const base = item.system.originItemType === 'class' ? multiclass : multiclassSubclass;
if (base) {
const baseFeature = base.system.features.find(x => x.item.name === item.name);
if (baseFeature) {
item.update({
system: {
multiclassOrigin: true,
identifier: baseFeature.type
}
});
}
}
}
});
});
const worldClasses = game.items.filter(x => x.type === 'class');
for (let classVal of [...compendiumClasses, ...worldClasses]) {
for (let subclass of classVal.system.subclasses) {
await subclass.update({ 'system.linkedClass': classVal.uuid });
}
}
for (let packId of lockedPacks) {
const pack = game.packs.get(packId);
await pack.configure({ locked: true });
}
lastMigrationVersion = '1.1.1';
}
await game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LastMigrationVersion, lastMigrationVersion); await game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LastMigrationVersion, lastMigrationVersion);
} }

View file

@ -270,7 +270,7 @@
"cost": [ "cost": [
{ {
"scalable": false, "scalable": false,
"key": "stress", "key": "fear",
"value": 1, "value": 1,
"keyIsID": false, "keyIsID": false,
"step": null "step": null
@ -286,7 +286,7 @@
"type": "self", "type": "self",
"amount": null "amount": null
}, },
"name": "Mark Stress", "name": "Spend Fear",
"img": "icons/creatures/abilities/tail-strike-bone-orange.webp", "img": "icons/creatures/abilities/tail-strike-bone-orange.webp",
"range": "" "range": ""
} }

View file

@ -12,7 +12,7 @@
"type": "attack", "type": "attack",
"_id": "a6WROv0OKx0lbYVa", "_id": "a6WROv0OKx0lbYVa",
"systemPath": "actions", "systemPath": "actions",
"description": "", "description": "<p>Choose an element for your breath (such as electricity, fire, or ice). You can use this breath against a target or group of targets within Very Close range, treating it as an Instinct weapon that deals <strong>d8</strong> magic damage using your Proficiency.</p>",
"chatDisplay": true, "chatDisplay": true,
"actionType": "action", "actionType": "action",
"cost": [], "cost": [],
@ -102,10 +102,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1753994055921, "createdTime": 1753994055921,
"modifiedTime": 1755394293348, "modifiedTime": 1755938895948,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!sRaE3CgkgjBF1UpV" "_key": "!items!sRaE3CgkgjBF1UpV"
} }

View file

@ -77,10 +77,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754174600538, "createdTime": 1754174600538,
"modifiedTime": 1755390999058, "modifiedTime": 1755943467705,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_id": "vegl3bFOq3pcFTWT", "_id": "vegl3bFOq3pcFTWT",
"sort": 300000, "sort": 300000,

View file

@ -79,10 +79,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754222247012, "createdTime": 1754222247012,
"modifiedTime": 1755391012909, "modifiedTime": 1755943479440,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!ZNwUTCyGCEcidZFv" "_key": "!items!ZNwUTCyGCEcidZFv"
} }

View file

@ -75,10 +75,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754246931974, "createdTime": 1754246931974,
"modifiedTime": 1755391032291, "modifiedTime": 1755943488697,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!nRAyoC0fOzXPDa4z" "_key": "!items!nRAyoC0fOzXPDa4z"
} }

View file

@ -75,10 +75,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754268869310, "createdTime": 1754268869310,
"modifiedTime": 1755391043325, "modifiedTime": 1755943505024,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!BTyfve69LKqoOi9S" "_key": "!items!BTyfve69LKqoOi9S"
} }

View file

@ -79,10 +79,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754325275832, "createdTime": 1754325275832,
"modifiedTime": 1755391064025, "modifiedTime": 1755943515533,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!CvHlkHZfpMiCz5uT" "_key": "!items!CvHlkHZfpMiCz5uT"
} }

View file

@ -75,10 +75,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754351482530, "createdTime": 1754351482530,
"modifiedTime": 1755391077728, "modifiedTime": 1755943523935,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!5ZnlJ5bEoyOTkUJv" "_key": "!items!5ZnlJ5bEoyOTkUJv"
} }

View file

@ -83,10 +83,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754349743129, "createdTime": 1754349743129,
"modifiedTime": 1755391092028, "modifiedTime": 1755943536635,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!DchOzHcWIJE9FKcR" "_key": "!items!DchOzHcWIJE9FKcR"
} }

View file

@ -79,10 +79,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754255776706, "createdTime": 1754255776706,
"modifiedTime": 1755391103528, "modifiedTime": 1755943545980,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!xCUWwJz4WSthvLfy" "_key": "!items!xCUWwJz4WSthvLfy"
} }

View file

@ -79,10 +79,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754253505323, "createdTime": 1754253505323,
"modifiedTime": 1755391118180, "modifiedTime": 1755943555087,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!5LwX4m8ziY3F1ZGC" "_key": "!items!5LwX4m8ziY3F1ZGC"
} }

View file

@ -12,7 +12,7 @@
"type": "effect", "type": "effect",
"_id": "ZBVqSlsDUKf8uGrI", "_id": "ZBVqSlsDUKf8uGrI",
"systemPath": "actions", "systemPath": "actions",
"description": "", "description": "<p>Record three sayings or values your upbringing instilled in you. Once per rest, when you describe how youre embodying one of these principles through your current action, you can roll a d20 as your Hope Die</p>",
"chatDisplay": true, "chatDisplay": true,
"actionType": "action", "actionType": "action",
"cost": [], "cost": [],
@ -48,10 +48,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754010247432, "createdTime": 1754010247432,
"modifiedTime": 1755394895431, "modifiedTime": 1755938935013,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"sort": 0, "sort": 0,
"ownership": { "ownership": {

View file

@ -35,7 +35,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 17, "page": 17,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.BTyfve69LKqoOi9S"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -50,10 +51,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754268237448, "createdTime": 1754268237448,
"modifiedTime": 1755391910037, "modifiedTime": 1755943503629,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!TIUsIlTS1WkK5vr2" "_key": "!items!TIUsIlTS1WkK5vr2"
} }

View file

@ -31,7 +31,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 24, "page": 24,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.xCUWwJz4WSthvLfy"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -46,10 +47,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754256077777, "createdTime": 1754256077777,
"modifiedTime": 1755392366229, "modifiedTime": 1755943544886,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!NAFU9roaVG7f3RNJ" "_key": "!items!NAFU9roaVG7f3RNJ"
} }

View file

@ -27,7 +27,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 24, "page": 24,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.xCUWwJz4WSthvLfy"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -42,10 +43,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754256112978, "createdTime": 1754256112978,
"modifiedTime": 1755392375946, "modifiedTime": 1755943545973,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!bcNe5qP3o6CKadhK" "_key": "!items!bcNe5qP3o6CKadhK"
} }

View file

@ -31,7 +31,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 21, "page": 21,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.5ZnlJ5bEoyOTkUJv"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -46,10 +47,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754352806098, "createdTime": 1754352806098,
"modifiedTime": 1755392139199, "modifiedTime": 1755943522722,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!M5mpGoAj8LRkylrY" "_key": "!items!M5mpGoAj8LRkylrY"
} }

View file

@ -27,7 +27,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 22, "page": 22,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.DchOzHcWIJE9FKcR"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -42,10 +43,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754349604941, "createdTime": 1754349604941,
"modifiedTime": 1755392260989, "modifiedTime": 1755943535524,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!wg1H0hROc2acHwZh" "_key": "!items!wg1H0hROc2acHwZh"
} }

View file

@ -35,7 +35,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 19, "page": 19,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.CvHlkHZfpMiCz5uT"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -50,10 +51,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754322815758, "createdTime": 1754322815758,
"modifiedTime": 1755392009996, "modifiedTime": 1755943514465,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!h161OSIK24Up4qNd" "_key": "!items!h161OSIK24Up4qNd"
} }

View file

@ -27,7 +27,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 22, "page": 22,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.DchOzHcWIJE9FKcR"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -42,10 +43,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754349604941, "createdTime": 1754349604941,
"modifiedTime": 1755392267640, "modifiedTime": 1755943536628,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!GLpRVxnY5E82khxH" "_key": "!items!GLpRVxnY5E82khxH"
} }

View file

@ -39,7 +39,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 25, "page": 25,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.5LwX4m8ziY3F1ZGC"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -54,10 +55,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754253538384, "createdTime": 1754253538384,
"modifiedTime": 1755392466418, "modifiedTime": 1755943553625,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!qqQlgCqhOivUFoQn" "_key": "!items!qqQlgCqhOivUFoQn"
} }

View file

@ -39,7 +39,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 25, "page": 25,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.5LwX4m8ziY3F1ZGC"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -54,10 +55,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754253587683, "createdTime": 1754253587683,
"modifiedTime": 1755392474218, "modifiedTime": 1755943555081,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!4y9Ph7RsCIAbkwTk" "_key": "!items!4y9Ph7RsCIAbkwTk"
} }

View file

@ -39,7 +39,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 16, "page": 16,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.nRAyoC0fOzXPDa4z"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -54,10 +55,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754245881893, "createdTime": 1754245881893,
"modifiedTime": 1755391787981, "modifiedTime": 1755943487549,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!rKRxFBlkbh9cDK8K" "_key": "!items!rKRxFBlkbh9cDK8K"
} }

View file

@ -27,7 +27,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 20, "page": 20,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.CvHlkHZfpMiCz5uT"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -42,10 +43,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754323643089, "createdTime": 1754323643089,
"modifiedTime": 1755392018277, "modifiedTime": 1755943515526,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!95QxNZwgyEm1LqdG" "_key": "!items!95QxNZwgyEm1LqdG"
} }

View file

@ -26,7 +26,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 9, "page": 9,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.vegl3bFOq3pcFTWT"
}, },
"effects": [], "effects": [],
"ownership": { "ownership": {
@ -40,10 +41,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754174653653, "createdTime": 1754174653653,
"modifiedTime": 1755391532634, "modifiedTime": 1755943465827,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_id": "ld8MIvk0xVJydSBz", "_id": "ld8MIvk0xVJydSBz",
"sort": 100000, "sort": 100000,

View file

@ -31,7 +31,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 16, "page": 16,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.nRAyoC0fOzXPDa4z"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -46,10 +47,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754246011733, "createdTime": 1754246011733,
"modifiedTime": 1755391794966, "modifiedTime": 1755943488691,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!SUo8NPBPO8aN193u" "_key": "!items!SUo8NPBPO8aN193u"
} }

View file

@ -34,7 +34,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 11, "page": 11,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.ZNwUTCyGCEcidZFv"
}, },
"effects": [], "effects": [],
"folder": "AZWrSJzGXltzQhAJ", "folder": "AZWrSJzGXltzQhAJ",
@ -50,10 +51,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754221346981, "createdTime": 1754221346981,
"modifiedTime": 1755391677508, "modifiedTime": 1755943479431,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!xp0XMjYT85Q7E90o" "_key": "!items!xp0XMjYT85Q7E90o"
} }

View file

@ -26,7 +26,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 11, "page": 11,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.ZNwUTCyGCEcidZFv"
}, },
"effects": [], "effects": [],
"folder": "AZWrSJzGXltzQhAJ", "folder": "AZWrSJzGXltzQhAJ",
@ -42,10 +43,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754221102716, "createdTime": 1754221102716,
"modifiedTime": 1755391669341, "modifiedTime": 1755943478132,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!W9hs5kxOWeY7eA4Q" "_key": "!items!W9hs5kxOWeY7eA4Q"
} }

View file

@ -31,7 +31,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 17, "page": 17,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.BTyfve69LKqoOi9S"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -46,10 +47,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754268318903, "createdTime": 1754268318903,
"modifiedTime": 1755391902003, "modifiedTime": 1755943505016,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!zsUglcU4NgZ8tNgZ" "_key": "!items!zsUglcU4NgZ8tNgZ"
} }

View file

@ -31,7 +31,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 21, "page": 21,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.5ZnlJ5bEoyOTkUJv"
}, },
"effects": [], "effects": [],
"sort": 0, "sort": 0,
@ -46,10 +47,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754354451615, "createdTime": 1754354451615,
"modifiedTime": 1755392149951, "modifiedTime": 1755943523928,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_key": "!items!y7ERWRIpJsdP9Re4" "_key": "!items!y7ERWRIpJsdP9Re4"
} }

View file

@ -30,7 +30,8 @@
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 9, "page": 9,
"artist": "" "artist": ""
} },
"linkedClass": "Compendium.daggerheart.classes.Item.vegl3bFOq3pcFTWT"
}, },
"effects": [], "effects": [],
"ownership": { "ownership": {
@ -44,10 +45,10 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.347",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.0.5", "systemVersion": "1.1.0",
"createdTime": 1754174655078, "createdTime": 1754174655078,
"modifiedTime": 1755391551654, "modifiedTime": 1755943467695,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "tt3PwMBXcTLCtIQU"
}, },
"_id": "XTSODVM8st75Os8M", "_id": "XTSODVM8st75Os8M",
"sort": 200000, "sort": 200000,

View file

@ -86,7 +86,7 @@
.flavor-text { .flavor-text {
font-size: var(--font-size-12); font-size: var(--font-size-12);
line-height: 20px; line-height: 20px;
color: var(--color-dark-4); color: light-dark(@dark, @beige);
text-align: center; text-align: center;
display: block; display: block;
} }

View file

@ -0,0 +1,14 @@
.measured-template-button,
.enriched-damage-button,
.duality-roll-button {
display: inline;
&.inline {
min-height: unset;
height: 18px;
}
i {
font-size: 12px;
}
}

View file

@ -0,0 +1,12 @@
.drag-area {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 100%;
height: 40px;
border: 1px dashed light-dark(@dark-blue-50, @beige-50);
border-radius: 3px;
color: light-dark(@dark-blue-50, @beige-50);
font-family: @font-body;
}

View file

@ -2,6 +2,8 @@
@import './dialog.less'; @import './dialog.less';
@import './chat.less'; @import './chat.less';
@import './elements.less'; @import './elements.less';
@import './enrichment.less';
@import './global.less';
@import './tab-navigation.less'; @import './tab-navigation.less';
@import './tab-form-footer.less'; @import './tab-form-footer.less';
@import './tab-actions.less'; @import './tab-actions.less';

View file

@ -34,17 +34,5 @@
width: 100%; width: 100%;
} }
} }
.adversaries-dragger {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 100%;
height: 40px;
border: 1px dashed light-dark(@dark-blue-50, @beige-50);
border-radius: 3px;
color: light-dark(@dark-blue-50, @beige-50);
}
} }
} }

View file

@ -26,10 +26,6 @@
outline: 2px solid light-dark(@dark, @golden); outline: 2px solid light-dark(@dark, @golden);
} }
&:placeholder {
color: light-dark(@dark-blue-50, @beige-50);
}
&::-webkit-search-cancel-button { &::-webkit-search-cancel-button {
-webkit-appearance: none; -webkit-appearance: none;
display: none; display: none;

View file

@ -26,10 +26,6 @@
outline: 2px solid light-dark(@dark, @golden); outline: 2px solid light-dark(@dark, @golden);
} }
&:placeholder {
color: light-dark(@dark-blue-50, @beige-50);
}
&::-webkit-search-cancel-button { &::-webkit-search-cancel-button {
-webkit-appearance: none; -webkit-appearance: none;
display: none; display: none;

View file

@ -146,10 +146,6 @@
outline: 2px solid light-dark(@dark, @golden); outline: 2px solid light-dark(@dark, @golden);
} }
&:placeholder {
color: light-dark(@dark-blue-50, @beige-50);
}
&::-webkit-search-cancel-button { &::-webkit-search-cancel-button {
-webkit-appearance: none; -webkit-appearance: none;
display: none; display: none;
@ -349,6 +345,8 @@
display: grid; display: grid;
grid-template-rows: 0fr; grid-template-rows: 0fr;
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
width: 100%;
.wrapper { .wrapper {
overflow: hidden; overflow: hidden;
display: grid; display: grid;

View file

@ -2,7 +2,7 @@
"id": "daggerheart", "id": "daggerheart",
"title": "Daggerheart", "title": "Daggerheart",
"description": "An unofficial implementation of the Daggerheart system", "description": "An unofficial implementation of the Daggerheart system",
"version": "1.1.0", "version": "1.1.1",
"compatibility": { "compatibility": {
"minimum": "13", "minimum": "13",
"verified": "13.347", "verified": "13.347",

View file

@ -25,7 +25,7 @@
</div> </div>
{{/each}} {{/each}}
</div> </div>
<div class="adversaries-dragger"> <div class="drag-area">
<span>{{localize "DAGGERHEART.GENERAL.dropActorsHere"}}</span> <span>{{localize "DAGGERHEART.GENERAL.dropActorsHere"}}</span>
</div> </div>
</fieldset> </fieldset>

View file

@ -27,6 +27,9 @@
<fieldset> <fieldset>
<legend>{{localize "TYPES.Item.subclass"}}</legend> <legend>{{localize "TYPES.Item.subclass"}}</legend>
<div class="feature-list"> <div class="feature-list">
{{#unless source.system.subclasses}}
<div class="drag-area">{{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "DAGGERHEART.GENERAL.subclasses")}}</div>
{{/unless}}
{{#each source.system.subclasses as |subclass index|}} {{#each source.system.subclasses as |subclass index|}}
<li class='feature-item'> <li class='feature-item'>
<div class='feature-line'> <div class='feature-line'>

View file

@ -45,6 +45,8 @@
{{#unless (eq document.parent.type 'character')}}<a data-action="removeSuggestedItem" data-target="suggestedPrimaryWeapon"><i class="fa-solid fa-trash icon-button"></i></a>{{/unless}} {{#unless (eq document.parent.type 'character')}}<a data-action="removeSuggestedItem" data-target="suggestedPrimaryWeapon"><i class="fa-solid fa-trash icon-button"></i></a>{{/unless}}
</div> </div>
</div> </div>
{{else}}
<div class="drag-area">{{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "DAGGERHEART.GENERAL.weapons")}}</div>
{{/if}} {{/if}}
</div> </div>
</fieldset> </fieldset>
@ -60,6 +62,8 @@
{{#unless (eq document.parent.type 'character')}}<a data-action="removeSuggestedItem" data-target="suggestedSecondaryWeapon"><i class="fa-solid fa-trash icon-button"></i></a>{{/unless}} {{#unless (eq document.parent.type 'character')}}<a data-action="removeSuggestedItem" data-target="suggestedSecondaryWeapon"><i class="fa-solid fa-trash icon-button"></i></a>{{/unless}}
</div> </div>
</div> </div>
{{else}}
<div class="drag-area">{{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "DAGGERHEART.GENERAL.weapons")}}</div>
{{/if}} {{/if}}
</div> </div>
</fieldset> </fieldset>
@ -75,6 +79,8 @@
{{#unless (eq document.parent.type 'character')}}<a data-action="removeSuggestedItem" data-target="suggestedArmor"><i class="fa-solid fa-trash icon-button"></i></a>{{/unless}} {{#unless (eq document.parent.type 'character')}}<a data-action="removeSuggestedItem" data-target="suggestedArmor"><i class="fa-solid fa-trash icon-button"></i></a>{{/unless}}
</div> </div>
</div> </div>
{{else}}
<div class="drag-area">{{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "DAGGERHEART.GENERAL.armors")}}</div>
{{/if}} {{/if}}
</div> </div>
</fieldset> </fieldset>
@ -85,6 +91,9 @@
<fieldset class="one-column drop-section take-section {{#if (eq document.parent.type 'character')}}inactive{{/if}}"> <fieldset class="one-column drop-section take-section {{#if (eq document.parent.type 'character')}}inactive{{/if}}">
<legend>{{localize "DAGGERHEART.GENERAL.take"}}</legend> <legend>{{localize "DAGGERHEART.GENERAL.take"}}</legend>
<div class="drop-section-body list-items"> <div class="drop-section-body list-items">
{{#unless source.system.inventory.take}}
<div class="drag-area">{{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "DAGGERHEART.GENERAL.items")}}</div>
{{/unless}}
{{#each source.system.inventory.take}} {{#each source.system.inventory.take}}
{{#if this}} {{#if this}}
<div class="suggested-item item-line" data-action="editDoc" data-item-uuid="{{this.uuid}}"> <div class="suggested-item item-line" data-action="editDoc" data-item-uuid="{{this.uuid}}">
@ -102,6 +111,9 @@
<fieldset class="one-column drop-section choice-a-section {{#if (eq document.parent.type 'character')}}inactive{{/if}}"> <fieldset class="one-column drop-section choice-a-section {{#if (eq document.parent.type 'character')}}inactive{{/if}}">
<legend>{{localize "DAGGERHEART.ITEMS.Class.guide.inventory.thenChoose"}}</legend> <legend>{{localize "DAGGERHEART.ITEMS.Class.guide.inventory.thenChoose"}}</legend>
<div class="drop-section-body list-items"> <div class="drop-section-body list-items">
{{#unless source.system.inventory.choiceA}}
<div class="drag-area">{{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "DAGGERHEART.GENERAL.items")}}</div>
{{/unless}}
{{#each source.system.inventory.choiceA}} {{#each source.system.inventory.choiceA}}
{{#if this}} {{#if this}}
<div class="suggested-item item-line" data-action="editDoc" data-item-uuid="{{this.uuid}}"> <div class="suggested-item item-line" data-action="editDoc" data-item-uuid="{{this.uuid}}">
@ -119,6 +131,9 @@
<fieldset class="one-column drop-section choice-b-section {{#if (eq document.parent.type 'character')}}inactive{{/if}}"> <fieldset class="one-column drop-section choice-b-section {{#if (eq document.parent.type 'character')}}inactive{{/if}}">
<legend>{{localize "DAGGERHEART.ITEMS.Class.guide.inventory.andEither"}}</legend> <legend>{{localize "DAGGERHEART.ITEMS.Class.guide.inventory.andEither"}}</legend>
<div class="drop-section-body list-items"> <div class="drop-section-body list-items">
{{#unless source.system.inventory.choiceB}}
<div class="drag-area">{{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "DAGGERHEART.GENERAL.items")}}</div>
{{/unless}}
{{#each source.system.inventory.choiceB}} {{#each source.system.inventory.choiceB}}
{{#if this}} {{#if this}}
<div class="suggested-item item-line" data-action="editDoc" data-item-uuid="{{this.uuid}}"> <div class="suggested-item item-line" data-action="editDoc" data-item-uuid="{{this.uuid}}">

View file

@ -1,6 +1,6 @@
<div class="roll-part target-section dice-roll" data-action="expandRoll"> <div class="roll-part target-section dice-roll" data-action="expandRoll">
<div class="roll-part-header"><div><span>{{pluralize currentTargets.length "DAGGERHEART.GENERAL.Target"}}</span></div></div> <div class="roll-part-header"><div><span>{{pluralize currentTargets.length "DAGGERHEART.GENERAL.Target"}}</span></div></div>
{{#if (or (and targets.length (or (gt targetShort.hit 0) (gt targetShort.miss 0))) (and hasSave pendingSaves))}} {{#if isGM}}
<div class="roll-part-extra on-reduced"> <div class="roll-part-extra on-reduced">
<div class="wrapper"> <div class="wrapper">
{{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}} {{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}}
@ -30,8 +30,8 @@
<img class="target-img" src="{{img}}"> <img class="target-img" src="{{img}}">
<div class="target-data"> <div class="target-data">
<div class="target-name" data-perm-id="{{actorId}}"><span>{{name}}</span></div> <div class="target-name" data-perm-id="{{actorId}}"><span>{{name}}</span></div>
{{#if (and ../targetMode ../hasRoll)}} {{#if (and ../hasRoll (hasProperty this "hit"))}}
<div class="target-hit-status {{#if hit}}is-hit{{else}}is-miss{{/if}}"> <div class="target-hit-status {{#if hit}}is-hit{{else}}is-miss{{/if}}" data-perm-id="{{actorId}}" data-perm-hidden="true">
{{#if hit}} {{#if hit}}
{{localize "DAGGERHEART.GENERAL.hit.single"}} {{localize "DAGGERHEART.GENERAL.hit.single"}}
{{else}} {{else}}