diff --git a/lang/en.json b/lang/en.json index d341b4bf..5dc09a1e 100755 --- a/lang/en.json +++ b/lang/en.json @@ -89,14 +89,9 @@ }, "Config": { "beastform": { - "exact": { "label": "Beastform Max Tier", "hint": "The Character's Tier is used if empty" }, - "modifications": { - "traitBonuses": { - "label": { "single": "Trait Bonus", "plural": "Trait Bonuses" }, - "hint": "Pick bonuses you apply to freely chosen traits at the time of transforming", - "bonus": "Bonus Amount" - } - } + "exact": "Beastform Max Tier", + "exactHint": "The Character's Tier is used if empty", + "label": "Beastform" }, "countdown": { "defaultOwnership": "Default Ownership", diff --git a/module/applications/dialogs/beastformDialog.mjs b/module/applications/dialogs/beastformDialog.mjs index 8ae6d5fe..09a9222b 100644 --- a/module/applications/dialogs/beastformDialog.mjs +++ b/module/applications/dialogs/beastformDialog.mjs @@ -10,12 +10,6 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat this.selected = null; this.evolved = { form: null }; this.hybrid = { forms: {}, advantages: {}, features: {} }; - this.modifications = { - traitBonuses: configData.modifications.traitBonuses.map(x => ({ - trait: null, - bonus: x.bonus - })) - }; this._dragDrop = this._createDragDropHandlers(); } @@ -34,7 +28,6 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat selectBeastform: this.selectBeastform, toggleHybridFeature: this.toggleHybridFeature, toggleHybridAdvantage: this.toggleHybridAdvantage, - toggleTraitBonus: this.toggleTraitBonus, submitBeastform: this.submitBeastform }, form: { @@ -55,7 +48,6 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat tabs: { template: 'systems/daggerheart/templates/dialogs/beastform/tabs.hbs' }, beastformTier: { template: 'systems/daggerheart/templates/dialogs/beastform/beastformTier.hbs' }, advanced: { template: 'systems/daggerheart/templates/dialogs/beastform/advanced.hbs' }, - modifications: { template: 'systems/daggerheart/templates/dialogs/beastform/modifications.hbs' }, footer: { template: 'systems/daggerheart/templates/dialogs/beastform/footer.hbs' } }; @@ -154,9 +146,6 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat {} ); - context.modifications = this.modifications; - context.traits = CONFIG.DH.ACTOR.abilities; - context.tier = beastformTiers[this.tabGroups.primary]; context.tierKey = this.tabGroups.primary; @@ -166,9 +155,6 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat } canSubmit() { - const modificationsFinished = this.modifications.traitBonuses.every(x => x.trait); - if (!modificationsFinished) return false; - if (this.selected) { switch (this.selected.system.beastformType) { case 'normal': @@ -275,13 +261,6 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat this.render(); } - static toggleTraitBonus(_, button) { - const { index, trait } = button.dataset; - this.modifications.traitBonuses[index].trait = - this.modifications.traitBonuses[index].trait === trait ? null : trait; - this.render(); - } - static async submitBeastform() { await this.close({ submitted: true }); } @@ -313,23 +292,6 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat } } - const beastformEffect = selected.effects.find(x => x.type === 'beastform'); - for (const traitBonus of app.modifications.traitBonuses) { - const existingChange = beastformEffect.changes.find( - x => x.key === `system.traits.${traitBonus.trait}.value` - ); - if (existingChange) { - existingChange.value = Number.parseInt(existingChange.value) + traitBonus.bonus; - } else { - beastformEffect.changes.push({ - key: `system.traits.${traitBonus.trait}.value`, - mode: 2, - priority: null, - value: traitBonus.bonus - }); - } - } - resolve({ selected: selected, evolved: { ...app.evolved, form: evolved }, diff --git a/module/applications/dialogs/tagTeamDialog.mjs b/module/applications/dialogs/tagTeamDialog.mjs index 5fdefcbd..27003162 100644 --- a/module/applications/dialogs/tagTeamDialog.mjs +++ b/module/applications/dialogs/tagTeamDialog.mjs @@ -453,8 +453,7 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio const { parsedRoll, newRoll } = await game.system.api.dice.DualityRoll.reroll( memberData.rollData, dieIndex, - diceType, - false + diceType ); const rollData = parsedRoll.toJSON(); this.updatePartyData( diff --git a/module/applications/sheets-configs/action-base-config.mjs b/module/applications/sheets-configs/action-base-config.mjs index 0ae39477..05a3177d 100644 --- a/module/applications/sheets-configs/action-base-config.mjs +++ b/module/applications/sheets-configs/action-base-config.mjs @@ -36,9 +36,7 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2) editDoc: this.editDoc, addTrigger: this.addTrigger, removeTrigger: this.removeTrigger, - expandTrigger: this.expandTrigger, - addBeastformTraitBonus: this.addBeastformTraitBonus, - removeBeastformTraitBonus: this.removeBeastformTraitBonus + expandTrigger: this.expandTrigger }, form: { handler: this.updateForm, @@ -414,21 +412,6 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2) } } - static async addBeastformTraitBonus() { - const data = this.action.toObject(); - data.beastform.modifications.traitBonuses = [ - ...data.beastform.modifications.traitBonuses, - this.action.schema.fields.beastform.fields.modifications.fields.traitBonuses.element.getInitialValue() - ]; - this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); - } - - static async removeBeastformTraitBonus(_event, button) { - const data = this.action.toObject(); - data.beastform.modifications.traitBonuses.splice(button.dataset.index, 1); - this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); - } - updateSummonCount(event) { event.stopPropagation(); const wrapper = event.target.closest('.summon-count-wrapper'); diff --git a/module/data/activeEffect/beastformEffect.mjs b/module/data/activeEffect/beastformEffect.mjs index 128c0c52..47e28b4c 100644 --- a/module/data/activeEffect/beastformEffect.mjs +++ b/module/data/activeEffect/beastformEffect.mjs @@ -25,7 +25,7 @@ export default class BeastformEffect extends BaseEffect { width: new fields.NumberField({ integer: false, nullable: true }) }) }), - advantageOn: new fields.TypedObjectField(new fields.SchemaField({ value: new fields.StringField() })), + advantageOn: new fields.ArrayField(new fields.StringField()), featureIds: new fields.ArrayField(new fields.StringField()), effectIds: new fields.ArrayField(new fields.StringField()) }; diff --git a/module/data/fields/action/beastformField.mjs b/module/data/fields/action/beastformField.mjs index e3be9937..e19807c7 100644 --- a/module/data/fields/action/beastformField.mjs +++ b/module/data/fields/action/beastformField.mjs @@ -28,21 +28,8 @@ export default class BeastformField extends fields.SchemaField { { 1: game.i18n.localize('DAGGERHEART.GENERAL.Tiers.1') } ); }, - label: 'DAGGERHEART.ACTIONS.Config.beastform.exact.label', - hint: 'DAGGERHEART.ACTIONS.Config.beastform.exact.hint' + hint: 'DAGGERHEART.ACTIONS.Config.beastform.exactHint' }) - }), - modifications: new fields.SchemaField({ - traitBonuses: new fields.ArrayField( - new fields.SchemaField({ - bonus: new fields.NumberField({ - integer: true, - initial: 1, - min: 1, - label: 'DAGGERHEART.ACTIONS.Config.beastform.modifications.traitBonuses.bonus' - }) - }) - ) }) }; super(beastformFields, options, context); @@ -79,9 +66,15 @@ export default class BeastformField extends fields.SchemaField { ) ?? 1; config.tierLimit = this.beastform.tierAccess.exact ?? actorTier; - config.modifications = this.beastform.modifications; } + /** + * TODO by Harry + * @param {*} selectedForm + * @param {*} evolvedData + * @param {*} hybridData + * @returns + */ static async transform(selectedForm, evolvedData, hybridData) { const formData = evolvedData?.form ?? selectedForm; const beastformEffect = formData.effects.find(x => x.type === 'beastform'); diff --git a/module/data/item/beastform.mjs b/module/data/item/beastform.mjs index d30d6046..2792f7e3 100644 --- a/module/data/item/beastform.mjs +++ b/module/data/item/beastform.mjs @@ -99,14 +99,10 @@ export default class DHBeastform extends BaseDataItem { get beastformAttackData() { const effect = this.parent.effects.find(x => x.type === 'beastform'); - return DHBeastform.getBeastformAttackData(effect); - } - - static getBeastformAttackData(effect) { if (!effect) return null; - const mainTrait = effect.system.changes.find(x => x.key === 'system.rules.attack.roll.trait')?.value; - const traitBonus = effect.system.changes.find(x => x.key === `system.traits.${mainTrait}.value`)?.value ?? 0; + const traitBonus = + effect.system.changes.find(x => x.key === `system.traits.${this.mainTrait}.value`)?.value ?? 0; const evasionBonus = effect.system.changes.find(x => x.key === 'system.evasion')?.value ?? 0; const damageDiceIndex = effect.system.changes.find(x => x.key === 'system.rules.attack.damage.diceIndex'); @@ -114,7 +110,7 @@ export default class DHBeastform extends BaseDataItem { const damageBonus = effect.system.changes.find(x => x.key === 'system.rules.attack.damage.bonus')?.value ?? 0; return { - trait: game.i18n.localize(CONFIG.DH.ACTOR.abilities[mainTrait]?.label), + trait: game.i18n.localize(CONFIG.DH.ACTOR.abilities[this.mainTrait].label), traitBonus: traitBonus ? Number(traitBonus).signedString() : '', evasionBonus: evasionBonus ? Number(evasionBonus).signedString() : '', damageDice: damageDice, diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index 3310b9ca..a5d95cd1 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -122,6 +122,10 @@ export default class DHRoll extends Roll { if (roll._evaluated) { const message = await cls.create(msgData, { messageMode: config.selectedMessageMode }); + if (config.tagTeamSelected) { + game.system.api.applications.dialogs.TagTeamDialog.assignRoll(message.speakerActor, message); + } + if (roll.formula !== '' && game.modules.get('dice-so-nice')?.active) { await game.dice3d.waitFor3DAnimationByMessageID(message.id); } diff --git a/module/dice/dualityRoll.mjs b/module/dice/dualityRoll.mjs index 84e0b493..03035f68 100644 --- a/module/dice/dualityRoll.mjs +++ b/module/dice/dualityRoll.mjs @@ -305,6 +305,7 @@ export default class DualityRoll extends D20Roll { !config.source?.actor || (game.user.isGM ? !hopeFearAutomation.gm : !hopeFearAutomation.players) || config.actionType === 'reaction' || + config.tagTeamSelected || config.skips?.resources ) return; @@ -345,6 +346,7 @@ export default class DualityRoll extends D20Roll { if ( automationSettings.countdownAutomation && config.actionType !== 'reaction' && + !config.tagTeamSelected && !config.skips?.updateCountdowns ) { const { updateCountdowns } = game.system.api.applications.ui.DhCountdowns; @@ -372,7 +374,7 @@ export default class DualityRoll extends D20Roll { } } - static async reroll(rollBase, dieIndex, diceType, updateResources = true) { + static async reroll(rollBase, dieIndex, diceType) { let parsedRoll = game.system.api.dice.DualityRoll.fromData({ ...rollBase, evaluated: false }); const term = parsedRoll.terms[dieIndex]; await term.reroll(`/r1=${term.total}`); @@ -419,14 +421,12 @@ export default class DualityRoll extends D20Roll { source: { actor: parsedRoll.options.source.actor ?? '' }, targets: parsedRoll.targets, roll: newRoll, - rerolledRoll: parsedRoll.options.roll, + rerolledRoll: parsedRoll.roll, resourceUpdates: new ResourceUpdateMap(actor) }; - if (updateResources) { - await DualityRoll.addDualityResourceUpdates(config); - await config.resourceUpdates.updateResources(); - } + await DualityRoll.addDualityResourceUpdates(config); + await config.resourceUpdates.updateResources(); return { newRoll, parsedRoll }; } diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index 8ec7a751..4aeba3af 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -1,4 +1,5 @@ import { itemAbleRollParse } from '../helpers/utils.mjs'; +import { RefreshType } from '../systemRegistration/socket.mjs'; export default class DhActiveEffect extends foundry.documents.ActiveEffect { /* -------------------------------------------- */ @@ -107,41 +108,37 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { update.img = 'icons/magic/life/heart-cross-blue.webp'; } - if (this.actor && data.origin) { - const existingEffect = this.actor.effects.find(x => x.origin === data.origin); - const stacks = Boolean(data.system?.stacking); - if (existingEffect && !stacks) return false; + const existingEffect = this.actor.effects.find(x => x.origin === data.origin); + const stacks = Boolean(data.system?.stacking); + if (existingEffect && !stacks) return false; - if (existingEffect && stacks) { - const incrementedValue = existingEffect.system.stacking.value + 1; - await existingEffect.update({ - 'system.stacking.value': Math.min(incrementedValue, existingEffect.system.stacking.max ?? Infinity) - }); - return false; - } + if (existingEffect && stacks) { + const incrementedValue = existingEffect.system.stacking.value + 1; + await existingEffect.update({ + 'system.stacking.value': Math.min(incrementedValue, existingEffect.system.stacking.max ?? Infinity) + }); + return false; } - if (this.parent) { - const statuses = Object.keys(data.statuses ?? {}); - const immuneStatuses = - statuses.filter( - status => - this.parent.system.rules?.conditionImmunities && - this.parent.system.rules.conditionImmunities[status] - ) ?? []; - if (immuneStatuses.length > 0) { - update.statuses = statuses.filter(x => !immuneStatuses.includes(x)); - const conditions = CONFIG.DH.GENERAL.conditions(); - const scrollingTexts = immuneStatuses.map(status => ({ - text: game.i18n.format('DAGGERHEART.ACTIVEEFFECT.immuneStatusText', { - status: game.i18n.localize(conditions[status].name) - }) - })); - if (update.statuses.length > 0) { - setTimeout(() => scrollingTexts, 500); - } else { - this.parent.queueScrollText(scrollingTexts); - } + const statuses = Object.keys(data.statuses ?? {}); + const immuneStatuses = + statuses.filter( + status => + this.parent.system.rules?.conditionImmunities && + this.parent.system.rules.conditionImmunities[status] + ) ?? []; + if (immuneStatuses.length > 0) { + update.statuses = statuses.filter(x => !immuneStatuses.includes(x)); + const conditions = CONFIG.DH.GENERAL.conditions(); + const scrollingTexts = immuneStatuses.map(status => ({ + text: game.i18n.format('DAGGERHEART.ACTIVEEFFECT.immuneStatusText', { + status: game.i18n.localize(conditions[status].name) + }) + })); + if (update.statuses.length > 0) { + setTimeout(() => scrollingTexts, 500); + } else { + this.parent.queueScrollText(scrollingTexts); } } @@ -152,6 +149,20 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { await super._preCreate(data, options, user); } + /** @inheritdoc */ + _onCreate(data, options, userId) { + super._onCreate(data, options, userId); + + Hooks.callAll(RefreshType.EffectsDisplay); + } + + /** @inheritdoc */ + _onDelete(data, options, userId) { + super._onDelete(data, options, userId); + + Hooks.callAll(RefreshType.EffectsDisplay); + } + /* -------------------------------------------- */ /* Methods */ /* -------------------------------------------- */ diff --git a/module/documents/tooltipManager.mjs b/module/documents/tooltipManager.mjs index e10dc5fa..bf107a42 100644 --- a/module/documents/tooltipManager.mjs +++ b/module/documents/tooltipManager.mjs @@ -31,39 +31,12 @@ export default class DhTooltipManager extends foundry.helpers.interaction.Toolti this.#bordered = true; let effect = {}; if (element.dataset.uuid) { - const effectItem = await foundry.utils.fromUuid(element.dataset.uuid); - const effectData = effectItem.toObject(); - + const effectData = (await foundry.utils.fromUuid(element.dataset.uuid)).toObject(); effect = { ...effectData, - name: game.i18n.localize(effectData.name) + name: game.i18n.localize(effectData.name), + description: game.i18n.localize(effectData.description ?? effectData.parent.system.description) }; - - if (effectData.type === 'beastform') { - const beastformData = { - features: [], - advantageOn: effectData.system.advantageOn, - beastformAttackData: game.system.api.data.items.DHBeastform.getBeastformAttackData(effectItem) - }; - - const features = effectItem.parent.items.filter(x => effectItem.system.featureIds.includes(x.id)); - for (const feature of features) { - const featureData = feature.toObject(); - featureData.enrichedDescription = await feature.system.getEnrichedDescription(); - beastformData.features.push(featureData); - } - - effect.description = await foundry.applications.handlebars.renderTemplate( - 'systems/daggerheart/templates/ui/tooltip/parts/beastformData.hbs', - { - item: { system: beastformData } - } - ); - } else { - effect.description = game.i18n.localize( - effectData.description ?? effectData.parent.system.description - ); - } } else { const conditions = CONFIG.DH.GENERAL.conditions(); const condition = conditions[element.dataset.condition]; diff --git a/module/systemRegistration/handlebars.mjs b/module/systemRegistration/handlebars.mjs index 63e591c6..36df8b54 100644 --- a/module/systemRegistration/handlebars.mjs +++ b/module/systemRegistration/handlebars.mjs @@ -36,7 +36,6 @@ export const preloadHandlebarsTemplates = async function () { 'systems/daggerheart/templates/actionTypes/summon.hbs', 'systems/daggerheart/templates/actionTypes/transform.hbs', 'systems/daggerheart/templates/settings/components/settings-item-line.hbs', - 'systems/daggerheart/templates/ui/tooltip/parts/beastformData.hbs', 'systems/daggerheart/templates/ui/tooltip/parts/tooltipChips.hbs', 'systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs', 'systems/daggerheart/templates/dialogs/downtime/activities.hbs', diff --git a/src/packs/classes/feature_Evolution_6rlxhrRwFaVgq9fe.json b/src/packs/classes/feature_Evolution_6rlxhrRwFaVgq9fe.json index 421063a4..46380fe8 100644 --- a/src/packs/classes/feature_Evolution_6rlxhrRwFaVgq9fe.json +++ b/src/packs/classes/feature_Evolution_6rlxhrRwFaVgq9fe.json @@ -5,7 +5,7 @@ "_id": "6rlxhrRwFaVgq9fe", "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", "system": { - "description": "
Spend 3 Hope to transform into a Beastform without marking a Stress. When you do, choose one trait to raise by +1 until you drop out of that Beastform.
", + "description": "Spend 3 Hope to transform into a Beastform without marking a Stress. When you do, choose one trait to raise by +1 until you drop out of that Beastform.
Note: Toggle one of the Evolution Traits in the effects tab to raise a trait by 1, e.g. Evolution: Agility
Toggle this for +1 to Agility when using Evolution. Turn it off when you leave Beastform.
", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.vQOqLZAxOltAzsVv" + }, + { + "name": "Evolution: Strength", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "cwEsO1NZpkQHuoTT", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.strength.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "Toggle this for +1 to Strength when using Evolution. Turn it off when you leave Beastform.
", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.cwEsO1NZpkQHuoTT" + }, + { + "name": "Evolution: Finesse", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "8P0nwRHNsVnHVPjq", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.finesse.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "Toggle this for +1 to Finesse when using Evolution. Turn it off when you leave Beastform.
", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.8P0nwRHNsVnHVPjq" + }, + { + "name": "Evolution: Instinct", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "i2GhNGo5TnGtLuA0", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.instinct.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "Toggle this for +1 to Instinct when using Evolution. Turn it off when you leave Beastform.
", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.i2GhNGo5TnGtLuA0" + }, + { + "name": "Evolution: Presence", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "APQF1in1LXjBZh9n", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.presence.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "Toggle this for +1 to Presence when using Evolution. Turn it off when you leave Beastform.
", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.APQF1in1LXjBZh9n" + }, + { + "name": "Evolution: Knowledge", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "WwOvGJYJb4d37cOy", + "img": "icons/magic/nature/wolf-paw-glow-large-orange.webp", + "changes": [ + { + "key": "system.traits.knowledge.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": true, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "Toggle this for +1 to Knowledge when using Evolution. Turn it off when you leave Beastform.
", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!items.effects!6rlxhrRwFaVgq9fe.WwOvGJYJb4d37cOy" + } + ], "sort": 100000, "ownership": { "default": 0, diff --git a/styles/less/dialog/beastform/sheet.less b/styles/less/dialog/beastform/sheet.less index 0e1fe746..9e87f53b 100644 --- a/styles/less/dialog/beastform/sheet.less +++ b/styles/less/dialog/beastform/sheet.less @@ -204,44 +204,6 @@ } } - .modifications-container { - display: flex; - flex-direction: column; - gap: 16px; - - .trait-bonuses-container { - display: flex; - flex-direction: column; - gap: 8px; - - .bonus-separator { - background: light-dark(@dark-blue, @golden); - mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); - height: 2px; - width: calc(100% - 10px); - } - - .trait-bonus-container { - display: flex; - gap: 4px; - - .trait-card { - border: 1px solid light-dark(@dark-blue, @golden); - border-radius: 6px; - padding: 2px; - opacity: 0.4; - flex: 1; - white-space: nowrap; - text-align: center; - - &.selected { - opacity: 1; - } - } - } - } - } - footer { margin-top: 8px; display: flex; diff --git a/styles/less/sheets/actions/actions.less b/styles/less/sheets/actions/actions.less index 5a18d622..5c21dc60 100644 --- a/styles/less/sheets/actions/actions.less +++ b/styles/less/sheets/actions/actions.less @@ -133,18 +133,4 @@ height: 300px; } } - - .deletable-row { - display: flex; - align-items: end; - gap: 8px; - - input { - flex: 1; - } - - a { - padding-bottom: 7px; - } - } } diff --git a/styles/less/sheets/actors/character/sidebar.less b/styles/less/sheets/actors/character/sidebar.less index 8bbede76..bb0a43cd 100644 --- a/styles/less/sheets/actors/character/sidebar.less +++ b/styles/less/sheets/actors/character/sidebar.less @@ -339,8 +339,7 @@ background: light-dark(@light-black, @dark-blue); border: 1px solid light-dark(@dark-blue, @golden); - h4, - i { + h4, i { color: light-dark(@dark-blue, @golden); } } @@ -381,7 +380,7 @@ } } } - .slot-label { + .slot-label { display: flex; align-items: center; color: light-dark(@beige, @dark-blue); @@ -400,9 +399,7 @@ background: light-dark(@light-black, @dark-blue); border: 1px solid light-dark(@dark-blue, @golden); - .label, - .value, - i { + .label, .value, i { color: light-dark(@dark-blue, @golden); } } diff --git a/styles/less/ux/index.less b/styles/less/ux/index.less index a73f2d1c..6fad3ab1 100644 --- a/styles/less/ux/index.less +++ b/styles/less/ux/index.less @@ -1,4 +1,3 @@ -@import './tooltip/sheet.less'; @import './tooltip/tooltip.less'; @import './tooltip/armorManagement.less'; @import './tooltip/battlepoints.less'; diff --git a/styles/less/ux/tooltip/bordered-tooltip.less b/styles/less/ux/tooltip/bordered-tooltip.less index d72f635e..abec93b7 100644 --- a/styles/less/ux/tooltip/bordered-tooltip.less +++ b/styles/less/ux/tooltip/bordered-tooltip.less @@ -18,7 +18,7 @@ display: flex; flex-direction: column; align-items: center; - text-align: center; + text-align: start; padding: 5px; gap: 0px; diff --git a/styles/less/ux/tooltip/sheet.less b/styles/less/ux/tooltip/sheet.less deleted file mode 100644 index 59e4e638..00000000 --- a/styles/less/ux/tooltip/sheet.less +++ /dev/null @@ -1,129 +0,0 @@ -#tooltip:has(div.daggerheart.dh-style.tooltip.card-style), -aside[role='tooltip']:has(div.daggerheart.dh-style.tooltip), -#tooltip.bordered-tooltip { - .tooltip-title { - font-size: var(--font-size-20); - color: light-dark(@dark-blue, @golden); - font-weight: 700; - } - - .tooltip-description { - font-style: inherit; - text-align: inherit; - width: 100%; - padding: 5px 10px; - position: relative; - margin-top: 5px; - - &::before { - content: ''; - background: @golden; - mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); - height: 2px; - width: calc(100% - 10px); - } - - &::before { - position: absolute; - top: -5px; - } - } - - .tooltip-separator { - background: @golden; - mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); - height: 2px; - width: calc(100% - 10px); - margin-bottom: 2px; - } - - .tooltip-tags { - display: flex; - flex-direction: column; - gap: 10px; - width: 100%; - padding: 5px 10px; - position: relative; - max-height: 150px; - overflow-y: auto; - position: relative; - - scrollbar-width: thin; - scrollbar-color: light-dark(@dark-blue, @golden) transparent; - - .tooltip-tag { - display: flex; - gap: 10px; - flex-direction: column; - - .tooltip-tag-label-container { - display: flex; - align-items: center; - gap: 5px; - - img { - width: 40px; - height: 40px; - border-radius: 3px; - } - } - } - } - - .tags { - display: flex; - gap: 5px 10px; - padding-bottom: 16px; - flex-wrap: wrap; - justify-content: center; - - &.advantages { - width: 100%; - padding: 5px 10px; - padding-bottom: 16px; - position: relative; - margin-top: 5px; - - &::before { - content: ''; - background: @golden; - mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); - height: 2px; - width: calc(100% - 10px); - } - - &::before { - position: absolute; - top: -5px; - } - - .tag { - background: @green-10; - color: @green; - border-color: @green; - } - } - - .tag { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - padding: 3px 5px; - font-size: var(--font-size-12); - font: @font-body; - - 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: var(--font-size-12); - } - } -} diff --git a/styles/less/ux/tooltip/tooltip.less b/styles/less/ux/tooltip/tooltip.less index 1566059f..ac09afc0 100644 --- a/styles/less/ux/tooltip/tooltip.less +++ b/styles/less/ux/tooltip/tooltip.less @@ -13,6 +13,13 @@ aside[role='tooltip']:has(div.daggerheart.dh-style.tooltip.card-style) { outline: 1px solid light-dark(@dark-80, @beige-80); box-shadow: 0 0 25px rgba(0, 0, 0, 0.8); + .tooltip-title { + font-size: var(--font-size-20); + color: light-dark(@dark-blue, @golden); + font-weight: 700; + margin-bottom: 5px; + } + .tooltip-subtitle { margin: 0; } @@ -73,6 +80,110 @@ aside[role='tooltip']:has(div.daggerheart.dh-style.tooltip.card-style) { } } + .tooltip-tags { + display: flex; + flex-direction: column; + gap: 10px; + width: 100%; + padding: 5px 10px; + position: relative; + padding-top: 10px; + max-height: 150px; + overflow-y: auto; + position: relative; + + scrollbar-width: thin; + scrollbar-color: light-dark(@dark-blue, @golden) transparent; + + &::before { + content: ''; + background: @golden; + mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); + height: 2px; + width: calc(100% - 10px); + } + + &::before { + position: absolute; + top: 0px; + } + + .tooltip-tag { + display: flex; + gap: 10px; + flex-direction: column; + + .tooltip-tag-label-container { + display: flex; + align-items: center; + gap: 5px; + + img { + width: 40px; + height: 40px; + border-radius: 3px; + } + } + } + } + + .tags { + display: flex; + gap: 5px 10px; + padding-bottom: 16px; + flex-wrap: wrap; + justify-content: center; + + &.advantages { + width: 100%; + padding: 5px 10px; + padding-bottom: 16px; + position: relative; + margin-top: 5px; + + &::before { + content: ''; + background: @golden; + mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); + height: 2px; + width: calc(100% - 10px); + } + + &::before { + position: absolute; + top: -5px; + } + + .tag { + background: @green-10; + color: @green; + border-color: @green; + } + } + + .tag { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + padding: 3px 5px; + font-size: var(--font-size-12); + font: @font-body; + + 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: var(--font-size-12); + } + } + .item-icons-list { position: absolute; display: flex; diff --git a/system.json b/system.json index cc322576..9a78bf50 100644 --- a/system.json +++ b/system.json @@ -5,7 +5,7 @@ "version": "2.0.0", "compatibility": { "minimum": "14.355", - "verified": "14.358", + "verified": "14.357", "maximum": "14" }, "authors": [ diff --git a/templates/actionTypes/beastform.hbs b/templates/actionTypes/beastform.hbs index 885038a1..b9bea445 100644 --- a/templates/actionTypes/beastform.hbs +++ b/templates/actionTypes/beastform.hbs @@ -1,16 +1,4 @@ -{{formGroup fields.tierAccess.fields.exact value=source.tierAccess.exact name="beastform.tierAccess.exact" labelAttr="label" valueAttr="key" localize=true blank=""}} - \ No newline at end of file diff --git a/templates/dialogs/beastform/modifications.hbs b/templates/dialogs/beastform/modifications.hbs deleted file mode 100644 index 2563ea13..00000000 --- a/templates/dialogs/beastform/modifications.hbs +++ /dev/null @@ -1,28 +0,0 @@ -{{item.system.examples}}
- {{> "systems/daggerheart/templates/ui/tooltip/parts/beastformData.hbs" }} + {{#if description}} +{{localize "DAGGERHEART.UI.Tooltip.middleClick"}} diff --git a/templates/ui/tooltip/effect-display.hbs b/templates/ui/tooltip/effect-display.hbs index f1db03c5..ebb21be4 100644 --- a/templates/ui/tooltip/effect-display.hbs +++ b/templates/ui/tooltip/effect-display.hbs @@ -41,32 +41,26 @@ {{/if}} - + {{#unless effect.isLockedCondition}}
- {{localize "DAGGERHEART.UI.Tooltip.middleClick"}} + {{localize "DAGGERHEART.UI.EffectsDisplay.increaseStacks"}}
- {{/if}} - {{#unless effect.isLockedCondition}} - {{#if effect.system.stacking}} + {{#if (gt effect.system.stacking.value 1)}}- {{localize "DAGGERHEART.UI.EffectsDisplay.increaseStacks"}} + {{localize "DAGGERHEART.UI.EffectsDisplay.decreaseStacks"}}
- {{#if (gt effect.system.stacking.value 1)}} -- {{localize "DAGGERHEART.UI.EffectsDisplay.decreaseStacks"}} -
- {{else}} -- {{localize "DAGGERHEART.UI.EffectsDisplay.removeThing" thing=(localize "DAGGERHEART.GENERAL.Effect.single")}} -
- {{/if}} {{else}}{{localize "DAGGERHEART.UI.EffectsDisplay.removeThing" thing=(localize "DAGGERHEART.GENERAL.Effect.single")}}
{{/if}} - {{/unless}} + {{else}} ++ {{localize "DAGGERHEART.UI.EffectsDisplay.removeThing" thing=(localize "DAGGERHEART.GENERAL.Effect.single")}} +
+ {{/if}}