diff --git a/src/module/dialog/defenseAction.mjs b/src/module/dialog/defenseAction.mjs index dd3180a4..a24a8871 100644 --- a/src/module/dialog/defenseAction.mjs +++ b/src/module/dialog/defenseAction.mjs @@ -172,6 +172,44 @@ export class DefenseActionDialog extends HandlebarsApplicationMixin(ApplicationV // TODO: also do this for combatAction const links = this._actor.system.heldenausruestung[this._actor.system.setEquipped].links const rechts = this._actor.system.heldenausruestung[this._actor.system.setEquipped].rechts + const linkeWaffe = this._actor.itemTypes["Equipment"].find(p => p._id === links) + if (linkeWaffe && linkeWaffe.system.meleeSkills.indexOf("Schilde") !== -1) { + const skillAt = 0 + const skillPa = 0 + + weapons.push({ + isSelected: this._skillId === "Schilde" && this._weaponId === linkeWaffe._id, + weaponId: linkeWaffe._id, + skillId: "Schilde", + name: linkeWaffe.name, + skillName: "Schilde", + img: linkeWaffe.img, + combatStatistics: { + at: baseAt["links"] + linkeWaffe.system.attackModifier + skillAt, + pa: basePa["links"] + linkeWaffe.system.parryModifier + skillPa + } + }) + } + + const rechteWaffe = this._actor.itemTypes["Equipment"].find(p => p._id === rechts) + if (rechteWaffe && rechteWaffe.system.meleeSkills.indexOf("Schilde") !== -1) { + const skillAt = 0 + const skillPa = 0 + + weapons.push({ + isSelected: this._skillId === "Schilde" && this._weaponId === rechteWaffe._id, + weaponId: rechteWaffe._id, + skillId: "Schilde", + name: rechteWaffe.name, + skillName: "Schilde", + img: rechteWaffe.img, + combatStatistics: { + at: baseAt["rechts"] + rechteWaffe.system.attackModifier + skillAt, + pa: basePa["rechts"] + rechteWaffe.system.parryModifier + skillPa + } + }) + } + if (!links && !rechts) { const unarmedSkills = [this._actor.itemTypes["Skill"].find(p => p.name === "Ringen"), this._actor.itemTypes["Skill"].find(p => p.name === "Raufen")] diff --git a/src/module/sheets/characterSheet.mjs b/src/module/sheets/characterSheet.mjs index 843df74f..fb6470a6 100644 --- a/src/module/sheets/characterSheet.mjs +++ b/src/module/sheets/characterSheet.mjs @@ -605,10 +605,20 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) { } if (links) { const meitems = [] + links.system.meleeSkills.forEach((skillInQuestion) => { const item = actorData.items.find(p => p.name === skillInQuestion) if (item) { meitems.push(item) + } else if (skillInQuestion === "Schilde") { + meitems.push({ + _id: "Schilde", + name: "Schildkampf", + system: { + at: 0, + pa: 0, + } + }) } }) meitems?.forEach(skill => { @@ -632,6 +642,15 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) { const item = actorData.items.find(p => p.name === skillInQuestion) if (item) { meitems.push(item) + } else if (skillInQuestion === "Schilde") { + meitems.push({ + _id: "Schilde", + name: "Schildkampf", + system: { + at: 0, + pa: 0, + } + }) } }) meitems?.forEach(skill => { diff --git a/src/style/molecules/_sidebar-elements.scss b/src/style/molecules/_sidebar-elements.scss index 11e82eb0..4fee38d3 100644 --- a/src/style/molecules/_sidebar-elements.scss +++ b/src/style/molecules/_sidebar-elements.scss @@ -102,7 +102,7 @@ .attack { display: grid; - grid-template-columns: 32px 32px 1fr 1fr; + grid-template-columns: 32px 32px 1fr 1fr; grid-template-rows: 18px 30px; grid-template-areas: "name name name name" "at pa tp ini"; height: 64px; @@ -116,6 +116,10 @@ h3 { grid-area: name; text-align: center; + overflow: hidden; + margin-bottom: -8px; + text-overflow: ellipsis; + white-space: pre; } label { diff --git a/src/templates/actor/character/main-sheet.hbs b/src/templates/actor/character/main-sheet.hbs index 3e03c230..391843b9 100644 --- a/src/templates/actor/character/main-sheet.hbs +++ b/src/templates/actor/character/main-sheet.hbs @@ -63,7 +63,7 @@ {{#each attacks}}