#6 Lasten und Gewichte #52

Merged
Byroks merged 16 commits from lasten into develop 2024-02-24 11:23:39 +01:00
13 changed files with 388 additions and 120 deletions
Showing only changes of commit 1888e201e5 - Show all commits

View File

@ -17,6 +17,11 @@
"midgard5.phase-movement": "Bewegungsphase",
"midgard5.no-encounter": "Kein Kampf",
"midgard5.encounter-not-started": "Kein aktiver Kampf",
"midgard5.initiative": "Handlungsrang",
"midgard5.combat-join": "Kampf Beitreten/Handlungsrang zurücksetzen",
"midgard5.combat-ranged": "Fernangriff",
"midgard5.combat-spell": "Zaubern (10 Sec)",
"midgard5.time-duration": "Dauer",
"midgard5.time-round": "Runde(n)",
@ -92,7 +97,6 @@
"midgard5.kampfkuenste": "Kampfkünste",
"midgard5.combat": "Kampf",
"midgard5.actor-name": "Figur",
"midgard5.level": "Grad",
"midgard5.class": "Typ",
@ -262,6 +266,10 @@
"midgard5.active": "Aktiv",
"midgard5.rangedWeapon": "Schusswaffe",
"midgard5.assignItemToCharacter": "Füge Gegenstand einem Charakter hinzu, um hier etwas auswählen zu können",
"midgard5.showAll": "Alle anzeigen",
"midgard5.wealthAndContainers": "Vermögen und Aufbewahrung",
"midgard5.itemsInContainers": "Gegenstände in Aufbewahrung",
"midgard5.allItems": "Alle Gegenstände",
"midgard5.pw": "Prüfwurf",
"midgard5.attack": "Angriff",

View File

@ -90,6 +90,16 @@ Hooks.once("init", async () => {
return label.toLowerCase().includes(contains.toLowerCase());
});
Handlebars.registerHelper("count", (object: any) => {
var length = 0;
for (var key in object) {
if (object.hasOwnProperty(key)) {
++length;
}
}
return length;
});
// Default Sheet für Items definieren und das Standardsheet deaktivieren
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("midgard5", M5ItemSheet, { makeDefault: true });
@ -114,12 +124,10 @@ Hooks.on("getChatLogEntryContext", function (html, options) {
name: "LP & AP Schaden",
icon: '<i class="fas fa-tint"></i>',
condition: (li) => {
// Only show this context menu if there are re-rollable dice in the message
const damageRolls = li.find(".apply-damage").length;
const damageRolls = li.find(".damage").length;
// All must be true to show the reroll dialogue
// The button doesn't work for the GM right now, so we don't need to show it
return game["user"].character && damageRolls > 0;
return (game["user"].character || game["canvas"].tokens.controlled) && damageRolls > 0;
},
callback: (li) => applyDamage(li, 2),
},
@ -127,12 +135,10 @@ Hooks.on("getChatLogEntryContext", function (html, options) {
name: "AP Schaden",
icon: '<i class="fas fa-shield-alt"></i>',
condition: (li) => {
// Only show this context menu if there are re-rollable dice in the message
const damageRolls = li.find(".apply-damage").length;
const damageRolls = li.find(".damage").length;
// All must be true to show the reroll dialogue
// The button doesn't work for the GM right now, so we don't need to show it
return game["user"].character && damageRolls > 0;
return (game["user"].character || game["canvas"].tokens.controlled) && damageRolls > 0;
},
callback: (li) => applyDamage(li, 1),
},
@ -140,12 +146,10 @@ Hooks.on("getChatLogEntryContext", function (html, options) {
name: "LP & AP Heilen",
icon: '<i class="fas fa-heart"></i>',
condition: (li) => {
// Only show this context menu if there are re-rollable dice in the message
const damageRolls = li.find(".apply-damage").length;
const damageRolls = li.find(".heal").length;
// All must be true to show the reroll dialogue
// The button doesn't work for the GM right now, so we don't need to show it
return game["user"].character && damageRolls > 0;
return (game["user"].character || game["canvas"].tokens.controlled) && damageRolls > 0;
},
callback: (li) => applyDamage(li, -1),
},
@ -153,12 +157,10 @@ Hooks.on("getChatLogEntryContext", function (html, options) {
name: "AP Heilen",
icon: '<i class="far fa-heart"></i>',
condition: (li) => {
// Only show this context menu if there are re-rollable dice in the message
const damageRolls = li.find(".apply-damage").length;
const damageRolls = li.find(".heal").length;
// All must be true to show the reroll dialogue
// The button doesn't work for the GM right now, so we don't need to show it
return game["user"].character && damageRolls > 0;
return (game["user"].character || game["canvas"].tokens.controlled) && damageRolls > 0;
},
callback: (li) => applyDamage(li, -2),
}
@ -209,15 +211,6 @@ Hooks.on("updateCombat", function (combat: Combat, updateData: { round: number;
}
});
function limitHeal(heal: number, current: number, max: number): number {
if (current === max) {
return 0;
} else if (heal + current > max) {
return max - current;
}
return heal;
}
Hooks.on("renderCombatTracker", (combatTracker, html, context) => {
if (context.combat === null) {
html.find("h3.encounter-title")[0].innerHTML = game["i18n"].localize("midgard5.no-encounter");
@ -234,27 +227,29 @@ Hooks.once("ready", () => {
});
async function applyDamage(roll, direction) {
const damageValue = Array.from(roll.find(".apply-damage") as HTMLElement[])
console.log(roll, direction);
const damageValue = Array.from(roll.find(".apply") as HTMLElement[])
.map((x) => Math.max(0, Number(x.innerText)))
.reduce((prev, curr) => prev + curr, 0);
const userId = game["user"].character.id;
const viewedSceneId = game["user"].viewedScene;
const token = game["actors"].get(userId).getDependentTokens(viewedSceneId)[0]?.delta.syntheticActor;
const controlledTokens = game["canvas"].tokens.controlled;
const actor = game["user"].character;
if (token) {
switch (direction) {
case 2:
token["system"].lp.value -= Math.max(0, damageValue - token["system"].calc.stats.lpProtection.value);
case 1:
token["system"].ap.value -= Math.max(0, damageValue - token["system"].calc.stats.apProtection.value);
break;
case -1:
token["system"].lp.value += limitHeal(damageValue, token["system"].lp.value, token["system"].lp.max);
case -2:
token["system"].ap.value += limitHeal(damageValue, token["system"].ap.value, token["system"].ap.max);
}
token.render();
if (controlledTokens) {
controlledTokens.forEach((controlledToken) => {
let token = controlledToken.document.delta.syntheticActor;
switch (direction) {
case 2:
token["system"].lp.value -= Math.max(0, damageValue - token["system"].calc.stats.lpProtection.value);
case 1:
token["system"].ap.value -= Math.max(0, damageValue - token["system"].calc.stats.apProtection.value);
break;
case -1:
token["system"].lp.value += limitHeal(damageValue, token["system"].lp.value, token["system"].lp.max);
case -2:
token["system"].ap.value += limitHeal(damageValue, token["system"].ap.value, token["system"].ap.max);
}
token.render();
});
} else {
switch (direction) {
case 2:
@ -263,10 +258,19 @@ async function applyDamage(roll, direction) {
actor["system"].ap.value -= Math.max(0, damageValue - actor["system"].calc.stats.apProtection.value);
break;
case -1:
actor["system"].lp.value += limitHeal(damageValue, token["system"].lp.value, token["system"].lp.max);
actor["system"].lp.value += limitHeal(damageValue, actor["system"].lp.value, actor["system"].lp.max);
case -2:
actor["system"].ap.value += limitHeal(damageValue, token["system"].ap.value, token["system"].ap.max);
actor["system"].ap.value += limitHeal(damageValue, actor["system"].ap.value, actor["system"].ap.max);
}
actor.render();
}
}
function limitHeal(heal: number, current: number, max: number): number {
if (current === max) {
return 0;
} else if (heal + current > max) {
return max - current;
}
return heal;
}

View File

@ -61,6 +61,13 @@ export enum M5ItemType {
EFFECT = "effect",
}
export enum M5SkillType {
INNATE = "innate",
GENERAL = "general",
LANGUAGE = "language",
COMBAT = "combat",
}
export enum M5EwResult {
TBD = "",
FUMBLE = "roll-ew-result-fumble",

View File

@ -1,5 +1,5 @@
import { M5Item } from "../items/M5Item";
import { M5Attribute, M5CharacterCalculatedData, M5ItemMod, M5ItemType, M5ModOperation, M5ModResult, M5ModType, M5RollData, M5Skill, M5SkillCalculated } from "../M5Base";
import { M5Attribute, M5CharacterCalculatedData, M5ItemMod, M5ItemType, M5ModOperation, M5ModResult, M5ModType, M5RollData, M5Skill, M5SkillCalculated, M5SkillLearned, M5SkillType } from "../M5Base";
import M5ModAggregate from "./M5ModAggregate";
export class M5Character extends Actor {
// constructor(
@ -666,10 +666,11 @@ export class M5Character extends Actor {
});
}
async createItem(itemName: string, itemType: M5ItemType): Promise<M5Item> {
createItem(itemName: string, itemType: M5ItemType, options?: any): Promise<M5Item> {
const itemData = {
name: itemName,
type: itemType,
data: options,
};
return (this as any).createEmbeddedDocuments("Item", [itemData]).then((docs) => {

View File

@ -269,27 +269,6 @@ export class M5Roll {
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.resistanceMind"));
}
static async initativeRoll(actor: any) {
let newInitiative; // the initiative value for the combatant
// ...
// The intnitiative value is calculated here
// ...
let combatant = game["combat"].getCombatantByActor(actor._id);
if (!combatant) {
await game["combat"].createEmbeddedDocuments("Combatant", [{ actorId: actor._id }]);
combatant = game["combat"].getCombatantByActor(actor._id);
}
const initiatives = {
_id: combatant._id,
initiative: actor.system.calc.attributes.gw.value,
};
await game["combat"].updateEmbeddedDocuments("Combatant", [initiatives]);
}
static resistanceBody(actor: any) {
const rollData = actor.getRollData() as M5RollData;
rollData.i = {

View File

@ -1,7 +1,7 @@
import Logger from "../../utils/Logger";
import { M5Character } from "../actors/M5Character";
import { M5Item } from "../items/M5Item";
import { M5ItemType, M5SkillLearned, M5SkillUnlearned } from "../M5Base";
import { M5ItemType, M5SkillLearned, M5SkillType, M5SkillUnlearned } from "../M5Base";
import { M5Roll } from "../rolls/M5Roll";
export default class M5CharacterSheet extends ActorSheet {
@ -282,14 +282,7 @@ export default class M5CharacterSheet extends ActorSheet {
const data = this.actor.system;
const character = this.actor as M5Character;
character.createItem((game as Game).i18n.localize("TYPES.Item.item"), M5ItemType.ITEM).then((i) => {
const item = i as any;
item.update({
data: {
quantity: 1,
},
});
});
character.createItem((game as Game).i18n.localize("TYPES.Item.item"), M5ItemType.ITEM, { quantity: 1 });
});
html.find(".add-weapon").on("click", async (event) => {
@ -317,42 +310,51 @@ export default class M5CharacterSheet extends ActorSheet {
const data = this.actor.system;
const character = this.actor as M5Character;
character.createItem((game as Game).i18n.localize("TYPES.Item.container"), M5ItemType.CONTAINER).then((i) => {
const item = i as any;
item.update({
data: {
quantity: 1,
},
});
});
character.createItem((game as Game).i18n.localize("TYPES.Item.container"), M5ItemType.CONTAINER, { quantity: 1 });
});
html.find(".add-innate-skill").on("click", async (event) => {
const data = this.actor.system;
const character = this.actor as M5Character;
character.createItem((game as Game).i18n.localize("TYPES.Item.innate-ability"), M5ItemType.SKILL, { type: M5SkillType.INNATE });
});
html.find(".add-general-skill").on("click", async (event) => {
const data = this.actor.system;
const character = this.actor as M5Character;
character.createItem((game as Game).i18n.localize("TYPES.Item.skill"), M5ItemType.SKILL, { type: M5SkillType.GENERAL });
});
html.find(".add-combat-skill").on("click", async (event) => {
const data = this.actor.system;
const character = this.actor as M5Character;
character.createItem((game as Game).i18n.localize("TYPES.Item.weapon-skill"), M5ItemType.SKILL, { type: M5SkillType.COMBAT });
});
html.find(".add-language-skill").on("click", async (event) => {
const data = this.actor.system;
const character = this.actor as M5Character;
character.createItem((game as Game).i18n.localize("TYPES.Item.language"), M5ItemType.SKILL, { type: M5SkillType.LANGUAGE });
});
html.find(".add-spell").on("click", async (event) => {
const data = this.actor.system;
const character = this.actor as M5Character;
character.createItem((game as Game).i18n.localize("TYPES.Item.spell"), M5ItemType.SPELL).then((i) => {
const item = i as any;
item.update({
data: {
process: "none",
},
});
});
character.createItem((game as Game).i18n.localize("TYPES.Item.spell"), M5ItemType.SPELL, { process: "none" });
});
html.find(".add-kampfkunst").on("click", async (event) => {
const data = this.actor.system;
const character = this.actor as M5Character;
character.createItem((game as Game).i18n.localize("TYPES.Item.kampfkunst"), M5ItemType.KAMPFKUNST).then((i) => {
const item = i as any;
item.update({
data: {
type: "angriff",
variante: "anstuermen",
},
});
character.createItem((game as Game).i18n.localize("TYPES.Item.kampfkunst"), M5ItemType.KAMPFKUNST, {
type: "angriff",
variante: "anstuermen",
});
});
@ -363,6 +365,57 @@ export default class M5CharacterSheet extends ActorSheet {
character.createItem((game as Game).i18n.localize("TYPES.Item.effect"), M5ItemType.EFFECT);
});
html.find(".join-combat").on("click", async (event) => {
if (!!game["combat"]) {
let combatant = game["combat"].getCombatantByActor(this.actor._id);
if (!combatant) {
await game["combat"].createEmbeddedDocuments("Combatant", [{ actorId: this.actor._id }]);
combatant = game["combat"].getCombatantByActor(this.actor._id);
}
const initiatives = {
_id: combatant._id,
initiative: this.actor.system.calc.attributes.gw.value,
};
await game["combat"].updateEmbeddedDocuments("Combatant", [initiatives]);
}
});
html.find(".ranged-combat").on("click", async (event) => {
if (!!game["combat"]) {
let combatant = game["combat"].getCombatantByActor(this.actor._id);
if (!combatant) {
await game["combat"].createEmbeddedDocuments("Combatant", [{ actorId: this.actor._id }]);
combatant = game["combat"].getCombatantByActor(this.actor._id);
}
const initiatives = {
_id: combatant._id,
initiative: 0.01 * this.actor.system.calc.attributes.gw.value,
};
await game["combat"].updateEmbeddedDocuments("Combatant", [initiatives]);
}
});
html.find(".spell-combat").on("click", async (event) => {
if (!!game["combat"]) {
let combatant = game["combat"].getCombatantByActor(this.actor._id);
if (!combatant) {
await game["combat"].createEmbeddedDocuments("Combatant", [{ actorId: this.actor._id }]);
combatant = game["combat"].getCombatantByActor(this.actor._id);
}
const initiatives = {
_id: combatant._id,
initiative: 0.001 * this.actor.system.calc.attributes.gw.value,
};
await game["combat"].updateEmbeddedDocuments("Combatant", [initiatives]);
}
});
// Drag & Drop
const dragDrop = new DragDrop({
dragSelector: ".items-list .item",

View File

@ -217,6 +217,10 @@
height: 1rem;
}
.wide-button {
margin: 0.25rem 0;
}
.learn-button {
padding: 0;
margin: 0;

View File

@ -82,7 +82,7 @@
<tr class="roll-row {{roll.css}}">
<td>{{roll.label}}</td>
<td class="roll-result">
<span class="roll-total {{#if (contains roll.label "Schaden")}} apply-damage{{/if}}">{{roll.totalStr}}</span>
<span class="roll-total {{#if (contains roll.label "Schaden")}} damage{{/if}}{{#if (contains roll.label "Heilung")}} heal{{/if}}">{{roll.totalStr}}</span>
<span class="roll-detail">{{roll.result}}</span>
</td>
</tr>

View File

@ -1,5 +1,41 @@
<div class="flexbox">
<div class="flexcolumn-3">
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/magic/time/arrows-circling-pink.webp" class="flexpart-icon">{{localize "midgard5.calculated-values"}}</div>
<table>
<tr height = 10px></tr>
<tr>
<td>{{localize "midgard5.movementRange"}}</td>
<td class="fixed-value">{{data.calc.stats.movement.value}}</td>
<td>{{localize "midgard5.initiative"}}</td>
<td class="fixed-value"><a class="join-combat">{{data.calc.attributes.gw.value}}</a></td>
</tr>
<td>{{localize "midgard5.defense"}}</td>
<td class="fixed-value">{{data.calc.stats.defense.value}}</td>
<td>{{localize "midgard5.defenseBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.defenseBonus.value}}</td>
</tr>
<tr>
<td>{{localize "midgard5.attackBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.attackBonus.value}}</td>
<td>{{localize "midgard5.damageBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.damageBonus.value}}</td>
</tr>
</table>
</div>
</div>
<div class="flexcolumn-2">
<div class="flexpart" style="padding: 0 0.5rem;">
<div class="flexpart-header">{{localize "midgard5.initiative"}}</div>
<button class="wide-button join-combat">{{localize "midgard5.combat-join"}}</button>
<button class="wide-button ranged-combat">{{localize "midgard5.combat-ranged"}}</button>
<button class="wide-button spell-combat">{{localize "midgard5.combat-spell"}}</button>
</div>
</div>
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/skills/melee/hand-grip-sword-white-brown.webp" class="flexpart-icon">{{localize "midgard5.attack"}}</div>
<table>
@ -48,7 +84,7 @@
<th class="title">{{localize "midgard5.kampfkunst-variante-short"}}</th>
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th class="title add-kampfkunst"><i class="fa-regular fa-plus"></i></th>
<td><a class="title add-kampfkunst"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>

View File

@ -2,7 +2,7 @@
<thead>
<tr>
<th class="title">{{localize "TYPES.Item.effect"}}</th>
<th class="title add-effect"><i class="fa-regular fa-plus"></i></th>
<td><a class="title add-effect"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>

View File

@ -31,11 +31,181 @@
</div>
<div class="flexpart">
<div class="flexpart-header">
<img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon">
{{localize "midgard5.gear"}}
(alle <input id="data.info.showAllItems" class="checkbox" type="checkbox" name="data.info.showAllItems" {{checked data.info.showAllItems}}>)
</div>
<div class="flexpart-header"><img src="icons/containers/chest/chest-simple-box-brown.webp" class="flexpart-icon">{{localize "TYPES.Item.container"}}</div>
<table>
<thead class="theader">
<tr>
<th class="title">{{localize "TYPES.Item.container"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<td><a class="title add-container"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>
<tr height = 10px></tr>
{{#each data.calc.gear.containers as |item itemId|}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
</div>
<h3>{{localize "midgard5.itemsInContainers"}}</h3>
<div class="flexbox">
{{#each data.calc.gear.containers as |container containerId|}}
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="{{container.icon}}" class="flexpart-icon">{{container.label}}</div>
<table>
<thead class="theader">
<tr>
<th class="title">{{localize "TYPES.Item.item"}}</th>
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th class="title">&nbsp;</th>
</tr>
</thead>
<tbody>
<tr height = 10px></tr>
{{#each ../data.calc.gear.items as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td>
<i class="fa fa-minus-circle quantity-decrease" style="cursor: pointer"></i>
<span>{{item.quantity}}</span>
<i class="fa fa-plus-circle quantity-increase" style="cursor: pointer"></i>
</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
{{#each ../data.calc.gear.weapons as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td></td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
{{#each ../data.calc.gear.defensiveWeapons as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td></td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
{{#each ../data.calc.gear.armor as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td></td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
</div>
</div>
{{/each}}
</div>
<h3>
{{localize "midgard5.allItems"}}
<input id="data.info.showAllItems" class="checkbox" type="checkbox" name="data.info.showAllItems" {{checked data.info.showAllItems}} style="float: right;">
<label for="data.info.showAllItems" style="font-size: normal; font-weight: normal; font-style: italic; float: right;">{{localize "midgard5.showAll"}}&nbsp;</label>
</h3>
<div class="flexbox">
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon">{{localize "midgard5.gear"}}</div>
<table>
<thead class="theader">
<tr>
@ -45,7 +215,7 @@
<th class="title center">{{localize "midgard5.item-weight"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th></th>
<th class="title add-item"><i class="fa-regular fa-plus"></i></th>
<td><a class="title add-item"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>
@ -87,7 +257,9 @@
</tbody>
</table>
</div>
</div>
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/weapons/swords/sword-guard-engraved-worn.webp" class="flexpart-icon">{{localize "midgard5.weapons"}}</div>
<table>
@ -97,7 +269,7 @@
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center">{{localize "midgard5.item-weight"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title add-weapon"><i class="fa-regular fa-plus"></i></th>
<td><a class="title add-weapon"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
@ -128,7 +300,9 @@
</tbody>
</table>
</div>
</div>
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/equipment/shield/heater-wooden-brown-axe.webp" class="flexpart-icon">{{localize "midgard5.defensive-weapons"}}</div>
<table>
@ -138,7 +312,7 @@
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center">{{localize "midgard5.item-weight"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title add-defensiveWeapon"><i class="fa-regular fa-plus"></i></th>
<td><a class="title add-defensiveWeapon"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>
@ -168,7 +342,9 @@
</tbody>
</table>
</div>
</div>
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/equipment/hand/gauntlet-armored-steel-grey.webp" class="flexpart-icon">{{localize "midgard5.armor"}}</div>
<table>
@ -178,7 +354,7 @@
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center">{{localize "midgard5.item-weight"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title add-armor"><i class="fa-regular fa-plus"></i></th>
<td><a class="title add-armor"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>

View File

@ -11,7 +11,7 @@
<th class="title">{{localize "midgard5.bonus"}}</th>
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th class="title"></th>
<th><a class="title add-innate-skill"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>
@ -56,7 +56,7 @@
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title">{{localize "midgard5.pp-short"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th class="title"></th>
<th><a class="title add-general-skill"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>
@ -66,7 +66,7 @@
<td class="fixed-value">{{skill.fw}}</td>
<td class="fixed-value">{{skill.calc.bonus}}</td>
<td class="fixed-value">{{skill.calc.ew}}</td>
<td class="fixed-value"><input name="data.skills.general.{{key}}.pp" type="text" value="{{skill.pp}}" data-dtype="Number" /></td>
<td class="fixed-value">{{skill.pp}}</td>
<td><button class="roll-button roll-learned-button"></button></td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
@ -86,7 +86,7 @@
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title">{{localize "midgard5.pp-short"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th class="title"></th>
<th><a class="title add-combat-skill"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
@ -116,7 +116,7 @@
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title">{{localize "midgard5.pp-short"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th class="title"></th>
<th><a class="title add-language-skill"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>

View File

@ -4,7 +4,7 @@
<th class="title">{{localize "TYPES.Item.spell"}}</th>
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title"></th>
<th class="title add-spell"><i class="fa-regular fa-plus"></i></th>
<td><a class="title add-spell"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>