Compare commits

...

19 Commits
v2.6.0 ... main

Author SHA1 Message Date
Byroks 031a0dbc2f Merge branch 'develop' 2024-09-21 10:21:40 +02:00
Byroks 4a9afcf150 v2.7.2 2024-09-21 10:21:19 +02:00
Byroks 6a90581c4e Fix Versteckte Würfe & Ungelernte Würfe auf EW 2024-09-21 10:17:53 +02:00
LeFrique 7c7ba3679b KUS-Update (#116)
+ Fine Arts from KUS-QB
+ Bugfix for Wealth (again parseFloat) on higher and mixed values for gold, silver and copper

Neuer/alter Mitspieler mit viel zuviel Vermögen deckt kleine Mängel auf, immer diese reichen Elfen... und ich hab schnell noch die neuen Fertigkeiten für die Küstenstaaten eingetragen.

Reviewed-on: #116
Reviewed-by: Byroks <byroks@gmail.com>
Co-authored-by: LeFrique <lefrique@live.de>
Co-committed-by: LeFrique <lefrique@live.de>
2024-06-02 20:17:20 +02:00
Byroks 25252cb283 Merge branch 'develop' 2024-05-27 11:59:36 +02:00
Byroks 28e960dbf1 V2.7.1 2024-05-27 11:59:28 +02:00
Byroks e1c27bb3f1 Remove Console.log 2024-05-27 11:57:05 +02:00
Byroks f06fbb2687 Hot Fix
Changes:
 + NPC Stat anzeige updaten damit boni mit angezeigt werden
 + Shit fix Mods da attribute Mods Sekundäre effekte (Schadensbonus zb.) nicht angepasst haben
2024-05-27 11:56:10 +02:00
Byroks 537cb29593 Merge branch 'develop' 2024-05-27 10:12:33 +02:00
Byroks c5ce058f44 V2.7.0 2024-05-27 10:12:23 +02:00
Byroks 32bf1ba747 Fix PP anzeige von Zaubern (#115)
Changes:
 + PP werden wieder angezeigt
 + Es werden nur PP Angezeigt von Zauberschulen wo die lernkosten ungleich 0 sind
Reviewed-on: #115
2024-05-27 10:04:26 +02:00
Byroks 38f1c90c09 Fix Bonus bei Wurf anzeige (#114)
Changes:
 + Situations Boni wird nicht mehr auf den Würfel gerechnet sondern seperat angezeigt wie andere Boni
Reviewed-on: #114
Reviewed-by: Le-Frique <lefrique@live.de>
2024-05-27 10:03:54 +02:00
Byroks 1852f2bf08 Sneak Fixes
Changes:
 + EP Input vergrößert
 + Verstecke Ungelernte Fähigkeiten auf Spieler Bogen wie bei NPC Bogen
 + Fix Mods (again)
 + nutze richtige movement wert bei NPC Bogen
2024-05-26 09:56:02 +02:00
Byroks 918b32fda0 Attribute Mods verändern Boni nicht (#111)
Problem:
 + Mods für die Attribute (wie zb. bei dem Zauber Stärke) haben davon abgeleitete Werte (Wie Schadensbonus) nicht verändert

Changes:
 + Mods werden vor den abgeleiteten Werten ausgewertet

Reviewed-on: #111
Reviewed-by: Le-Frique <lefrique@live.de>
2024-05-22 08:15:47 +02:00
oskaloq 3ecd2c6c1e Vereinfachter-NPC/Kreaturen-Bogen (#107)
Ich habe mal den ersten Entwurf eines NPC Bogens fertiggestellt. Ist jetzt ein eigener Actor Type geworden und nicht nur ein alternativer Char Bogen:
Einfach beim Erstellen eines neuen Actors NPC wählen.

Co-authored-by: Ender <harald@drueppels.de>
Co-authored-by: LeFrique <lefrique@live.de>
Co-authored-by: Byroks <byroks@gmail.com>
Reviewed-on: #107
Reviewed-by: Le-Frique <lefrique@live.de>
2024-05-14 11:38:20 +02:00
LeFrique 37d6ba12e7 tragkraft-containerwert-abw-kidoprep (#103)
+ Added ABW to items
+ Added warning for over-capacity
+ Added Valuecalculation for containers
+ Updated KiDo-template

Reviewed-on: #103
Reviewed-by: Byroks <byroks@gmail.com>
Co-authored-by: LeFrique <lefrique@live.de>
Co-committed-by: LeFrique <lefrique@live.de>
2024-05-01 19:10:47 +02:00
Byroks 5a1e11d0d7 Sneak update, AP Cost not working correctly 2024-04-27 18:45:20 +02:00
oskaloq c5e5ba199b changed manifest for easier update (#97)
Co-authored-by: Ender <harald@drueppels.de>
Reviewed-on: #97
Reviewed-by: Byroks <byroks@gmail.com>
2024-04-01 19:30:19 +02:00
oskaloq 08e767afcb Drag and Drop für Container #98 (#99)
Items können jetzt per Drag and Drop in Container verschoben werden. Werden sie nicht in einen Container gedroppt, landen sie wieder in der allgemeinen Item Übersicht.

Co-authored-by: Ender <harald@drueppels.de>
Reviewed-on: #99
Reviewed-by: Byroks <byroks@gmail.com>
2024-03-31 18:51:01 +02:00
30 changed files with 808 additions and 101 deletions

View File

@ -473,8 +473,8 @@ const updateManifest = (cb: any) => {
const result = `${repoURL}/releases/download`; const result = `${repoURL}/releases/download`;
manifest.file.url = repoURL; manifest.file.url = repoURL;
manifest.file.manifest = `${result}/v${manifest.file.version}/${manifest.name}`; manifest.file.manifest = `${result}/latest/${manifest.name}?token=2455375115b92bc8d87c93df7159eec232456f2d`;
manifest.file.download = `${result}/v${manifest.file.version}/${manifest.file.name}-v${manifest.file.version}.zip`; manifest.file.download = `${result}/v${manifest.file.version}/${manifest.file.name}-v${manifest.file.version}.zip?token=2455375115b92bc8d87c93df7159eec232456f2d`;
const prettyProjectJson = stringify(manifest.file, { const prettyProjectJson = stringify(manifest.file, {
maxLength: 35, maxLength: 35,
@ -504,7 +504,7 @@ const gitTaskBuild = (cb: gulp.TaskFunctionCallback) => {
if (!manifest) return cb(Error("could not load manifest.")); if (!manifest) return cb(Error("could not load manifest."));
return gulp return gulp
.src(`${manifest.file.name}-v${manifest.file.version}.zip`) .src(`${manifest.file.name}.zip`)
.pipe(git.checkout(`v${manifest.file.version}`, { args: "-b" })) .pipe(git.checkout(`v${manifest.file.version}`, { args: "-b" }))
.pipe(git.add({ args: "--no-all -f" })) .pipe(git.add({ args: "--no-all -f" }))
.pipe(git.commit(`v${manifest.file.version}`, { args: "-a", disableAppendPaths: true })); .pipe(git.commit(`v${manifest.file.version}`, { args: "-a", disableAppendPaths: true }));

View File

@ -1,6 +1,6 @@
{ {
"TYPES.Actor.character": "Charakter", "TYPES.Actor.character": "Charakter",
"ACTOR.TypeNpc": "Kreatur / Nichtspielerfigur", "TYPES.Actor.npc": "Kreatur / Nichtspielerfigur",
"ACTOR.TypeVehicle": "Transportmittel / Pferd etc.", "ACTOR.TypeVehicle": "Transportmittel / Pferd etc.",
"TYPES.Item.item": "Gegenstand", "TYPES.Item.item": "Gegenstand",
@ -61,6 +61,8 @@
"item-ismagic": "Ist Magisch", "item-ismagic": "Ist Magisch",
"item-wealth": "Vermögenswert", "item-wealth": "Vermögenswert",
"item-weight": "Gewicht", "item-weight": "Gewicht",
"item-abw": "ABW",
"item-abw-long": "Ausbrennwahrscheinlichkeit",
"actor-lp": "Lebenspunkte", "actor-lp": "Lebenspunkte",
"actor-lp-short": "LP", "actor-lp-short": "LP",
@ -133,7 +135,7 @@
"heavy-load": "Schwere Last", "heavy-load": "Schwere Last",
"thrust-load": "Schublast", "thrust-load": "Schublast",
"load-max": "Höchstlast", "load-max": "Höchstlast",
"load-capacity": "Tragkraft", "capacity": "Tragkraft",
"exp-overall": "Erfahrungsschatz", "exp-overall": "Erfahrungsschatz",
"exp-available": "Erfahrungspunkte", "exp-available": "Erfahrungspunkte",
@ -154,6 +156,10 @@
"beredsamkeit": "Beredsamkeit", "beredsamkeit": "Beredsamkeit",
"betaeuben": "Betäuben", "betaeuben": "Betäuben",
"betaeubungsgriff": "Betäubungsgriff", "betaeubungsgriff": "Betäubungsgriff",
"bildendeKuensteA": "Bildende Künste (Architektur)",
"bildendeKuensteB": "Bildende Künste (Bildhauerei)",
"bildendeKuensteG": "Bildende Künste (Grafik)",
"bildendeKuensteM": "Bildende Künste (Malerei)",
"bootfahren": "Bootfahren", "bootfahren": "Bootfahren",
"dickhaeuterLenken": "Dickhäuter lenken", "dickhaeuterLenken": "Dickhäuter lenken",
"ersteHilfe": "Erste Hilfe", "ersteHilfe": "Erste Hilfe",
@ -281,6 +287,7 @@
"rangedWeapon": "Schusswaffe", "rangedWeapon": "Schusswaffe",
"assignItemToCharacter": "Füge Gegenstand einem Charakter hinzu, um hier etwas auswählen zu können", "assignItemToCharacter": "Füge Gegenstand einem Charakter hinzu, um hier etwas auswählen zu können",
"showAll": "Alle anzeigen", "showAll": "Alle anzeigen",
"showUnlearned": "Ungelernte Fertigkeiten",
"wealthAndWeight": "Vermögen und Lasten", "wealthAndWeight": "Vermögen und Lasten",
"itemsInContainers": "Gegenstände in Aufbewahrung", "itemsInContainers": "Gegenstände in Aufbewahrung",
"allItems": "Alle Gegenstände", "allItems": "Alle Gegenstände",
@ -356,12 +363,13 @@
"spell-agens": "Agens", "spell-agens": "Agens",
"spell-reagens": "Reagens", "spell-reagens": "Reagens",
"spell-material": "Zaubermaterial", "spell-material": "Zaubermaterial",
"spell-rank": "Stufe",
"kampfkunst-type": "Form", "kampfkunst-type": "Form",
"kampfkunst-variante": "Variante", "kampfkunst-variante": "Variante",
"kampfkunst-variante-short": "Var", "kampfkunst-variante-short": "Var",
"kampfkunst-ep": "Erfahrungspunkte", "kampfkunst-ep": "Erfahrungspunkte",
"kampfkunst-rank": "Stufe", "kampfkunst-rank": "Stufe der Technik",
"kampfkunst-weapon": "Waffengruppe", "kampfkunst-weapon": "Waffengruppe",
"kampfkunst-enemy": "Einschränkungen durch Art der Gegner", "kampfkunst-enemy": "Einschränkungen durch Art der Gegner",
@ -385,6 +393,10 @@
"kido-variante": "KiDo Variante", "kido-variante": "KiDo Variante",
"kido-color": "Kampfstilfarbe", "kido-color": "Kampfstilfarbe",
"kido-style": "Art der Technik", "kido-style": "Art der Technik",
"kido-rank": "Stufe der Technik",
"kido-grade": "Ausbildungsgrad",
"kido-enemy": "Einschränkungen durch Art der Gegner",
"kido-weapon": "Waffengruppe",
"kido-type-angriff": "Kido Angriff", "kido-type-angriff": "Kido Angriff",
"kido-type-verteidigung": "Kido Verteidigung", "kido-type-verteidigung": "Kido Verteidigung",
@ -399,6 +411,7 @@
"kido-variante-blockieren": "Blockieren", "kido-variante-blockieren": "Blockieren",
"kido-variante-bewegen": "Bewegen", "kido-variante-bewegen": "Bewegen",
"kido-variante-kontrollieren": "Kontrollieren", "kido-variante-kontrollieren": "Kontrollieren",
"kido-variante-finte": "Finte",
"mod-operation-add100": "Addieren (max 100)", "mod-operation-add100": "Addieren (max 100)",
"mod-operation-roll": "Wurf Modifikation", "mod-operation-roll": "Wurf Modifikation",
@ -444,9 +457,9 @@
"reroll": "Neuwürfeln", "reroll": "Neuwürfeln",
"options": { "options": {
"modifier": "Modifikator", "modifier": "Wurfmodifikator",
"difficulty": "Schwellenwert", "difficulty": "Erfolg",
"rollMode": "Würfel Modus" "rollMode": "Würfelmodus"
} }
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "foundry-system-midgard5", "name": "foundry-system-midgard5",
"version": "2.6.0", "version": "2.7.2",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -15,6 +15,11 @@ const preloadTemplates = async (): Promise<Handlebars.TemplateDelegate<any>[]> =
"sheets/character/spells.hbs", "sheets/character/spells.hbs",
"sheets/character/combat.hbs", "sheets/character/combat.hbs",
"sheets/character/effects.hbs", "sheets/character/effects.hbs",
"sheets/npc/main.hbs",
"sheets/npc/combat.hbs",
"sheets/npc/properties.hbs",
"sheets/npc/description.hbs",
"sheets/npc/attribute.hbs",
"sheets/partial/mod.hbs", "sheets/partial/mod.hbs",
"sheets/item/rolls.hbs", "sheets/item/rolls.hbs",
"chat/roll-m5.hbs", "chat/roll-m5.hbs",

View File

@ -162,6 +162,7 @@ export interface M5AttributeCalculated extends M5ModResult {
export interface M5CharacterCalculatedData { export interface M5CharacterCalculatedData {
level: number; level: number;
movement: number;
attributes: { attributes: {
st: M5AttributeCalculated; st: M5AttributeCalculated;
gs: M5AttributeCalculated; gs: M5AttributeCalculated;

View File

@ -152,6 +152,7 @@ export class M5Character extends Actor {
ret.level = M5Character.levelFromExp(data.info.race === "Zwerg" ? Math.min(data.calc.stats?.hoard * 2 || 0, data.es) : data.es); ret.level = M5Character.levelFromExp(data.info.race === "Zwerg" ? Math.min(data.calc.stats?.hoard * 2 || 0, data.es) : data.es);
//Set all values that are not dependent on another Value
ret.attributes.st.value = M5Character.attributeMinMax(data.attributes.st); // TODO item effects ret.attributes.st.value = M5Character.attributeMinMax(data.attributes.st); // TODO item effects
ret.attributes.gs.value = M5Character.attributeMinMax(data.attributes.gs); ret.attributes.gs.value = M5Character.attributeMinMax(data.attributes.gs);
ret.attributes.gw.value = M5Character.attributeMinMax(data.attributes.gw); ret.attributes.gw.value = M5Character.attributeMinMax(data.attributes.gw);
@ -176,11 +177,37 @@ export class M5Character extends Actor {
ret.stats.ap = this.modResult(data.ap); ret.stats.ap = this.modResult(data.ap);
ret.stats.lpProtection = this.modResult(0); ret.stats.lpProtection = this.modResult(0);
ret.stats.apProtection = this.modResult(0); ret.stats.apProtection = this.modResult(0);
ret.stats.movement = this.modResult(data.movement);
ret.stats.hoardMin = M5Character.levelThreshold.at(ret.level - 1) / 2;
ret.stats.hoardNext = M5Character.levelThreshold.at(ret.level) / 2;
ret.stats.wealth = parseFloat((data.info.gold + data.info.silver / 10 + data.info.copper / 100).toPrecision(10));
ret.stats.hoard = 0;
ret.stats.encumbrance = 0;
if (!skip?.mods) {
const aggregate = new M5ModAggregate(data, ret);
context.items
?.filter(
(item) =>
(item.type === "item" || item.type === "skill" || item.type === "effect" || item.type === "armor" || item.type === "container" || item.type === "class") && item.system.equipped
)
.forEach((item) => {
const mods = item.system.mods;
//console.log("Actor item mods", mods)
Object.keys(mods).forEach((modIndex) => {
const mod = mods[modIndex] as M5ItemMod;
aggregate.push(mod, item.name);
});
});
ret.skillMods = aggregate.calculate();
}
ret.stats.defense = this.modResult(M5Character.defenseFromLevel(ret.level)); ret.stats.defense = this.modResult(M5Character.defenseFromLevel(ret.level));
ret.stats.damageBonus = this.modResult(Math.floor(ret.attributes.st.value / 20) + Math.floor(ret.attributes.gs.value / 30) - 3); ret.stats.damageBonus = this.modResult(Math.floor(ret.attributes.st.value / 20) + Math.floor(ret.attributes.gs.value / 30) - 3);
ret.stats.attackBonus = this.modResult(ret.attributes.gs.bonus); ret.stats.attackBonus = this.modResult(ret.attributes.gs.bonus);
ret.stats.defenseBonus = this.modResult(ret.attributes.gw.bonus); ret.stats.defenseBonus = this.modResult(ret.attributes.gw.bonus);
ret.stats.movement = this.modResult(data.movement);
ret.stats.resistanceMind = this.modResult(ret.stats.defense.value + (data.info.race === "Mensch" ? ret.attributes.in.bonus : this.raceBonus(data.info.race))); ret.stats.resistanceMind = this.modResult(ret.stats.defense.value + (data.info.race === "Mensch" ? ret.attributes.in.bonus : this.raceBonus(data.info.race)));
ret.stats.resistanceBody = this.modResult(ret.stats.defense.value + (data.info.race === "Mensch" ? ret.attributes.ko.bonus : this.raceBonus(data.info.race))); ret.stats.resistanceBody = this.modResult(ret.stats.defense.value + (data.info.race === "Mensch" ? ret.attributes.ko.bonus : this.raceBonus(data.info.race)));
ret.stats.spellCasting = this.modResult((data.info.magicUsing ? M5Character.spellCastingFromLevel(ret.level) : 3) + ret.attributes.zt.bonus); ret.stats.spellCasting = this.modResult((data.info.magicUsing ? M5Character.spellCastingFromLevel(ret.level) : 3) + ret.attributes.zt.bonus);
@ -191,15 +218,10 @@ export class M5Character extends Actor {
ret.stats.deprivationCold = this.modResult(Math.floor(ret.attributes.ko.value / 2)); ret.stats.deprivationCold = this.modResult(Math.floor(ret.attributes.ko.value / 2));
ret.stats.deprivationHeat = this.modResult(Math.floor(ret.attributes.ko.value / 2)); ret.stats.deprivationHeat = this.modResult(Math.floor(ret.attributes.ko.value / 2));
ret.stats.deprivationFood = this.modResult(Math.floor(40 + ret.attributes.ko.value / 2)); ret.stats.deprivationFood = this.modResult(Math.floor(40 + ret.attributes.ko.value / 2));
ret.stats.hoardMin = M5Character.levelThreshold.at(ret.level - 1) / 2;
ret.stats.hoardNext = M5Character.levelThreshold.at(ret.level) / 2;
ret.stats.wealth = parseFloat((data.info.gold + data.info.silver / 10 + data.info.copper / 100).toPrecision(3));
ret.stats.hoard = 0;
ret.stats.load = M5Character.loadValue(data.attributes.st); ret.stats.load = M5Character.loadValue(data.attributes.st);
ret.stats.heavyLoad = M5Character.heavyLoadValue(data.attributes.st); ret.stats.heavyLoad = M5Character.heavyLoadValue(data.attributes.st);
ret.stats.loadMax = M5Character.maxLoadValue(data.attributes.st); ret.stats.loadMax = M5Character.maxLoadValue(data.attributes.st);
ret.stats.thrustLoad = M5Character.thrustLoadValue(data.attributes.st); ret.stats.thrustLoad = M5Character.thrustLoadValue(data.attributes.st);
ret.stats.encumbrance = 0;
if (!skip?.mods) { if (!skip?.mods) {
const aggregate = new M5ModAggregate(data, ret); const aggregate = new M5ModAggregate(data, ret);
@ -280,6 +302,7 @@ export class M5Character extends Actor {
if (!!item.system.containerId) { if (!!item.system.containerId) {
ret.gear.containers[item.system.containerId].weight += parseFloat((item.system.weight * item.system.quantity).toPrecision(4)); ret.gear.containers[item.system.containerId].weight += parseFloat((item.system.weight * item.system.quantity).toPrecision(4));
ret.gear.containers[item.system.containerId].value += parseFloat(this.calculateValue(item.system.value * item.system.quantity, item.system.currency).toPrecision(3));
if (ret.gear.containers[item.system.containerId].equipped) { if (ret.gear.containers[item.system.containerId].equipped) {
ret.stats.encumbrance += item.system.weight * item.system.quantity; ret.stats.encumbrance += item.system.weight * item.system.quantity;
} }
@ -302,6 +325,7 @@ export class M5Character extends Actor {
label: label, label: label,
icon: icon, icon: icon,
magic: item.system.magic, magic: item.system.magic,
abw: item.system.abw || 0,
calc: item.system.calc, calc: item.system.calc,
equipped: item.system?.equipped, equipped: item.system?.equipped,
valuable: item.system?.valuable, valuable: item.system?.valuable,
@ -352,6 +376,7 @@ export class M5Character extends Actor {
icon: item.img, icon: item.img,
skillId: item.system.skillId, skillId: item.system.skillId,
magic: item.system.magic, magic: item.system.magic,
abw: item.system.abw || 0,
valuable: item.system?.valuable, valuable: item.system?.valuable,
hoarded: item.system?.hoarded, hoarded: item.system?.hoarded,
value: item.system.value || 0, value: item.system.value || 0,
@ -395,6 +420,7 @@ export class M5Character extends Actor {
icon: item.img, icon: item.img,
skillId: item.system.skillId, skillId: item.system.skillId,
magic: item.system.magic, magic: item.system.magic,
abw: item.system.abw || 0,
valuable: item.system?.valuable, valuable: item.system?.valuable,
hoarded: item.system?.hoarded, hoarded: item.system?.hoarded,
value: item.system.value || 0, value: item.system.value || 0,
@ -438,6 +464,7 @@ export class M5Character extends Actor {
label: label, label: label,
icon: item.img, icon: item.img,
magic: item.system.magic, magic: item.system.magic,
abw: item.system.abw || 0,
valuable: item.system?.valuable, valuable: item.system?.valuable,
hoarded: item.system?.hoarded, hoarded: item.system?.hoarded,
value: item.system.value || 0, value: item.system.value || 0,

View File

@ -314,7 +314,7 @@ export class M5Item extends Item {
return ret; return ret;
} }
async roll() { async roll(toggleAutomatedRoll = false) {
const item = this as any; const item = this as any;
// Initialize chat data. // Initialize chat data.
@ -341,14 +341,20 @@ export class M5Item extends Item {
} }
}); });
const roll = new M5Roll(rollData, this.actor, item.name, item.id);
if (await roll.toMessage(toggleAutomatedRoll)) {
if (item.type === "spell" || item.type === "kampfkunst") { if (item.type === "spell" || item.type === "kampfkunst") {
if (this.actor["system"].ap.value >= item.system.ap) { if (this.actor["system"].ap.value >= item.system.ap) {
this.actor["system"].ap.value -= item.system.ap; this.actor["update"]({
data: {
ap: {
value: this.actor["system"].ap.value - item.system.ap,
},
},
});
}
} }
} }
const roll = new M5Roll(rollData, this.actor, item.name, item.id);
return roll.toMessage();
} else { } else {
ChatMessage.create({ ChatMessage.create({
speaker: speaker, speaker: speaker,

View File

@ -11,7 +11,12 @@ export class M5Roll {
public _total: number = 0; public _total: number = 0;
public pool: PoolTerm = null; public pool: PoolTerm = null;
constructor(public data: M5RollData, public actor: any, public label: string, public id?: string) { constructor(
public data: M5RollData,
public actor: any,
public label: string,
public id?: string
) {
//super(null) //super(null)
//this.data = rollData //this.data = rollData
} }
@ -26,7 +31,7 @@ export class M5Roll {
.map((rollName, index) => { .map((rollName, index) => {
indexMap.set(index, rollName); indexMap.set(index, rollName);
const formula = this.data.rolls[rollName]; const formula = this.data.rolls[rollName];
formula.formula = index === 0 && this.id !== "-1" ? formula.formula.replace(/(\d*d\d*)/, `{$1 + ${this.data.b.modifier}}`) : formula.formula; formula.formula = index === 0 && this.id !== "-1" ? formula.formula + `+ ${this.data.b.modifier}` : formula.formula;
const roll = new Roll(formula.formula, this.data); const roll = new Roll(formula.formula, this.data);
return roll; return roll;
}); });
@ -90,6 +95,7 @@ export class M5Roll {
this.data.res.label = this.label; this.data.res.label = this.label;
if ((game as Game).settings.get("midgard5", "automatedPP") && this.data.iType !== null) { if ((game as Game).settings.get("midgard5", "automatedPP") && this.data.iType !== null) {
if ((this.data.i.type === "language" || this.data.i.type === "general") && this.data.rolls[0].dice[0] >= 16) { if ((this.data.i.type === "language" || this.data.i.type === "general") && this.data.rolls[0].dice[0] >= 16) {
ui.notifications.notify(`Praxispunkt eingetragen für ${this.actor.items.get(this.id).name}`);
this.actor.items.get(this.id).update({ this.actor.items.get(this.id).update({
system: { system: {
pp: this.data.i.pp + 1, pp: this.data.i.pp + 1,
@ -97,6 +103,7 @@ export class M5Roll {
}); });
} else if (this.data.rolls[0].dice[0] === 20) { } else if (this.data.rolls[0].dice[0] === 20) {
if (this.data.i.type === "combat") { if (this.data.i.type === "combat") {
ui.notifications.notify(`Praxispunkt eingetragen für ${this.actor.items.get(this.id).name}`);
// Rolling through skill // Rolling through skill
this.actor.items.get(this.id).update({ this.actor.items.get(this.id).update({
system: { system: {
@ -104,6 +111,7 @@ export class M5Roll {
}, },
}); });
} else if (this.data.iType === "weapon") { } else if (this.data.iType === "weapon") {
ui.notifications.notify(`Praxispunkt eingetragen für ${this.actor.items.get(this.id).name}`);
// Rolling through Weapon Item // Rolling through Weapon Item
const skill = this.actor.items.get(this.data.i.skillId); const skill = this.actor.items.get(this.data.i.skillId);
skill.update({ skill.update({
@ -112,6 +120,7 @@ export class M5Roll {
}, },
}); });
} else if (this.data.iType === "defensiveWeapon") { } else if (this.data.iType === "defensiveWeapon") {
ui.notifications.notify(`Praxispunkt eingetragen für ${this.actor.items.get(this.id).name}`);
// Rolling through defensiveWeapon Item // Rolling through defensiveWeapon Item
const skill = this.actor.items.get(this.data.i.skillId); const skill = this.actor.items.get(this.data.i.skillId);
skill.update({ skill.update({
@ -120,6 +129,7 @@ export class M5Roll {
}, },
}); });
} else if (this.data.iType === "spell") { } else if (this.data.iType === "spell") {
ui.notifications.notify(`Praxispunkt eingetragen für ${this.data.i.process}`);
// Rolling through Spell Item // Rolling through Spell Item
const klasse = this.actor.items.find((x) => x.type === "class" && x.system.equipped); const klasse = this.actor.items.find((x) => x.type === "class" && x.system.equipped);
klasse.update({ klasse.update({
@ -142,18 +152,26 @@ export class M5Roll {
return renderTemplate(M5Roll.TEMPLATE_PATH, this.data); return renderTemplate(M5Roll.TEMPLATE_PATH, this.data);
} }
async toMessage() { async toMessage(toggleAutomatedRoll = false) {
let automatedRoll = (game as Game).settings.get("midgard5", "automatedRoll");
automatedRoll = toggleAutomatedRoll ? !automatedRoll : automatedRoll;
let rMode = (game as Game).settings.get("core", "rollMode");
if (!automatedRoll) {
let checkOptions = await this.popUp({ isPW: this.data.rolls[0].label === (game as Game).i18n.localize("midgard5.pw") }); let checkOptions = await this.popUp({ isPW: this.data.rolls[0].label === (game as Game).i18n.localize("midgard5.pw") });
if (checkOptions["cancelled"]) { if (checkOptions["cancelled"]) {
return; return;
} else { } else {
rMode = checkOptions["rollMode"];
this.data.b = checkOptions; this.data.b = checkOptions;
} }
} else {
this.data.b = { difficulty: 20, modifier: 0 };
}
if (!this._evaluated) await this.evaluate(); if (!this._evaluated) await this.evaluate();
const faces = this.pool.dice.map((x) => x.faces); const faces = this.pool.dice.map((x) => x.faces);
const rMode = checkOptions["rollMode"] || (game as Game).settings.get("core", "rollMode");
const chatData = { const chatData = {
type: CONST.CHAT_MESSAGE_TYPES.ROLL, type: CONST.CHAT_MESSAGE_TYPES.ROLL,
content: await this.render(), content: await this.render(),
@ -204,7 +222,7 @@ export class M5Roll {
rollData.rolls["0"] = { rollData.rolls["0"] = {
formula: "1d20 + @i.fw + @i.bonus", formula: "1d20 + @i.fw + @i.bonus",
enabled: true, enabled: true,
label: (game as Game).i18n.localize("midgard5.pw"), label: (game as Game).i18n.localize("midgard5.ew"),
result: "", result: "",
total: 0, total: 0,
totalStr: "", totalStr: "",

View File

@ -7,7 +7,6 @@ import { M5Roll } from "../rolls/M5Roll";
export default class M5CharacterSheet extends ActorSheet { export default class M5CharacterSheet extends ActorSheet {
static get defaultOptions() { static get defaultOptions() {
return mergeObject(super.defaultOptions, { return mergeObject(super.defaultOptions, {
template: "systems/midgard5/templates/sheets/character/main.hbs",
width: 1000, width: 1000,
height: 800, height: 800,
classes: ["midgard5", "sheet", "character"], classes: ["midgard5", "sheet", "character"],
@ -21,7 +20,15 @@ export default class M5CharacterSheet extends ActorSheet {
}); });
} }
// get template() { get template() {
//console.log("M5CharacterSheet", this.actor.data.type)
if (this.actor.type === "npc") {
return "systems/midgard5/templates/sheets/npc/main.hbs";
}
else {
return "systems/midgard5/templates/sheets/character/main.hbs";
}
}
// return "systems/midgard5/templates/character_sheet/main.hbs" // return "systems/midgard5/templates/character_sheet/main.hbs"
// }Options extends ActorSheet.Options = ActorSheet.Options, Data extends object = ActorSheet.Data<Options> // }Options extends ActorSheet.Options = ActorSheet.Options, Data extends object = ActorSheet.Data<Options>
@ -78,7 +85,8 @@ export default class M5CharacterSheet extends ActorSheet {
let attributeValue = target ? parseInt(target.dataset.value) : null; let attributeValue = target ? parseInt(target.dataset.value) : null;
let attributeStr = target ? target.dataset.attribute : null; let attributeStr = target ? target.dataset.attribute : null;
const roll = M5Roll.fromAttributeValue(this.actor, attributeStr, attributeValue); const roll = M5Roll.fromAttributeValue(this.actor, attributeStr, attributeValue);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".edit-item").on("click", async (event) => { html.find(".edit-item").on("click", async (event) => {
@ -138,7 +146,8 @@ export default class M5CharacterSheet extends ActorSheet {
}); });
} }
await item.roll(); let toggleAutomatedRoll = (event.shiftKey)
await item.roll(toggleAutomatedRoll);
this.render(); this.render();
}); });
@ -158,7 +167,8 @@ export default class M5CharacterSheet extends ActorSheet {
const actor = this.actor as any; const actor = this.actor as any;
const item = actor.items.get(skillId) as M5Item; const item = actor.items.get(skillId) as M5Item;
await item.roll(); let toggleAutomatedRoll = (event.shiftKey)
await item.roll(toggleAutomatedRoll);
}); });
html.find(".roll-general-button").on("click", async (event) => { html.find(".roll-general-button").on("click", async (event) => {
@ -169,7 +179,8 @@ export default class M5CharacterSheet extends ActorSheet {
const unlearnedSkill = data.skills.general[skillName] as M5SkillUnlearned; const unlearnedSkill = data.skills.general[skillName] as M5SkillUnlearned;
const roll = M5Roll.fromUnlearnedSkill(this.actor, unlearnedSkill, skillName); const roll = M5Roll.fromUnlearnedSkill(this.actor, unlearnedSkill, skillName);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".learn-button").on("click", async (event) => { html.find(".learn-button").on("click", async (event) => {
@ -267,48 +278,57 @@ export default class M5CharacterSheet extends ActorSheet {
const context = this.actor as any; const context = this.actor as any;
const item = context.items.get(itemId) as M5Item; const item = context.items.get(itemId) as M5Item;
await item.roll(); let toggleAutomatedRoll = (event.shiftKey)
await item.roll(toggleAutomatedRoll);
this.render(); this.render();
}); });
html.find(".roll-brawl-button").on("click", async (event) => { html.find(".roll-brawl-button").on("click", async (event) => {
const roll = M5Roll.brawl(this.actor); const roll = M5Roll.brawl(this.actor);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".roll-cleanSpell-button").on("click", async (event) => { html.find(".roll-cleanSpell-button").on("click", async (event) => {
const roll = M5Roll.cleanSpell(this.actor); const roll = M5Roll.cleanSpell(this.actor);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".roll-deprivationCold-button").on("click", async (event) => { html.find(".roll-deprivationCold-button").on("click", async (event) => {
const roll = M5Roll.deprivationCold(this.actor); const roll = M5Roll.deprivationCold(this.actor);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".roll-deprivationHeat-button").on("click", async (event) => { html.find(".roll-deprivationHeat-button").on("click", async (event) => {
const roll = M5Roll.deprivationHeat(this.actor); const roll = M5Roll.deprivationHeat(this.actor);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".roll-deprivationFood-button").on("click", async (event) => { html.find(".roll-deprivationFood-button").on("click", async (event) => {
const roll = M5Roll.deprivationFood(this.actor); const roll = M5Roll.deprivationFood(this.actor);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".roll-defense-button").on("click", async (event) => { html.find(".roll-defense-button").on("click", async (event) => {
const roll = M5Roll.defense(this.actor); const roll = M5Roll.defense(this.actor);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".roll-resistanceMind-button").on("click", async (event) => { html.find(".roll-resistanceMind-button").on("click", async (event) => {
const roll = M5Roll.resistanceMind(this.actor); const roll = M5Roll.resistanceMind(this.actor);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".roll-resistanceBody-button").on("click", async (event) => { html.find(".roll-resistanceBody-button").on("click", async (event) => {
const roll = M5Roll.resistanceBody(this.actor); const roll = M5Roll.resistanceBody(this.actor);
await roll.toMessage(); let toggleAutomatedRoll = (event.shiftKey)
await roll.toMessage(toggleAutomatedRoll);
}); });
html.find(".change-equipped").on("click", async (event) => { html.find(".change-equipped").on("click", async (event) => {
@ -526,7 +546,11 @@ export default class M5CharacterSheet extends ActorSheet {
let data = null; let data = null;
try { try {
data = JSON.parse(event.dataTransfer.getData("text/plain")); data = JSON.parse(event.dataTransfer.getData("text/plain"));
data.data.system.containerId = ""; //Clean containerId console.log("Data", data.data);
let target = event.target.closest("[data-container-id]") as HTMLElement;
let containerId = target ? target.dataset.containerId : "";
console.log("Container ID", containerId);
data.data.system.containerId = containerId; //Update containerId
if (data.type !== "Transfer") return false; if (data.type !== "Transfer") return false;
} catch (err) { } catch (err) {
return false; return false;
@ -535,6 +559,14 @@ export default class M5CharacterSheet extends ActorSheet {
if (!data.data) return false; if (!data.data) return false;
if (data.actorId === this.actor.id) { if (data.actorId === this.actor.id) {
let itemId=data.data._id;
const context = this.actor as any;
const item = context.items.get(itemId);
item.update({
data: {
containerId: data.data.system.containerId,
},
});
return this._onSortItem(event, data.data); return this._onSortItem(event, data.data);
} }

View File

@ -13,4 +13,13 @@ export const loadSettings = async function () {
default: true, default: true,
type: Boolean, type: Boolean,
}); });
(game as Game).settings.register("midgard5", "automatedRoll", {
name: "Automatische Würfelwürfe",
hint: "Falls aktiv, wird bei Würfelwürfen kein Dialog gezeigt. Das Verhalten kann mit gleichzeitig gedrückter Shift Taste umgekehrt werden.",
scope: "world",
config: true,
default: false,
type: Boolean,
});
}; };

View File

@ -0,0 +1,23 @@
// main: midgard5.less
@borderGroove: 2px groove #eeede0;
@attributeBorderColor: rgba(0, 0, 0, 0.5);
.midgard5 {
.sheet-npc {
.attribute-header {
align-items: center;
text-align: center;
font-weight: bold;
border: 0px solid transparent;
}
.attribute-value {
align-items: center;
text-align: center;
border: 0px solid transparent;
}
.fixed-value {
width: 3rem;
text-align: center;
}
}
}

View File

@ -3,13 +3,17 @@
"name": "midgard5", "name": "midgard5",
"title": "Midgard 5. Edition", "title": "Midgard 5. Edition",
"description": "The German RPG Midgard 5. Edition", "description": "The German RPG Midgard 5. Edition",
"version": "2.6.0", "version": "2.7.2",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "11", "verified": "11",
"maximum": "11" "maximum": "11"
}, },
"authors": [{ "name": "Byroks" }, { "name": "Le-Frique" }, { "name": "Oskaloq" }], "authors": [
{"name": "Byroks"},
{"name": "Le-Frique"},
{"name": "Oskaloq"}
],
"scripts": ["bundle.js"], "scripts": ["bundle.js"],
"styles": ["bundle.css"], "styles": ["bundle.css"],
"languages": [ "languages": [
@ -24,8 +28,8 @@
"primaryTokenAttribute": "lp", "primaryTokenAttribute": "lp",
"secondaryTokenAttribute": "ap", "secondaryTokenAttribute": "ap",
"url": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5", "url": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5",
"manifest": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5/releases/download/v2.6.0/system.json", "manifest": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5/releases/download/latest/system.json?token=2455375115b92bc8d87c93df7159eec232456f2d",
"download": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5/releases/download/v2.6.0/midgard5-v2.6.0.zip", "download": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5/releases/download/latest/midgard5.zip?token=2455375115b92bc8d87c93df7159eec232456f2d",
"initiative": "@c.calc.attributes.gw.value", "initiative": "@c.calc.attributes.gw.value",
"license": "LICENSE.txt" "license": "LICENSE.txt"
} }

View File

@ -1,15 +1,18 @@
{ {
"Actor": { "Actor": {
"types": ["character"], "types": [
"character",
"npc"
],
"templates": { "templates": {
"characterDescription": { "characterDescription": {
"info": { "info": {
"description": "", "description": "",
"background": "", "background": "",
"class": {}, "class": {},
"npc-class": "",
"race": "", "race": "",
"magicUsing": false, "magicUsing": false,
"showAllItems": false,
"gender": "", "gender": "",
"weight": "", "weight": "",
"height": "", "height": "",
@ -19,9 +22,12 @@
"occupation": "", "occupation": "",
"origin": "", "origin": "",
"faith": "", "faith": "",
"level": 1,
"gold": 0, "gold": 0,
"silver": 0, "silver": 0,
"copper": 0 "copper": 0,
"showAllItems": false,
"showUnlearned": false
} }
}, },
"characterBars": { "characterBars": {
@ -44,6 +50,8 @@
"gp": 0 "gp": 0
}, },
"attributes": { "attributes": {
"level": 1,
"movement": 24,
"attributes": { "attributes": {
"st": { "value": 50, "bonus": 0 }, "st": { "value": 50, "bonus": 0 },
"gs": { "value": 50, "bonus": 0 }, "gs": { "value": 50, "bonus": 0 },
@ -53,7 +61,8 @@
"zt": { "value": 50, "bonus": 0 }, "zt": { "value": 50, "bonus": 0 },
"au": { "value": 50, "bonus": 0 }, "au": { "value": 50, "bonus": 0 },
"pa": { "value": 50, "bonus": 0 }, "pa": { "value": 50, "bonus": 0 },
"wk": { "value": 50, "bonus": 0 } "wk": { "value": 50, "bonus": 0 },
"git": { "value": 50, "bonus": 0 }
} }
}, },
"skills": { "skills": {
@ -72,6 +81,10 @@
"bergreiten": { "fw": 0, "attribute": "gw", "initial": 12, "pp": 0 }, "bergreiten": { "fw": 0, "attribute": "gw", "initial": 12, "pp": 0 },
"betaeuben": { "fw": 6, "attribute": "gs", "initial": 8, "pp": 0 }, "betaeuben": { "fw": 6, "attribute": "gs", "initial": 8, "pp": 0 },
"betaeubungsgriff": { "fw": 0, "attribute": "in", "initial": 8, "pp": 0 }, "betaeubungsgriff": { "fw": 0, "attribute": "in", "initial": 8, "pp": 0 },
"bildendeKuensteA": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
"bildendeKuensteB": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
"bildendeKuensteG": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
"bildendeKuensteM": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
"bootfahren": { "fw": 3, "attribute": "gs", "initial": 8, "pp": 0 }, "bootfahren": { "fw": 3, "attribute": "gs", "initial": 8, "pp": 0 },
"dickhaeuterLenken": { "fw": 0, "attribute": "gs", "initial": 8, "pp": 0 }, "dickhaeuterLenken": { "fw": 0, "attribute": "gs", "initial": 8, "pp": 0 },
"ersteHilfe": { "fw": 0, "attribute": "gs", "initial": 8, "pp": 0 }, "ersteHilfe": { "fw": 0, "attribute": "gs", "initial": 8, "pp": 0 },
@ -156,6 +169,10 @@
"character": { "character": {
"templates": ["characterBars", "attributes", "characterDescription", "characterHeader", "skills", "gear"], "templates": ["characterBars", "attributes", "characterDescription", "characterHeader", "skills", "gear"],
"calc": {} "calc": {}
},
"npc": {
"templates": ["characterBars", "attributes", "characterDescription", "skills", "gear"],
"calc": {}
} }
}, },
"Item": { "Item": {
@ -224,7 +241,8 @@
"weight": 0, "weight": 0,
"capacity": 0, "capacity": 0,
"containerId": "", "containerId": "",
"magic": false "magic": false,
"abw": 0
}, },
"durationSelection": { "durationSelection": {
"durationSelection": { "durationSelection": {
@ -314,7 +332,8 @@
"ausweichen": "midgard5.kido-variante-ausweichen", "ausweichen": "midgard5.kido-variante-ausweichen",
"blockieren": "midgard5.kido-variante-blockieren", "blockieren": "midgard5.kido-variante-blockieren",
"bewegen": "midgard5.kido-variante-bewegen", "bewegen": "midgard5.kido-variante-bewegen",
"kontrollieren": "midgard5.kido-variante-kontrollieren" "kontrollieren": "midgard5.kido-variante-kontrollieren",
"finte": "midgard5.kido-variante-finte"
} }
} }
}, },
@ -374,6 +393,7 @@
"hoarded": false, "hoarded": false,
"skillId": "", "skillId": "",
"damageBase": "1d6", "damageBase": "1d6",
"ew": 5,
"rolls": { "rolls": {
"formulas": { "formulas": {
"0": { "0": {
@ -438,6 +458,7 @@
"agens": "", "agens": "",
"reagens": "", "reagens": "",
"material": "", "material": "",
"rank": 0,
"rolls": { "rolls": {
"formulas": { "formulas": {
"0": { "0": {
@ -459,10 +480,11 @@
"ap": "", "ap": "",
"weapon": "", "weapon": "",
"ep": "", "ep": "",
"rank": "", "rank": 0,
"enemy": "", "enemy": "",
"color": "", "color": "",
"style": "", "style": "",
"grade": "",
"rolls": { "rolls": {
"formulas": { "formulas": {
"0": { "0": {

View File

@ -94,31 +94,29 @@
<td class="roll-spell-details">{{i.ep}}</td> <td class="roll-spell-details">{{i.ep}}</td>
</tr> </tr>
<tr> <tr>
<td>{{localize "midgard5.kampfkunst-color"}}</td> <td>{{localize "midgard5.kido-color"}}</td>
<td class="roll-spell-details">{{i.color}}</td> <td class="roll-spell-details">{{i.color}}</td>
</tr> </tr>
<tr> <tr>
<td>{{localize "midgard5.kampfkunst-style"}}</td> <td>{{localize "midgard5.kido-style"}}</td>
<td class="roll-spell-details">{{i.style}}</td> <td class="roll-spell-details">{{i.style}}</td>
</tr> </tr>
<tr> <tr>
<td>{{localize "midgard5.kido-type"}}</td> <td>{{localize "midgard5.kido-type"}}</td>
<td class="roll-spell-details">{{localize (m5concat "midgard5.kido-type-" i.type)}}</td> <td class="roll-spell-details">{{localize (m5concat "midgard5.kido-type-" i.type)}}</td>
</tr> </tr>
{{#if (eq i.type "angriff")}}
<tr> <tr>
<td>{{localize "midgard5.kido-variante"}}</td> <td>{{localize "midgard5.kido-variante"}}</td>
<td class="roll-spell-details">{{localize (m5concat "midgard5.kido-variante-" i.variante)}}</td> <td class="roll-spell-details">{{localize (m5concat "midgard5.kido-variante-" i.variante)}}</td>
</tr> </tr>
<tr> <tr>
<td>{{localize "midgard5.kampfkunst-enemy"}}</td> <td>{{localize "midgard5.kido-enemy"}}</td>
<td class="roll-spell-details">{{i.enemy}}</td> <td class="roll-spell-details">{{i.enemy}}</td>
</tr> </tr>
<tr> <tr>
<td>{{localize "midgard5.kampfkunst-weapon"}}</td> <td>{{localize "midgard5.kido-weapon"}}</td>
<td class="roll-spell-details">{{i.weapon}}</td> <td class="roll-spell-details">{{i.weapon}}</td>
</tr> </tr>
{{/if}}
{{/unless}} {{/unless}}
{{/if}} {{/if}}

View File

@ -35,7 +35,7 @@
<td>{{localize "midgard5.grace"}}</td> <td>{{localize "midgard5.grace"}}</td>
<td><input name="data.gg" type="text" value="{{data.gg}}" data-dtype="Number" /></td> <td><input name="data.gg" type="text" value="{{data.gg}}" data-dtype="Number" /></td>
<td>{{localize "midgard5.exp-overall"}}</td> <td>{{localize "midgard5.exp-overall"}}</td>
<td><input name="data.es" type="text" value="{{data.es}}" data-dtype="Number" /></td> <td width="40%"><input name="data.es" type="text" value="{{data.es}}" data-dtype="Number" /></td>
</tr> </tr>
<tr> <tr>
<td>{{localize "midgard5.destiny"}}</td> <td>{{localize "midgard5.destiny"}}</td>

View File

@ -63,7 +63,7 @@
<h3>{{localize "midgard5.itemsInContainers"}}</h3> <h3>{{localize "midgard5.itemsInContainers"}}</h3>
<div class="flexbox"> <div class="flexbox">
{{#each data.calc.gear.containers as |container containerId|}} {{#each data.calc.gear.containers as |container containerId|}}
<div class="flexcolumn-2"> <div class="flexcolumn-2" data-container-id="{{containerId}}">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="{{container.icon}}" class="flexpart-icon">{{container.label}}</div> <div class="flexpart-header"><img src="{{container.icon}}" class="flexpart-icon">{{container.label}}</div>
<table> <table>
@ -234,7 +234,7 @@
<th class="title center">{{localize "midgard5.capacity"}}</th> <th class="title center">{{localize "midgard5.capacity"}}</th>
<th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></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"><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> <th><a class="title add-container"><i class="fa-regular fa-plus"></i></a></th>
</tr> </tr>
</thead> </thead>
<tbody class="items-list"> <tbody class="items-list">
@ -251,13 +251,13 @@
{{/unless}} {{/unless}}
</td> </td>
<td style="text-align: start"> <td style="text-align: start">
{{#unless (or (eq item.weight "") (eq item.equipped?))}} {{#unless (or (eq item.weight 0) (eq item.equipped?))}}
<span class="spell-process">{{item.weight}}kg</span> <span class="spell-process">{{item.weight}}kg</span>
{{/unless}} {{/unless}}
</td> </td>
<td style="text-align: start"> <td style="text-align: start">
{{#unless (eq item.capacity "")}} {{#unless (eq item.capacity 0)}}
<span class="spell-process">{{item.capacity}} kg</span> <span class="spell-process"{{#if (gt item.weight item.capacity) }}style="background:#FF6666"{{/if}}>{{item.capacity}}kg</span>
{{/unless}} {{/unless}}
</td> </td>
<td class="change-equipped"> <td class="change-equipped">
@ -289,7 +289,7 @@
<th class="title center">{{localize "midgard5.item-weight"}}</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"><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"><img src="/icons/svg/d20.svg" class="table-icon"></th></th>
<td><a class="title add-item"><i class="fa-regular fa-plus"></i></a></th> <th><a class="title add-item"><i class="fa-regular fa-plus"></i></a></th>
</tr> </tr>
</thead> </thead>
<tbody class="items-list"> <tbody class="items-list">
@ -345,7 +345,7 @@
<th class="title center">{{localize "midgard5.item-value"}}</th> <th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center">{{localize "midgard5.item-weight"}}</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"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<td><a class="title add-weapon"><i class="fa-regular fa-plus"></i></a></th> <th><a class="title add-weapon"><i class="fa-regular fa-plus"></i></a></th>
</tr> </tr>
</thead> </thead>
@ -392,7 +392,7 @@
<th class="title center">{{localize "midgard5.item-value"}}</th> <th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center">{{localize "midgard5.item-weight"}}</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"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<td><a class="title add-defensiveWeapon"><i class="fa-regular fa-plus"></i></a></th> <th><a class="title add-defensiveWeapon"><i class="fa-regular fa-plus"></i></a></th>
</tr> </tr>
</thead> </thead>
<tbody class="items-list"> <tbody class="items-list">
@ -438,7 +438,7 @@
<th class="title center">{{localize "midgard5.item-value"}}</th> <th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center">{{localize "midgard5.item-weight"}}</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"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<td><a class="title add-armor"><i class="fa-regular fa-plus"></i></a></th> <th><a class="title add-armor"><i class="fa-regular fa-plus"></i></a></th>
</tr> </tr>
</thead> </thead>
<tbody class="items-list"> <tbody class="items-list">

View File

@ -49,18 +49,6 @@
</table> </table>
<table style="width: 100%;"> <table style="width: 100%;">
<tr>
<td class="attribute">{{localize "midgard5.actor-st"}}</td>
<td class="attribute">{{localize "midgard5.actor-gs"}}</td>
<td class="attribute">{{localize "midgard5.actor-gw"}}</td>
<td class="attribute">{{localize "midgard5.actor-ko"}}</td>
<td class="attribute">{{localize "midgard5.actor-in"}}</td>
<td class="attribute">{{localize "midgard5.actor-zt"}}</td>
<td class="attribute">{{localize "midgard5.actor-au"}}</td>
<td class="attribute">{{localize "midgard5.actor-pa"}}</td>
<td class="attribute">{{localize "midgard5.actor-wk"}}</td>
<td class="attribute">{{localize "midgard5.actor-git"}}</td>
</tr>
<tr> <tr>
<td class="attribute-value roll-attribute-button" data-attribute="st" data-value="{{data.calc.attributes.st.value}}">{{data.calc.attributes.st.value}}</td> <td class="attribute-value roll-attribute-button" data-attribute="st" data-value="{{data.calc.attributes.st.value}}">{{data.calc.attributes.st.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="gs" data-value="{{data.calc.attributes.gs.value}}">{{data.calc.attributes.gs.value}}</td> <td class="attribute-value roll-attribute-button" data-attribute="gs" data-value="{{data.calc.attributes.gs.value}}">{{data.calc.attributes.gs.value}}</td>
@ -73,6 +61,18 @@
<td class="attribute-value roll-attribute-button" data-attribute="wk" data-value="{{data.calc.attributes.wk.value}}">{{data.calc.attributes.wk.value}}</td> <td class="attribute-value roll-attribute-button" data-attribute="wk" data-value="{{data.calc.attributes.wk.value}}">{{data.calc.attributes.wk.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="git" data-value="{{data.calc.stats.poisonResistance.value}}">{{data.calc.stats.poisonResistance.value}}</td> <td class="attribute-value roll-attribute-button" data-attribute="git" data-value="{{data.calc.stats.poisonResistance.value}}">{{data.calc.stats.poisonResistance.value}}</td>
</tr> </tr>
<tr>
<td class="attribute">{{localize "midgard5.actor-st"}}</td>
<td class="attribute">{{localize "midgard5.actor-gs"}}</td>
<td class="attribute">{{localize "midgard5.actor-gw"}}</td>
<td class="attribute">{{localize "midgard5.actor-ko"}}</td>
<td class="attribute">{{localize "midgard5.actor-in"}}</td>
<td class="attribute">{{localize "midgard5.actor-zt"}}</td>
<td class="attribute">{{localize "midgard5.actor-au"}}</td>
<td class="attribute">{{localize "midgard5.actor-pa"}}</td>
<td class="attribute">{{localize "midgard5.actor-wk"}}</td>
<td class="attribute">{{localize "midgard5.actor-git"}}</td>
</tr>
</table> </table>
</div> </div>

View File

@ -142,6 +142,8 @@
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/sundries/gaming/dice-pair-white-green.webp" class="flexpart-icon">{{localize "midgard5.unlearned-skills"}}</div> <div class="flexpart-header"><img src="icons/sundries/gaming/dice-pair-white-green.webp" class="flexpart-icon">{{localize "midgard5.unlearned-skills"}}</div>
<input id="data.info.showUnlearned" class="checkbox" type="checkbox" name="data.info.showUnlearned" {{checked data.info.showUnlearned}} style="float: right;">
<label for="data.info.showUnlearned" style="font-size: small; font-weight: normal; font-style: italic; float: right;">{{localize "midgard5.showUnlearned"}}&nbsp;</label>
<table> <table>
<thead> <thead>
<tr> <tr>
@ -154,6 +156,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{#unless (not data.info.showUnlearned)}}
{{#each data.skills.general as |skill key|}} {{#each data.skills.general as |skill key|}}
{{#unless (isSkillInList (localizeMidgard key) ../actor.system.calc.skills.general) }} {{#unless (isSkillInList (localizeMidgard key) ../actor.system.calc.skills.general) }}
<tr data-skill="{{key}}"> <tr data-skill="{{key}}">
@ -166,6 +169,7 @@
</tr> </tr>
{{/unless}} {{/unless}}
{{/each}} {{/each}}
{{/unless}}
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@ -87,6 +87,7 @@
<div class="flexrow"> <div class="flexrow">
{{#each data.lernKostenZauber as |group name|}} {{#each data.lernKostenZauber as |group name|}}
{{#unless (eq group.kosten 0)}}
<span data-pp-name="{{name}}" class="pp-listing"> <span data-pp-name="{{name}}" class="pp-listing">
<label for="data.lernKostenZauber.{{name}}">{{localize (m5concat "midgard5.spell-process-" name)}}</label> <label for="data.lernKostenZauber.{{name}}">{{localize (m5concat "midgard5.spell-process-" name)}}</label>
<span > <span >
@ -95,6 +96,7 @@
<i class="fa fa-plus-circle pp-increase" style="cursor: pointer"></i> <i class="fa fa-plus-circle pp-increase" style="cursor: pointer"></i>
</span> </span>
</span> </span>
{{/unless}}
{{/each}} {{/each}}
</div> </div>
</td> </td>

View File

@ -51,7 +51,13 @@
<td> <td>
<div class="flexrow"> <div class="flexrow">
<span>{{localize "midgard5.item-weight"}}</span> <span>{{localize "midgard5.item-weight"}}</span>
<input id="data.weight" type="number" name="data.weight" value="{{data.weight}}"> <input id="data.weight" type="number" name="data.weight" value="{{data.weight}}kg">
</div>
</td>
<td>
<div class="flexrow">
<span>{{localize "midgard5.item-abw"}}</span>
<input id="data.abw" type="number" name="data.abw" value="{{data.abw}}">
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -18,6 +18,12 @@
</span> </span>
</div> </div>
</td> </td>
<td>
<div class="flexrow">
<span>{{localize "midgard5.item-abw"}}</span>
<input id="data.abw" type="number" name="data.abw" value="{{data.abw}}">
</div>
</td>
</tr> </tr>
<tr> <tr>
<td> <td>

View File

@ -55,7 +55,13 @@
<td> <td>
<div class="flexrow"> <div class="flexrow">
<span>{{localize "midgard5.item-weight"}}</span> <span>{{localize "midgard5.item-weight"}}</span>
<input id="data.weight" type="number" name="data.weight" value="{{data.weight}}"> <input id="data.weight" type="number" name="data.weight" value="{{data.weight}}kg">
</div>
</td>
<td>
<div class="flexrow">
<span>{{localize "midgard5.item-abw"}}</span>
<input id="data.abw" type="number" name="data.abw" value="{{data.abw}}">
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -37,8 +37,6 @@
<input id="data.quantity" type="number" name="data.quantity" value="{{data.quantity}}"> <input id="data.quantity" type="number" name="data.quantity" value="{{data.quantity}}">
</div> </div>
</td> </td>
</tr>
<tr>
<td colspan="4"> <td colspan="4">
<div class="flexrow"> <div class="flexrow">
<span>{{localize "midgard5.item-value"}}</span> <span>{{localize "midgard5.item-value"}}</span>
@ -53,6 +51,18 @@
</select> </select>
</div> </div>
</td> </td>
<td>
<div class="flexrow">
<span>{{localize "midgard5.item-weight"}}</span>
<input id="data.weight" type="number" name="data.weight" value="{{data.weight}}">
</div>
</td>
<td>
<div class="flexrow">
<span>{{localize "midgard5.item-abw"}}</span>
<input id="data.abw" type="number" name="data.abw" value="{{data.abw}}">
</div>
</td>
</tr> </tr>
<tr> <tr>
@ -73,12 +83,6 @@
{{/if}} {{/if}}
</div> </div>
</td> </td>
<td>
<div class="flexrow">
<span>{{localize "midgard5.item-weight"}}</span>
<input id="data.weight" type="number" name="data.weight" value="{{data.weight}}">
</div>
</td>
</tr> </tr>
</table> </table>

View File

@ -25,8 +25,10 @@
<tr> <tr>
<td>{{localize "midgard5.kampfkunst-ep"}}</td> <td>{{localize "midgard5.kampfkunst-ep"}}</td>
<td><input name="data.ep" type="text" value="{{data.ep}}" data-dtype="String" /></td> <td><input name="data.ep" type="text" value="{{data.ep}}" data-dtype="String" /></td>
{{#unless item.system.isKido}}
<td>{{localize "midgard5.kampfkunst-rank"}}</td> <td>{{localize "midgard5.kampfkunst-rank"}}</td>
<td><input name="data.rank" type="text" value="{{data.rank}}" data-dtype="String" /></td> <td><input name="data.rank" type="number" value="{{data.rank}}" data-dtype="Number" /></td>
{{/unless}}
</tr> </tr>
<tr> <tr>
<td>{{localize "midgard5.kampfkunst-weapon"}}</td> <td>{{localize "midgard5.kampfkunst-weapon"}}</td>
@ -83,6 +85,20 @@
</td> </td>
{{/unless}} {{/unless}}
{{/unless}} {{/unless}}
{{#if item.system.isKido}}
<tr>
<td>{{localize "midgard5.kido-color"}}</td>
<td><input name="data.color" type="text" value="{{data.color}}" data-dtype="String" /></td>
<td>{{localize "midgard5.kido-style"}}</td>
<td><input name="data.style" type="text" value="{{data.style}}" data-dtype="String" /></td>
</tr>
<tr>
<td>{{localize "midgard5.kido-grade"}}</td>
<td><input name="data.grade" type="text" value="{{data.grade}}" data-dtype="String" /></td>
<td>{{localize "midgard5.kido-rank"}}</td>
<td><input name="data.rank" type="number" value="{{data.rank}}" data-dtype="Number" /></td>
</tr>
{{/if}}
</tr> </tr>
<td>{{localize "midgard5.skill"}}</td> <td>{{localize "midgard5.skill"}}</td>
<td> <td>

View File

@ -60,7 +60,13 @@
<td> <td>
<div class="flexrow"> <div class="flexrow">
<span>{{localize "midgard5.item-weight"}}</span> <span>{{localize "midgard5.item-weight"}}</span>
<input id="data.weight" type="number" name="data.weight" value="{{data.weight}}"> <input id="data.weight" type="number" name="data.weight" value="{{data.weight}}kg">
</div>
</td>
<td>
<div class="flexrow">
<span>{{localize "midgard5.item-abw"}}</span>
<input id="data.abw" type="number" name="data.abw" value="{{data.abw}}">
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -0,0 +1,4 @@
<div class="sheet-npc" style="flex: 1 0 20%" data-attribute="{{attributeId}}">
<div class="attribute-header">{{localize (m5concat "midgard5.actor-" attributeId "-long")}}</div>
<div class="attribute-value"> <input class="attribute-footer-value" name="data.attributes.{{attributeId}}.value" value="{{attribute.value}}" type="text" data-dtype="Number" /></div>
</div>

View File

@ -0,0 +1,233 @@
<div class="flexbox">
<div class="flexcolumn-3">
<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></td>
<td class="fixed-value"></td>
</tr>
<tr>
<td>{{localize "midgard5.initiative"}}</td>
<td class="fixed-value">
{{#if (isSkillInList (localizeMidgard "anfuehren") data.calc.skills.general)}}
{{skillEwInList (localizeMidgard "anfuehren") data.calc.skills.general}}
{{else}}
{{skillEw actor._id data.skills.general.anfuehren}}
{{/if}}
</td>
<td>{{localize "midgard5.actionrank"}}</td>
<td class="fixed-value"><a class="join-combat">{{data.calc.attributes.gw.value}}</a></td>
</tr>
</table>
</div>
</div>
<div class="flexcolumn-3">
<div class="flexpart" style="padding: 0 0.5rem;">
<div class="flexpart-header">{{localize "midgard5.actionrank"}}</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-3">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/magic/life/cross-worn-green.webp" class="flexpart-icon">{{localize "TYPES.Item.effect"}}</div>
<table>
<thead>
<tr>
<th class="title"><img src="/icons/svg/eye.svg" class="table-icon"></th>
<th class="title">{{localize "TYPES.Item.effect"}}</th>
<td><a class="title add-effect"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody class="items-list">
{{#each data.calc.gear.effects as |item itemId|}}
<tr data-item-id="{{itemId}}" class="items">
<td class="flexpart-img"><img src={{item.icon}} class="flexpart-icon"></td>
<td class="padding">
<span class="edit-item">{{item.label}}</span>
{{#if item.equipped}}
<span class="spell-process">{{localize "midgard5.active"}}</span>
{{#unless (or (eq item.duration.unit "") (eq item.duration.unit "limitless"))}}
<span class="spell-process">{{item.duration.time}} {{localize (concat "midgard5.time-" item.duration.unit)}}</span>
{{/unless}}
{{/if}}
</td>
{{!--{{#unless (eq item.label "Belastung")}}--}}
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
{{!--{{/unless}}--}}
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
<div class="flexcolumn-3">
<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>
<thead>
<tr>
<th class="title"><img src="/icons/svg/eye.svg" class="table-icon"></th>
<th class="title">{{localize "TYPES.Item.weapon"}}</th>
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title">{{localize "midgard5.damage"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<td><a class="title add-weapon"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody class="items-list">
{{#each data.calc.gear.weapons as |item itemId|}}
<tr data-item-id="{{itemId}}" class="item">
<td class="flexpart-img"><img src={{item.icon}} class="flexpart-icon"></td>
<td class="padding edit-item {{#if item.special}}highlight{{/if}}">{{item.label}}{{#if item.special}}(*){{/if}}</td>
<td class="fixed-value">{{item.calc.ew}}</td>
<td class="fixed-value">{{item.damageBase}}</td>
<td><button class="roll-button roll-weapon-button"></button></td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
<table>
<thead>
<tr>
<th class="title"><img src="/icons/svg/eye.svg" class="table-icon"></th>
<th class="title">{{localize "midgard5.weapon-skill"}}</th>
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th><a class="title add-combat-skill"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody class="items-list">
{{#each data.calc.skills.combat as |skill skillId|}}
<tr data-item-id="{{skillId}}" class="item">
<td class="flexpart-img"><img src={{skill.icon}} class="flexpart-icon"></td>
<td class="padding edit-item">{{skill.label}}</td>
<td class="fixed-value">{{skill.calc.ew}}</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>
{{/each}}
</tbody>
</table>
</div>
</div>
<div class="flexcolumn-3">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/skills/melee/shield-block-gray-orange.webp" class="flexpart-icon">{{localize "midgard5.defense"}}</div>
<table>
<tr height = 10px></tr>
<tr>
<td class="padding highlight">{{localize "midgard5.defense"}}</td>
<td class="center">{{add data.calc.stats.defense.value data.calc.stats.defenseBonus.value}}</td>
<td class="fixed-value"><button class="roll-button roll-defense-button"></button></td>
</tr>
<tr>
<td class="padding highlight">{{localize "midgard5.resistanceMind"}}</td>
<td class="center">{{data.calc.stats.resistanceMind.value}}</td>
<td class="fixed-value"><button class="roll-button roll-resistanceMind-button"></button></td>
</tr>
<tr>
<td class="padding highlight">{{localize "midgard5.resistanceBody"}}</td>
<td class="center">{{data.calc.stats.resistanceBody.value}}</td>
<td class="fixed-value"><button class="roll-button roll-resistanceBody-button"></button></td>
</tr>
</table>
<table>
<thead>
<tr>
<th class="title"><img src="/icons/svg/eye.svg" class="table-icon"></th>
<th class="title">{{localize "TYPES.Item.defensiveWeapon"}}</th>
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th><a class="title add-defensiveWeapon"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody class="items-list">
{{#each data.calc.gear.defensiveWeapons as |item itemId|}}
<tr data-item-id="{{itemId}}" class="item">
<td class="flexpart-img"><img src={{item.icon}} class="flexpart-icon"></td>
<td class="padding edit-item">{{item.label}}</td>
<td class="fixed-value">{{item.calc.ew}}</td>
<td><button class="roll-button roll-weapon-button"></button></td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
<table>
<thead>
<tr>
<th class="title"><img src="/icons/svg/eye.svg" class="table-icon"></th>
<th class="title">{{localize "TYPES.Item.armor"}}</th>
<th class="title">{{localize "midgard5.actor-lp-short"}}</th>
<th><a class="title add-armor"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody class="items-list">
{{#each data.calc.gear.armor as |item itemId|}}
<tr data-item-id="{{itemId}}" class="item">
<td class="flexpart-img"><img src={{item.icon}} class="flexpart-icon"></td>
<td class="padding edit-item">{{item.label}}</td>
<td class="fixed-value">{{lpProtection}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
{{#if actor.system.info.magicUsing }}
<div class="flexcolumn-3">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/magic/symbols/star-inverted-yellow.webp" class="flexpart-icon">{{localize "TYPES.Item.spell"}}</div>
<table>
<tr height = 10px></tr>
<tr>
<td class="padding highlight">{{localize "midgard5.spellCasting"}}</td>
<td class="center">{{data.calc.stats.spellCasting.value}}</td>
<td class="fixed-value"><button class="roll-button roll-defense-button"></button></td>
</tr>
</table>
<table>
<thead>
<tr>
<th class="title"><img src="/icons/svg/eye.svg" class="table-icon"></th>
<th class="title">{{localize "TYPES.Item.spell"}}</th>
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th><a class="title add-spell"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody class="items-list">
{{#each data.calc.spells as |item itemId|}}
<tr data-item-id="{{itemId}}" class="item">
<td class="flexpart-img"><img src={{item.icon}} class="flexpart-icon"></td>
<td class="padding edit-item {{#if item.special}}highlight{{/if}}">{{item.label}}{{#if item.special}}(*){{/if}}</td>
<td class="fixed-value">{{item.calc.ew}}</td>
<td><button class="roll-button roll-weapon-button"></button></td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
{{/if}}
</div>

View File

@ -0,0 +1,18 @@
<div class="flexbox">
<div class="flexcolumn-1">
<div class="flexpart" style="height: 250px;">
<div class="flexpart-header"><img src="icons/environment/wilderness/mine-interior-dungeon-door.webp" class="flexpart-icon" />{{localize "midgard5.description"}}</div>
<br />
<div class="biography">{{editor data.info.description target="data.info.description" button=true owner=owner editable=editable}}</div>
</div>
</div>
<div class="flexcolumn-1">
<div class="flexpart" style="height: 250px;">
<div class="flexpart-header"><img src="icons/environment/people/group.webp" class="flexpart-icon" />{{localize "midgard5.background"}}</div>
<br />
<div class="biography">{{editor data.info.background target="data.info.background" button=true owner=owner editable=editable}}</div>
</div>
</div>
</div>

View File

@ -0,0 +1,127 @@
<form class="actor-sheet {{cssClass}}" autocomplete="off">
<header class="flexbox" style="background-color: beige; padding: 5px; border: 2px solid black;">
<!-- Logo -->
<div class="flexcolumn-5" style="height: 200px;">
<img class="profile-img" src="/systems/midgard5/assets/icons/backgrounds/bg1.webp" alt="Midgard">
</div>
<!-- Name, Class, Level, Race, Occupation -->
<div class="flexcolumn-2" style="margin:0px 5px 0px 5px;">
<table class="bordered">
<tr>
<td >{{localize "midgard5.actor-name"}}</td>
<td colspan="3"><input name="name" type="text" value="{{actor.name}}" data-dtype="String" /></td>
</tr>
<tr>
<td >{{localize "midgard5.class"}}</td>
<td ><input name="data.info.npc-class" type="text" value="{{data.info.npc-class}}" data-dtype="String" /></td>
<td >{{localize "midgard5.level"}}</td>
<td>{{data.calc.level}}</td>
</table>
<table style="font-weight: bold;">
<tr height = 10px></tr>
<tr>
<td ><input name="data.info.race" type="text" value="{{data.info.race}}" data-dtype="String" /></td>
<td ><input name="data.info.occupation" type="text" value="{{data.info.occupation}}" data-dtype="String" /></td>
</tr>
<tr>
<td style="text-align: center; font-size: small">{{localize "midgard5.race"}}</td>
<td style="text-align: center; font-size: small">{{localize "midgard5.occupation"}}</td>
</tr>
</table>
<table style="width: 100%;">
<tr>
<td class="attribute-value roll-attribute-button" data-attribute="st" data-value="{{data.calc.attributes.st.value}}">{{data.calc.attributes.st.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="gs" data-value="{{data.calc.attributes.gs.value}}">{{data.calc.attributes.gs.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="gw" data-value="{{data.calc.attributes.gw.value}}">{{data.calc.attributes.gw.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="ko" data-value="{{data.calc.attributes.ko.value}}">{{data.calc.attributes.ko.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="in" data-value="{{data.calc.attributes.in.value}}">{{data.calc.attributes.in.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="zt" data-value="{{data.calc.attributes.zt.value}}">{{data.calc.attributes.zt.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="au" data-value="{{data.calc.attributes.au.value}}">{{data.calc.attributes.au.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="pa" data-value="{{data.calc.attributes.pa.value}}">{{data.calc.attributes.pa.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="wk" data-value="{{data.calc.attributes.wk.value}}">{{data.calc.attributes.wk.value}}</td>
<td class="attribute-value roll-attribute-button" data-attribute="git" data-value="{{data.calc.stats.poisonResistance.value}}">{{data.calc.stats.poisonResistance.value}}</td>
</tr>
<tr>
<td class="attribute">{{localize "midgard5.actor-st"}}</td>
<td class="attribute">{{localize "midgard5.actor-gs"}}</td>
<td class="attribute">{{localize "midgard5.actor-gw"}}</td>
<td class="attribute">{{localize "midgard5.actor-ko"}}</td>
<td class="attribute">{{localize "midgard5.actor-in"}}</td>
<td class="attribute">{{localize "midgard5.actor-zt"}}</td>
<td class="attribute">{{localize "midgard5.actor-au"}}</td>
<td class="attribute">{{localize "midgard5.actor-pa"}}</td>
<td class="attribute">{{localize "midgard5.actor-wk"}}</td>
<td class="attribute">{{localize "midgard5.actor-git"}}</td>
</tr>
</table>
</div>
<!-- Profilbild -->
<div class="flexcolumn-5" style="height: 200px;text-align: center;" >
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" />
</div>
<!-- LP + AP -->
<div class="flexcolumn-1">
<table>
<tr>
<td><b>{{localize "midgard5.actor-lp-short"}}</b></td>
<td colspan="9">
<div class="health-bar">
<input name="data.lp.value" type="text" value="{{data.lp.value}}" data-dtype="Number" />
{{#times data.lp.max}}
{{#if (lt this ../data.lp.value)}}
<div class="lp-bar-item update-lp" data-value="{{this}}"></div>
{{else}}
<div class="lp-bar-item-empty update-lp" data-value="{{this}}"></div>
{{/if}}
{{/times}}
<div class="max-value">{{data.lp.max}}</div>
</div>
</td>
</tr>
<tr>
<td><b>{{localize "midgard5.actor-ap-short"}}</b></td>
<td colspan="9">
<div class="health-bar">
<input name="data.ap.value" type="text" value="{{data.ap.value}}" data-dtype="Number" />
{{#times data.ap.max}}
{{#if (lt this ../data.ap.value)}}
<div class="ap-bar-item update-ap" data-value="{{this}}"></div>
{{else}}
<div class="ap-bar-item-empty update-ap" data-value="{{this}}"></div>
{{/if}}
{{/times}}
<div class="max-value">{{data.ap.max}}</div>
</div>
</td>
</tr>
</table>
</div>
</header>
{{!-- Character Sheet Navigation --}}
<nav class="sheet-navigation tabs" data-group="primary">
<a class="item active" data-tab="combat">{{ localize "midgard5.combat" }}</a>
<a class="item" data-tab="properties">{{ localize "midgard5.attributes" }}</a>
<a class="item" data-tab="description">{{ localize "midgard5.description" }}</a>
</nav>
<section class="sheet-content">
<div class="tab combat flexcol" data-group="primary" data-tab="combat">
{{> "systems/midgard5/templates/sheets/npc/combat.hbs"}}
</div>
<div class="tab properties flexcol" data-group="primary" data-tab="properties">
{{> "systems/midgard5/templates/sheets/npc/properties.hbs"}}
</div>
<div class="tab description flexcol" data-group="primary" data-tab="description">
{{> "systems/midgard5/templates/sheets/npc/description.hbs"}}
</div>
</section>
</form>

View File

@ -0,0 +1,117 @@
<div class="flexbox">
<div class="flexcolumn-1">
<div class="flexpart-header"><img src="icons/skills/melee/maneuver-sword-katana-yellow.webp" class="flexpart-icon">{{localize "midgard5.attributes"}}</div>
<div class="flexpart">
<div class="attributes">
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="st" attribute=data.attributes.st}}
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="gs" attribute=data.attributes.gs}}
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="gw" attribute=data.attributes.gw}}
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="ko" attribute=data.attributes.ko}}
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="in" attribute=data.attributes.in}}
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="zt" attribute=data.attributes.zt}}
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="au" attribute=data.attributes.au}}
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="pa" attribute=data.attributes.pa}}
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="wk" attribute=data.attributes.wk}}
{{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="git" attribute=data.attributes.git}}
<div class="sheet-npc">
<div class="attribute-header">{{localize "midgard5.movementRange"}}</div>
<div class="attribute-value"><input name="data.movement" type="text" value="{{data.movement}}" data-dtype="Number" /></div>
</div>
<div class="sheet-npc">
<div class="attribute-header">{{localize "midgard5.exp-overall"}}</div>
<div class="attribute-value"><input name="data.es" type="text" value="{{data.es}}" data-dtype="Number" /></div>
</div>
<div class="sheet-npc">
<div class="attribute-header">{{localize "midgard5.actor-lp-short"}} {{localize "midgard5.maximum"}}</div>
<div class="attribute-value"><input name="data.lp.max" type="text" value="{{data.lp.max}}" data-dtype="Number" /></div>
</div>
<div class="sheet-npc">
<div class="attribute-header">{{localize "midgard5.actor-ap-short"}} {{localize "midgard5.maximum"}}</div>
<div class="attribute-value"><input name="data.ap.max" type="text" value="{{data.ap.max}}" data-dtype="Number" /></div>
</div>
<div class="sheet-npc">
<div class="attribute-header">{{localize "midgard5.magicUsing"}}</div>
<div class="attribute-value"><input id="data.info.magicUsing" type="checkbox" name="data.info.magicUsing" {{checked data.info.magicUsing}}></div>
</div>
</div>
</div>
</div>
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/sundries/gaming/dice-pair-white-green.webp" class="flexpart-icon">{{localize "midgard5.skills"}}</div>
<input id="data.info.showUnlearned" class="checkbox" type="checkbox" name="data.info.showUnlearned" {{checked data.info.showUnlearned}} style="float: right;">
<label for="data.info.showUnlearned" style="font-size: small; font-weight: normal; font-style: italic; float: right;">{{localize "midgard5.showUnlearned"}}&nbsp;</label>
<table>
<thead>
<tr>
<th class="title">{{localize "midgard5.skills"}}</th>
<th class="title">{{localize "midgard5.ew"}}</th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th><a class="title add-general-skill"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody>
{{#each data.calc.skills.general as |skill skillId|}}
<tr data-item-id="{{skillId}}" class="item">
<td class="padding edit-item">{{skill.label}}</td>
<td class="fixed-value"><input type="text" value="{{skill.fw}}" data-dtype="Number" /></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>
{{/each}}
{{#unless (not data.info.showUnlearned)}}
{{#each data.skills.general as |skill key|}}
{{#unless (isSkillInList (localizeMidgard key) ../actor.system.calc.skills.general) }}
<tr data-skill="{{key}}">
<td class="padding" style="font-style: italic;">{{localizeMidgard key}}</td>
<td class="fixed-value"><input type="text" value="{{skill.fw}}" data-dtype="Number" /></td>
<td><button class="roll-button roll-general-button"></button></td>
<td><a class="learn-button" title="Learn Skill"><i class="fa-regular fa-plus"></i></a></td>
</tr>
{{/unless}}
{{/each}}
{{/unless}}
</tbody>
</table>
</div>
</div>
<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>
<th class="title"><img src="/icons/svg/eye.svg" class="table-icon"></th>
<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>
<td><a class="title add-item"><i class="fa-regular fa-plus"></i></a></th>
</tr>
</thead>
<tbody class="items-list">
<tr height = 10px></tr>
{{#each data.calc.gear.items as |item itemId|}}
<tr data-item-id="{{itemId}}" class="item">
<td class="flexpart-img"><img src={{item.icon}} class="flexpart-icon"></td>
<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><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
</div>