diff --git a/lang/en.json b/lang/en.json index 0180b085..3f21f5eb 100755 --- a/lang/en.json +++ b/lang/en.json @@ -113,8 +113,7 @@ "area": { "sectionTitle": "Areas", "shape": "Shape", - "size": "Size", - "hasHole": "Area Hole" + "size": "Size" }, "displayInChat": "Display in chat", "deleteTriggerTitle": "Delete Trigger", @@ -871,10 +870,6 @@ "bruiser": "for each Bruiser adversary.", "solo": "for each Solo adversary." }, - "AreaTypes": { - "attached": { "label": "Attached To Token" }, - "placed": { "label": "Placed In Scene" } - }, "ArmorInteraction": { "none": { "label": "Ignores Armor" }, "active": { "label": "Active w/ Armor" }, diff --git a/module/applications/sheets/actors/adversary.mjs b/module/applications/sheets/actors/adversary.mjs index bcfe3cbb..35612e69 100644 --- a/module/applications/sheets/actors/adversary.mjs +++ b/module/applications/sheets/actors/adversary.mjs @@ -7,7 +7,7 @@ export default class AdversarySheet extends DHBaseActorSheet { /** @inheritDoc */ static DEFAULT_OPTIONS = { classes: ['adversary'], - position: { width: 645, height: 760 }, + position: { width: 660, height: 766 }, window: { resizable: true }, actions: { toggleHitPoints: AdversarySheet.#toggleHitPoints, diff --git a/module/canvas/placeables/regionLayer.mjs b/module/canvas/placeables/regionLayer.mjs index b71ccc3f..684fdd5e 100644 --- a/module/canvas/placeables/regionLayer.mjs +++ b/module/canvas/placeables/regionLayer.mjs @@ -96,7 +96,7 @@ export default class DhRegionLayer extends foundry.canvas.layers.RegionLayer { return inBounds.length === 1 ? inBounds[0] : null; } - static getTemplateShape({ shapeType, angle, range, direction, hasHole } = {}) { + static getTemplateShape({ type, angle, range, direction } = {}) { const { line, rectangle, inFront, cone, circle, emanation } = CONFIG.DH.GENERAL.templateTypes; /* Length calculation */ @@ -112,11 +112,11 @@ export default class DhRegionLayer extends foundry.canvas.layers.RegionLayer { const shapeData = { ...canvas.mousePosition, - type: shapeType, + type: type, direction: direction ?? 0 }; - switch (shapeType) { + switch (type) { case rectangle.id: shapeData.width = length; shapeData.height = length; @@ -145,8 +145,7 @@ export default class DhRegionLayer extends foundry.canvas.layers.RegionLayer { y: 0, width: 1, height: 1, - shape: game.canvas.grid.isHexagonal ? CONST.TOKEN_SHAPES.ELLIPSE_1 : CONST.TOKEN_SHAPES.RECTANGLE_1, - hole: hasHole + shape: game.canvas.grid.isHexagonal ? CONST.TOKEN_SHAPES.ELLIPSE_1 : CONST.TOKEN_SHAPES.RECTANGLE_1 }; break; } diff --git a/module/config/actionConfig.mjs b/module/config/actionConfig.mjs index e413a828..a6c04e18 100644 --- a/module/config/actionConfig.mjs +++ b/module/config/actionConfig.mjs @@ -119,10 +119,6 @@ export const advantageState = { export const areaTypes = { placed: { id: 'placed', - label: 'DAGGERHEART.CONFIG.AreaTypes.placed.label' - }, - attached: { - id: 'attached', - label: 'DAGGERHEART.CONFIG.AreaTypes.attached.label' + label: 'Placed Area' } }; diff --git a/module/data/fields/action/areasField.mjs b/module/data/fields/action/areasField.mjs index a4180101..52110045 100644 --- a/module/data/fields/action/areasField.mjs +++ b/module/data/fields/action/areasField.mjs @@ -33,10 +33,6 @@ export default class AreasField extends fields.ArrayField { initial: CONFIG.DH.GENERAL.range.veryClose.id, label: 'DAGGERHEART.ACTIONS.Config.area.size' }), - hasHole: new fields.BooleanField({ - initial: false, - label: 'DAGGERHEART.ACTIONS.Config.area.hasHole' - }), effects: new fields.ArrayField(new fields.DocumentIdField()) }); super(element, options, context); diff --git a/module/documents/chatMessage.mjs b/module/documents/chatMessage.mjs index fd68997c..b555dfca 100644 --- a/module/documents/chatMessage.mjs +++ b/module/documents/chatMessage.mjs @@ -276,12 +276,8 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage { async onCreateAreas(event) { const createArea = async selectedArea => { const effects = selectedArea.effects.map(effect => this.system.action.item.effects.get(effect).uuid); - const { shape: shapeType, size: range, hasHole } = selectedArea; - const shapeData = CONFIG.Canvas.layers.regions.layerClass.getTemplateShape({ - shapeType, - range, - hasHole - }); + const { shape: type, size: range } = selectedArea; + const shapeData = CONFIG.Canvas.layers.regions.layerClass.getTemplateShape({ type, range }); const scene = game.scenes.get(game.user.viewedScene); const level = scene.levels.find(x => x.isView); @@ -309,10 +305,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage { visibility: CONST.REGION_VISIBILITY.ALWAYS }; const placeRegion = data => { - canvas.regions.placeRegion(data, { - create: true, - attachToToken: selectedArea.type === CONFIG.DH.ACTIONS.areaTypes.attached.id - }); + canvas.regions.placeRegion(data, { create: true }); }; // Regions with effects must be placed by the GM diff --git a/module/enrichers/TemplateEnricher.mjs b/module/enrichers/TemplateEnricher.mjs index 4478ea14..bbe93b17 100644 --- a/module/enrichers/TemplateEnricher.mjs +++ b/module/enrichers/TemplateEnricher.mjs @@ -58,11 +58,10 @@ export const renderMeasuredTemplate = async event => { if (!type || !range || !game.canvas.scene) return; const shapeData = CONFIG.Canvas.layers.regions.layerClass.getTemplateShape({ - shapetype: type, + type, angle, range, - direction, - hasHole: false + direction }); await canvas.regions.placeRegion( diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs index 71f43997..cb79a76b 100644 --- a/module/helpers/utils.mjs +++ b/module/helpers/utils.mjs @@ -893,12 +893,13 @@ export function shouldUseHopeFearAutomation(options = { gmAsPlayer: true }) { export async function getWorldActor(baseActor) { if (baseActor.inCompendium) { - const worldActorCandidates = game.actors.filter(x => - x._stats.compendiumSource === baseActor.uuid && - x.prototypeToken.actorLink === baseActor.prototypeToken.actorLink + const worldActorCopy = game.actors.find(x => + x._stats.compendiumSource === baseActor.uuid && + (!x.prototypeToken.actorLink || x.name === baseActor.name) ); - const worldActorCopy = worldActorCandidates.find(a => a.name === baseActor.name) ?? worldActorCandidates[0]; - if (worldActorCopy) return worldActorCopy; + + if (worldActorCopy) + return worldActorCopy; const baseActorData = baseActor; return await game.system.api.documents.DhpActor.create({ diff --git a/src/packs/subclasses/feature_Elemental_Aura_2JH9NaOh69yN80Gw.json b/src/packs/subclasses/feature_Elemental_Aura_2JH9NaOh69yN80Gw.json index e0476a56..7a3ebd91 100644 --- a/src/packs/subclasses/feature_Elemental_Aura_2JH9NaOh69yN80Gw.json +++ b/src/packs/subclasses/feature_Elemental_Aura_2JH9NaOh69yN80Gw.json @@ -52,7 +52,7 @@ "includeBase": false }, "target": { - "type": "", + "type": "hostile", "amount": 1 }, "effects": [ @@ -63,23 +63,13 @@ ], "name": "Fire", "img": "icons/magic/fire/barrier-wall-explosion-orange.webp", - "range": "", - "areas": [ - { - "name": "Elemental Aura: Fire", - "type": "attached", - "shape": "emanation", - "size": "close", - "hasHole": false, - "effects": [] - } - ] + "range": "close" }, "xDBLH5TWidvrYF7z": { "type": "effect", "_id": "xDBLH5TWidvrYF7z", "systemPath": "actions", - "description": "

Your allies gain a +1 bonus to Strength.

", + "description": "

When an adversary marks 1 or more Hit Points, they must also mark a Stress.

", "chatDisplay": true, "actionType": "action", "cost": [], @@ -88,26 +78,19 @@ "max": "", "recovery": null }, - "effects": [], + "effects": [ + { + "_id": "WRuijfHxmUscAa69", + "onSave": false + } + ], "target": { - "type": "", + "type": "friendly", "amount": null }, "name": "Earth", "img": "icons/magic/control/buff-strength-muscle-damage-red.webp", - "range": "", - "areas": [ - { - "name": "Elemental Aura: Earth", - "type": "attached", - "shape": "emanation", - "size": "close", - "hasHole": true, - "effects": [ - "yvpWNCNobg0LLjey" - ] - } - ] + "range": "close" }, "S4t5HlgxWlHwaBDw": { "type": "effect", @@ -129,22 +112,12 @@ } ], "target": { - "type": "self", + "type": "hostile", "amount": null }, "name": "Water", "img": "icons/magic/water/vortex-water-whirlpool.webp", - "range": "self", - "areas": [ - { - "name": "Elemental Aura: Water", - "type": "attached", - "shape": "emanation", - "size": "close", - "hasHole": false, - "effects": [] - } - ] + "range": "close" }, "hAsKFFewtTqd1gg9": { "type": "attack", @@ -165,10 +138,15 @@ "includeBase": false }, "target": { - "type": "self", + "type": "any", "amount": null }, - "effects": [], + "effects": [ + { + "_id": "mJBA2QTyM9SM5NVS", + "onSave": false + } + ], "roll": { "type": "diceSet", "trait": null, @@ -191,19 +169,7 @@ }, "name": "Air", "img": "icons/magic/air/air-burst-spiral-blue-gray.webp", - "range": "self", - "areas": [ - { - "name": "Elemental Aura: Air", - "type": "attached", - "shape": "emanation", - "size": "close", - "hasHole": false, - "effects": [ - "vnKV5hsO4DVjURAl" - ] - } - ] + "range": "" } }, "originItemType": null, @@ -215,6 +181,49 @@ } }, "effects": [ + { + "name": "Elemental Aura (Earth)", + "img": "icons/magic/control/buff-strength-muscle-damage-orange.webp", + "origin": "Compendium.daggerheart.subclasses.Item.2JH9NaOh69yN80Gw", + "transfer": false, + "_id": "WRuijfHxmUscAa69", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "changes": [ + { + "key": "system.traits.strength.value", + "mode": 2, + "value": "1", + "priority": null + } + ], + "disabled": false, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "", + "tint": "#ffffff", + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!items.effects!2JH9NaOh69yN80Gw.WRuijfHxmUscAa69" + }, { "name": "Elemental Aura (Water)", "img": "icons/magic/water/vortex-water-whirlpool.webp", @@ -228,15 +237,18 @@ "type": "withinRange", "target": "hostile", "range": "melee" - }, - "changes": [] + } }, + "changes": [], "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, "description": "", "tint": "#ffffff", @@ -246,9 +258,6 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, "_key": "!items.effects!2JH9NaOh69yN80Gw.H7W52ps5d3UGmaFr" }, { @@ -264,15 +273,18 @@ "type": "withinRange", "target": "hostile", "range": "melee" - }, - "changes": [] + } }, + "changes": [], "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, "description": "", "tint": "#ffffff", @@ -282,120 +294,43 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, "_key": "!items.effects!2JH9NaOh69yN80Gw.WX5AMEpmUAutB9Hm" }, { - "name": "Elemental Aura: Earth", - "disabled": false, - "img": "icons/magic/control/buff-strength-muscle-damage-red.webp", - "description": "

Your allies gain a +1 bonus to Strength.

", - "transfer": false, - "statuses": [], - "system": { - "rangeDependence": { - "enabled": false, - "type": "withinRange", - "target": "hostile", - "range": "melee" - }, - "changes": [ - { - "key": "system.traits.strength.value", - "type": "add", - "value": 1, - "priority": null, - "phase": "initial" - } - ], - "duration": { - "description": "", - "type": "" - }, - "stacking": null, - "targetDispositions": [ - 1 - ] - }, - "_id": "yvpWNCNobg0LLjey", - "type": "base", - "start": { - "time": 0, - "combat": null, - "combatant": null, - "initiative": null, - "round": null, - "turn": null - }, - "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false - }, - "origin": null, - "tint": "#ffffff", - "showIcon": 1, - "folder": null, - "sort": 0, - "flags": {}, - "_stats": { - "compendiumSource": null - }, - "_key": "!items.effects!2JH9NaOh69yN80Gw.yvpWNCNobg0LLjey" - }, - { - "name": "Elemental Aura: Air", - "disabled": false, + "name": "Elemental Aura (Air)", "img": "icons/magic/air/air-burst-spiral-blue-gray.webp", - "description": "

When you or an ally takes damage from an attack beyond Melee range, reduce the damage by 1d8.

", + "origin": "Compendium.daggerheart.subclasses.Item.2JH9NaOh69yN80Gw", "transfer": false, - "statuses": [], + "_id": "mJBA2QTyM9SM5NVS", + "type": "base", "system": { "rangeDependence": { "enabled": false, "type": "withinRange", "target": "hostile", "range": "melee" - }, - "changes": [], - "duration": { - "description": "", - "type": "" - }, - "stacking": null, - "targetDispositions": [ - 1 - ] - }, - "_id": "vnKV5hsO4DVjURAl", - "type": "base", - "start": { - "time": 0, - "combat": null, - "combatant": null, - "initiative": null, - "round": null, - "turn": null + } }, + "changes": [], + "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, - "origin": null, + "description": "", "tint": "#ffffff", - "showIcon": 1, - "folder": null, + "statuses": [], "sort": 0, "flags": {}, "_stats": { "compendiumSource": null }, - "_key": "!items.effects!2JH9NaOh69yN80Gw.vnKV5hsO4DVjURAl" + "_key": "!items.effects!2JH9NaOh69yN80Gw.mJBA2QTyM9SM5NVS" } ], "sort": 100000, diff --git a/styles/less/global/elements.less b/styles/less/global/elements.less index df12eda4..e57ba50d 100755 --- a/styles/less/global/elements.less +++ b/styles/less/global/elements.less @@ -384,10 +384,6 @@ justify-content: space-between; } - label { - white-space: nowrap; - } - .btn { padding-top: 15px; } @@ -403,13 +399,6 @@ > .checkbox { align-self: end; } - - .auto-sized { - width: auto; - display: flex; - flex-direction: column; - align-items: center; - } } .form-group { diff --git a/styles/less/global/resource-bar.less b/styles/less/global/resource-bar.less index 3560285a..fb7f7d4e 100644 --- a/styles/less/global/resource-bar.less +++ b/styles/less/global/resource-bar.less @@ -59,6 +59,7 @@ .slot-value { display: flex; flex-direction: column; + padding: 0 5px; font-size: 1.5rem; align-items: center; justify-content: center; diff --git a/styles/less/sheets/actors/adversary/index.less b/styles/less/sheets/actors/adversary/index.less index 978cf1f8..28ff9d22 100644 --- a/styles/less/sheets/actors/adversary/index.less +++ b/styles/less/sheets/actors/adversary/index.less @@ -1,6 +1,7 @@ -@import './sheet.less'; @import './features.less'; @import './header.less'; +@import './sheet.less'; @import './sidebar.less'; @import './effects.less'; @import './notes.less'; + diff --git a/styles/less/sheets/actors/adversary/sheet.less b/styles/less/sheets/actors/adversary/sheet.less index 639af98b..0bd845fa 100644 --- a/styles/less/sheets/actors/adversary/sheet.less +++ b/styles/less/sheets/actors/adversary/sheet.less @@ -2,37 +2,35 @@ @import '../../../utils/fonts.less'; .application.sheet.daggerheart.actor.dh-style.adversary { - --sidebar-width: 260px; - .window-content { display: grid; - grid-template-columns: var(--sidebar-width) 1fr; + grid-template-columns: 275px 1fr; grid-template-rows: auto 1fr; height: 100%; width: 100%; padding-bottom: 0; - } - .adversary-sidebar-sheet { - grid-row: 1 / span 2; - grid-column: 1; - overflow: hidden; - display: flex; - flex-direction: column; - } - - .adversary-header-sheet { - grid-row: 1; - grid-column: 2; - } - - .tab { - grid-row: 2; - grid-column: 2; - &.active { + .adversary-sidebar-sheet { + grid-row: 1 / span 2; + grid-column: 1; overflow: hidden; display: flex; flex-direction: column; } + + .adversary-header-sheet { + grid-row: 1; + grid-column: 2; + } + + .tab { + grid-row: 2; + grid-column: 2; + &.active { + overflow: hidden; + display: flex; + flex-direction: column; + } + } } -} \ No newline at end of file +} diff --git a/styles/less/sheets/actors/adversary/sidebar.less b/styles/less/sheets/actors/adversary/sidebar.less index 8353d092..a2a3240a 100644 --- a/styles/less/sheets/actors/adversary/sidebar.less +++ b/styles/less/sheets/actors/adversary/sidebar.less @@ -22,8 +22,8 @@ .application.sheet.daggerheart.actor.dh-style.adversary { .adversary-sidebar-sheet { - width: var(--sidebar-width); - min-width: var(--sidebar-width); + width: 275px; + min-width: 275px; border-right: 1px solid light-dark(@dark-blue, @golden); .portrait { @@ -52,7 +52,7 @@ } img { - height: var(--sidebar-width); + height: 275px; } .death-roll-btn { @@ -63,7 +63,7 @@ .threshold-section { position: relative; display: flex; - gap: 7px; + gap: 10px; background-color: light-dark(transparent, @dark-blue); color: @color-text-emphatic; padding: 5px 10px; @@ -107,7 +107,7 @@ flex-direction: column; top: -20px; gap: 10px; - margin-bottom: -16px; + margin-bottom: -10px; &.pip-display { top: -15px; @@ -185,8 +185,8 @@ .shortcut-items-section { overflow-y: hidden; - padding: 10px 0; - flex: 1; + padding-top: 10px; + padding-bottom: 20px; scrollbar-gutter: stable; .with-scroll-shadows(); @@ -214,6 +214,8 @@ } .experience-section { + margin-bottom: 20px; + .title { display: flex; gap: 15px; @@ -230,21 +232,21 @@ gap: 5px; width: 100%; margin-top: 10px; - align-items: stretch; - padding: 0 4px 0 12px; + align-items: center; .experience-row { display: flex; gap: 5px; + width: 250px; align-items: center; justify-content: space-between; .experience-name { + width: 180px; display: flex; align-items: center; text-align: start; font-size: var(--font-size-14); - flex: 1; color: light-dark(@dark, @beige); line-height: 1; } @@ -269,7 +271,9 @@ .reaction-section { display: flex; - margin: 10px; + padding: 0 10px; + margin-top: 20px; + width: 100%; button { height: 40px; diff --git a/templates/actionTypes/areas.hbs b/templates/actionTypes/areas.hbs index 662716f5..2e010c72 100644 --- a/templates/actionTypes/areas.hbs +++ b/templates/actionTypes/areas.hbs @@ -11,10 +11,9 @@
- {{formField ../fields.type value=area.type name=(concat "areas." index ".type") localize=true blank=false}} - {{formField ../fields.shape value=area.shape name=(concat "areas." index ".shape") localize=true blank=false}} - {{formField ../fields.size value=area.size name=(concat "areas." index ".size") localize=true blank=false}} - {{formField ../fields.hasHole value=area.hasHole name=(concat "areas." index ".hasHole") localize=true classes="auto-sized" }} + {{formField ../fields.type value=area.type name=(concat "areas." index ".type") localize=true}} + {{formField ../fields.shape value=area.shape name=(concat "areas." index ".shape") localize=true}} + {{formField ../fields.size value=area.size name=(concat "areas." index ".size") localize=true}}
diff --git a/templates/sheets/actors/adversary/sidebar.hbs b/templates/sheets/actors/adversary/sidebar.hbs index 213c96ee..d2fca5f1 100644 --- a/templates/sheets/actors/adversary/sidebar.hbs +++ b/templates/sheets/actors/adversary/sidebar.hbs @@ -1,102 +1,100 @@ -