This commit is contained in:
Dapoolp 2025-09-08 18:19:40 +02:00
commit 8420c707f7
12 changed files with 47 additions and 32 deletions

View file

@ -475,18 +475,21 @@
}, },
"takeLevelUp": "Finish Level Up", "takeLevelUp": "Finish Level Up",
"tier2": { "tier2": {
"name": "Tier 2",
"label": "Levels 2-4", "label": "Levels 2-4",
"infoLabel": "At Level 2, gain an additional Experience at +2 and gain a +1 bonus to your Proficiency.", "infoLabel": "At Level 2, gain an additional Experience at +2 and gain a +1 bonus to your Proficiency.",
"pretext": "Choose two options from the list below", "pretext": "Choose two options from the list below",
"posttext": "Take an additional domain card of your level or lower from a domain you have access to." "posttext": "Take an additional domain card of your level or lower from a domain you have access to."
}, },
"tier3": { "tier3": {
"name": "Tier 3",
"label": "Levels 5-7", "label": "Levels 5-7",
"infoLabel": "At Level 5, take an additional Experience and clear all marks on Character Traits.", "infoLabel": "At Level 5, take an additional Experience and clear all marks on Character Traits.",
"pretext": "When you level up, record it on your character sheet, then choose two from the list below or any unmarked from the previous tier.", "pretext": "When you level up, record it on your character sheet, then choose two from the list below or any unmarked from the previous tier.",
"posttext": "Take an additional domain card of your level or lower from a domain you have access to." "posttext": "Take an additional domain card of your level or lower from a domain you have access to."
}, },
"tier4": { "tier4": {
"name": "Tier 4",
"label": "Levels 8-10", "label": "Levels 8-10",
"infoLabel": "At Level 8, take an additional Experience and clear all marks on Character Traits.", "infoLabel": "At Level 8, take an additional Experience and clear all marks on Character Traits.",
"pretext": "When you level up, record it on your character sheet, then choose two from the list below or any unmarked from the previous tier.", "pretext": "When you level up, record it on your character sheet, then choose two from the list below or any unmarked from the previous tier.",
@ -989,6 +992,12 @@
"selectType": "Select Action Type", "selectType": "Select Action Type",
"selectAction": "Action Selection" "selectAction": "Action Selection"
}, },
"TargetTypes": {
"any": "Any",
"friendly": "Friendly",
"hostile": "Hostile",
"self": "Self"
},
"TemplateTypes": { "TemplateTypes": {
"circle": "Circle", "circle": "Circle",
"cone": "Cone", "cone": "Cone",
@ -1877,7 +1886,9 @@
"tier4": "tier 4", "tier4": "tier 4",
"domains": "Domains", "domains": "Domains",
"downtime": "Downtime", "downtime": "Downtime",
"rules": "Rules" "rules": "Rules",
"configuration": "Configuration",
"base": "Base"
}, },
"Tiers": { "Tiers": {
"singular": "Tier", "singular": "Tier",
@ -1978,6 +1989,8 @@
"save": "Save", "save": "Save",
"scalable": "Scalable", "scalable": "Scalable",
"situationalBonus": "Situational Bonus", "situationalBonus": "Situational Bonus",
"spent": "Spent",
"step": "Step",
"stress": "Stress", "stress": "Stress",
"subclasses": "Subclasses", "subclasses": "Subclasses",
"success": "Success", "success": "Success",

View file

@ -66,7 +66,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
group: 'primary', group: 'primary',
id: 'base', id: 'base',
icon: null, icon: null,
label: 'Base' label: 'DAGGERHEART.GENERAL.Tabs.base'
}, },
config: { config: {
active: false, active: false,
@ -74,7 +74,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
group: 'primary', group: 'primary',
id: 'config', id: 'config',
icon: null, icon: null,
label: 'Configuration' label: 'DAGGERHEART.GENERAL.Tabs.configuration'
}, },
effect: { effect: {
active: false, active: false,
@ -82,7 +82,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
group: 'primary', group: 'primary',
id: 'effect', id: 'effect',
icon: null, icon: null,
label: 'Effect' label: 'DAGGERHEART.GENERAL.Tabs.effects'
} }
}; };

View file

@ -90,22 +90,22 @@ export const rangeInclusion = {
export const otherTargetTypes = { export const otherTargetTypes = {
friendly: { friendly: {
id: 'friendly', id: 'friendly',
label: 'Friendly' label: 'DAGGERHEART.CONFIG.TargetTypes.friendly'
}, },
hostile: { hostile: {
id: 'hostile', id: 'hostile',
label: 'Hostile' label: 'DAGGERHEART.CONFIG.TargetTypes.hostile'
}, },
any: { any: {
id: 'any', id: 'any',
label: 'Any' label: 'DAGGERHEART.CONFIG.TargetTypes.any'
} }
}; };
export const targetTypes = { export const targetTypes = {
self: { self: {
id: 'self', id: 'self',
label: 'Self' label: 'DAGGERHEART.CONFIG.TargetTypes.self'
}, },
...otherTargetTypes ...otherTargetTypes
}; };

View file

@ -94,7 +94,8 @@ export default class CostField extends fields.ArrayField {
} }
static getRealCosts(costs) { static getRealCosts(costs) {
const realCosts = costs?.length ? costs.filter(c => c.enabled) : []; const cloneCosts = foundry.utils.deepClone(costs),
realCosts = cloneCosts?.length ? cloneCosts.filter(c => c.enabled) : [];
let mergedCosts = []; let mergedCosts = [];
realCosts.forEach(c => { realCosts.forEach(c => {
const getCost = Object.values(mergedCosts).find(gc => gc.key === c.key); const getCost = Object.values(mergedCosts).find(gc => gc.key === c.key);

View file

@ -169,7 +169,7 @@ export const defaultLevelTiers = {
tiers: { tiers: {
2: { 2: {
tier: 2, tier: 2,
name: 'Tier 2', name: 'DAGGERHEART.APPLICATIONS.Levelup.tier2.name',
levels: { levels: {
start: 2, start: 2,
end: 4 end: 4
@ -232,7 +232,7 @@ export const defaultLevelTiers = {
}, },
3: { 3: {
tier: 3, tier: 3,
name: 'Tier 3', name: 'DAGGERHEART.APPLICATIONS.Levelup.tier3.name',
levels: { levels: {
start: 5, start: 5,
end: 7 end: 7
@ -313,7 +313,7 @@ export const defaultLevelTiers = {
}, },
4: { 4: {
tier: 4, tier: 4,
name: 'Tier 4', name: 'DAGGERHEART.APPLICATIONS.Levelup.tier4.name',
levels: { levels: {
start: 8, start: 8,
end: 10 end: 10

View file

@ -234,7 +234,7 @@ export class DhLevelup extends foundry.abstract.DataModel {
const subclassInTier = subclasses.some(x => x.tier === Number(tierKey)); const subclassInTier = subclasses.some(x => x.tier === Number(tierKey));
return { return {
name: tier.name, name: game.i18n.localize(tier.name),
active: this.currentLevel >= Math.min(...tier.belongingLevels), active: this.currentLevel >= Math.min(...tier.belongingLevels),
groups: Object.keys(tier.options).map(optionKey => { groups: Object.keys(tier.options).map(optionKey => {
const option = tier.options[optionKey]; const option = tier.options[optionKey];

View file

@ -169,7 +169,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
if (this.system.source.item && this.system.source.action) { if (this.system.source.item && this.system.source.action) {
const action = this.getAction(actor, this.system.source.item, this.system.source.action); const action = this.getAction(actor, this.system.source.item, this.system.source.action);
if (!action || !action?.applyEffects) return; if (!action || !action?.applyEffects) return;
const targets = this.getTargetList(); const targets = this.system.hitTargets;
if (targets.length === 0) if (targets.length === 0)
ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noTargetsSelected')); ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noTargetsSelected'));
this.consumeOnSuccess(); this.consumeOnSuccess();

View file

@ -105,19 +105,20 @@
"img": "icons/skills/melee/blood-slash-foam-red.webp", "img": "icons/skills/melee/blood-slash-foam-red.webp",
"type": "attack", "type": "attack",
"chatDisplay": false "chatDisplay": false
} },
"motivesAndTactics": "Hide in plain sight, preserve the forest, root down, swing branches"
}, },
"flags": {}, "flags": {},
"_stats": { "_stats": {
"compendiumSource": null, "compendiumSource": null,
"duplicateSource": null, "duplicateSource": null,
"exportSource": null, "exportSource": null,
"coreVersion": "13.347", "coreVersion": "13.348",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "0.0.1", "systemVersion": "1.1.2",
"createdTime": 1753922784314, "createdTime": 1753922784314,
"modifiedTime": 1755259462770, "modifiedTime": 1757057641714,
"lastModifiedBy": "VZIeX2YDvX338Zvr" "lastModifiedBy": "mdk78Q6pOyHh6aBg"
}, },
"_id": "XK78QUfY8c8Go8Uv", "_id": "XK78QUfY8c8Go8Uv",
"sort": 3400000, "sort": 3400000,

View file

@ -1,6 +1,6 @@
<fieldset class="one-column" data-key="cost"> <fieldset class="one-column" data-key="cost">
<legend> <legend>
Cost {{localize "DAGGERHEART.GENERAL.Cost.single"}}
<a><i class="fa-solid fa-plus icon-button" data-action="addElement"></i></a> <a><i class="fa-solid fa-plus icon-button" data-action="addElement"></i></a>
</legend> </legend>
{{#each source as |cost index|}} {{#each source as |cost index|}}
@ -8,10 +8,10 @@
{{formField ../fields.consumeOnSuccess value=cost.consumeOnSuccess name=(concat "cost." index ".consumeOnSuccess") classes="checkbox" rootId=partId localize=true}} {{formField ../fields.consumeOnSuccess value=cost.consumeOnSuccess name=(concat "cost." index ".consumeOnSuccess") classes="checkbox" rootId=partId localize=true}}
{{/if}} {{/if}}
<div class="nest-inputs"> <div class="nest-inputs">
{{formField ../fields.scalable label="Scalable" value=cost.scalable name=(concat "cost." index ".scalable") classes="checkbox"}} {{formField ../fields.scalable label="DAGGERHEART.GENERAL.scalable" value=cost.scalable name=(concat "cost." index ".scalable") classes="checkbox" localize=true}}
{{formField ../fields.key choices=(@root.disableOption index @root.costOptions ../source) label="Resource" value=cost.key name=(concat "cost." index ".key") localize=true blank=false}} {{formField ../fields.key choices=(@root.disableOption index @root.costOptions ../source) label="DAGGERHEART.GENERAL.resource" value=cost.key name=(concat "cost." index ".key") localize=true blank=false}}
{{formField ../fields.value label="Amount" value=cost.value name=(concat "cost." index ".value")}} {{formField ../fields.value label="DAGGERHEART.GENERAL.amount" value=cost.value name=(concat "cost." index ".value") localize=true}}
{{formField ../fields.step label="Step" value=cost.step name=(concat "cost." index ".step") disabled=(not cost.scalable)}} {{formField ../fields.step label="DAGGERHEART.GENERAL.step" value=cost.step name=(concat "cost." index ".step") disabled=(not cost.scalable) localize=true}}
<a class="btn" data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeElement" data-index="{{index}}"><i class="fas fa-trash"></i></a> <a class="btn" data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeElement" data-index="{{index}}"><i class="fas fa-trash"></i></a>
</div> </div>
{{/each}} {{/each}}

View file

@ -1,12 +1,12 @@
<fieldset class="one-column"> <fieldset class="one-column">
<legend>{{localize "DAGGERHEART.GENERAL.range"}}{{#if fields.target}} & {{localize "DAGGERHEART.GENERAL.Target.single"}}{{/if}}</legend> <legend>{{localize "DAGGERHEART.GENERAL.range"}}{{#if fields.target}} & {{localize "DAGGERHEART.GENERAL.Target.single"}}{{/if}}</legend>
{{formField fields.range value=source.range label="Range" name=(concat path "range") localize=true}} {{formField fields.range value=source.range label="DAGGERHEART.GENERAL.range" name=(concat path "range") localize=true}}
{{#if fields.target}} {{#if fields.target}}
<div class="nest-inputs"> <div class="nest-inputs">
{{#if (and source.target.type (not (eq source.target.type 'self')))}} {{#if (and source.target.type (not (eq source.target.type 'self')))}}
{{ formField fields.target.amount value=source.target.amount label="Amount" name=(concat path "target.amount") }} {{ formField fields.target.amount value=source.target.amount label="DAGGERHEART.GENERAL.amount" name=(concat path "target.amount") localize=true}}
{{/if}} {{/if}}
{{ formField fields.target.type value=source.target.type label="Target" name=(concat path "target.type") localize=true }} {{ formField fields.target.type value=source.target.type label="DAGGERHEART.GENERAL.Target.single" name=(concat path "target.type") localize=true }}
</div> </div>
{{/if}} {{/if}}
</fieldset> </fieldset>

View file

@ -4,8 +4,8 @@
{{formField fields.consumeOnSuccess value=source.consumeOnSuccess name="uses.consumeOnSuccess" classes="checkbox" rootId=partId localize=true}} {{formField fields.consumeOnSuccess value=source.consumeOnSuccess name="uses.consumeOnSuccess" classes="checkbox" rootId=partId localize=true}}
{{/if}} {{/if}}
<div class="nest-inputs"> <div class="nest-inputs">
{{formField fields.value label="Spent" value=source.value name="uses.value" rootId=partId}} {{formField fields.value label="DAGGERHEART.GENERAL.spent" value=source.value name="uses.value" rootId=partId localize=true}}
{{formField fields.max label="Max" value=source.max name="uses.max" rootId=partId}} {{formField fields.max label="DAGGERHEART.GENERAL.max" value=source.max name="uses.max" rootId=partId localize=true}}
</div> </div>
{{formField fields.recovery label="Recovery" value=source.recovery name="uses.recovery" rootId=partId localize=true}} {{formField fields.recovery label="DAGGERHEART.GENERAL.recovery" value=source.recovery name="uses.recovery" rootId=partId localize=true}}
</fieldset> </fieldset>

View file

@ -148,7 +148,7 @@
<select class="roll-mode-select" name="selectedRollMode"> <select class="roll-mode-select" name="selectedRollMode">
{{selectOptions rollModes selected=selectedRollMode valueAttr="action" labelAttr="label" localize=true}} {{selectOptions rollModes selected=selectedRollMode valueAttr="action" labelAttr="label" localize=true}}
</select> </select>
<button class="sunmit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}> <button class="submit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}>
<i class="fa-solid fa-dice"></i> <i class="fa-solid fa-dice"></i>
<span class="label"> <span class="label">
{{#if @root.rollConfig.roll.difficulty}} {{#if @root.rollConfig.roll.difficulty}}
@ -164,7 +164,7 @@
{{> 'systems/daggerheart/templates/dialogs/dice-roll/costSelection.hbs'}} {{> 'systems/daggerheart/templates/dialogs/dice-roll/costSelection.hbs'}}
{{/if}} {{/if}}
<div class="roll-dialog-controls"> <div class="roll-dialog-controls">
<button class="sunmit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}> <button class="submit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}>
<span class="label">{{localize "DAGGERHEART.GENERAL.continue"}}</span> <span class="label">{{localize "DAGGERHEART.GENERAL.continue"}}</span>
</button> </button>
</div> </div>