Merged with action branch

This commit is contained in:
WBHarry 2025-06-24 16:03:58 +02:00
commit f4539ab158
48 changed files with 2747 additions and 387 deletions

View file

@ -0,0 +1,3 @@
<svg width="35" height="25" viewBox="0 0 35 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M32.0195 21.126C32.6293 22.7597 31.4216 24.5 29.6777 24.5L3.32226 24.5C1.57838 24.5 0.370692 22.7597 0.980468 21.126L3.74316 13.7246C4.0379 12.9351 4.0379 12.0649 3.74316 11.2754L0.980469 3.87402C0.370692 2.24027 1.57838 0.499999 3.32227 0.499999L29.6777 0.5C31.4216 0.5 32.6293 2.24027 32.0195 3.87402L29.2568 11.2754C28.9621 12.0649 28.9621 12.9351 29.2568 13.7246L32.0195 21.126Z" fill="transparent" stroke="#18162E"/>
</svg>

After

Width:  |  Height:  |  Size: 535 B

View file

@ -0,0 +1,3 @@
<svg width="35" height="25" viewBox="0 0 35 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M32.0195 21.126C32.6293 22.7597 31.4216 24.5 29.6777 24.5L3.32226 24.5C1.57838 24.5 0.370692 22.7597 0.980468 21.126L3.74316 13.7246C4.0379 12.9351 4.0379 12.0649 3.74316 11.2754L0.980469 3.87402C0.370692 2.24027 1.57838 0.499999 3.32227 0.499999L29.6777 0.5C31.4216 0.5 32.6293 2.24027 32.0195 3.87402L29.2568 11.2754C28.9621 12.0649 28.9621 12.9351 29.2568 13.7246L32.0195 21.126Z" fill="#18162E" fill-opacity="0.33" stroke="#F3C267"/>
</svg>

After

Width:  |  Height:  |  Size: 551 B

View file

@ -0,0 +1,3 @@
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.12012 0.5H51.8799C55.2901 0.500041 57.8779 3.57175 57.2998 6.93262L50.4639 46.6777C50.1604 48.4411 49.0179 49.9467 47.4014 50.7139L31.3584 58.3271C29.8661 59.0354 28.1339 59.0354 26.6416 58.3271L10.5986 50.7139C8.98214 49.9467 7.83959 48.4411 7.53613 46.6777L0.700195 6.93262C0.122088 3.57175 2.7099 0.500042 6.12012 0.5Z" fill="transparent" stroke="#18162e"/>
</svg>

After

Width:  |  Height:  |  Size: 476 B

View file

@ -0,0 +1,3 @@
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.12012 0.5H51.8799C55.2901 0.500041 57.8779 3.57175 57.2998 6.93262L50.4639 46.6777C50.1604 48.4411 49.0179 49.9467 47.4014 50.7139L31.3584 58.3271C29.8661 59.0354 28.1339 59.0354 26.6416 58.3271L10.5986 50.7139C8.98214 49.9467 7.83959 48.4411 7.53613 46.6777L0.700195 6.93262C0.122088 3.57175 2.7099 0.500042 6.12012 0.5Z" fill="#18152E" stroke="#F3C267"/>
</svg>

After

Width:  |  Height:  |  Size: 472 B

View file

@ -16,7 +16,7 @@ import Resources from './module/applications/resources.mjs';
import { NarrativeCountdowns, registerCountdownApplicationHooks } from './module/applications/countdowns.mjs'; import { NarrativeCountdowns, registerCountdownApplicationHooks } from './module/applications/countdowns.mjs';
import DHDualityRoll from './module/data/chat-message/dualityRoll.mjs'; import DHDualityRoll from './module/data/chat-message/dualityRoll.mjs';
import { DualityRollColor } from './module/data/settings/Appearance.mjs'; import { DualityRollColor } from './module/data/settings/Appearance.mjs';
import { DHRoll, DualityRoll, D20Roll, DamageRoll, DualityDie } from './module/applications/roll.mjs' import { DHRoll, DualityRoll, D20Roll, DamageRoll, DualityDie } from './module/applications/roll.mjs';
import { DhMeasuredTemplate } from './module/placeables/_module.mjs'; import { DhMeasuredTemplate } from './module/placeables/_module.mjs';
import { renderDualityButton } from './module/enrichers/DualityRollEnricher.mjs'; import { renderDualityButton } from './module/enrichers/DualityRollEnricher.mjs';
import { renderMeasuredTemplate } from './module/enrichers/TemplateEnricher.mjs'; import { renderMeasuredTemplate } from './module/enrichers/TemplateEnricher.mjs';
@ -282,6 +282,11 @@ Hooks.on('renderJournalDirectory', async (tab, html, _, options) => {
const preloadHandlebarsTemplates = async function () { const preloadHandlebarsTemplates = async function () {
return foundry.applications.handlebars.loadTemplates([ return foundry.applications.handlebars.loadTemplates([
'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs',
'systems/daggerheart/templates/sheets/global/partials/inventory-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/parts/attributes.hbs', 'systems/daggerheart/templates/sheets/parts/attributes.hbs',
'systems/daggerheart/templates/sheets/parts/defense.hbs', 'systems/daggerheart/templates/sheets/parts/defense.hbs',
'systems/daggerheart/templates/sheets/parts/armor.hbs', 'systems/daggerheart/templates/sheets/parts/armor.hbs',

View file

@ -280,17 +280,17 @@
"SpellcastingTrait": "Spellcasting Trait" "SpellcastingTrait": "Spellcasting Trait"
}, },
"Condition": { "Condition": {
"Vulnerable": { "vulnerable": {
"Name": "Vulnerable", "name": "Vulnerable",
"Description": "While a creature is Vulnerable, all rolls targeting them have advantage.\nA creature who is already Vulnerable cant be made to take the condition again." "description": "While a creature is Vulnerable, all rolls targeting them have advantage.\nA creature who is already Vulnerable cant be made to take the condition again."
}, },
"Hidden": { "hidden": {
"Name": "Hidden", "name": "Hidden",
"Description": "While Hidden, attacks cannot be made directly targeting them nd any rolls against them are at disadvantage.\nWhen a Hidden creature moves or attacks, they are no longer Hidden. However, if a creature is Hidden when they begin making an attack, the roll has advantage; the Hidden condition isnt cleared until after the attack is resolved." "description": "While Hidden, attacks cannot be made directly targeting them nd any rolls against them are at disadvantage.\nWhen a Hidden creature moves or attacks, they are no longer Hidden. However, if a creature is Hidden when they begin making an attack, the roll has advantage; the Hidden condition isnt cleared until after the attack is resolved."
}, },
"Restrained": { "restrained": {
"Name": "Restrained", "name": "Restrained",
"Description": "When an effect makes a creature Restrained, it means they cannot move until this condition is cleared.\nThey can still take actions from their current position." "description": "When an effect makes a creature Restrained, it means they cannot move until this condition is cleared.\nThey can still take actions from their current position."
} }
}, },
"Tiers": { "Tiers": {
@ -1104,6 +1104,8 @@
"PC": { "PC": {
"Name": "Name", "Name": "Name",
"Pronouns": "Pronouns", "Pronouns": "Pronouns",
"age": "Age",
"faith": "Faith",
"ShortRest": "Take a Short Rest", "ShortRest": "Take a Short Rest",
"LongRest": "Take a Long Rest", "LongRest": "Take a Long Rest",
"Level": "Level", "Level": "Level",
@ -1115,7 +1117,9 @@
"Loadout": "Loadout", "Loadout": "Loadout",
"Vault": "Vault", "Vault": "Vault",
"Heritage": "Heritage", "Heritage": "Heritage",
"Story": "Story" "Story": "Story",
"biography": "Biography",
"effects": "Effects"
}, },
"Armor": { "Armor": {
"Title": "Active Armor" "Title": "Active Armor"
@ -1194,6 +1198,7 @@
"BackgroundTitle": "Background", "BackgroundTitle": "Background",
"AppearanceTitle": "Appearance", "AppearanceTitle": "Appearance",
"ConnectionsTitle": "Connections", "ConnectionsTitle": "Connections",
"characteristics": "Characteristics",
"Scars": { "Scars": {
"Title": "Scars" "Title": "Scars"
} }
@ -1353,7 +1358,9 @@
}, },
"Global": { "Global": {
"Actions": "Actions", "Actions": "Actions",
"Effects": "Effects" "Effects": "Effects",
"activeEffects": "Active Effects",
"inativeEffects": "Inative Effects"
}, },
"DomainCard": { "DomainCard": {
"Type": "Type", "Type": "Type",
@ -1444,6 +1451,10 @@
} }
}, },
"Effects": { "Effects": {
"duration": {
"passive": "Passive",
"temporary": "Temporary"
},
"Types": { "Types": {
"health": { "health": {
"Name": "Health" "Name": "Health"
@ -1469,7 +1480,13 @@
}, },
"Tooltip": { "Tooltip": {
"openItemWorld": "Open Item World", "openItemWorld": "Open Item World",
"delete": "Delete" "sendToChat": "Send to Chat",
"moreOptions": "More Options",
"equip": "Equip",
"unequip": "Unequip",
"delete": "Delete",
"sendToVault": "Send to Vault",
"sendToLoadout": "Send to Loadout"
}, },
"Actions": { "Actions": {
"Types": { "Types": {

View file

@ -1,9 +1,10 @@
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api; const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
export default class CostSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) { export default class CostSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
constructor(costs, action, resolve) { constructor(costs, uses, action, resolve) {
super({}); super({});
this.costs = costs; this.costs = costs;
this.uses = uses;
this.action = action; this.action = action;
this.resolve = resolve; this.resolve = resolve;
} }
@ -41,21 +42,25 @@ export default class CostSelectionDialog extends HandlebarsApplicationMixin(Appl
} }
async _prepareContext(_options) { async _prepareContext(_options) {
const updatedCosts = this.action.calcCosts(this.costs); const updatedCosts = this.action.calcCosts(this.costs),
updatedUses = this.action.calcUses(this.uses);
return { return {
costs: updatedCosts, costs: updatedCosts,
canUse: this.action.getRealCosts(updatedCosts)?.hasCost uses: updatedUses,
canUse: this.action.getRealCosts(updatedCosts)?.hasCost && this.action.hasUses(updatedUses)
}; };
} }
static async updateForm(event, _, formData) { static async updateForm(event, _, formData) {
this.costs = foundry.utils.mergeObject(this.costs, foundry.utils.expandObject(formData.object).costs); const data = foundry.utils.expandObject(formData.object);
this.render(true) this.costs = foundry.utils.mergeObject(this.costs, data.costs);
this.uses = foundry.utils.mergeObject(this.uses, data.uses);
this.render(true);
} }
static sendCost(event) { static sendCost(event) {
event.preventDefault(); event.preventDefault();
this.resolve(this.action.getRealCosts(this.costs)); this.resolve({ costs: this.action.getRealCosts(this.costs), uses: this.uses });
this.close(); this.close();
} }
} }

View file

@ -11,19 +11,19 @@ export class DHRoll extends Roll {
super(formula, data, options); super(formula, data, options);
} }
static async build(config={}, message={}) { static async build(config = {}, message = {}) {
const roll = await this.buildConfigure(config, message); const roll = await this.buildConfigure(config, message);
if(!roll) return; if (!roll) return;
await this.buildEvaluate(roll, config, message={}); await this.buildEvaluate(roll, config, (message = {}));
await this.buildPost(roll, config, message={}); await this.buildPost(roll, config, (message = {}));
return roll; return roll;
} }
static async buildConfigure(config={}, message={}) { static async buildConfigure(config = {}, message = {}) {
config.hooks = [...(config.hooks ?? []), ""]; config.hooks = [...(config.hooks ?? []), ''];
config.dialog ??= {}; config.dialog ??= {};
for ( const hook of config.hooks ) { for (const hook of config.hooks) {
if ( Hooks.call(`${SYSTEM.id}.preRoll${hook.capitalize()}`, config, message) === false ) return null; if (Hooks.call(`${SYSTEM.id}.preRoll${hook.capitalize()}`, config, message) === false) return null;
} }
this.applyKeybindings(config); this.applyKeybindings(config);
@ -32,45 +32,44 @@ export class DHRoll extends Roll {
// if(config.dialog?.configure === false) { // if(config.dialog?.configure === false) {
// roll = new this('', config.actor, config); // roll = new this('', config.actor, config);
// } else { // } else {
if(config.dialog.configure !== false) { if (config.dialog.configure !== false) {
// Open Roll Dialog // Open Roll Dialog
const DialogClass = config.dialog?.class ?? this.DefaultDialog; const DialogClass = config.dialog?.class ?? this.DefaultDialog;
config = await DialogClass.configure(config, message); config = await DialogClass.configure(config, message);
if(!config) return; if (!config) return;
} }
let roll = new this(config.formula, config.actor, config); let roll = new this(config.formula, config.actor, config);
for ( const hook of config.hooks ) { for (const hook of config.hooks) {
if ( Hooks.call(`${SYSTEM.id}.post${hook.capitalize()}RollConfiguration`, roll, config, message) === false ) return []; if (Hooks.call(`${SYSTEM.id}.post${hook.capitalize()}RollConfiguration`, roll, config, message) === false)
return [];
} }
return roll; return roll;
} }
static async buildEvaluate(roll, config={}, message={}) { static async buildEvaluate(roll, config = {}, message = {}) {
if(config.evaluate !== false) await roll.evaluate(); if (config.evaluate !== false) await roll.evaluate();
this.postEvaluate(roll, config); this.postEvaluate(roll, config);
} }
static async buildPost(roll, config, message) {
for ( const hook of config.hooks ) {
if ( Hooks.call(`${SYSTEM.id}.postRoll${hook.capitalize()}`, config, message) === false ) return null;
}
// Create Chat Message
if(message.data) {
static async buildPost(roll, config, message) {
for (const hook of config.hooks) {
if (Hooks.call(`${SYSTEM.id}.postRoll${hook.capitalize()}`, config, message) === false) return null;
}
// Create Chat Message
if (message.data) {
} else { } else {
const messageData = {}; const messageData = {};
await this.toMessage(roll, config); await this.toMessage(roll, config);
} }
} }
static async postEvaluate(roll, config={}) {} static async postEvaluate(roll, config = {}) {}
static async toMessage(roll, config) { static async toMessage(roll, config) {
console.log(config) const cls = getDocumentClass('ChatMessage'),
const cls = getDocumentClass("ChatMessage"),
msg = { msg = {
type: this.messageType, type: this.messageType,
user: game.user.id, user: game.user.id,
@ -80,7 +79,6 @@ export class DHRoll extends Roll {
content: await this.messageTemplate(config), content: await this.messageTemplate(config),
rolls: [roll] rolls: [roll]
}; };
console.log(msg)
await cls.create(msg); await cls.create(msg);
} }
@ -95,13 +93,13 @@ export class DHRoll extends Roll {
// D20Die // D20Die
export class DualityDie extends foundry.dice.terms.Die { export class DualityDie extends foundry.dice.terms.Die {
constructor({ number=1, faces=12, ...args }={}) { constructor({ number = 1, faces = 12, ...args } = {}) {
super({ number, faces, ...args }); super({ number, faces, ...args });
} }
} }
export class D20Roll extends DHRoll { export class D20Roll extends DHRoll {
constructor(formula, data={}, options={}) { constructor(formula, data = {}, options = {}) {
super(formula, data, options); super(formula, data, options);
// console.log(data, options) // console.log(data, options)
// this.options = this._prepareData(data); // this.options = this._prepareData(data);
@ -122,21 +120,21 @@ export class D20Roll extends DHRoll {
// static messageTemplate = 'systems/daggerheart/templates/chat/adversary-roll.hbs'; // static messageTemplate = 'systems/daggerheart/templates/chat/adversary-roll.hbs';
static messageTemplate = async (config) => { static messageTemplate = async config => {
return 'systems/daggerheart/templates/chat/adversary-roll.hbs'; return 'systems/daggerheart/templates/chat/adversary-roll.hbs';
} };
static CRITICAL_TRESHOLD = 20; static CRITICAL_TRESHOLD = 20;
static DefaultDialog = D20RollDialog; static DefaultDialog = D20RollDialog;
get d20() { get d20() {
if ( !(this.terms[0] instanceof foundry.dice.terms.Die) ) this.createBaseDice(); if (!(this.terms[0] instanceof foundry.dice.terms.Die)) this.createBaseDice();
return this.terms[0]; return this.terms[0];
} }
set d20(faces) { set d20(faces) {
if ( !(this.terms[0] instanceof foundry.dice.terms.Die) ) this.createBaseDice(); if (!(this.terms[0] instanceof foundry.dice.terms.Die)) this.createBaseDice();
this.terms[0].faces = faces; this.terms[0].faces = faces;
} }
@ -145,7 +143,7 @@ export class D20Roll extends DHRoll {
} }
get isCritical() { get isCritical() {
if ( !this.d20._evaluated ) return; if (!this.d20._evaluated) return;
return this.d20.total >= this.constructor.CRITICAL_TRESHOLD; return this.d20.total >= this.constructor.CRITICAL_TRESHOLD;
} }
@ -163,66 +161,69 @@ export class D20Roll extends DHRoll {
advantage: config.event.altKey, advantage: config.event.altKey,
disadvantage: config.event.ctrlKey disadvantage: config.event.ctrlKey
}; };
// Should the roll configuration dialog be displayed? // Should the roll configuration dialog be displayed?
config.dialog.configure ??= !Object.values(keys).some(k => k); config.dialog.configure ??= !Object.values(keys).some(k => k);
// Determine advantage mode // Determine advantage mode
const advantage = config.advantage || keys.advantage; const advantage = config.advantage || keys.advantage;
const disadvantage = config.disadvantage || keys.disadvantage; const disadvantage = config.disadvantage || keys.disadvantage;
if ( advantage && !disadvantage ) config.advantage = this.ADV_MODE.ADVANTAGE; if (advantage && !disadvantage) config.advantage = this.ADV_MODE.ADVANTAGE;
else if ( !advantage && disadvantage ) config.advantage = this.ADV_MODE.DISADVANTAGE; else if (!advantage && disadvantage) config.advantage = this.ADV_MODE.DISADVANTAGE;
else config.advantage = this.ADV_MODE.NORMAL; else config.advantage = this.ADV_MODE.NORMAL;
} }
createBaseDice() { createBaseDice() {
if ( this.terms[0] instanceof foundry.dice.terms.Die ) return; if (this.terms[0] instanceof foundry.dice.terms.Die) return;
this.terms[0] = new foundry.dice.terms.Die({ faces: 20 }); this.terms[0] = new foundry.dice.terms.Die({ faces: 20 });
} }
applyAdvantage() { applyAdvantage() {
this.d20.modifiers.findSplice(m => ["kh", "kl"].includes(m)); this.d20.modifiers.findSplice(m => ['kh', 'kl'].includes(m));
if ( !this.hasAdvantage && !this.hasAdvantage ) this.number = 1; if (!this.hasAdvantage && !this.hasAdvantage) this.number = 1;
else { else {
this.d20.number = 2; this.d20.number = 2;
this.d20.modifiers.push(this.hasAdvantage ? "kh" : "kl"); this.d20.modifiers.push(this.hasAdvantage ? 'kh' : 'kl');
} }
} }
// Trait bonus != Adversary // Trait bonus != Adversary
configureModifiers() { configureModifiers() {
this.applyAdvantage(); this.applyAdvantage();
this.applyBaseBonus(); this.applyBaseBonus();
this.options.experiences?.forEach(m => { this.options.experiences?.forEach(m => {
if(this.options.actor.experiences?.[m]) this.options.roll.modifiers.push( if (this.options.actor.experiences?.[m])
{ this.options.roll.modifiers.push({
label: this.options.actor.experiences[m].description, label: this.options.actor.experiences[m].description,
value: this.options.actor.experiences[m].total value: this.options.actor.experiences[m].total
} });
); });
})
this.options.roll.modifiers?.forEach(m => { this.options.roll.modifiers?.forEach(m => {
this.terms.push(...this.formatModifier(m.value)); this.terms.push(...this.formatModifier(m.value));
}) });
if(this.options.extraFormula) this.terms.push(new foundry.dice.terms.OperatorTerm({operator: '+'}), ...this.constructor.parse(this.options.extraFormula, this.getRollData())); if (this.options.extraFormula)
this.terms.push(
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
...this.constructor.parse(this.options.extraFormula, this.getRollData())
);
// this.resetFormula(); // this.resetFormula();
} }
applyBaseBonus() { applyBaseBonus() {
// if(this.options.action) { // if(this.options.action) {
if(this.options.type === "attack") this.terms.push(...this.formatModifier(this.options.actor.system.attack.modifier)); if (this.options.type === 'attack')
/* this.options.roll.modifiers?.forEach(m => { this.terms.push(...this.formatModifier(this.options.actor.system.attack.modifier));
/* this.options.roll.modifiers?.forEach(m => {
this.terms.push(...this.formatModifier(m)); this.terms.push(...this.formatModifier(m));
}) */ }) */
// } // }
} }
static async postEvaluate(roll, config={}) { static async postEvaluate(roll, config = {}) {
if (config.targets?.length) { if (config.targets?.length) {
/* targets = config.targets.map(target => { /* targets = config.targets.map(target => {
const difficulty = config.roll.difficulty ?? target.difficulty ?? target.evasion const difficulty = config.roll.difficulty ?? target.difficulty ?? target.evasion
@ -230,10 +231,10 @@ export class D20Roll extends DHRoll {
return target; return target;
}); */ }); */
config.targets.forEach(target => { config.targets.forEach(target => {
const difficulty = config.roll.difficulty ?? target.difficulty ?? target.evasion const difficulty = config.roll.difficulty ?? target.difficulty ?? target.evasion;
target.hit = roll.total >= difficulty; target.hit = roll.total >= difficulty;
}) });
} else if(config.roll.difficulty) roll.success = roll.total >= config.roll.difficulty; } else if (config.roll.difficulty) roll.success = roll.total >= config.roll.difficulty;
// config.roll.advantage = { // config.roll.advantage = {
// dice: roll.dHope.faces, // dice: roll.dHope.faces,
// value: roll.dHope.total // value: roll.dHope.total
@ -244,8 +245,8 @@ export class D20Roll extends DHRoll {
type: config.advantage, type: config.advantage,
dice: roll.dAdvantage?.denomination, dice: roll.dAdvantage?.denomination,
value: roll.dAdvantage?.total value: roll.dAdvantage?.total
} };
config.roll.modifierTotal = config.roll.modifiers.reduce((a,c) => a + c.value, 0); config.roll.modifierTotal = config.roll.modifiers.reduce((a, c) => a + c.value, 0);
} }
getRollData() { getRollData() {
@ -254,51 +255,54 @@ export class D20Roll extends DHRoll {
formatModifier(modifier) { formatModifier(modifier) {
const numTerm = modifier < 0 ? '-' : '+'; const numTerm = modifier < 0 ? '-' : '+';
return [new foundry.dice.terms.OperatorTerm({operator: numTerm}), new foundry.dice.terms.NumericTerm({number: Math.abs(modifier)})]; return [
new foundry.dice.terms.OperatorTerm({ operator: numTerm }),
new foundry.dice.terms.NumericTerm({ number: Math.abs(modifier) })
];
} }
resetFormula() { resetFormula() {
return this._formula = this.constructor.getFormula(this.terms); return (this._formula = this.constructor.getFormula(this.terms));
} }
} }
export class DualityRoll extends D20Roll { export class DualityRoll extends D20Roll {
constructor(formula, data={}, options={}) { constructor(formula, data = {}, options = {}) {
super(formula, data, options); super(formula, data, options);
} }
static messageType = 'dualityRoll'; static messageType = 'dualityRoll';
// static messageTemplate = 'systems/daggerheart/templates/chat/duality-roll.hbs'; // static messageTemplate = 'systems/daggerheart/templates/chat/duality-roll.hbs';
static messageTemplate = async (config) => { static messageTemplate = async config => {
return 'systems/daggerheart/templates/chat/duality-roll.hbs'; return 'systems/daggerheart/templates/chat/duality-roll.hbs';
} };
static DefaultDialog = D20RollDialog; static DefaultDialog = D20RollDialog;
get dHope() { get dHope() {
// if ( !(this.terms[0] instanceof foundry.dice.terms.Die) ) return; // if ( !(this.terms[0] instanceof foundry.dice.terms.Die) ) return;
if ( !(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie) ) this.createBaseDice(); if (!(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie)) this.createBaseDice();
return this.dice[0]; return this.dice[0];
// return this.#hopeDice; // return this.#hopeDice;
} }
set dHope(faces) { set dHope(faces) {
if ( !(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie) ) this.createBaseDice(); if (!(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie)) this.createBaseDice();
this.terms[0].faces = faces; this.terms[0].faces = faces;
// this.#hopeDice = `d${face}`; // this.#hopeDice = `d${face}`;
} }
get dFear() { get dFear() {
// if ( !(this.terms[1] instanceof foundry.dice.terms.Die) ) return; // if ( !(this.terms[1] instanceof foundry.dice.terms.Die) ) return;
if ( !(this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie) ) this.createBaseDice(); if (!(this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie)) this.createBaseDice();
return this.dice[1]; return this.dice[1];
// return this.#fearDice; // return this.#fearDice;
} }
set dFear(faces) { set dFear(faces) {
if ( !(this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie) ) this.createBaseDice(); if (!(this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie)) this.createBaseDice();
this.dice[1].faces = faces; this.dice[1].faces = faces;
// this.#fearDice = `d${face}`; // this.#fearDice = `d${face}`;
} }
@ -308,17 +312,17 @@ export class DualityRoll extends D20Roll {
} }
get isCritical() { get isCritical() {
if ( !this.dHope._evaluated || !this.dFear._evaluated ) return; if (!this.dHope._evaluated || !this.dFear._evaluated) return;
return this.dHope.total === this.dFear.total; return this.dHope.total === this.dFear.total;
} }
get withHope() { get withHope() {
if(!this._evaluated) return; if (!this._evaluated) return;
return this.dHope.total > this.dFear.total; return this.dHope.total > this.dFear.total;
} }
get withFear() { get withFear() {
if(!this._evaluated) return; if (!this._evaluated) return;
return this.dHope.total < this.dFear.total; return this.dHope.total < this.dFear.total;
} }
@ -326,105 +330,110 @@ export class DualityRoll extends D20Roll {
return null; return null;
} }
get totalLabel() { get totalLabel() {
const label = const label = this.withHope
this.withHope ? 'DAGGERHEART.General.Hope'
? 'DAGGERHEART.General.Hope' : this.withFear
: this.withFear ? 'DAGGERHEART.General.Fear'
? 'DAGGERHEART.General.Fear' : 'DAGGERHEART.General.CriticalSuccess';
: 'DAGGERHEART.General.CriticalSuccess';
return game.i18n.localize(label); return game.i18n.localize(label);
} }
createBaseDice() { createBaseDice() {
if ( this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie && this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie ) return; if (
if ( !(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie) ) this.terms[0] = new CONFIG.Dice.daggerheart.DualityDie(); this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie &&
this.terms[1] = new foundry.dice.terms.OperatorTerm({operator:'+'}); this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie
if ( !(this.dice[2] instanceof CONFIG.Dice.daggerheart.DualityDie) ) this.terms[2] = new CONFIG.Dice.daggerheart.DualityDie(); )
return;
if (!(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie))
this.terms[0] = new CONFIG.Dice.daggerheart.DualityDie();
this.terms[1] = new foundry.dice.terms.OperatorTerm({ operator: '+' });
if (!(this.dice[2] instanceof CONFIG.Dice.daggerheart.DualityDie))
this.terms[2] = new CONFIG.Dice.daggerheart.DualityDie();
} }
applyAdvantage() { applyAdvantage() {
const dieFaces = 6, const dieFaces = 6,
bardRallyFaces = this.hasBarRally, bardRallyFaces = this.hasBarRally,
advDie = new foundry.dice.terms.Die({faces: dieFaces}); advDie = new foundry.dice.terms.Die({ faces: dieFaces });
// console.log(this.hasAdvantage, this.hasDisadvantage) // console.log(this.hasAdvantage, this.hasDisadvantage)
if(this.hasAdvantage || this.hasDisadvantage || bardRallyFaces) this.terms.push(new foundry.dice.terms.OperatorTerm({operator:'+'})); if (this.hasAdvantage || this.hasDisadvantage || bardRallyFaces)
if(bardRallyFaces) { this.terms.push(new foundry.dice.terms.OperatorTerm({ operator: '+' }));
const rallyDie = new foundry.dice.terms.Die({faces: bardRallyFaces}); if (bardRallyFaces) {
if(this.hasAdvantage) { const rallyDie = new foundry.dice.terms.Die({ faces: bardRallyFaces });
this.terms.push(new foundry.dice.terms.PoolTerm({ if (this.hasAdvantage) {
terms: [advDie.formula, rallyDie.formula], this.terms.push(
modifiers: ["kh"] new foundry.dice.terms.PoolTerm({
})) terms: [advDie.formula, rallyDie.formula],
} else if(this.hasDisadvantage){ modifiers: ['kh']
this.terms.push(advDie, new foundry.dice.terms.OperatorTerm({operator:'+'}), rallyDie); })
);
} else if (this.hasDisadvantage) {
this.terms.push(advDie, new foundry.dice.terms.OperatorTerm({ operator: '+' }), rallyDie);
} }
} else if(this.hasAdvantage || this.hasDisadvantage) this.terms.push(advDie); } else if (this.hasAdvantage || this.hasDisadvantage) this.terms.push(advDie);
} }
applyBaseBonus() { applyBaseBonus() {
// if(this.options.action) { // if(this.options.action) {
// console.log(this.options, this.options.actor.system.traits[this.options.roll.trait].bonus) // console.log(this.options, this.options.actor.system.traits[this.options.roll.trait].bonus)
// console.log(this.options.actor.system); // console.log(this.options.actor.system);
/* if(this.options.roll?.trait) this.terms.push(...this.formatModifier(this.options.actor.traits[this.options.roll.trait].total)); */ /* if(this.options.roll?.trait) this.terms.push(...this.formatModifier(this.options.actor.traits[this.options.roll.trait].total)); */
if(!this.options.roll.modifiers) this.options.roll.modifiers = []; if (!this.options.roll.modifiers) this.options.roll.modifiers = [];
if(this.options.roll?.trait) this.options.roll.modifiers.push( if (this.options.roll?.trait)
{ this.options.roll.modifiers.push({
label: `DAGGERHEART.Abilities.${this.options.roll.trait}.name`, label: `DAGGERHEART.Abilities.${this.options.roll.trait}.name`,
value: this.options.actor.traits[this.options.roll.trait].total value: this.options.actor.traits[this.options.roll.trait].total
} });
); console.log(this.options);
console.log(this.options)
// } else if(this.options.trait) this.terms.push(...this.formatModifier(this.options.actor.system.traits[this.options.roll.trait].total)); // } else if(this.options.trait) this.terms.push(...this.formatModifier(this.options.actor.system.traits[this.options.roll.trait].total));
} }
static async postEvaluate(roll, config={}) { static async postEvaluate(roll, config = {}) {
console.log(roll,config); console.log(roll, config);
super.postEvaluate(roll, config); super.postEvaluate(roll, config);
config.roll.hope = { config.roll.hope = {
dice: roll.dHope.denomination, dice: roll.dHope.denomination,
value: roll.dHope.total value: roll.dHope.total
} };
config.roll.fear = { config.roll.fear = {
dice: roll.dFear.denomination, dice: roll.dFear.denomination,
value: roll.dFear.total value: roll.dFear.total
} };
config.roll.result = { config.roll.result = {
duality: roll.withHope ? 1 : roll.withFear ? -1 : 0, duality: roll.withHope ? 1 : roll.withFear ? -1 : 0,
total: roll.dHope.total + roll.dFear.total, total: roll.dHope.total + roll.dFear.total,
label: roll.totalLabel label: roll.totalLabel
} };
} }
} }
export class DamageRoll extends DHRoll { export class DamageRoll extends DHRoll {
constructor(formula, data={}, options={}) { constructor(formula, data = {}, options = {}) {
super(formula, data, options) super(formula, data, options);
} }
static messageType = 'damageRoll'; static messageType = 'damageRoll';
// static messageTemplate = 'systems/daggerheart/templates/chat/damage-roll.hbs'; // static messageTemplate = 'systems/daggerheart/templates/chat/damage-roll.hbs';
static messageTemplate = async (config) => { static messageTemplate = async config => {
return await foundry.applications.handlebars.renderTemplate( return await foundry.applications.handlebars.renderTemplate(
config.messageTemplate ?? 'systems/daggerheart/templates/chat/damage-roll.hbs', config.messageTemplate ?? 'systems/daggerheart/templates/chat/damage-roll.hbs',
config config
) );
} };
static DefaultDialog = DamageDialog; static DefaultDialog = DamageDialog;
static async postEvaluate(roll, config={}) { static async postEvaluate(roll, config = {}) {
console.log(roll, config) console.log(roll, config);
config.roll = { config.roll = {
// formula : config.formula, // formula : config.formula,
result: roll.total, result: roll.total,
dice: roll.dice dice: roll.dice
} };
if(roll.healing) config.roll.type = roll.healing.type if (roll.healing) config.roll.type = roll.healing.type;
/* const dice = []; /* const dice = [];
const modifiers = []; const modifiers = [];
for (var i = 0; i < roll.terms.length; i++) { for (var i = 0; i < roll.terms.length; i++) {
@ -444,4 +453,4 @@ export class DamageRoll extends DHRoll {
config.roll.dice = dice; config.roll.dice = dice;
config.roll.modifiers = modifiers; */ config.roll.modifiers = modifiers; */
} }
} }

View file

@ -16,8 +16,8 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
static DEFAULT_OPTIONS = { static DEFAULT_OPTIONS = {
tag: 'form', tag: 'form',
classes: ['daggerheart', 'sheet', 'pc'], classes: ['daggerheart', 'sheet', 'actor', 'dh-style', 'daggerheart', 'character'],
position: { width: 810, height: 1080 }, position: { width: 850, height: 800 },
actions: { actions: {
attributeRoll: this.rollAttribute, attributeRoll: this.rollAttribute,
toggleMarks: this.toggleMarks, toggleMarks: this.toggleMarks,
@ -47,10 +47,10 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
useAdvancementCard: this.useAdvancementCard, useAdvancementCard: this.useAdvancementCard,
useAdvancementAbility: this.useAdvancementAbility, useAdvancementAbility: this.useAdvancementAbility,
toggleEquipItem: this.toggleEquipItem, toggleEquipItem: this.toggleEquipItem,
levelup: this.openLevelUp levelup: this.openLevelUp,
editImage: this._onEditImage
}, },
window: { window: {
minimizable: false,
resizable: true resizable: true
}, },
form: { form: {
@ -66,9 +66,76 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
}; };
static PARTS = { static PARTS = {
form: { sidebar: {
id: 'character', id: 'sidebar',
template: 'systems/daggerheart/templates/sheets/character/character.hbs' template: 'systems/daggerheart/templates/sheets/actors/character/sidebar.hbs'
},
header: {
id: 'header',
template: 'systems/daggerheart/templates/sheets/actors/character/header.hbs'
},
features: {
id: 'features',
template: 'systems/daggerheart/templates/sheets/actors/character/features.hbs'
},
loadout: {
id: 'loadout',
template: 'systems/daggerheart/templates/sheets/actors/character/loadout.hbs'
},
inventory: {
id: 'inventory',
template: 'systems/daggerheart/templates/sheets/actors/character/inventory.hbs'
},
biography: {
id: 'biography',
template: 'systems/daggerheart/templates/sheets/actors/character/biography.hbs'
},
effects: {
id: 'effects',
template: 'systems/daggerheart/templates/sheets/actors/character/effects.hbs'
}
};
static TABS = {
features: {
active: true,
cssClass: '',
group: 'primary',
id: 'features',
icon: null,
label: 'DAGGERHEART.Sheets.PC.Tabs.Features'
},
loadout: {
active: false,
cssClass: '',
group: 'primary',
id: 'loadout',
icon: null,
label: 'DAGGERHEART.Sheets.PC.Tabs.Loadout'
},
inventory: {
active: false,
cssClass: '',
group: 'primary',
id: 'inventory',
icon: null,
label: 'DAGGERHEART.Sheets.PC.Tabs.Inventory'
},
biography: {
active: false,
cssClass: '',
group: 'primary',
id: 'biography',
icon: null,
label: 'DAGGERHEART.Sheets.PC.Tabs.biography'
},
effects: {
active: false,
cssClass: '',
group: 'primary',
id: 'effects',
icon: null,
label: 'DAGGERHEART.Sheets.PC.Tabs.effects'
} }
}; };
@ -150,17 +217,29 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
_attachPartListeners(partId, htmlElement, options) { _attachPartListeners(partId, htmlElement, options) {
super._attachPartListeners(partId, htmlElement, options); super._attachPartListeners(partId, htmlElement, options);
htmlElement.querySelector('.level-value').addEventListener('change', this.onLevelChange.bind(this)); // htmlElement.querySelector('.level-value').addEventListener('change', this.onLevelChange.bind(this));
// To Remove when ContextMenu Handler is made // To Remove when ContextMenu Handler is made
htmlElement htmlElement
.querySelectorAll('[data-item-id]') .querySelectorAll('[data-item-id]')
.forEach(element => element.addEventListener('contextmenu', this.editItem.bind(this))); .forEach(element => element.addEventListener('contextmenu', this.editItem.bind(this)));
} }
static _onEditImage() {
const fp = new FilePicker({
current: this.document.img,
type: 'image',
redirectToRoot: ['icons/svg/mystery-man.svg'],
callback: async path => this._updateImage.bind(this)(path),
top: this.position.top + 40,
left: this.position.left + 10
});
return fp.browse();
}
async _prepareContext(_options) { async _prepareContext(_options) {
const context = await super._prepareContext(_options); const context = await super._prepareContext(_options);
context.document = this.document; context.document = this.document;
context.tabs = this._getTabs(); context.tabs = super._getTabs(this.constructor.TABS);
context.config = SYSTEM; context.config = SYSTEM;
@ -293,7 +372,7 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
trait: button.dataset.attribute trait: button.dataset.attribute
/* label: abilityLabel, /* label: abilityLabel,
modifier: button.dataset.value */ modifier: button.dataset.value */
}, }
/* chatMessage: { /* chatMessage: {
template: 'systems/daggerheart/templates/chat/duality-roll.hbs' template: 'systems/daggerheart/templates/chat/duality-roll.hbs'
} */ } */

View file

@ -93,21 +93,21 @@ export const healingTypes = {
export const conditions = { export const conditions = {
vulnerable: { vulnerable: {
id: 'vulnerable', id: 'vulnerable',
name: 'DAGGERHEART.Condition.Vulnerable.Name', name: 'DAGGERHEART.Condition.vulnerable.name',
icon: 'icons/magic/control/silhouette-fall-slip-prone.webp', icon: 'icons/magic/control/silhouette-fall-slip-prone.webp',
description: 'DAGGERHEART.Condition.Vulnerable.Description' description: 'DAGGERHEART.Condition.vulnerable.description'
}, },
hidden: { hidden: {
id: 'hidden', id: 'hidden',
name: 'DAGGERHEART.Condition.Hidden.Name', name: 'DAGGERHEART.Condition.hidden.name',
icon: 'icons/magic/perception/silhouette-stealth-shadow.webp', icon: 'icons/magic/perception/silhouette-stealth-shadow.webp',
description: 'DAGGERHEART.Condition.Hidden.Description' description: 'DAGGERHEART.Condition.hidden.description'
}, },
restrained: { restrained: {
id: 'restrained', id: 'restrained',
name: 'DAGGERHEART.Condition.Restrained.Name', name: 'DAGGERHEART.Condition.restrained.name',
icon: 'icons/magic/control/debuff-chains-shackle-movement-red.webp', icon: 'icons/magic/control/debuff-chains-shackle-movement-red.webp',
description: 'DAGGERHEART.Condition.Restrained.Description' description: 'DAGGERHEART.Condition.restrained.description'
} }
}; };

View file

@ -109,7 +109,8 @@ export class DHBaseAction extends foundry.abstract.DataModel {
type: new fields.StringField({ type: new fields.StringField({
choices: SYSTEM.ACTIONS.targetTypes, choices: SYSTEM.ACTIONS.targetTypes,
initial: SYSTEM.ACTIONS.targetTypes.any.id, initial: SYSTEM.ACTIONS.targetTypes.any.id,
nullable: true, initial: null nullable: true,
initial: null
}), }),
amount: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 }) amount: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 })
}), }),
@ -130,8 +131,8 @@ export class DHBaseAction extends foundry.abstract.DataModel {
}) })
}, },
extraSchemas = {}; extraSchemas = {};
this.extraSchemas.forEach(s => extraSchemas[s] = extraFields[s]); this.extraSchemas.forEach(s => (extraSchemas[s] = extraFields[s]));
return extraSchemas; return extraSchemas;
} }
@ -170,8 +171,8 @@ export class DHBaseAction extends foundry.abstract.DataModel {
trait: parent.system.trait trait: parent.system.trait
}; };
} }
if(parent?.type === 'weapon' && !!this.schema.fields.damage) { if (parent?.type === 'weapon' && !!this.schema.fields.damage) {
updateSource['damage'] = {includeBase: true}; updateSource['damage'] = { includeBase: true };
} }
if (parent?.system?.range) { if (parent?.system?.range) {
updateSource['range'] = parent?.system?.range; updateSource['range'] = parent?.system?.range;
@ -185,9 +186,14 @@ export class DHBaseAction extends foundry.abstract.DataModel {
...actorData.toObject(), ...actorData.toObject(),
prof: actorData.proficiency?.value ?? 1, prof: actorData.proficiency?.value ?? 1,
cast: actorData.spellcast?.value ?? 1, cast: actorData.spellcast?.value ?? 1,
scale: this.cost.length ? this.cost.reduce((a,c) => {a[c.type] = c.value; return a},{}) : 1, scale: this.cost.length
? this.cost.reduce((a, c) => {
a[c.type] = c.value;
return a;
}, {})
: 1,
roll: {} roll: {}
} };
} }
async use(event, ...args) { async use(event, ...args) {
@ -205,25 +211,30 @@ export class DHBaseAction extends foundry.abstract.DataModel {
}; };
// this.proceedChatDisplay(config); // this.proceedChatDisplay(config);
// Filter selected targets based on Target parameters // Filter selected targets based on Target parameters
config.targets = await this.getTarget(config); config.targets = await this.getTarget(config);
if(!config.targets) return ui.notifications.warn("Too many targets selected for that actions."); if (!config.targets) return ui.notifications.warn('Too many targets selected for that actions.');
// Filter selected targets based on Range parameters // Filter selected targets based on Range parameters
config.range = await this.checkRange(config); config.range = await this.checkRange(config);
if(!config.range.hasRange) return ui.notifications.warn("No Target within range."); if (!config.range.hasRange) return ui.notifications.warn('No Target within range.');
// Display Costs Dialog & Check if Actor get enough resources // Display Uses/Costs Dialog & Check if Actor get enough resources
config.costs = await this.getCost(config); config = {
if(!this.hasRoll() && !config.costs.hasCost) return ui.notifications.warn("You don't have the resources to use that action."); ...config,
...(await this.getCost(config))
};
if (!this.hasRoll() && (!config.costs.hasCost || !this.hasUses(config.uses)))
return ui.notifications.warn("You don't have the resources to use that action.");
// Proceed with Roll // Proceed with Roll
config = await this.proceedRoll(config); config = await this.proceedRoll(config);
if(!config) return; if (this.roll && !config.roll.result) return;
// Update Actor resources based on Action Cost configuration // Update Actor resources based on Action Cost configuration
this.spendCost(config.costs.values); this.spendCost(config.costs.values);
this.spendUses(config.uses);
// console.log(config) // console.log(config)
@ -238,36 +249,37 @@ export class DHBaseAction extends foundry.abstract.DataModel {
async proceedRoll(config) { async proceedRoll(config) {
if (!this.hasRoll()) return config; if (!this.hasRoll()) return config;
const modifierValue = this.actor.system.traits[this.roll.trait].value; const modifierValue = this.actor.system.traits[this.roll.trait].value;
config = { config = {
...config, ...config,
roll: { roll: {
modifiers: [], modifiers: [],
trait: this.roll?.trait, trait: this.roll?.trait,
label: game.i18n.localize(abilities[this.roll.trait].label), label: game.i18n.localize(abilities[this.roll.trait].label),
type: this.actionType, type: this.actionType,
difficulty: this.roll?.difficulty difficulty: this.roll?.difficulty
}
} }
return await this.actor.diceRoll(config, this); };
// config = await this.actor.diceRoll(config, this);
return this.actor.diceRoll(config, this);
} }
/* ROLL */ /* ROLL */
/* COST */ /* COST */
async getCost(config) { async getCost(config) {
if(!this.cost?.length || !this.actor) return {values: [], hasCost: true}; let costs = this.cost?.length ? foundry.utils.deepClone(this.cost) : { values: [], hasCost: true };
let cost = foundry.utils.deepClone(this.cost); let uses = this.getUses();
if (!config.event.shiftKey && !this.hasRoll()) { if (!config.event.shiftKey && !this.hasRoll()) {
const dialogClosed = new Promise((resolve, _) => { const dialogClosed = new Promise((resolve, _) => {
new CostSelectionDialog(cost, this, resolve).render(true); new CostSelectionDialog(costs, uses, this, resolve).render(true);
}); });
cost = await dialogClosed; ({ costs, uses } = await dialogClosed);
} }
return cost; return { costs, uses };
} }
getRealCosts(costs) { getRealCosts(costs) {
const realCosts = costs?.length ? costs.filter(c => c.enabled) : []; const realCosts = costs?.length ? costs.filter(c => c.enabled) : [];
return {values: realCosts, hasCost: this.hasCost(realCosts)} return { values: realCosts, hasCost: this.hasCost(realCosts) };
} }
calcCosts(costs) { calcCosts(costs) {
@ -276,44 +288,69 @@ export class DHBaseAction extends foundry.abstract.DataModel {
c.step = c.step ?? 1; c.step = c.step ?? 1;
c.total = c.value * c.scale * c.step; c.total = c.value * c.scale * c.step;
c.enabled = c.hasOwnProperty('enabled') ? c.enabled : true; c.enabled = c.hasOwnProperty('enabled') ? c.enabled : true;
return c return c;
}) });
} }
hasCost(costs) { hasCost(costs) {
return costs.reduce((a, c) => a && this.actor.system.resources[c.type]?.value >= (c.total ?? c.value), true) return costs.reduce((a, c) => a && this.actor.system.resources[c.type]?.value >= (c.total ?? c.value), true);
} }
async spendCost(config) { async spendCost(config) {
if(!config.costs?.values?.length) return; if (!config.costs?.values?.length) return;
return await this.actor.modifyResource(config.costs.values); return await this.actor.modifyResource(config.costs.values);
} }
/* COST */ /* COST */
/* USES */ /* USES */
async spendUses(config) { async spendUses(config) {
if(!this.uses.max) return; if (!this.uses.max || config.enabled === false) return;
const newActions = foundry.utils.getProperty(this.item.system, this.systemPath).map(x => x.toObject());
newActions[this.index].uses.value++;
await this.item.update({ [`system.${this.systemPath}`]: newActions });
}
getUses() {
if (!this.uses) return { hasUse: true };
const uses = foundry.utils.deepClone(this.uses);
if (!uses.value) uses.value = 0;
return uses;
}
calcUses(uses) {
return {
...uses,
enabled: uses.hasOwnProperty('enabled') ? uses.enabled : true
};
}
hasUses(uses) {
return !uses.enabled || uses.value + 1 <= uses.max;
} }
/* USES */ /* USES */
/* TARGET */ /* TARGET */
async getTarget(config) { async getTarget(config) {
if(this.target?.type === SYSTEM.ACTIONS.targetTypes.self.id) return this.formatTarget(this.actor.token ?? this.actor.prototypeToken); if (this.target?.type === SYSTEM.ACTIONS.targetTypes.self.id)
return this.formatTarget(this.actor.token ?? this.actor.prototypeToken);
let targets = Array.from(game.user.targets); let targets = Array.from(game.user.targets);
// foundry.CONST.TOKEN_DISPOSITIONS.FRIENDLY // foundry.CONST.TOKEN_DISPOSITIONS.FRIENDLY
if(this.target?.type && this.target.type !== SYSTEM.ACTIONS.targetTypes.any.id) { if (this.target?.type && this.target.type !== SYSTEM.ACTIONS.targetTypes.any.id) {
targets = targets.filter(t => this.isTargetFriendly(t)); targets = targets.filter(t => this.isTargetFriendly(t));
if(this.target.amount && targets.length > this.target.amount) return false; if (this.target.amount && targets.length > this.target.amount) return false;
} }
return targets.map(t => this.formatTarget(t)); return targets.map(t => this.formatTarget(t));
} }
isTargetFriendly(target) { isTargetFriendly(target) {
const actorDisposition = this.actor.token ? this.actor.token.disposition : this.actor.prototypeToken.disposition, const actorDisposition = this.actor.token
? this.actor.token.disposition
: this.actor.prototypeToken.disposition,
targetDisposition = target.document.disposition; targetDisposition = target.document.disposition;
return (this.target.type === SYSTEM.ACTIONS.targetTypes.friendly.id && actorDisposition === targetDisposition) || (this.target.type === SYSTEM.ACTIONS.targetTypes.hostile.id && (actorDisposition + targetDisposition === 0)) return (
(this.target.type === SYSTEM.ACTIONS.targetTypes.friendly.id && actorDisposition === targetDisposition) ||
(this.target.type === SYSTEM.ACTIONS.targetTypes.hostile.id && actorDisposition + targetDisposition === 0)
);
} }
formatTarget(actor) { formatTarget(actor) {
@ -323,57 +360,58 @@ export class DHBaseAction extends foundry.abstract.DataModel {
img: actor.actor.img, img: actor.actor.img,
difficulty: actor.actor.system.difficulty, difficulty: actor.actor.system.difficulty,
evasion: actor.actor.system.evasion?.value evasion: actor.actor.system.evasion?.value
} };
} }
/* TARGET */ /* TARGET */
/* RANGE */ /* RANGE */
async checkRange(config) { async checkRange(config) {
if(!this.range || !this.actor) return true; if (!this.range || !this.actor) return true;
return {values: [], hasRange: true}; return { values: [], hasRange: true };
} }
/* RANGE */ /* RANGE */
/* EFFECTS */ /* EFFECTS */
async applyEffects(event, data, force=false) { async applyEffects(event, data, force = false) {
if(!this.effects?.length || !data.system.targets.length) return; if (!this.effects?.length || !data.system.targets.length) return;
data.system.targets.forEach(async (token) => { data.system.targets.forEach(async token => {
// console.log(token, force) // console.log(token, force)
if(!token.hit && !force) return; if (!token.hit && !force) return;
this.effects.forEach(async (e) => { this.effects.forEach(async e => {
const actor = canvas.tokens.get(token.id)?.actor, const actor = canvas.tokens.get(token.id)?.actor,
effect = this.item.effects.get(e._id); effect = this.item.effects.get(e._id);
if(!actor || !effect) return; if (!actor || !effect) return;
await this.applyEffect(effect, actor); await this.applyEffect(effect, actor);
}) });
}) });
} }
async applyEffect(effect, actor) { async applyEffect(effect, actor) {
// Enable an existing effect on the target if it originated from this effect // Enable an existing effect on the target if it originated from this effect
const existingEffect = actor.effects.find(e => e.origin === origin.uuid); const existingEffect = actor.effects.find(e => e.origin === origin.uuid);
if ( existingEffect ) { if (existingEffect) {
return existingEffect.update(foundry.utils.mergeObject({ return existingEffect.update(
foundry.utils.mergeObject({
...effect.constructor.getInitialDuration(), ...effect.constructor.getInitialDuration(),
disabled: false disabled: false
})); })
} );
}
// Otherwise, create a new effect on the target
const effectData = foundry.utils.mergeObject({ // Otherwise, create a new effect on the target
...effect.toObject(), const effectData = foundry.utils.mergeObject({
disabled: false, ...effect.toObject(),
transfer: false, disabled: false,
origin: origin.uuid transfer: false,
}); origin: origin.uuid
await ActiveEffect.implementation.create(effectData, { parent: actor }); });
await ActiveEffect.implementation.create(effectData, { parent: actor });
} }
/* EFFECTS */ /* EFFECTS */
/* CHAT */ /* CHAT */
async proceedChatDisplay(config) { async proceedChatDisplay(config) {
if(!this.chatDisplay) return; if (!this.chatDisplay) return;
} }
/* CHAT */ /* CHAT */
} }
@ -385,15 +423,14 @@ export class DHDamageAction extends DHBaseAction {
async use(event, ...args) { async use(event, ...args) {
const config = await super.use(event, args); const config = await super.use(event, args);
if(['error', 'warning'].includes(config.type)) return; if (!config || ['error', 'warning'].includes(config.type)) return;
if(!this.directDamage) return; if (!this.directDamage) return;
return await this.rollDamage(event, config); return await this.rollDamage(event, config);
} }
async rollDamage(event, data) { async rollDamage(event, data) {
console.log(event, data)
let formula = this.damage.parts.map(p => p.getFormula(this.actor)).join(' + '); let formula = this.damage.parts.map(p => p.getFormula(this.actor)).join(' + ');
if (!formula || formula == '') return; if (!formula || formula == '') return;
let roll = { formula: formula, total: formula }, let roll = { formula: formula, total: formula },
bonusDamage = []; bonusDamage = [];
@ -401,10 +438,15 @@ export class DHDamageAction extends DHBaseAction {
const config = { const config = {
title: game.i18n.format('DAGGERHEART.Chat.DamageRoll.Title', { damage: this.name }), title: game.i18n.format('DAGGERHEART.Chat.DamageRoll.Title', { damage: this.name }),
formula, formula,
targets: (data.system?.targets ?? data.targets).map(x => ({ id: x.id, name: x.name, img: x.img, hit: true })) targets: (data.system?.targets ?? data.targets).map(x => ({
} id: x.id,
name: x.name,
img: x.img,
hit: true
}))
};
roll = CONFIG.Dice.daggerheart.DamageRoll.build(config) roll = CONFIG.Dice.daggerheart.DamageRoll.build(config);
} }
} }
@ -449,25 +491,32 @@ export class DHHealingAction extends DHBaseAction {
async use(event, ...args) { async use(event, ...args) {
const config = await super.use(event, args); const config = await super.use(event, args);
if(['error', 'warning'].includes(config.type)) return; if (!config || ['error', 'warning'].includes(config.type)) return;
if(this.hasRoll()) return; if (this.hasRoll()) return;
return await this.rollHealing(event, config); return await this.rollHealing(event, config);
} }
async rollHealing(event, data) { async rollHealing(event, data) {
console.log(event, data) console.log(event, data);
let formula = this.healing.value.getFormula(this.actor); let formula = this.healing.value.getFormula(this.actor);
if (!formula || formula == '') return; if (!formula || formula == '') return;
let roll = { formula: formula, total: formula }, let roll = { formula: formula, total: formula },
bonusDamage = []; bonusDamage = [];
const config = { const config = {
title: game.i18n.format('DAGGERHEART.Chat.HealingRoll.Title', { healing: game.i18n.localize(SYSTEM.GENERAL.healingTypes[this.healing.type].label) }), title: game.i18n.format('DAGGERHEART.Chat.HealingRoll.Title', {
healing: game.i18n.localize(SYSTEM.GENERAL.healingTypes[this.healing.type].label)
}),
formula, formula,
targets: (data.system?.targets ?? data.targets).map(x => ({ id: x.id, name: x.name, img: x.img, hit: true })), targets: (data.system?.targets ?? data.targets).map(x => ({
id: x.id,
name: x.name,
img: x.img,
hit: true
})),
messageTemplate: 'systems/daggerheart/templates/chat/healing-roll.hbs' messageTemplate: 'systems/daggerheart/templates/chat/healing-roll.hbs'
} };
roll = CONFIG.Dice.daggerheart.DamageRoll.build(config); roll = CONFIG.Dice.daggerheart.DamageRoll.build(config);
} }
@ -486,13 +535,12 @@ export class DHSummonAction extends DHBaseAction {
} }
async use(event, ...args) { async use(event, ...args) {
if ( !this.canSummon || !canvas.scene ) return; if (!this.canSummon || !canvas.scene) return;
const config = await super.use(event, args); const config = await super.use(event, args);
} }
get canSummon() { get canSummon() {
return game.user.can("TOKEN_CREATE"); return game.user.can('TOKEN_CREATE');
} }
} }
@ -501,7 +549,7 @@ export class DHEffectAction extends DHBaseAction {
async use(event, ...args) { async use(event, ...args) {
const config = await super.use(event, args); const config = await super.use(event, args);
if(['error', 'warning'].includes(config.type)) return; if (['error', 'warning'].includes(config.type)) return;
return await this.chatApplyEffects(event, config); return await this.chatApplyEffects(event, config);
} }
@ -545,7 +593,7 @@ export class DHMacroAction extends DHBaseAction {
async use(event, ...args) { async use(event, ...args) {
const config = await super.use(event, args); const config = await super.use(event, args);
if(['error', 'warning'].includes(config.type)) return; if (['error', 'warning'].includes(config.type)) return;
const fixUUID = !this.documentUUID.includes('Macro.') ? `Macro.${this.documentUUID}` : this.documentUUID, const fixUUID = !this.documentUUID.includes('Macro.') ? `Macro.${this.documentUUID}` : this.documentUUID,
macro = await fromUuid(fixUUID); macro = await fromUuid(fixUUID);
try { try {

View file

@ -62,14 +62,21 @@ export default class DhCharacter extends BaseDataActor {
bags: new fields.NumberField({ initial: 0, integer: true }), bags: new fields.NumberField({ initial: 0, integer: true }),
chests: new fields.NumberField({ initial: 0, integer: true }) chests: new fields.NumberField({ initial: 0, integer: true })
}), }),
pronouns: new fields.StringField({}),
scars: new fields.TypedObjectField( scars: new fields.TypedObjectField(
new fields.SchemaField({ new fields.SchemaField({
name: new fields.StringField({}), name: new fields.StringField({}),
description: new fields.HTMLField() description: new fields.HTMLField()
}) })
), ),
story: new fields.HTMLField(), biography: new fields.SchemaField({
background: new fields.HTMLField(),
connections: new fields.HTMLField(),
characteristics: new fields.SchemaField({
pronouns: new fields.StringField({}),
age: new fields.StringField({}),
faith: new fields.StringField({})
})
}),
class: new fields.SchemaField({ class: new fields.SchemaField({
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 })

View file

@ -1,14 +1,16 @@
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api; const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
export default class D20RollDialog extends HandlebarsApplicationMixin(ApplicationV2) { export default class D20RollDialog extends HandlebarsApplicationMixin(ApplicationV2) {
constructor(config={}, options={}) { constructor(config = {}, options = {}) {
super(options); super(options);
this.config = config; this.config = config;
this.config.experiences = []; this.config.experiences = [];
this.item = config.actor.parent.items.get(config.source.item); if (config.source?.action) {
this.action = this.item.system.actions.find(a => a._id === config.source.action); this.item = config.actor.parent.items.get(config.source.item);
this.action = this.item.system.actions.find(a => a._id === config.source.action);
}
} }
static DEFAULT_OPTIONS = { static DEFAULT_OPTIONS = {
@ -45,23 +47,30 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
async _prepareContext(_options) { async _prepareContext(_options) {
const context = await super._prepareContext(_options); const context = await super._prepareContext(_options);
context.experiences = Object.keys(this.config.actor.experiences).map(id => ({ id, ...this.config.actor.experiences[id] })); context.experiences = Object.keys(this.config.actor.experiences).map(id => ({
id,
...this.config.actor.experiences[id]
}));
context.selectedExperiences = this.config.experiences; context.selectedExperiences = this.config.experiences;
context.advantage = this.config.advantage; context.advantage = this.config.advantage;
/* context.diceOptions = this.diceOptions; */ /* context.diceOptions = this.diceOptions; */
context.canRoll = true; context.canRoll = true;
if(this.config.costs?.length) { if (this.config.costs?.length) {
const updatedCosts = this.action.calcCosts(this.config.costs); const updatedCosts = this.action.calcCosts(this.config.costs);
context.costs = updatedCosts context.costs = updatedCosts;
context.canRoll = this.action.getRealCosts(updatedCosts)?.hasCost; context.canRoll = this.action.getRealCosts(updatedCosts)?.hasCost;
} }
if (this.config.uses?.max) {
context.uses = this.action.calcUses(this.config.uses);
context.canRoll = context.canRoll && this.action.hasUses(context.uses);
}
return context; return context;
} }
static updateRollConfiguration(event, _, formData) { static updateRollConfiguration(event, _, formData) {
const { ...rest } = foundry.utils.expandObject(formData.object); const { ...rest } = foundry.utils.expandObject(formData.object);
console.log(formData.object, rest) if (this.config.costs) this.config.costs = foundry.utils.mergeObject(this.config.costs, rest.costs);
this.config.costs = foundry.utils.mergeObject(this.config.costs, rest.costs); if (this.config.uses) this.config.uses = foundry.utils.mergeObject(this.config.uses, rest.uses);
this.render(); this.render();
} }
@ -81,19 +90,19 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
} }
static async submitRoll() { static async submitRoll() {
await this.close({ submitted: true }); await this.close({ submitted: true });
} }
/** @override */ /** @override */
_onClose(options={}) { _onClose(options = {}) {
if ( !options.submitted ) this.config = false; if (!options.submitted) this.config = false;
} }
static async configure(config={}) { static async configure(config = {}) {
return new Promise(resolve => { return new Promise(resolve => {
const app = new this(config); const app = new this(config);
app.addEventListener("close", () => resolve(app.config), { once: true }); app.addEventListener('close', () => resolve(app.config), { once: true });
app.render({ force: true }); app.render({ force: true });
}); });
} }
} }

View file

@ -269,19 +269,11 @@ export default class DhpActor extends Actor {
// console.log(config) // console.log(config)
config.source = { ...(config.source ?? {}), actor: this.id }; config.source = { ...(config.source ?? {}), actor: this.id };
const newConfig = { const newConfig = {
// data: {
...config, ...config,
/* action, */
// actor: this.getRollData(),
actor: this.system actor: this.system
// },
// options: {
// dialog: false,
// },
// event: config.event
}; };
// console.log(this, newConfig) const roll =
const roll = CONFIG.Dice.daggerheart[this.type === 'character' ? 'DualityRoll' : 'D20Roll'].build(newConfig); await CONFIG.Dice.daggerheart[this.type === 'character' ? 'DualityRoll' : 'D20Roll'].build(newConfig);
return config; return config;
/* let hopeDice = 'd12', /* let hopeDice = 'd12',
fearDice = 'd12', fearDice = 'd12',

View file

@ -13,10 +13,43 @@ export default class RegisterHandlebarsHelpers {
signedNumber: this.signedNumber, signedNumber: this.signedNumber,
length: this.length, length: this.length,
switch: this.switch, switch: this.switch,
case: this.case case: this.case,
eq: this.eq,
ne: this.ne,
lt: this.lt,
gt: this.gt,
lte: this.lte,
gte: this.gte,
and: this.and,
or: this.or
}); });
} }
static eq(v1, v2) {
return v1 === v2;
}
static ne(v1, v2) {
return v1 !== v2;
}
static lt(v1, v2) {
return v1 < v2;
}
static gt(v1, v2) {
return v1 > v2;
}
static lte(v1, v2) {
return v1 <= v2;
}
static gte(v1, v2) {
return v1 >= v2;
}
static and() {
return Array.prototype.every.call(arguments, Boolean);
}
static or() {
return Array.prototype.slice.call(arguments, 0, -1).some(Boolean);
}
static times(nr, block) { static times(nr, block) {
var accum = ''; var accum = '';
for (var i = 0; i < nr; ++i) accum += block.fn(i); for (var i = 0; i < nr; ++i) accum += block.fn(i);
@ -101,7 +134,7 @@ export default class RegisterHandlebarsHelpers {
} }
static debug(a) { static debug(a) {
console.log(JSON.stringify(a)); console.log(a);
return a; return a;
} }
} }

View file

@ -404,6 +404,8 @@
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
border-radius: 6px; border-radius: 6px;
height: 100px;
width: 100px;
} }
.daggerheart.sheet.pc div[data-application-part] .sheet-body .left-main-container .legend { .daggerheart.sheet.pc div[data-application-part] .sheet-body .left-main-container .legend {
margin-left: auto; margin-left: auto;
@ -3523,6 +3525,553 @@ 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;
} }
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet {
padding: 0 15px;
padding-top: 36px;
width: 100%;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .name-row {
display: flex;
gap: 20px;
align-items: baseline;
justify-content: space-between;
padding: 0;
padding-top: 5px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .name-row input[type='text'] {
font-size: 32px;
height: 42px;
width: 380px;
text-align: start;
border: 1px solid transparent;
outline: 2px solid transparent;
transition: all 0.3s ease;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .name-row input[type='text']:hover {
outline: 2px solid light-dark(#222, #f3c267);
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .name-row .level-div {
white-space: nowrap;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-details {
display: flex;
justify-content: space-between;
padding: 5px 0;
margin-bottom: 10px;
font-size: 12px;
color: light-dark(#18162e, #f3c267);
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-details span {
padding: 3px;
border-radius: 3px;
transition: all 0.3s ease;
cursor: pointer;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-details span:hover {
background: light-dark(#18162e40, #f3c26740);
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-details span.dot {
background: transparent;
cursor: default;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row {
display: flex;
gap: 20px;
align-items: center;
justify-content: space-between;
padding: 0;
margin-bottom: 15px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .hope-section,
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .threshold-section {
position: relative;
display: flex;
gap: 10px;
background-color: light-dark(transparent, #18162e);
color: light-dark(#18162e, #f3c267);
padding: 5px 10px;
border: 1px solid light-dark(#18162e, #f3c267);
border-radius: 6px;
align-items: center;
width: fit-content;
height: 30px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .hope-section h4,
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .threshold-section h4 {
font-size: 14px;
font-weight: bold;
text-transform: uppercase;
color: light-dark(#18162e, #f3c267);
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .hope-section h4.threshold-value,
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .threshold-section h4.threshold-value {
color: light-dark(#222, #efe6d8);
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .hope-section .threshold-legend,
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .threshold-section .threshold-legend {
position: absolute;
bottom: -21px;
color: light-dark(#f3c267, #18162e);
background-color: light-dark(#18162e, #f3c267);
padding: 3px;
justify-self: anchor-center;
border-radius: 0 0 3px 3px;
text-transform: capitalize;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .hope-section .hope-value,
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-row .threshold-section .hope-value {
display: flex;
cursor: pointer;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-traits {
display: flex;
justify-content: space-between;
padding: 0;
margin-bottom: 15px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-traits .trait {
height: 60px;
width: 60px;
background: url(../assets/svg/trait-shield.svg) no-repeat;
cursor: pointer;
}
.theme-light .application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-traits .trait {
background: url('../assets/svg/trait-shield-light.svg') no-repeat;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-traits .trait .trait-name {
display: flex;
padding-top: 5px;
color: light-dark(#18162e, #f3c267);
font-size: 14px;
font-weight: 600;
align-items: center;
justify-content: center;
gap: 3px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-traits .trait .trait-name i {
line-height: 17px;
font-size: 10px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-header-sheet .character-traits .trait .trait-value {
font-family: 'Montserrat', sans-serif;
font-style: normal;
font-weight: 400;
font-size: 20px;
text-align: center;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet {
width: 275px;
min-width: 275px;
border-right: 1px solid light-dark(#18162e, #f3c267);
background-image: url('../assets/parchments/dh-parchment-dark.png');
}
.theme-light .application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet {
background: transparent;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet img {
height: 235px;
width: 275px;
border-bottom: 1px solid light-dark(#18162e, #f3c267);
cursor: pointer;
object-fit: cover;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section {
position: relative;
display: flex;
flex-direction: column;
top: -20px;
gap: 30px;
margin-bottom: -10px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section {
display: flex;
justify-content: space-evenly;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar {
position: relative;
width: 100px;
height: 40px;
justify-items: center;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .status-label {
position: relative;
top: 40px;
height: 22px;
width: 79px;
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(#18162e, #f3c267);
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .status-label h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
color: light-dark(#efe6d8, #18162e);
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .status-value {
position: absolute;
display: flex;
padding: 0 6px;
font-size: 1.5rem;
align-items: center;
width: 100px;
height: 40px;
justify-content: center;
text-align: center;
z-index: 2;
color: #efe6d8;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'] {
background: transparent;
font-size: 1.5rem;
width: 40px;
height: 30px;
text-align: center;
border: none;
outline: 2px solid transparent;
color: #efe6d8;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input {
padding: 0;
color: #efe6d8;
backdrop-filter: none;
background: transparent;
transition: all 0.3s ease;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input:hover,
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input:focus {
background: rgba(24, 22, 46, 0.33);
backdrop-filter: blur(9.5px);
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .status-value .bar-label {
width: 40px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar {
position: absolute;
appearance: none;
width: 100px;
height: 40px;
border: 1px solid light-dark(#18162e, #f3c267);
border-radius: 6px;
z-index: 1;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-webkit-progress-bar {
border: none;
background: #18162e;
border-radius: 6px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-webkit-progress-value {
background: linear-gradient(15deg, #46140a 0%, #be0000 42%, #fcb045 100%);
border-radius: 6px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar.stress-color::-webkit-progress-value {
background: linear-gradient(15deg, #823b01 0%, #fc8e45 65%, #be0000 100%);
border-radius: 6px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-moz-progress-value,
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-moz-progress-bar {
border-radius: 6px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-moz-progress-bar {
background: linear-gradient(15deg, #46140a 0%, #be0000 42%, #fcb045 100%);
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar.stress-color::-moz-progress-bar {
background: linear-gradient(15deg, #823b01 0%, #fc8e45 65%, #be0000 100%);
border-radius: 6px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .status-section {
display: flex;
flex-wrap: wrap;
gap: 5px;
justify-content: center;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .status-section .status-number {
justify-items: center;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .status-section .status-number .status-value {
position: relative;
display: flex;
width: 50px;
height: 30px;
border: 1px solid light-dark(#18162e, #f3c267);
border-bottom: none;
border-radius: 6px 6px 0 0;
padding: 0 6px;
font-size: 1.2rem;
align-items: center;
justify-content: center;
background: light-dark(transparent, #18162e);
z-index: 2;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .status-section .status-number .status-value.armor-slots {
width: 80px;
height: 30px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .status-section .status-number .status-label {
padding: 2px 10px;
width: 100%;
border-radius: 3px;
background: light-dark(#18162e, #f3c267);
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .info-section .status-section .status-number .status-label h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
font-size: 12px;
color: light-dark(#efe6d8, #18162e);
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .items-sidebar-list {
display: flex;
flex-direction: column;
gap: 5px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .items-sidebar-list .inventory-item {
padding: 0 10px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .equipment-section .title {
display: flex;
gap: 15px;
align-items: center;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .equipment-section .title h3 {
font-size: 20px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .equipment-section .items-list {
display: flex;
flex-direction: column;
gap: 10px;
align-items: center;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .loadout-section .title {
display: flex;
gap: 15px;
align-items: center;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .loadout-section .title h3 {
font-size: 20px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .experience-section .title {
display: flex;
gap: 15px;
align-items: center;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .experience-section .title h3 {
font-size: 20px;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .experience-section .experience-list {
display: flex;
flex-direction: column;
gap: 5px;
width: 100%;
margin-top: 10px;
align-items: center;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .experience-section .experience-list .experience-row {
display: flex;
gap: 5px;
width: 250px;
align-items: center;
justify-content: space-between;
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .experience-section .experience-list .experience-row input[type='text'] {
height: 32px;
width: 180px;
border: 1px solid transparent;
outline: 2px solid transparent;
font-size: 14px;
font-family: 'Montserrat', sans-serif;
transition: all 0.3s ease;
color: light-dark(#222, #efe6d8);
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .experience-section .experience-list .experience-row input[type='text']:hover {
outline: 2px solid light-dark(#222, #efe6d8);
}
.application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .experience-section .experience-list .experience-value {
height: 25px;
width: 35px;
font-size: 14px;
font-family: 'Montserrat', sans-serif;
color: light-dark(#222, #efe6d8);
align-content: center;
text-align: center;
background: url(../assets/svg/experience-shield.svg) no-repeat;
}
.theme-light .application.sheet.daggerheart.actor.dh-style.character .character-sidebar-sheet .experience-section .experience-list .experience-value {
background: url('../assets/svg/experience-shield-light.svg') no-repeat;
}
.application.sheet.daggerheart.actor.dh-style.character .window-content {
display: grid;
grid-template-columns: 275px 1fr;
grid-template-rows: 283px 1fr;
gap: 15px 0;
height: 100%;
width: 100%;
}
.application.sheet.daggerheart.actor.dh-style.character .window-content .character-sidebar-sheet {
grid-row: 1 / span 2;
grid-column: 1;
}
.application.sheet.daggerheart.actor.dh-style.character .window-content .character-header-sheet {
grid-row: 1;
grid-column: 2;
}
.application.sheet.daggerheart.actor.dh-style.character .window-content .tab {
grid-row: 2;
grid-column: 2;
}
.application.sheet.daggerheart.actor.dh-style.character .window-content .old-sheet {
width: 500px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.inventory .search-section {
display: flex;
gap: 10px;
align-items: center;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.inventory .search-section .search-bar {
position: relative;
color: light-dark(#18162e50, #efe6d850);
width: 100%;
padding-top: 5px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.inventory .search-section .search-bar input {
border-radius: 50px;
font-family: 'Montserrat', sans-serif;
background: light-dark(#18162e10, #f3c26710);
border: none;
outline: 2px solid transparent;
transition: all 0.3s ease;
padding: 0 20px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.inventory .search-section .search-bar input:hover {
outline: 2px solid light-dark(#222, #f3c267);
}
.application.sheet.daggerheart.actor.dh-style.character .tab.inventory .search-section .search-bar input:placeholder {
color: light-dark(#18162e50, #efe6d850);
}
.application.sheet.daggerheart.actor.dh-style.character .tab.inventory .search-section .search-bar .icon {
align-content: center;
height: 32px;
position: absolute;
right: 20px;
font-size: 16px;
z-index: 1;
color: light-dark(#18162e50, #efe6d850);
}
.application.sheet.daggerheart.actor.dh-style.character .tab.inventory .items-section {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
padding: 20px 0;
height: 80%;
scrollbar-width: thin;
scrollbar-color: light-dark(#18162e, #f3c267) transparent;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.inventory .currency-section {
display: flex;
gap: 10px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section {
display: flex;
align-items: center;
justify-content: space-between;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .search-bar {
position: relative;
color: light-dark(#18162e50, #efe6d850);
width: 80%;
padding-top: 5px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .search-bar input {
border-radius: 50px;
font-family: 'Montserrat', sans-serif;
background: light-dark(#18162e10, #f3c26710);
border: none;
outline: 2px solid transparent;
transition: all 0.3s ease;
padding: 0 20px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .search-bar input:hover {
outline: 2px solid light-dark(#222, #f3c267);
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .search-bar input:placeholder {
color: light-dark(#18162e50, #efe6d850);
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .search-bar .icon {
align-content: center;
height: 32px;
position: absolute;
right: 20px;
font-size: 16px;
z-index: 1;
color: light-dark(#18162e50, #efe6d850);
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .btn-toogle-view {
background: light-dark(#18162e10, #18162e);
border: 1px solid light-dark(#18162e, #f3c267);
border-radius: 15px;
padding: 0;
gap: 0;
width: 62px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .btn-toogle-view span {
margin: 1px;
width: 26px;
color: light-dark(#18162e, #f3c267);
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .btn-toogle-view span.list-icon i {
margin-left: 3px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .btn-toogle-view span.grid-icon i {
margin-right: 3px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .btn-toogle-view span.list-active {
border-radius: 32px 3px 3px 32px;
background-color: light-dark(#18162e, #f3c267);
color: light-dark(#efe6d8, #18162e);
padding: 2px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .search-section .btn-toogle-view span.grid-active {
border-radius: 3px 32px 32px 3px;
background-color: light-dark(#18162e, #f3c267);
color: light-dark(#efe6d8, #18162e);
padding: 2px;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.loadout .items-section {
display: flex;
flex-direction: column;
gap: 10px;
height: 100%;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 98%, transparent 100%);
padding: 20px 0;
height: 90%;
scrollbar-width: thin;
scrollbar-color: light-dark(#18162e, #f3c267) transparent;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.biography .items-section {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 98%, transparent 100%);
padding-bottom: 40px;
height: 100%;
scrollbar-width: thin;
scrollbar-color: light-dark(#18162e, #f3c267) transparent;
}
.application.sheet.daggerheart.actor.dh-style.character .tab.features .features-sections {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
padding: 20px 0;
padding-top: 10px;
height: 95%;
scrollbar-width: thin;
scrollbar-color: light-dark(#18162e, #f3c267) transparent;
}
.application.sheet.daggerheart.actor.dh-style.adversary .window-content { .application.sheet.daggerheart.actor.dh-style.adversary .window-content {
overflow: auto; overflow: auto;
} }
@ -3602,9 +4151,6 @@ div.daggerheart.views.multiclass {
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
} }
.application.sheet.daggerheart.dh-style.class .tab.settings .list-items .item-line .controls a {
text-shadow: none;
}
@font-face { @font-face {
font-family: 'Cinzel'; font-family: 'Cinzel';
font-style: normal; font-style: normal;
@ -3703,7 +4249,6 @@ div.daggerheart.views.multiclass {
transition: opacity 0.3s ease; transition: opacity 0.3s ease;
} }
.application.sheet.dh-style.minimized .window-content { .application.sheet.dh-style.minimized .window-content {
display: none;
opacity: 0; opacity: 0;
transition: opacity 0.1s ease; transition: opacity 0.1s ease;
} }
@ -3711,26 +4256,38 @@ div.daggerheart.views.multiclass {
opacity: 1; opacity: 1;
transition: opacity 0.3s ease; transition: opacity 0.3s ease;
} }
.application.sheet.dh-style .window-content {
overflow: initial;
backdrop-filter: none;
padding: 0;
}
.theme-dark .application.sheet.dh-style { .theme-dark .application.sheet.dh-style {
backdrop-filter: blur(4px); background: rgba(24, 22, 46, 0.33);
backdrop-filter: blur(9px);
} }
.theme-light .application.sheet.dh-style { .theme-light .application.sheet.dh-style {
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;
} }
.application.sheet.daggerheart.dh-style {
border-radius: 10px;
}
.application.sheet.daggerheart.dh-style .window-content { .application.sheet.daggerheart.dh-style .window-content {
padding: 0;
position: relative; position: relative;
top: -36px; top: -36px;
min-height: -webkit-fill-available;
} }
.application.sheet.daggerheart.dh-style .window-content .tab { .application.sheet.daggerheart.dh-style .window-content .tab {
padding: 0 10px; padding: 0 10px;
} }
.application.sheet.daggerheart.character.dh-style {
border-radius: 10px;
}
.application.sheet.daggerheart.character.dh-style .window-content {
position: absolute;
top: 0;
}
.application.sheet.daggerheart.character.dh-style .window-content .tab {
padding: 0 15px;
overflow-y: hidden;
}
.application.sheet.dh-style { .application.sheet.dh-style {
border: 1px solid light-dark(#18162e, #f3c267); border: 1px solid light-dark(#18162e, #f3c267);
} }
@ -3805,19 +4362,36 @@ div.daggerheart.views.multiclass {
.application.sheet.dh-style li { .application.sheet.dh-style li {
margin: 0; margin: 0;
} }
.application.sheet.dh-style a:hover,
.application.sheet.dh-style a.active {
text-shadow: 0 0 8px light-dark(#18162e, #f3c267);
}
.application.sheet.dh-style fieldset { .application.sheet.dh-style fieldset {
align-items: center; align-items: center;
margin-top: 5px; margin-top: 5px;
border-radius: 6px; border-radius: 6px;
border-color: light-dark(#18162e, #f3c267); border-color: light-dark(#18162e, #f3c267);
} }
.application.sheet.dh-style fieldset.glassy {
background-color: light-dark(#18162e10, #f3c26710);
border-color: transparent;
}
.application.sheet.dh-style fieldset.glassy legend {
padding: 2px 12px;
border-radius: 3px;
background-color: light-dark(#18162e, #f3c267);
color: light-dark(#efe6d8, #18162e);
}
.application.sheet.dh-style fieldset.flex {
display: flex;
gap: 20px;
}
.application.sheet.dh-style fieldset.one-column { .application.sheet.dh-style fieldset.one-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: start; align-items: start;
gap: 10px; gap: 10px;
min-height: 64px; min-height: 64px;
width: 100%;
} }
.application.sheet.dh-style fieldset.two-columns { .application.sheet.dh-style fieldset.two-columns {
display: grid; display: grid;
@ -3835,9 +4409,6 @@ div.daggerheart.views.multiclass {
font-weight: bold; font-weight: bold;
color: light-dark(#18162e, #f3c267); color: light-dark(#18162e, #f3c267);
} }
.application.sheet.dh-style fieldset legend a {
text-shadow: none;
}
.application.sheet.dh-style fieldset input[type='text'], .application.sheet.dh-style fieldset input[type='text'],
.application.sheet.dh-style fieldset input[type='number'] { .application.sheet.dh-style fieldset input[type='number'] {
color: light-dark(#222, #efe6d8); color: light-dark(#222, #efe6d8);
@ -3876,6 +4447,16 @@ div.daggerheart.views.multiclass {
border-bottom: 1px solid light-dark(#18162e, #f3c267); border-bottom: 1px solid light-dark(#18162e, #f3c267);
mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%);
} }
.application.sheet.dh-style side-line-div {
display: block;
height: 1px;
width: 100%;
border-bottom: 1px solid light-dark(#18162e, #f3c267);
mask-image: linear-gradient(270deg, transparent 0%, black 100%);
}
.application.sheet.dh-style side-line-div.invert {
mask-image: linear-gradient(270deg, black 0%, transparent 100%);
}
.application.sheet.dh-style .item-description { .application.sheet.dh-style .item-description {
opacity: 1; opacity: 1;
transform: translateY(0); transform: translateY(0);
@ -4070,11 +4651,9 @@ div.daggerheart.views.multiclass {
} }
.sheet.daggerheart.dh-style .tab-navigation .feature-tab { .sheet.daggerheart.dh-style .tab-navigation .feature-tab {
border: none; border: none;
gap: 5px;
} }
.sheet.daggerheart.dh-style .tab-navigation .feature-tab a { .sheet.daggerheart.dh-style .tab-navigation .feature-tab a {
color: light-dark(#18162e, #f3c267); color: light-dark(#18162e, #f3c267);
text-shadow: none;
font-family: 'Montserrat', sans-serif; font-family: 'Montserrat', sans-serif;
} }
.sheet.daggerheart.dh-style .tab-form-footer { .sheet.daggerheart.dh-style .tab-form-footer {
@ -4119,9 +4698,6 @@ div.daggerheart.views.multiclass {
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
} }
.sheet.daggerheart.dh-style .tab.actions .actions-list .action-item .controls a {
text-shadow: none;
}
.sheet.daggerheart.dh-style .tab.effects .effects-list { .sheet.daggerheart.dh-style .tab.effects .effects-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -4154,9 +4730,6 @@ div.daggerheart.views.multiclass {
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
} }
.sheet.daggerheart.dh-style .tab.effects .effects-list .effect-item .controls a {
text-shadow: none;
}
.application.sheet.daggerheart.dh-style .item-sheet-header { .application.sheet.daggerheart.dh-style .item-sheet-header {
display: flex; display: flex;
} }
@ -4329,12 +4902,129 @@ div.daggerheart.views.multiclass {
.sheet.daggerheart.dh-style.item .tab.features .feature-list .feature-item .feature-line .controls a { .sheet.daggerheart.dh-style.item .tab.features .feature-list .feature-item .feature-line .controls a {
text-shadow: none; text-shadow: none;
} }
#logo { .application.sheet.daggerheart.actor.dh-style.character .inventory-item {
content: url(../assets/DaggerheartLogo.webp); display: grid;
height: 50px; grid-template-columns: 40px 1fr 60px;
width: 50px; gap: 10px;
width: 100%;
}
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .item-img {
height: 40px;
width: 40px;
border-radius: 3px;
border: none;
cursor: pointer;
object-fit: cover;
}
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .item-label {
font-family: 'Montserrat', sans-serif;
align-self: center;
}
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .item-label .item-name {
font-size: 14px;
}
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .item-label .item-tags,
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .item-label .item-labels {
display: flex;
gap: 10px;
}
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .item-label .item-tags .tag,
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .item-label .item-labels .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.sheet.daggerheart.actor.dh-style.character .inventory-item .item-label .item-tags .label,
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .item-label .item-labels .label {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
font-size: 12px;
}
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .controls {
display: flex;
align-items: center;
justify-content: end;
gap: 8px;
}
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .controls a {
text-align: center;
}
.application.sheet.daggerheart.actor.dh-style.character .inventory-item .controls a.unequipped {
opacity: 0.4;
}
.application.sheet.daggerheart.actor.dh-style.character .card-item {
position: relative; position: relative;
left: 25px; height: 120px;
width: 100px;
border: 1px solid light-dark(#18162e, #f3c267);
border-radius: 6px;
cursor: pointer;
}
.application.sheet.daggerheart.actor.dh-style.character .card-item:hover .card-label {
padding-top: 15px;
}
.application.sheet.daggerheart.actor.dh-style.character .card-item:hover .card-label .controls {
opacity: 1;
visibility: visible;
transition: all 0.3s ease;
max-height: 16px;
}
.application.sheet.daggerheart.actor.dh-style.character .card-item .card-img {
height: 100%;
width: 100%;
object-fit: cover;
}
.application.sheet.daggerheart.actor.dh-style.character .card-item .card-label {
display: flex;
flex-direction: column;
height: fit-content;
align-items: center;
gap: 5px;
padding-top: 5px;
padding-bottom: 5px;
width: 100%;
position: absolute;
background-color: #18162e;
bottom: 0;
mask-image: linear-gradient(180deg, transparent 0%, black 20%);
}
.application.sheet.daggerheart.actor.dh-style.character .card-item .card-label .card-name {
font-family: 'Montserrat', sans-serif;
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 15px;
color: #efe6d8;
}
.application.sheet.daggerheart.actor.dh-style.character .card-item .card-label .controls {
display: flex;
gap: 15px;
align-items: center;
max-height: 0px;
opacity: 0;
visibility: collapse;
transition: all 0.3s ease;
color: #efe6d8;
}
.application.sheet.daggerheart.actor.dh-style.character .items-list {
display: flex;
flex-direction: column;
gap: 10px;
align-items: center;
}
.application.sheet.daggerheart.actor.dh-style.character .card-list {
display: flex;
flex-direction: row;
gap: 10px;
align-items: center;
} }
.daggerheart { .daggerheart {
/* Flex */ /* Flex */

View file

@ -17,7 +17,14 @@
@import './settings.less'; @import './settings.less';
// new styles imports // new styles imports
@import './less/actors/character.less'; @import './less/actors/character/header.less';
@import './less/actors/character/sidebar.less';
@import './less/actors/character/sheet.less';
@import './less/actors/character/inventory.less';
@import './less/actors/character/loadout.less';
@import './less/actors/character/biography.less';
@import './less/actors/character/features.less';
@import './less/actors/adversary.less'; @import './less/actors/adversary.less';
@import './less/actors/environment.less'; @import './less/actors/environment.less';
@ -36,14 +43,8 @@
@import './less/global/tab-effects.less'; @import './less/global/tab-effects.less';
@import './less/global/item-header.less'; @import './less/global/item-header.less';
@import './less/global/feature-section.less'; @import './less/global/feature-section.less';
@import './less/global/inventory-item.less';
#logo { @import './less/global/inventory-fieldset-items.less';
content: url(../assets/DaggerheartLogo.webp);
height: 50px;
width: 50px;
position: relative;
left: 25px;
}
.daggerheart { .daggerheart {
.vertical-separator { .vertical-separator {

View file

@ -0,0 +1,11 @@
@import '../utils/colors.less';
@import '../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.window-content {
display: flex;
flex-direction: row;
height: 100%;
width: 100%;
}
}

View file

@ -0,0 +1,20 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.tab.biography {
.items-section {
display: flex;
flex-direction: column;
gap: 10px;
height: 100%;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 98%, transparent 100%);
padding-bottom: 40px;
height: 100%;
scrollbar-width: thin;
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
}
}
}

View file

@ -0,0 +1,20 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.tab.features {
.features-sections {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
padding: 20px 0;
padding-top: 10px;
height: 95%;
scrollbar-width: thin;
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
}
}
}

View file

@ -0,0 +1,157 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.character-header-sheet {
padding: 0 15px;
padding-top: 36px;
width: 100%;
.name-row {
display: flex;
gap: 20px;
align-items: baseline;
justify-content: space-between;
padding: 0;
padding-top: 5px;
input[type='text'] {
font-size: 32px;
height: 42px;
width: 380px;
text-align: start;
border: 1px solid transparent;
outline: 2px solid transparent;
transition: all 0.3s ease;
&:hover {
outline: 2px solid light-dark(@dark, @golden);
}
}
.level-div {
white-space: nowrap;
}
}
.character-details {
display: flex;
justify-content: space-between;
padding: 5px 0;
margin-bottom: 10px;
font-size: 12px;
color: light-dark(@dark-blue, @golden);
span {
padding: 3px;
border-radius: 3px;
transition: all 0.3s ease;
cursor: pointer;
&:hover {
background: light-dark(@dark-blue-40, @golden-40);
}
&.dot {
background: transparent;
cursor: default;
}
}
}
.character-row {
display: flex;
gap: 20px;
align-items: center;
justify-content: space-between;
padding: 0;
margin-bottom: 15px;
.hope-section,
.threshold-section {
position: relative;
display: flex;
gap: 10px;
background-color: light-dark(transparent, @dark-blue);
color: light-dark(@dark-blue, @golden);
padding: 5px 10px;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
align-items: center;
width: fit-content;
height: 30px;
h4 {
font-size: 14px;
font-weight: bold;
text-transform: uppercase;
color: light-dark(@dark-blue, @golden);
&.threshold-value {
color: light-dark(@dark, @beige);
}
}
.threshold-legend {
position: absolute;
bottom: -21px;
color: light-dark(@golden, @dark-blue);
background-color: light-dark(@dark-blue, @golden);
padding: 3px;
justify-self: anchor-center;
border-radius: 0 0 3px 3px;
text-transform: capitalize;
}
.hope-value {
display: flex;
cursor: pointer;
}
}
}
.character-traits {
display: flex;
justify-content: space-between;
padding: 0;
margin-bottom: 15px;
.trait {
height: 60px;
width: 60px;
background: url(../assets/svg/trait-shield.svg) no-repeat;
cursor: pointer;
.theme-light & {
background: url('../assets/svg/trait-shield-light.svg') no-repeat;
}
.trait-name {
display: flex;
align-items: center;
padding-top: 5px;
color: light-dark(@dark-blue, @golden);
font-size: 14px;
font-weight: 600;
align-items: center;
justify-content: center;
gap: 3px;
i {
line-height: 17px;
font-size: 10px;
}
}
.trait-value {
font-family: @font-body;
font-style: normal;
font-weight: 400;
font-size: 20px;
text-align: center;
}
}
}
}
}

View file

@ -0,0 +1,65 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.tab.inventory {
.search-section {
display: flex;
gap: 10px;
align-items: center;
.search-bar {
position: relative;
color: light-dark(@dark-blue-50, @beige-50);
width: 100%;
padding-top: 5px;
input {
border-radius: 50px;
font-family: @font-body;
background: light-dark(@dark-blue-10, @golden-10);
border: none;
outline: 2px solid transparent;
transition: all 0.3s ease;
padding: 0 20px;
&:hover {
outline: 2px solid light-dark(@dark, @golden);
}
&:placeholder {
color: light-dark(@dark-blue-50, @beige-50);
}
}
.icon {
align-content: center;
height: 32px;
position: absolute;
right: 20px;
font-size: 16px;
z-index: 1;
color: light-dark(@dark-blue-50, @beige-50);
}
}
}
.items-section {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
padding: 20px 0;
height: 80%;
scrollbar-width: thin;
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
}
.currency-section {
display: flex;
gap: 10px;
}
}
}

View file

@ -0,0 +1,101 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.tab.loadout {
.search-section {
display: flex;
align-items: center;
justify-content: space-between;
.search-bar {
position: relative;
color: light-dark(@dark-blue-50, @beige-50);
width: 80%;
padding-top: 5px;
input {
border-radius: 50px;
font-family: @font-body;
background: light-dark(@dark-blue-10, @golden-10);
border: none;
outline: 2px solid transparent;
transition: all 0.3s ease;
padding: 0 20px;
&:hover {
outline: 2px solid light-dark(@dark, @golden);
}
&:placeholder {
color: light-dark(@dark-blue-50, @beige-50);
}
}
.icon {
align-content: center;
height: 32px;
position: absolute;
right: 20px;
font-size: 16px;
z-index: 1;
color: light-dark(@dark-blue-50, @beige-50);
}
}
.btn-toogle-view {
background: light-dark(@dark-blue-10, @dark-blue);
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 15px;
padding: 0;
gap: 0;
width: 62px;
span {
margin: 1px;
width: 26px;
color: light-dark(@dark-blue, @golden);
&.list-icon {
i {
margin-left: 3px;
}
}
&.grid-icon {
i {
margin-right: 3px;
}
}
&.list-active {
border-radius: 32px 3px 3px 32px;
background-color: light-dark(@dark-blue, @golden);
color: light-dark(@beige, @dark-blue);
padding: 2px;
}
&.grid-active {
border-radius: 3px 32px 32px 3px;
background-color: light-dark(@dark-blue, @golden);
color: light-dark(@beige, @dark-blue);
padding: 2px;
}
}
}
}
.items-section {
display: flex;
flex-direction: column;
gap: 10px;
height: 100%;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 98%, transparent 100%);
padding: 20px 0;
height: 90%;
scrollbar-width: thin;
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
}
}
}

View file

@ -0,0 +1,32 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.window-content {
display: grid;
grid-template-columns: 275px 1fr;
grid-template-rows: 283px 1fr;
gap: 15px 0;
height: 100%;
width: 100%;
.character-sidebar-sheet {
grid-row: 1 / span 2;
grid-column: 1;
}
.character-header-sheet {
grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
}
.old-sheet {
width: 500px;
}
}
}

View file

@ -0,0 +1,283 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.character-sidebar-sheet {
width: 275px;
min-width: 275px;
border-right: 1px solid light-dark(@dark-blue, @golden);
background-image: url('../assets/parchments/dh-parchment-dark.png');
.theme-light & {
background: transparent;
}
img {
height: 235px;
width: 275px;
border-bottom: 1px solid light-dark(@dark-blue, @golden);
cursor: pointer;
object-fit: cover;
}
.info-section {
position: relative;
display: flex;
flex-direction: column;
top: -20px;
gap: 30px;
margin-bottom: -10px;
.resources-section {
display: flex;
justify-content: space-evenly;
.status-bar {
position: relative;
width: 100px;
height: 40px;
justify-items: center;
.status-label {
position: relative;
top: 40px;
height: 22px;
width: 79px;
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
color: light-dark(@beige, @dark-blue);
}
}
.status-value {
position: absolute;
display: flex;
padding: 0 6px;
font-size: 1.5rem;
align-items: center;
width: 100px;
height: 40px;
justify-content: center;
text-align: center;
z-index: 2;
color: @beige;
input[type='number'] {
background: transparent;
font-size: 1.5rem;
width: 40px;
height: 30px;
text-align: center;
border: none;
outline: 2px solid transparent;
color: @beige;
&.bar-input {
padding: 0;
color: @beige;
backdrop-filter: none;
background: transparent;
transition: all 0.3s ease;
&:hover,
&:focus {
background: @semi-transparent-dark-blue;
backdrop-filter: blur(9.5px);
}
}
}
.bar-label {
width: 40px;
}
}
.progress-bar {
position: absolute;
appearance: none;
width: 100px;
height: 40px;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
z-index: 1;
&::-webkit-progress-bar {
border: none;
background: @dark-blue;
border-radius: 6px;
}
&::-webkit-progress-value {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-webkit-progress-value {
background: @gradient-stress;
border-radius: 6px;
}
&::-moz-progress-value,
&::-moz-progress-bar {
border-radius: 6px;
}
&::-moz-progress-bar {
background: @gradient-hp;
}
&.stress-color::-moz-progress-bar {
background: @gradient-stress;
border-radius: 6px;
}
}
}
}
.status-section {
display: flex;
flex-wrap: wrap;
gap: 5px;
justify-content: center;
.status-number {
justify-items: center;
.status-value {
position: relative;
display: flex;
width: 50px;
height: 30px;
border: 1px solid light-dark(@dark-blue, @golden);
border-bottom: none;
border-radius: 6px 6px 0 0;
padding: 0 6px;
font-size: 1.2rem;
align-items: center;
justify-content: center;
background: light-dark(transparent, @dark-blue);
z-index: 2;
&.armor-slots {
width: 80px;
height: 30px;
}
}
.status-label {
padding: 2px 10px;
width: 100%;
border-radius: 3px;
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
font-size: 12px;
color: light-dark(@beige, @dark-blue);
}
}
}
}
}
.items-sidebar-list {
display: flex;
flex-direction: column;
gap: 5px;
.inventory-item {
padding: 0 10px;
}
}
.equipment-section {
.title {
display: flex;
gap: 15px;
align-items: center;
h3 {
font-size: 20px;
}
}
.items-list {
display: flex;
flex-direction: column;
gap: 10px;
align-items: center;
}
}
.loadout-section {
.title {
display: flex;
gap: 15px;
align-items: center;
h3 {
font-size: 20px;
}
}
}
.experience-section {
.title {
display: flex;
gap: 15px;
align-items: center;
h3 {
font-size: 20px;
}
}
.experience-list {
display: flex;
flex-direction: column;
gap: 5px;
width: 100%;
margin-top: 10px;
align-items: center;
.experience-row {
display: flex;
gap: 5px;
width: 250px;
align-items: center;
justify-content: space-between;
input[type='text'] {
height: 32px;
width: 180px;
border: 1px solid transparent;
outline: 2px solid transparent;
font-size: 14px;
font-family: @font-body;
transition: all 0.3s ease;
color: light-dark(@dark, @beige);
&:hover {
outline: 2px solid light-dark(@dark, @beige);
}
}
}
.experience-value {
height: 25px;
width: 35px;
font-size: 14px;
font-family: @font-body;
color: light-dark(@dark, @beige);
align-content: center;
text-align: center;
background: url(../assets/svg/experience-shield.svg) no-repeat;
.theme-light & {
background: url('../assets/svg/experience-shield-light.svg') no-repeat;
}
}
}
}
}
}

View file

@ -84,19 +84,40 @@
margin: 0; margin: 0;
} }
a:hover,
a.active {
text-shadow: 0 0 8px light-dark(@dark-blue, @golden);
}
fieldset { fieldset {
align-items: center; align-items: center;
margin-top: 5px; margin-top: 5px;
border-radius: 6px; border-radius: 6px;
border-color: light-dark(@dark-blue, @golden); border-color: light-dark(@dark-blue, @golden);
&.glassy {
background-color: light-dark(@dark-blue-10, @golden-10);
border-color: transparent;
legend {
padding: 2px 12px;
border-radius: 3px;
background-color: light-dark(@dark-blue, @golden);
color: light-dark(@beige, @dark-blue);
}
}
&.flex {
display: flex;
gap: 20px;
}
&.one-column { &.one-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: start; align-items: start;
gap: 10px; gap: 10px;
min-height: 64px; min-height: 64px;
width: 100%;
} }
&.two-columns { &.two-columns {
@ -117,10 +138,6 @@
font-family: @font-body; font-family: @font-body;
font-weight: bold; font-weight: bold;
color: light-dark(@dark-blue, @golden); color: light-dark(@dark-blue, @golden);
a {
text-shadow: none;
}
} }
input[type='text'], input[type='text'],
@ -169,6 +186,18 @@
mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%);
} }
side-line-div {
display: block;
height: 1px;
width: 100%;
border-bottom: 1px solid light-dark(@dark-blue, @golden);
mask-image: linear-gradient(270deg, transparent 0%, black 100%);
&.invert {
mask-image: linear-gradient(270deg, black 0%, transparent 100%);
}
}
.item-description { .item-description {
opacity: 1; opacity: 1;
transform: translateY(0); transform: translateY(0);

View file

@ -0,0 +1,17 @@
@import '../utils/colors.less';
@import '../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.items-list {
display: flex;
flex-direction: column;
gap: 10px;
align-items: center;
}
.card-list {
display: flex;
flex-direction: row;
gap: 10px;
align-items: center;
}
}

View file

@ -0,0 +1,133 @@
@import '../utils/colors.less';
@import '../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
.inventory-item {
display: grid;
grid-template-columns: 40px 1fr 60px;
gap: 10px;
width: 100%;
.item-img {
height: 40px;
width: 40px;
border-radius: 3px;
border: none;
cursor: pointer;
object-fit: cover;
}
.item-label {
font-family: @font-body;
align-self: center;
.item-name {
font-size: 14px;
}
.item-tags,
.item-labels {
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;
align-items: center;
justify-content: end;
gap: 8px;
a {
text-align: center;
&.unequipped {
opacity: 0.4;
}
}
}
}
.card-item {
position: relative;
height: 120px;
width: 100px;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
cursor: pointer;
&:hover {
.card-label {
padding-top: 15px;
.controls {
opacity: 1;
visibility: visible;
transition: all 0.3s ease;
max-height: 16px;
}
}
}
.card-img {
height: 100%;
width: 100%;
object-fit: cover;
}
.card-label {
display: flex;
flex-direction: column;
height: fit-content;
align-items: center;
gap: 5px;
padding-top: 5px;
padding-bottom: 5px;
width: 100%;
position: absolute;
background-color: @dark-blue;
bottom: 0;
mask-image: linear-gradient(180deg, transparent 0%, black 20%);
.card-name {
font-family: @font-body;
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 15px;
color: @beige;
}
.controls {
display: flex;
gap: 15px;
align-items: center;
max-height: 0px;
opacity: 0;
visibility: collapse;
transition: all 0.3s ease;
color: @beige;
}
}
}
}

View file

@ -35,7 +35,6 @@
.application.sheet.dh-style.minimized { .application.sheet.dh-style.minimized {
.window-content { .window-content {
display: none;
opacity: 0; opacity: 0;
transition: opacity 0.1s ease; transition: opacity 0.1s ease;
} }
@ -48,15 +47,10 @@
} }
} }
.application.sheet.dh-style .window-content {
overflow: initial;
backdrop-filter: none;
padding: 0;
}
.theme-dark { .theme-dark {
.application.sheet.dh-style { .application.sheet.dh-style {
backdrop-filter: blur(4px); background: @semi-transparent-dark-blue;
backdrop-filter: blur(9px);
} }
} }
@ -69,12 +63,29 @@
} }
.application.sheet.daggerheart.dh-style { .application.sheet.daggerheart.dh-style {
border-radius: 10px;
.window-content { .window-content {
padding: 0;
position: relative; position: relative;
top: -36px; top: -36px;
min-height: -webkit-fill-available;
.tab { .tab {
padding: 0 10px; padding: 0 10px;
} }
} }
} }
.application.sheet.daggerheart.character.dh-style {
border-radius: 10px;
.window-content {
position: absolute;
top: 0;
.tab {
padding: 0 15px;
overflow-y: hidden;
}
}
}

View file

@ -36,9 +36,6 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
a {
text-shadow: none;
}
} }
} }
} }

View file

@ -36,9 +36,6 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
a {
text-shadow: none;
}
} }
} }
} }

View file

@ -1,20 +1,18 @@
@import '../utils/colors.less'; @import '../utils/colors.less';
@import '../utils/fonts.less'; @import '../utils/fonts.less';
.sheet.daggerheart.dh-style { .sheet.daggerheart.dh-style {
.tab-navigation { .tab-navigation {
margin: 5px 0; margin: 5px 0;
height: 40px; height: 40px;
.feature-tab { .feature-tab {
border: none; border: none;
gap: 5px;
a {
a { color: light-dark(@dark-blue, @golden);
color: light-dark(@dark-blue, @golden); font-family: @font-body;
text-shadow: none; }
font-family: @font-body; }
} }
} }
}
}

View file

@ -36,9 +36,6 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
a {
text-shadow: none;
}
} }
} }
} }

View file

@ -1,22 +1,21 @@
@primary-blue: #1488cc; @primary-blue: #1488cc;
@secondary-blue: #2b32b2; @secondary-blue: #2b32b2;
@golden: #f3c267; @golden: #f3c267;
@dark-blue: #18162e; @golden-40: #f3c26740;
@deep-black: #0e0d15; @dark-blue-40: #18162e40;
@beige: #efe6d8; @golden-10: #f3c26710;
@beige-60-opacity: #efe6d860; @dark-blue-10: #18162e10;
@dark-blue: rgb(24, 22, 46); @dark-blue-50: #18162e50;
@semi-transparent-dark-blue: rgba(24, 22, 46, 0.33); @dark-blue: #18162e;
@dark: #222; @deep-black: #0e0d15;
@light-black: rgba(0, 0, 0, 0.3); @beige: #efe6d8;
@soft-shadow: rgba(0, 0, 0, 0.05); @beige-15: #efe6d815;
@gradient-hp: linear-gradient(15deg, rgb(70, 20, 10) 0%, rgb(190, 0, 0) 42%, rgb(252, 176, 69) 100%); @beige-50: #efe6d850;
@gradient-stress: linear-gradient(15deg, rgb(130, 59, 1) 0%, rgb(252, 142, 69) 65%, rgb(190, 0, 0) 100%); @dark-blue: rgb(24, 22, 46);
@semi-transparent-dark-blue: rgba(24, 22, 46, 0.33);
.theme-dark { @dark: #222;
@primary-color: @golden; @dark-15: #22222215;
} @light-black: rgba(0, 0, 0, 0.3);
@soft-shadow: rgba(0, 0, 0, 0.05);
.theme-light { @gradient-hp: linear-gradient(15deg, rgb(70, 20, 10) 0%, rgb(190, 0, 0) 42%, rgb(252, 176, 69) 100%);
@primary-color: @dark-blue; @gradient-stress: linear-gradient(15deg, rgb(130, 59, 1) 0%, rgb(252, 142, 69) 65%, rgb(190, 0, 0) 100%);
}

View file

@ -1,3 +1,6 @@
@import 'variables/values.less';
@import 'variables/colors.less';
.daggerheart.sheet.pc { .daggerheart.sheet.pc {
width: 810px !important; // Form won't apply height for some reason width: 810px !important; // Form won't apply height for some reason
@ -457,6 +460,9 @@
align-items: flex-start; align-items: flex-start;
border-radius: @normalRadius; border-radius: @normalRadius;
height: 100px;
width: 100px;
.legend { .legend {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;

View file

@ -0,0 +1,36 @@
<section
class='tab {{tabs.biography.cssClass}} {{tabs.biography.id}}'
data-tab='{{tabs.biography.id}}'
data-group='{{tabs.biography.group}}'
>
<div class="items-section">
<fieldset class="flex">
<legend>{{localize 'DAGGERHEART.Sheets.PC.Story.characteristics'}}</legend>
<div class="input">
<span>{{localize 'DAGGERHEART.Sheets.PC.Pronouns'}}</span>
{{formInput systemFields.biography.fields.characteristics.fields.pronouns value=source.system.biography.characteristics.pronouns enriched=source.system.biography.characteristics.pronouns localize=true toggled=true}}
</div>
<div class="input">
<span>{{localize 'DAGGERHEART.Sheets.PC.age'}}</span>
{{formInput systemFields.biography.fields.characteristics.fields.age value=source.system.biography.characteristics.age enriched=source.system.biography.characteristics.age localize=true toggled=true}}
</div>
<div class="input">
<span>{{localize 'DAGGERHEART.Sheets.PC.faith'}}</span>
{{formInput systemFields.biography.fields.characteristics.fields.faith value=source.system.biography.characteristics.faith enriched=source.system.biography.characteristics.faith localize=true toggled=true}}
</div>
</fieldset>
<fieldset>
<legend>{{localize 'DAGGERHEART.Sheets.PC.Story.BackgroundTitle'}}</legend>
{{formInput systemFields.biography.fields.background value=source.system.biography.background enriched=source.system.biography.background localize=true toggled=true}}
</fieldset>
<fieldset>
<legend>{{localize 'DAGGERHEART.Sheets.PC.Story.ConnectionsTitle'}}</legend>
{{formInput systemFields.biography.fields.connections value=source.system.biography.connections enriched=source.system.biography.connections localize=true toggled=true}}
</fieldset>
</div>
</section>

View file

@ -0,0 +1,8 @@
<section
class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}'
data-tab='{{tabs.effects.id}}'
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.inativeEffects') type='effect'}}
</section>

View file

@ -0,0 +1,20 @@
<section
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'
>
<div class="features-sections">
{{#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'}}
{{/if}}
{{#if document.system.class.subclass}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.subclass') ' - ' document.system.class.subclass.name) type='subclass'}}
{{/if}}
{{#if document.system.community}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.community') ' - ' document.system.community.name) type='community'}}
{{/if}}
{{#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'}}
{{/if}}
</div>
</section>

View file

@ -0,0 +1,111 @@
4<header class="character-header-sheet">
<line-div></line-div>
<div class="name-row">
<h1 class='actor-name'>
<input
type='text'
name='name'
value='{{document.name}}'
placeholder='Actor Name'
/>
</h1>
<div class='level-div'>
<h3 class='label'>
{{localize 'DAGGERHEART.Sheets.PC.Level'}}
{{document.system.levelData.level.current}}
</h3>
</div>
</div>
<div class="character-details">
<div>
{{#if document.system.class.value}}
<span data-action="viewObject" data-value="{{document.system.class.value.uuid}}">{{document.system.class.value.name}}</span>
{{else}}
<span>{{localize 'TYPES.Item.class'}}</span>
{{/if}}
<span class="dot">•</span>
{{#if document.system.class.subclass}}
<span data-action="viewObject" data-value="{{document.system.class.subclass.uuid}}">{{document.system.class.subclass.name}}</span>
{{else}}
<span data-action="selectSubclass">{{localize 'TYPES.Item.subclass'}}</span>
{{/if}}
<span class="dot">•</span>
{{#if document.system.community}}
<span data-action="viewObject" data-value="{{document.system.community.uuid}}">{{document.system.community.name}}</span>
{{else}}
<span data-action="selectCommunity">{{localize 'TYPES.Item.community'}}</span>
{{/if}}
<span class="dot">•</span>
{{#if document.system.ancestry}}
<span data-action="viewObject" data-value="{{document.system.ancestry.uuid}}">{{document.system.ancestry.name}}</span>
{{else}}
<span data-action="selectAncestry">{{localize 'TYPES.Item.ancestry'}}</span>
{{/if}}
</div>
{{#if document.system.multiclass.value}}
<div class="multiclass">
{{#if document.system.multiclass.value}}
<span data-action="viewObject" data-value="{{document.system.multiclass.value.uuid}}">{{document.system.multiclass.value.name}}</span>
{{else}}
<span>{{localize 'DAGGERHEART.Sheets.PC.Heritage.Multiclass'}}</span>
{{/if}}
<span class="dot">•</span>
{{#if document.system.multiclass.subclass}}
<span data-action="viewObject" data-value="{{document.system.multiclass.subclass.uuid}}">{{document.system.multiclass.subclass.name}}</span>
{{else}}
<span data-action="selectSubclass">{{localize 'TYPES.Item.subclass'}}</span>
{{/if}}
</div>
{{/if}}
</div>
<div class="character-row">
<div class="hope-section">
<h4>{{localize "DAGGERHEART.General.Hope"}}</h4>
{{#times document.system.resources.hope.max}}
<span class='hope-value' data-action='toggleHope' data-value="{{this}}">
{{#if (gte ../document.system.resources.hope.value this)}}
<i class='fa-solid fa-diamond'></i>
{{else}}
<i class='fa-regular fa-circle'></i>
{{/if}}
</span>
{{/times}}
</div>
<div class="threshold-section">
<h4 class="threshold-label">{{localize "DAGGERHEART.Sheets.PC.Health.Minor"}}</h4>
<h4 class="threshold-value">{{document.system.damageThresholds.major}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.Sheets.PC.Health.Major"}}</h4>
<h4 class="threshold-value">{{document.system.damageThresholds.severe}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.Sheets.PC.Health.Severe"}}</h4>
</div>
</div>
<div class="character-traits">
{{#each this.attributes as |attribute key|}}
<div class="trait" data-tooltip="{{#each attribute.verbs}}{{this}}<br>{{/each}}" data-action="attributeRoll" data-attribute="{{key}}" data-value="{{attribute.total}}">
<div class="trait-name">
<span>{{localize (concat 'DAGGERHEART.Abilities.' key '.short')}}</span>
{{#if attribute.tierMarked}}
<i class='fa-solid fa-circle'></i>
{{else}}
<i class='fa-regular fa-circle'></i>
{{/if}}
</div>
<div class="trait-value">
{{#if (gt attribute.total 0)}}
<span>+{{attribute.total}}</span>
{{else}}
<span>{{attribute.total}}</span>
{{/if}}
</div>
</div>
{{/each}}
</div>
{{> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
</header>

View file

@ -0,0 +1,42 @@
<section
class='tab {{tabs.inventory.cssClass}} {{tabs.inventory.id}}'
data-tab='{{tabs.inventory.id}}'
data-group='{{tabs.inventory.group}}'
>
<div class="search-section">
<div class="search-bar">
<div class="icon">
<i class="fa-solid fa-magnifying-glass"></i>
</div>
<input type="text" name="" id="" placeholder="Search...">
</div>
<a><i class="fa-solid fa-filter"></i></a>
</div>
<div class="items-section">
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'TYPES.Item.weapon') type='weapon' isGlassy=true}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'TYPES.Item.armor') type='armor' isGlassy=true}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'TYPES.Item.consumable') type='consumable' isGlassy=true}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'TYPES.Item.miscellaneous') type='miscellaneous' isGlassy=true}}
</div>
<div class="currency-section">
<div class="input">
<span>{{localize "DAGGERHEART.Sheets.PC.Gold.Coins"}}</span>
{{formInput systemFields.gold.fields.coins value=source.system.gold.coins enriched=source.system.gold.coins localize=true toggled=true}}
</div>
<div class="input">
<span>{{localize "DAGGERHEART.Sheets.PC.Gold.Handfulls"}}</span>
{{formInput systemFields.gold.fields.handfulls value=source.system.gold.handfulls enriched=source.system.gold.handfulls localize=true toggled=true}}
</div>
<div class="input">
<span>{{localize "DAGGERHEART.Sheets.PC.Gold.Bags"}}</span>
{{formInput systemFields.gold.fields.bags value=source.system.gold.bags enriched=source.system.gold.bags localize=true toggled=true}}
</div>
<div class="input">
<span>{{localize "DAGGERHEART.Sheets.PC.Gold.Chests"}}</span>
{{formInput systemFields.gold.fields.chests value=source.system.gold.chests enriched=source.system.gold.chests localize=true toggled=true}}
</div>
</div>
</section>

View file

@ -0,0 +1,28 @@
<section
class='tab {{tabs.loadout.cssClass}} {{tabs.loadout.id}}'
data-tab='{{tabs.loadout.id}}'
data-group='{{tabs.loadout.group}}'
>
<div class="search-section">
<div class="search-bar">
<div class="icon">
<i class="fa-solid fa-magnifying-glass"></i>
</div>
<input type="text" name="" id="" placeholder="Search...">
</div>
<a><i class="fa-solid fa-filter"></i></a>
<button class="btn-toogle-view">
<span class="{{#if listView}}list-active{{/if}}list-active list-icon">
<i class="fa-solid fa-bars"></i>
</span>
<span class="{{#if gridView}}grid-active{{/if}} grid-icon">
<i class="fa-solid fa-grip"></i>
</span>
</button>
</div>
<div class="items-section">
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.PC.Tabs.Loadout') type='domainCard' isGlassy=true cardView='list'}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.PC.Tabs.Vault') type='domainCard' isGlassy=true cardView='list'}}
</div>
</section>

View file

@ -0,0 +1,120 @@
<aside class="character-sidebar-sheet">
<img class="portrait" src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
<div class="info-section">
<div class="resources-section">
<div class="status-bar">
<div class='status-value'>
<p><input class="bar-input" name="system.resources.hitPoints.value" value="{{document.system.resources.hitPoints.value}}" type="number"></p>
<p>/</p>
<p class="bar-label">{{document.system.resources.hitPoints.max}}</p>
</div>
<progress
class='progress-bar'
value='{{document.system.resources.hitPoints.value}}'
max='{{document.system.resources.hitPoints.max}}'
></progress>
<div class="status-label">
<h4>Health</h4>
</div>
</div>
<div class="status-bar">
<div class='status-value'>
<p><input class="bar-input" name="system.resources.stress.value" value="{{document.system.resources.stress.value}}" type="number"></p>
<p>/</p>
<p class="bar-label">{{document.system.resources.stress.max}}</p>
</div>
<progress
class='progress-bar stress-color'
value='{{document.system.resources.stress.value}}'
max='{{document.system.resources.stress.max}}'
></progress>
<div class="status-label">
<h4>Stress</h4>
</div>
</div>
</div>
<div class="status-section">
<div class="status-number">
<div class='status-value'>
<p>{{document.system.proficiency.total}}</p>
</div>
<div class="status-label">
<h4>Proficiency</h4>
</div>
</div>
<div class="status-number">
<div class='status-value armor-slots'>
{{#if document.system.armor.system.marks}}
<p>{{document.system.armor.system.marks.value}}/{{document.system.armor.system.marks.max}}</p>
{{else}}
<p>-</p>
{{/if}}
</div>
<div class="status-label">
<h4>Armor Slots</h4>
</div>
</div>
<div class="status-number">
<div class='status-value'>
<p>{{document.system.evasion.total}}</p>
</div>
<div class="status-label">
<h4>Evasion</h4>
</div>
</div>
</div>
</div>
<div class="equipment-section">
<div class="title">
<side-line-div class="invert"></side-line-div>
<h3>Equipment</h3>
<side-line-div></side-line-div>
</div>
<ul class="items-sidebar-list">
{{#each document.items as |item|}}
{{#if item.system.equipped}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=item type=item.type isSidebar=true}}
{{/if}}
{{/each}}
</ul>
</div>
<div class="loadout-section">
<div class="title">
<side-line-div class="invert"></side-line-div>
<h3>Loadout</h3>
<side-line-div></side-line-div>
</div>
<ul class="items-sidebar-list">
{{#each document.items as |item|}}
{{#if (eq item.type 'domainCard')}}
{{#unless item.system.inVault}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=item type=item.type isSidebar=true}}
{{/unless}}
{{/if}}
{{/each}}
</ul>
</div>
<div class="experience-section">
<div class="title">
<side-line-div class="invert"></side-line-div>
<h3>Experience</h3>
<side-line-div></side-line-div>
</div>
<div class="experience-list">
{{#each document.system.experiences as |experience id|}}
<div class="experience-row">
<div class="experience-value">
+{{experience.total}}
</div>
<input name="{{concat "system.experiences." id ".description"}}" data-experience={{id}} value="{{experience.description}}" type="text" />
<div class="controls">
<a><i class="fa-regular fa-message"></i></a>
</div>
</div>
{{/each}}
</div>
</div>
</aside>

View file

@ -1,9 +1,8 @@
<div> <div class="old-sheet">
<header> <header>
<div class="pc-sheet-header"> <div class="pc-sheet-header">
<div class="class-info"> <div class="class-info">
<div class="flexrow"> <div class="flexrow">
<img class="portrait" src="{{document.img}}" alt="{{document.name}}" data-edit="img">
{{#if document.system.class.value}} {{#if document.system.class.value}}
<div class="flexcol"> <div class="flexcol">
<h2 class="class-title flex0" data-action="viewObject" data-value="{{document.system.class.value.uuid}}" data-tab="guide"> <h2 class="class-title flex0" data-action="viewObject" data-value="{{document.system.class.value.uuid}}" data-tab="guide">
@ -41,12 +40,12 @@
<button data-action="takeLongRest" title="{{localize "DAGGERHEART.Sheets.PC.LongRest"}}"><i class="fa-solid fa-bed"></i></button> <button data-action="takeLongRest" title="{{localize "DAGGERHEART.Sheets.PC.LongRest"}}"><i class="fa-solid fa-bed"></i></button>
</div> </div>
</div> </div>
<div class="level-container {{#if document.system.levelData.canLevelUp}}levelup{{/if}}"> <div class="level-container {{#if document.system.levelData.canLevelUp}}levelup{{/if}}" style="width: 30px; height: 30px;">
<div class="level-value-container"> <div class="level-value-container">
<input class="level-value {{#if document.system.levelData.canLevelUp}}levelup{{/if}}" value="{{document.system.levelData.level.changed}}" type="text" data-dtype="Number" /> <input class="level-value {{#if document.system.levelData.canLevelUp}}levelup{{/if}}" value="{{document.system.levelData.level.changed}}" type="text" data-dtype="Number" />
{{#if document.system.levelData.canLevelUp}}<div class="levelup-marker">*</div>{{/if}} {{#if document.system.levelData.canLevelUp}}<div class="levelup-marker">*</div>{{/if}}
</div> </div>
<img src="systems/daggerheart/assets/AttributeShield.svg" /> <img style="width: 30px; height: 30px;" src="systems/daggerheart/assets/AttributeShield.svg" />
<div data-action="levelup" class="level-title {{#if document.system.levelData.canLevelUp}}levelup{{/if}}">{{localize "DAGGERHEART.Sheets.PC.Level"}}</div> <div data-action="levelup" class="level-title {{#if document.system.levelData.canLevelUp}}levelup{{/if}}">{{localize "DAGGERHEART.Sheets.PC.Level"}}</div>
</div> </div>
</div> </div>
@ -81,7 +80,6 @@
{{> "systems/daggerheart/templates/sheets/parts/defense.hbs" }} {{> "systems/daggerheart/templates/sheets/parts/defense.hbs" }}
{{> "systems/daggerheart/templates/sheets/parts/health.hbs" }} {{> "systems/daggerheart/templates/sheets/parts/health.hbs" }}
{{> "systems/daggerheart/templates/sheets/parts/hope.hbs" }} {{> "systems/daggerheart/templates/sheets/parts/hope.hbs" }}
{{> "systems/daggerheart/templates/sheets/parts/experience.hbs" }}
{{> "systems/daggerheart/templates/sheets/parts/gold.hbs" }} {{> "systems/daggerheart/templates/sheets/parts/gold.hbs" }}
{{> "systems/daggerheart/templates/sheets/parts/features.hbs" }} {{> "systems/daggerheart/templates/sheets/parts/features.hbs" }}
</div> </div>

View file

@ -0,0 +1,32 @@
<li class="card-item">
<img src="{{item.img}}" data-action="viewObject" data-value="{{item.uuid}}" class="card-img" />
<div class="card-label">
<div class="controls">
{{#if (eq type 'weapon')}}
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" id="{{item.id}}" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
<i class="fa-solid fa-hands"></i>
</a>
{{/if}}
{{#if (eq type 'armor')}}
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" id="{{item.id}}" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
<i class="fa-solid fa-shield"></i>
</a>
{{/if}}
{{#if (eq type 'domainCard')}}
{{#unless item.system.inVault}}
<a data-action="sendToVault" data-domain="{{card.uuid}}" id="{{item.id}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToVault'}}">
<i class="fa-solid fa-arrow-down"></i>
</a>
{{else}}
<a data-action="sendToLoadout" data-domain="{{card.uuid}}" id="{{item.id}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToLoadout'}}">
<i class="fa-solid fa-arrow-up"></i>
</a>
{{/unless}}
{{/if}}
<a data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToChat'}}"><i class="fa-regular fa-message"></i></a>
<a data-tooltip="{{localize 'DAGGERHEART.Tooltip.moreOptions'}}"><i class="fa-solid fa-ellipsis-vertical"></i></a>
</div>
<div class="card-name">{{item.name}}</div>
</div>
</li>

View file

@ -0,0 +1,49 @@
<fieldset class="{{#if isGlassy}}glassy{{/if}}">
<legend>{{title}}</legend>
<ul class="items-list">
{{#each document.items as |item|}}
{{#if (eq item.type ../type)}}
{{#unless (or (eq ../type 'ancestry') (eq item.type 'class') (eq item.type 'subclass'))}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=item type=../type}}
{{/unless}}
{{/if}}
{{/each}}
{{#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.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}}
</ul>
<ul class="card-list">
{{#each document.items as |item|}}
{{#if (eq item.type ../type)}}
{{#if (eq item.type 'domainCard')}}
{{#unless (eq ../cardView 'list')}}
{{> 'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs' item=item type=../type}}
{{/unless}}
{{/if}}
{{/if}}
{{/each}}
</ul>
</fieldset>

View file

@ -0,0 +1,130 @@
<li class="inventory-item">
<img src="{{item.img}}" data-action="viewObject" data-value="{{item.uuid}}" class="item-img" />
<div class="item-label">
<div class="item-name">{{item.name}}</div>
{{#if (eq type 'weapon')}}
<div class="item-tags">
{{#if isSidebar}}
<div class="item-labels">
<div class="label">
{{localize (concat 'DAGGERHEART.Abilities.' item.system.trait '.name')}}
{{localize (concat 'DAGGERHEART.Range.' item.system.range '.name')}}
<span> - </span>
{{item.system.damage.value}}
({{localize (concat 'DAGGERHEART.DamageType.' item.system.damage.type '.abbreviation')}})
</div>
</div>
{{else}}
<div class="tag">
{{localize (concat 'DAGGERHEART.Abilities.' item.system.trait '.name')}}
{{localize (concat 'DAGGERHEART.Range.' item.system.range '.name')}}
</div>
<div class="tag">
{{item.system.damage.value}}
({{localize (concat 'DAGGERHEART.DamageType.' item.system.damage.type '.abbreviation')}})
</div>
<div class="tag">
{{localize (concat 'DAGGERHEART.Burden.' item.system.burden)}}
</div>
{{/if}}
</div>
{{/if}}
{{#if (eq type 'armor')}}
{{#if isSidebar}}
<div class="item-labels">
<div class="label">
{{localize "DAGGERHEART.Sheets.Armor.baseScore"}}:
{{item.system.baseScore}}
</div>
</div>
{{else}}
<div class="item-tags">
<div class="tag">
{{localize "DAGGERHEART.Sheets.Armor.baseScore"}}:
{{item.system.baseScore}}
</div>
<div class="tag">
{{localize "DAGGERHEART.Sheets.Armor.baseThresholds.base"}}:
{{item.system.baseThresholds.major}}
<span>/</span>
{{item.system.baseThresholds.severe}}
</div>
</div>
{{/if}}
{{/if}}
{{#if (eq type 'domainCard')}}
{{#if isSidebar}}
<div class="item-labels">
<div class="label">
{{localize (concat 'DAGGERHEART.Domain.CardTypes.' item.system.type)}}
<span> - </span>
{{localize (concat 'DAGGERHEART.Domains.' item.system.domain '.label')}}
<span> - </span>
<span class="recall-value">{{item.system.recallCost}}</span>
<i class="fa-solid fa-bolt"></i>
</div>
</div>
{{else}}
<div class="item-tags">
<div class="tag">
{{localize (concat 'DAGGERHEART.Domain.CardTypes.' item.system.type)}}
</div>
<div class="tag">
{{localize (concat 'DAGGERHEART.Domains.' item.system.domain '.label')}}
</div>
<div class="tag">
<span class="recall-label">{{localize "DAGGERHEART.Sheets.DomainCard.RecallCost"}}: </span>
<span class="recall-value">{{item.system.recallCost}}</span>
</div>
</div>
{{/if}}
{{/if}}
{{#if (eq type 'effect')}}
<div class="item-tags">
<div class="tag">
{{localize (concat 'TYPES.Item.' item.parent.type)}}
<span>: </span>
{{item.parent.name}}
</div>
<div class="tag">
{{#if item.duration.duration}}
{{localize 'DAGGERHEART.Effects.duration.temporary'}}
{{else}}
{{localize 'DAGGERHEART.Effects.duration.passive'}}
{{/if}}
</div>
{{#each item.statuses as |status|}}
<div class="tag">
{{localize (concat 'DAGGERHEART.Condition.' status '.name')}}
</div>
{{/each}}
</div>
{{/if}}
</div>
<div class="controls">
{{#if (eq type 'weapon')}}
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" id="{{item.id}}" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
<i class="fa-solid fa-hands"></i>
</a>
{{/if}}
{{#if (eq type 'armor')}}
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" id="{{item.id}}" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
<i class="fa-solid fa-shield"></i>
</a>
{{/if}}
{{#if (eq type 'domainCard')}}
{{#unless item.system.inVault}}
<a data-action="sendToVault" data-domain="{{card.uuid}}" id="{{item.id}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToVault'}}">
<i class="fa-solid fa-arrow-down"></i>
</a>
{{else}}
<a data-action="sendToLoadout" data-domain="{{card.uuid}}" id="{{item.id}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToLoadout'}}">
<i class="fa-solid fa-arrow-up"></i>
</a>
{{/unless}}
{{/if}}
<a data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToChat'}}"><i class="fa-regular fa-message"></i></a>
<a data-tooltip="{{localize 'DAGGERHEART.Tooltip.moreOptions'}}"><i class="fa-solid fa-ellipsis-vertical"></i></a>
</div>
</li>

View file

@ -14,12 +14,10 @@
<h3> <h3>
{{localize (concat 'DAGGERHEART.Domain.CardTypes.' source.system.type)}} {{localize (concat 'DAGGERHEART.Domain.CardTypes.' source.system.type)}}
<span>-</span> <span>-</span>
{{source.system.domain}} {{localize (concat 'DAGGERHEART.Domains.' source.system.domain '.label')}}
<span>-</span> <span>-</span>
<span> {{localize "DAGGERHEART.Sheets.DomainCard.Level"}}:
{{localize "DAGGERHEART.Sheets.DomainCard.Level"}}: {{source.system.level}}
{{source.system.level}}
</span>
</h3> </h3>
</div> </div>
</div> </div>

View file

@ -1,4 +1,12 @@
<div> <div>
{{#if uses}}
<div class="form-group">
<div class="form-fields">
<label for="uses.enabled">Uses: {{uses.value}}/{{uses.max}}</label>
<input name="uses.enabled" type="checkbox"{{#if uses.enabled}} checked{{/if}}>
</div>
</div>
{{/if}}
{{#each costs as | cost index |}} {{#each costs as | cost index |}}
<div class="form-group"> <div class="form-group">
<div class="form-fields"> <div class="form-fields">