diff --git a/module/applications/dialogs/tagTeamDialog.mjs b/module/applications/dialogs/tagTeamDialog.mjs index 5236afb8..2d363471 100644 --- a/module/applications/dialogs/tagTeamDialog.mjs +++ b/module/applications/dialogs/tagTeamDialog.mjs @@ -16,11 +16,9 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio ...member.toObject(), uuid: member.uuid, id: member.id, - selected: false, - owned: member.testUserPermission(game.user, CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER) + selected: false })); - - this.initiator = null; + this.intiator = null; this.openForAllPlayers = true; this.tabGroups.application = Object.keys(party.system.tagTeam.members).length @@ -82,18 +80,6 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio for (const element of htmlElement.querySelectorAll('.roll-type-select')) element.addEventListener('change', this.updateRollType.bind(this)); - - htmlElement - .querySelector('.initiator-member-field') - ?.addEventListener('input', this.updateInitiatorMemberField.bind(this)); - - htmlElement - .querySelector('.initiator-cost-field') - ?.addEventListener('input', this.updateInitiatorCostField.bind(this)); - - htmlElement - .querySelector('.openforall-field') - ?.addEventListener('change', this.updateOpenForAllField.bind(this)); } _configureRenderParts(options) { @@ -149,12 +135,9 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio const selectedMembers = partContext.memberSelection.filter(x => x.selected); partContext.allSelected = selectedMembers.length === 2; - partContext.canStartTagTeam = - partContext.allSelected && this.initiator?.memberId && typeof this.initiator?.cost === 'number'; + partContext.canStartTagTeam = partContext.allSelected && this.initiator; partContext.initiator = this.initiator; - partContext.initiatorOptions = selectedMembers - .filter(actor => actor.owned) - .map(x => ({ value: x.id, label: x.name })); + partContext.initiatorOptions = selectedMembers.map(x => ({ value: x.id, label: x.name })); partContext.initiatorDisabled = !selectedMembers.length; partContext.openForAllPlayers = this.openForAllPlayers; @@ -247,15 +230,14 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio } static async updateData(event, _, formData) { - const partyData = foundry.utils.expandObject(formData.object); + const { initiator, openForAllPlayers, ...partyData } = foundry.utils.expandObject(formData.object); + this.initiator = initiator; + this.openForAllPlayers = openForAllPlayers !== undefined ? openForAllPlayers : this.openForAllPlayers; this.updatePartyData(partyData, this.getUpdatingParts(event.target)); } async updatePartyData(update, updatingParts, options = { render: true }) { - if (!game.users.activeGM) - return ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.gmRequired')); - const gmUpdate = async update => { await this.party.update(update); this.render({ parts: updatingParts }); @@ -392,23 +374,6 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio ); } - updateInitiatorMemberField(event) { - if (!this.initiator) this.initiator = {}; - this.initiator.memberId = event.target.value; - this.render(); - } - - updateInitiatorCostField(event) { - if (!this.initiator) this.initiator = {}; - this.initiator.cost = event.target.value ? Number.parseInt(event.target.value) : null; - this.render(); - } - - updateOpenForAllField(event) { - this.openForAllPlayers = event.target.checked; - this.render(); - } - static async #removeRoll(_, button) { this.updatePartyData( { diff --git a/module/documents/tokenManager.mjs b/module/documents/tokenManager.mjs index f766a677..be5467da 100644 --- a/module/documents/tokenManager.mjs +++ b/module/documents/tokenManager.mjs @@ -95,7 +95,7 @@ export default class DhTokenManager { : this.#actor; const tokenData = await actor.getTokenDocument(); const result = await canvas.scene.createEmbeddedDocuments('Token', [ - { ...tokenData.toObject(), x: this.#activePreview.document.x, y: this.#activePreview.document.y } + { ...tokenData, x: this.#activePreview.document.x, y: this.#activePreview.document.y } ]); this.#activePreview = undefined; diff --git a/src/packs/domains/domainCard_Rain_of_Blades_Ucenef6JpjQxwXni.json b/src/packs/domains/domainCard_Rain_of_Blades_Ucenef6JpjQxwXni.json index 293490e3..080dd67f 100644 --- a/src/packs/domains/domainCard_Rain_of_Blades_Ucenef6JpjQxwXni.json +++ b/src/packs/domains/domainCard_Rain_of_Blades_Ucenef6JpjQxwXni.json @@ -44,9 +44,7 @@ "flatMultiplier": 1 }, "applyTo": "hitPoints", - "type": [ - "magical" - ], + "type": [], "base": false, "valueAlt": { "multiplier": "prof", @@ -89,6 +87,57 @@ "name": "Cast", "img": "icons/skills/melee/spear-tips-three-green.webp", "range": "veryClose" + }, + "CUKoYyDxQhNc0pLs": { + "type": "damage", + "_id": "CUKoYyDxQhNc0pLs", + "systemPath": "actions", + "description": "

If a target you hit is Vulnerable, they take an extra 1d8 damage.

", + "chatDisplay": true, + "actionType": "action", + "cost": [], + "uses": { + "value": null, + "max": "", + "recovery": null + }, + "damage": { + "parts": { + "hitPoints": { + "value": { + "custom": { + "enabled": false + }, + "multiplier": "flat", + "flatMultiplier": 1, + "dice": "d8", + "bonus": null + }, + "applyTo": "hitPoints", + "type": [], + "base": false, + "resultBased": false, + "valueAlt": { + "multiplier": "prof", + "flatMultiplier": 1, + "dice": "d6", + "bonus": null, + "custom": { + "enabled": false + } + } + } + }, + "includeBase": false + }, + "target": { + "type": "any", + "amount": null + }, + "effects": [], + "name": "Damage Against Vulnerable", + "img": "icons/skills/melee/spear-tips-three-purple.webp", + "range": "" } }, "attribution": { diff --git a/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json b/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json index d5af9b14..11994d3e 100644 --- a/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json +++ b/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json @@ -5,14 +5,22 @@ "_id": "ijWppQzSOqVCb3rE", "img": "icons/weapons/axes/axe-battle-jagged.webp", "system": { - "description": "Protective: +1 to Armor Score", + "description": "", "actions": {}, "attached": [], "tier": 3, "equipped": false, "secondary": false, "burden": "twoHanded", - "weaponFeatures": [], + "weaponFeatures": [ + { + "value": "protective", + "effectIds": [ + "qTxADRsQnKiYfOiQ" + ], + "actionIds": [] + } + ], "attack": { "name": "Attack", "img": "icons/skills/melee/blood-slash-foam-red.webp", @@ -103,8 +111,8 @@ "effects": [ { "name": "Protective", - "description": "+1 to Armor Score", - "img": "icons/magic/defensive/shield-barrier-deflect-teal.webp", + "description": "Add your character's Tier to your Armor Score", + "img": "icons/skills/melee/shield-block-gray-orange.webp", "_id": "vnR4Zhnb0rOqwrFw", "type": "base", "system": { @@ -114,7 +122,7 @@ "phase": "initial", "priority": 20, "value": { - "max": "1" + "max": "ITEM.@system.tier" } } ] diff --git a/templates/dialogs/tagTeamDialog/initialization.hbs b/templates/dialogs/tagTeamDialog/initialization.hbs index d25e8f6c..604d06c0 100644 --- a/templates/dialogs/tagTeamDialog/initialization.hbs +++ b/templates/dialogs/tagTeamDialog/initialization.hbs @@ -17,24 +17,19 @@
- {{selectOptions initiatorOptions selected=initiator.memberId blank="" }}
-
- -
- -
-
+ {{formGroup tagTeamFields.initiator.fields.cost name="initiator.cost" value=initiator.cost disabled=initiatorDisabled localize=true }} \ No newline at end of file diff --git a/templates/sheets/items/armor/description.hbs b/templates/sheets/items/armor/description.hbs index 74e4e234..af2698ef 100644 --- a/templates/sheets/items/armor/description.hbs +++ b/templates/sheets/items/armor/description.hbs @@ -1,9 +1,9 @@ -{{#if features.length}} -
+
+ {{#if features.length}}
{{#each features as | feature |}}
{{localize feature.label}}: {{{localize feature.description}}}
{{/each}}
-
-{{/if}} \ No newline at end of file + {{/if}} +
\ No newline at end of file diff --git a/templates/sheets/items/weapon/description.hbs b/templates/sheets/items/weapon/description.hbs index 74e4e234..af2698ef 100644 --- a/templates/sheets/items/weapon/description.hbs +++ b/templates/sheets/items/weapon/description.hbs @@ -1,9 +1,9 @@ -{{#if features.length}} -
+
+ {{#if features.length}}
{{#each features as | feature |}}
{{localize feature.label}}: {{{localize feature.description}}}
{{/each}}
-
-{{/if}} \ No newline at end of file + {{/if}} +
\ No newline at end of file