Merge branch 'develop' into entbehrungen
This commit is contained in:
commit
2203a96176
33
lang/de.json
33
lang/de.json
|
|
@ -181,7 +181,11 @@
|
||||||
"midgard5.meditieren": "Meditieren",
|
"midgard5.meditieren": "Meditieren",
|
||||||
"midgard5.menschenkenntnis": "Menschenkenntnis",
|
"midgard5.menschenkenntnis": "Menschenkenntnis",
|
||||||
"midgard5.meucheln": "Meucheln",
|
"midgard5.meucheln": "Meucheln",
|
||||||
"midgard5.musizieren": "Musizieren",
|
"midgard5.musizierenFloete": "Musizieren (Flöten)",
|
||||||
|
"midgard5.musizierenBlas": "Musizieren (Blasinstrumente)",
|
||||||
|
"midgard5.musizierenRythmus": "Musizieren (Rythmusinstrumente)",
|
||||||
|
"midgard5.musizierenStreich": "Musizieren (Streichinstrumente)",
|
||||||
|
"midgard5.musizierenZupf": "Musizieren (Zupfinstrumente)",
|
||||||
"midgard5.naturkunde": "Naturkunde",
|
"midgard5.naturkunde": "Naturkunde",
|
||||||
"midgard5.ninjutsu": "NinJutsu",
|
"midgard5.ninjutsu": "NinJutsu",
|
||||||
"midgard5.orakelkunst": "Orakelkunst",
|
"midgard5.orakelkunst": "Orakelkunst",
|
||||||
|
|
@ -284,29 +288,36 @@
|
||||||
"midgard5.damage": "Schaden",
|
"midgard5.damage": "Schaden",
|
||||||
|
|
||||||
"midgard5.spell-process-none": "Ohne",
|
"midgard5.spell-process-none": "Ohne",
|
||||||
|
"midgard5.spell-process-artefakte": "Artefakte",
|
||||||
"midgard5.spell-process-beherrschen": "Beherrschen",
|
"midgard5.spell-process-beherrschen": "Beherrschen",
|
||||||
"midgard5.spell-process-bewegen": "Bewegen",
|
"midgard5.spell-process-bewegen": "Bewegen",
|
||||||
"midgard5.spell-process-blutzauber": "Blutmagie",
|
"midgard5.spell-process-beschwoeren": "Beschwören",
|
||||||
|
"midgard5.spell-process-blutmagie": "Blutmagie",
|
||||||
"midgard5.spell-process-chaoswunder": "Chaoswunder",
|
"midgard5.spell-process-chaoswunder": "Chaoswunder",
|
||||||
|
"midgard5.spell-process-dweomer": "Dweomer",
|
||||||
"midgard5.spell-process-erkennen": "Erkennen",
|
"midgard5.spell-process-erkennen": "Erkennen",
|
||||||
"midgard5.spell-process-erschaffen": "Erschaffen",
|
"midgard5.spell-process-erschaffen": "Erschaffen",
|
||||||
|
"midgard5.spell-process-erhaltung": "Erhaltung",
|
||||||
"midgard5.spell-process-formen": "Formen",
|
"midgard5.spell-process-formen": "Formen",
|
||||||
"midgard5.spell-process-finstere_magie": "Finstere Magie",
|
"midgard5.spell-process-finstere_magie": "Finstere Magie",
|
||||||
"midgard5.spell-process-veraendern": "Verändern",
|
"midgard5.spell-process-kampfverse": "Kampfverse",
|
||||||
"midgard5.spell-process-zerstoeren": "Zerstören",
|
"midgard5.spell-process-namensmagie": "Namensmagie",
|
||||||
"midgard5.spell-process-wundertat": "Wundertat",
|
|
||||||
"midgard5.spell-process-dweomer": "Dweomer",
|
|
||||||
"midgard5.spell-process-wilder_Dweomer": "Wilder Dweomer",
|
|
||||||
"midgard5.spell-process-zauberlied": "Zauberlied",
|
|
||||||
"midgard5.spell-process-salz": "Salz",
|
|
||||||
"midgard5.spell-process-thaumagraphie": "Thaumagraphie",
|
|
||||||
"midgard5.spell-process-beschwoeren": "Beschwören",
|
|
||||||
"midgard5.spell-process-nekromantie": "Nekromantie",
|
"midgard5.spell-process-nekromantie": "Nekromantie",
|
||||||
|
"midgard5.spell-process-runenstaebe": "Runenstäbe",
|
||||||
"midgard5.spell-process-thaumatherapie": "Thaumatherapie",
|
"midgard5.spell-process-thaumatherapie": "Thaumatherapie",
|
||||||
|
"midgard5.spell-process-veraendern": "Verändern",
|
||||||
|
"midgard5.spell-process-vigilsignien": "Vigilsignien",
|
||||||
|
"midgard5.spell-process-wundertat": "Wundertat",
|
||||||
|
"midgard5.spell-process-wilder_dweomer": "Wilder Dweomer",
|
||||||
|
"midgard5.spell-process-zerstoeren": "Zerstören",
|
||||||
|
"midgard5.spell-process-zauberlied": "Zauberlieder",
|
||||||
|
"midgard5.spell-process-zaubersalz": "Zaubersalze",
|
||||||
"midgard5.spell-process-zaubermittel": "Zaubermittel",
|
"midgard5.spell-process-zaubermittel": "Zaubermittel",
|
||||||
"midgard5.spell-process-zauberschutz": "Zauberschutz",
|
"midgard5.spell-process-zauberschutz": "Zauberschutz",
|
||||||
"midgard5.spell-process-zauberrunen": "Zauberrunen",
|
"midgard5.spell-process-zauberrunen": "Zauberrunen",
|
||||||
"midgard5.spell-process-zaubersiegel": "Zaubersiegel",
|
"midgard5.spell-process-zaubersiegel": "Zaubersiegel",
|
||||||
|
"midgard5.spell-process-zaubertaenze": "Zaubertänze",
|
||||||
|
"midgard5.spell-process-zauberblaetter": "Zauberblätter",
|
||||||
|
|
||||||
"midgard5.spell-type-gedanke": "Gedanke",
|
"midgard5.spell-type-gedanke": "Gedanke",
|
||||||
"midgard5.spell-type-geste": "Geste",
|
"midgard5.spell-type-geste": "Geste",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,110 @@
|
||||||
|
/* global Handlebars, game, TextEditor, WOD5E */
|
||||||
|
|
||||||
|
import { M5Skill } from "./module/M5Base";
|
||||||
|
import { M5Character } from "./module/actors/M5Character";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define any helpers necessary for working with Handlebars
|
||||||
|
* @return {Promise}
|
||||||
|
*/
|
||||||
|
export const loadHelpers = async function () {
|
||||||
|
Handlebars.registerHelper("times", (n: number, block) => {
|
||||||
|
var accum = "";
|
||||||
|
for (let i = 0; i < n; ++i) accum += block.fn(i);
|
||||||
|
return accum;
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("array", (arr: any[], index: number) => {
|
||||||
|
return arr[index];
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("m5concat", (...values) => {
|
||||||
|
const options = values.pop();
|
||||||
|
const join = options.hash?.join || "";
|
||||||
|
//return new Handlebars.SafeString(values.join(join));
|
||||||
|
return values.map((val) => val.toString()).join(join);
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("add", (...values) => {
|
||||||
|
const options = values.pop();
|
||||||
|
return values.reduce((prev, cur) => prev + cur);
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("localizeMidgard", (str: string) => {
|
||||||
|
const template = Handlebars.compile("{{localize value}}");
|
||||||
|
return template({
|
||||||
|
value: "midgard5." + str,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("skillBonus", (actorId: string, skill: M5Skill) => {
|
||||||
|
const actor = (game as Game).actors.get(actorId) as M5Character;
|
||||||
|
return actor.skillBonus(skill).toString();
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("skillEw", (actorId: string, skill: M5Skill) => {
|
||||||
|
const actor = (game as Game).actors.get(actorId) as M5Character;
|
||||||
|
return actor.skillEw(skill).toString();
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("skill", (skillId: string) => {
|
||||||
|
return (game as Game).items.get(skillId);
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("itemValue", (id: string, path: string) => {
|
||||||
|
let obj = (game as Game).items.get(id);
|
||||||
|
path.split(".").forEach((p) => (obj = obj[p]));
|
||||||
|
return `${obj}`;
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("actorItemValue", (actorId: any, itemId: string, path: string, token?: boolean) => {
|
||||||
|
//console.log("actorItemValue", actorId, itemId, path)
|
||||||
|
const actor = (game as Game).actors.get(actorId);
|
||||||
|
let obj = actor.items.get(itemId)?.system;
|
||||||
|
path.split(".").forEach((p) => {
|
||||||
|
if (obj) obj = obj[p];
|
||||||
|
});
|
||||||
|
return `${obj}`;
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("icon", (relpath: string) => {
|
||||||
|
return `systems/midgard5/assets/icons/${relpath}`;
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("isSkillInList", (skillName: string, list: any) => {
|
||||||
|
for (let key in list) {
|
||||||
|
if (list[key]?.label?.toLowerCase() === skillName?.toLowerCase()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("skillEwInList", (skillName: string, list: any) => {
|
||||||
|
for (let key in list) {
|
||||||
|
if (list[key]?.label?.toLowerCase() === skillName?.toLowerCase()) {
|
||||||
|
return list[key].calc.ew;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("stripHtml", function (param) {
|
||||||
|
var regex = /(<([^>]+)>)/gi;
|
||||||
|
return param.replace(regex, "");
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("contains", (label: string, contains: string) => {
|
||||||
|
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;
|
||||||
|
});
|
||||||
|
};
|
||||||
107
source/index.ts
107
source/index.ts
|
|
@ -2,112 +2,17 @@ import Logger from "./utils/Logger";
|
||||||
import M5CharacterSheet from "./module/sheets/M5CharacterSheet";
|
import M5CharacterSheet from "./module/sheets/M5CharacterSheet";
|
||||||
import preloadTemplates from "./PreloadTemplates";
|
import preloadTemplates from "./PreloadTemplates";
|
||||||
import { M5Character } from "./module/actors/M5Character";
|
import { M5Character } from "./module/actors/M5Character";
|
||||||
import { M5ItemMod, M5ModOperation, M5Skill, M5TimeUnit } from "./module/M5Base";
|
import { M5ModOperation, M5TimeUnit } from "./module/M5Base";
|
||||||
import { M5ItemSheet } from "./module/sheets/M5ItemSheet";
|
import { M5ItemSheet } from "./module/sheets/M5ItemSheet";
|
||||||
import { M5Item } from "./module/items/M5Item";
|
import { M5Item } from "./module/items/M5Item";
|
||||||
|
import { loadHelpers } from "./helpers";
|
||||||
|
import { loadSettings } from "./settings";
|
||||||
|
|
||||||
Hooks.once("init", async () => {
|
Hooks.once("init", async () => {
|
||||||
Logger.log("M5 | Initialisierung Midgard 5");
|
Logger.log("M5 | Initialisierung Midgard 5");
|
||||||
|
|
||||||
Handlebars.registerHelper("times", (n: number, block) => {
|
// Load settings into Foundry
|
||||||
var accum = "";
|
loadSettings();
|
||||||
for (let i = 0; i < n; ++i) accum += block.fn(i);
|
|
||||||
return accum;
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("array", (arr: any[], index: number) => {
|
|
||||||
return arr[index];
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("m5concat", (...values) => {
|
|
||||||
const options = values.pop();
|
|
||||||
const join = options.hash?.join || "";
|
|
||||||
//return new Handlebars.SafeString(values.join(join));
|
|
||||||
return values.map((val) => val.toString()).join(join);
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("add", (...values) => {
|
|
||||||
const options = values.pop();
|
|
||||||
return values.reduce((prev, cur) => prev + cur);
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("localizeMidgard", (str: string) => {
|
|
||||||
const template = Handlebars.compile("{{localize value}}");
|
|
||||||
return template({
|
|
||||||
value: "midgard5." + str,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("skillBonus", (actorId: string, skill: M5Skill) => {
|
|
||||||
const actor = (game as Game).actors.get(actorId) as M5Character;
|
|
||||||
return actor.skillBonus(skill).toString();
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("skillEw", (actorId: string, skill: M5Skill) => {
|
|
||||||
const actor = (game as Game).actors.get(actorId) as M5Character;
|
|
||||||
return actor.skillEw(skill).toString();
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("skill", (skillId: string) => {
|
|
||||||
return (game as Game).items.get(skillId);
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("itemValue", (id: string, path: string) => {
|
|
||||||
let obj = (game as Game).items.get(id);
|
|
||||||
path.split(".").forEach((p) => (obj = obj[p]));
|
|
||||||
return `${obj}`;
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("actorItemValue", (actorId: any, itemId: string, path: string, token?: boolean) => {
|
|
||||||
//console.log("actorItemValue", actorId, itemId, path)
|
|
||||||
const actor = (game as Game).actors.get(actorId);
|
|
||||||
let obj = actor.items.get(itemId)?.system;
|
|
||||||
path.split(".").forEach((p) => {
|
|
||||||
if (obj) obj = obj[p];
|
|
||||||
});
|
|
||||||
return `${obj}`;
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("icon", (relpath: string) => {
|
|
||||||
return `systems/midgard5/assets/icons/${relpath}`;
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("isSkillInList", (skillName: string, list: any) => {
|
|
||||||
for (let key in list) {
|
|
||||||
if (list[key]?.label?.toLowerCase() === skillName?.toLowerCase()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("skillEwInList", (skillName: string, list: any) => {
|
|
||||||
for (let key in list) {
|
|
||||||
if (list[key]?.label?.toLowerCase() === skillName?.toLowerCase()) {
|
|
||||||
return list[key].calc.ew;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("stripHtml", function (param) {
|
|
||||||
var regex = /(<([^>]+)>)/gi;
|
|
||||||
return param.replace(regex, "");
|
|
||||||
});
|
|
||||||
|
|
||||||
Handlebars.registerHelper("contains", (label: string, contains: string) => {
|
|
||||||
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
|
// Default Sheet für Items definieren und das Standardsheet deaktivieren
|
||||||
Items.unregisterSheet("core", ItemSheet);
|
Items.unregisterSheet("core", ItemSheet);
|
||||||
|
|
@ -121,6 +26,8 @@ Hooks.once("init", async () => {
|
||||||
CONFIG.Item.documentClass = M5Item;
|
CONFIG.Item.documentClass = M5Item;
|
||||||
//RegisterSettings();
|
//RegisterSettings();
|
||||||
await preloadTemplates();
|
await preloadTemplates();
|
||||||
|
|
||||||
|
loadHelpers();
|
||||||
});
|
});
|
||||||
|
|
||||||
Hooks.once("setup", () => {
|
Hooks.once("setup", () => {
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ export interface M5RollData {
|
||||||
c: any;
|
c: any;
|
||||||
i: any;
|
i: any;
|
||||||
iType: string;
|
iType: string;
|
||||||
rolls: {};
|
rolls: any;
|
||||||
res: {
|
res: {
|
||||||
label: string;
|
label: string;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,5 @@
|
||||||
import { M5Item } from "../items/M5Item";
|
import { M5Item } from "../items/M5Item";
|
||||||
import {
|
import { M5Attribute, M5CharacterCalculatedData, M5ItemMod, M5ItemType, M5ModOperation, M5ModResult, M5RollData, M5Skill, M5SkillCalculated } from "../M5Base";
|
||||||
M5Attribute,
|
|
||||||
M5CharacterCalculatedData,
|
|
||||||
M5ItemMod,
|
|
||||||
M5ItemType,
|
|
||||||
M5ModOperation,
|
|
||||||
M5ModResult,
|
|
||||||
M5ModType,
|
|
||||||
M5RollData,
|
|
||||||
M5Skill,
|
|
||||||
M5SkillCalculated,
|
|
||||||
M5SkillLearned,
|
|
||||||
M5SkillType,
|
|
||||||
} from "../M5Base";
|
|
||||||
import M5ModAggregate from "./M5ModAggregate";
|
import M5ModAggregate from "./M5ModAggregate";
|
||||||
export class M5Character extends Actor {
|
export class M5Character extends Actor {
|
||||||
// constructor(
|
// constructor(
|
||||||
|
|
@ -94,6 +81,7 @@ export class M5Character extends Actor {
|
||||||
containers?: boolean;
|
containers?: boolean;
|
||||||
kampfkuenste?: boolean;
|
kampfkuenste?: boolean;
|
||||||
encumbrance?: boolean;
|
encumbrance?: boolean;
|
||||||
|
class?: boolean;
|
||||||
} = {}
|
} = {}
|
||||||
): M5CharacterCalculatedData {
|
): M5CharacterCalculatedData {
|
||||||
let ret: M5CharacterCalculatedData = {
|
let ret: M5CharacterCalculatedData = {
|
||||||
|
|
@ -193,12 +181,8 @@ export class M5Character extends Actor {
|
||||||
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.movement = this.modResult(data.movement);
|
||||||
ret.stats.resistanceMind = this.modResult(
|
ret.stats.resistanceMind = this.modResult(ret.stats.defense.value + (data.info.race === "Mensch" ? ret.attributes.in.bonus : this.raceBonus(data.info.race)));
|
||||||
(data.info.magicUsing ? 2 : 0) + 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(
|
|
||||||
(data.info.magicUsing ? 2 : 1) + 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);
|
||||||
ret.stats.brawl = this.modResult(Math.floor((ret.attributes.st.value + ret.attributes.gw.value) / 20));
|
ret.stats.brawl = this.modResult(Math.floor((ret.attributes.st.value + ret.attributes.gw.value) / 20));
|
||||||
ret.stats.brawlFw = ret.stats.brawl.value + ret.stats.attackBonus.value + (data.info.race === "Zwerg" ? 1 : 0);
|
ret.stats.brawlFw = ret.stats.brawl.value + ret.stats.attackBonus.value + (data.info.race === "Zwerg" ? 1 : 0);
|
||||||
|
|
@ -221,7 +205,7 @@ export class M5Character extends Actor {
|
||||||
const aggregate = new M5ModAggregate(data, ret);
|
const aggregate = new M5ModAggregate(data, ret);
|
||||||
|
|
||||||
context.items
|
context.items
|
||||||
?.filter((item) => (item.type === "item" || item.type === "effect" || item.type === "armor" || item.type === "container") && item.system.equipped)
|
?.filter((item) => (item.type === "item" || item.type === "effect" || item.type === "armor" || item.type === "container" || item.type === "class") && item.system.equipped)
|
||||||
.forEach((item) => {
|
.forEach((item) => {
|
||||||
const mods = item.system.mods;
|
const mods = item.system.mods;
|
||||||
//console.log("Actor item mods", mods)
|
//console.log("Actor item mods", mods)
|
||||||
|
|
@ -498,6 +482,25 @@ export class M5Character extends Actor {
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!skip?.class) {
|
||||||
|
context.items
|
||||||
|
?.filter((item) => item.type === "class")
|
||||||
|
.sort((a, b) => b?.system.magicUsing - a?.system.magicUsing)
|
||||||
|
.forEach((item, index) => {
|
||||||
|
if (index !== 0) {
|
||||||
|
item.system.equipped = false;
|
||||||
|
} else {
|
||||||
|
item.system.equipped = true;
|
||||||
|
data.info.magicUsing = item.system.magicUsing;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof data.info.class === "string") {
|
||||||
|
data.info.class = {};
|
||||||
|
}
|
||||||
|
data.info.class[item.id] = item.name;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!skip?.effects) {
|
if (!skip?.effects) {
|
||||||
context.items
|
context.items
|
||||||
?.filter((item) => item.type === "effect")
|
?.filter((item) => item.type === "effect")
|
||||||
|
|
@ -579,7 +582,7 @@ export class M5Character extends Actor {
|
||||||
type: item.system.type,
|
type: item.system.type,
|
||||||
castDuration: item.system.castDuration || 0,
|
castDuration: item.system.castDuration || 0,
|
||||||
ap: item.system.ap || 0,
|
ap: item.system.ap || 0,
|
||||||
range: item.system.range|| 0,
|
range: item.system.range || 0,
|
||||||
effectTarget: item.system.effectTarget,
|
effectTarget: item.system.effectTarget,
|
||||||
effectArea: item.system.effectArea,
|
effectArea: item.system.effectArea,
|
||||||
effectDuration: item.system.effectDuration || 0,
|
effectDuration: item.system.effectDuration || 0,
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export class M5Item extends Item {
|
||||||
calc.containers = null;
|
calc.containers = null;
|
||||||
|
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = actor.derivedData({ containers: false, items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true });
|
const actorCalc = actor.derivedData({ containers: false, items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true, class: true });
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
calc.containers = actorCalc.gear.containers;
|
calc.containers = actorCalc.gear.containers;
|
||||||
}
|
}
|
||||||
|
|
@ -47,12 +47,14 @@ export class M5Item extends Item {
|
||||||
|
|
||||||
if (character) {
|
if (character) {
|
||||||
const actorCalc = character.derivedData({
|
const actorCalc = character.derivedData({
|
||||||
|
containers: true,
|
||||||
skills: true,
|
skills: true,
|
||||||
items: true,
|
items: true,
|
||||||
spells: true,
|
spells: true,
|
||||||
effects: true,
|
effects: true,
|
||||||
kampfkuenste: true,
|
kampfkuenste: true,
|
||||||
encumbrance: true,
|
encumbrance: true,
|
||||||
|
class: true,
|
||||||
});
|
});
|
||||||
if (actorCalc?.skillMods && Object.keys(actorCalc.skillMods).indexOf(itemId) !== -1) {
|
if (actorCalc?.skillMods && Object.keys(actorCalc.skillMods).indexOf(itemId) !== -1) {
|
||||||
pairs = pairs.concat(actorCalc.skillMods[itemId]);
|
pairs = pairs.concat(actorCalc.skillMods[itemId]);
|
||||||
|
|
@ -89,7 +91,7 @@ export class M5Item extends Item {
|
||||||
calc.containers = null;
|
calc.containers = null;
|
||||||
|
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = character.derivedData({ items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true });
|
const actorCalc = character.derivedData({ items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true, class: true });
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
calc.ew += actorCalc.stats.attackBonus.value;
|
calc.ew += actorCalc.stats.attackBonus.value;
|
||||||
calc.combatSkills = actorCalc.skills.combat;
|
calc.combatSkills = actorCalc.skills.combat;
|
||||||
|
|
@ -124,7 +126,7 @@ export class M5Item extends Item {
|
||||||
calc.containers = null;
|
calc.containers = null;
|
||||||
|
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = character.derivedData({ items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true });
|
const actorCalc = character.derivedData({ items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true, class: true });
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
calc.ew += actorCalc.stats.defense.value + actorCalc.stats.defenseBonus.value;
|
calc.ew += actorCalc.stats.defense.value + actorCalc.stats.defenseBonus.value;
|
||||||
calc.combatSkills = actorCalc.skills.combat;
|
calc.combatSkills = actorCalc.skills.combat;
|
||||||
|
|
@ -157,7 +159,7 @@ export class M5Item extends Item {
|
||||||
itemData.mods[5] = { type: "stat", id: "apProtection", operation: "set", value: itemData.apProtection };
|
itemData.mods[5] = { type: "stat", id: "apProtection", operation: "set", value: itemData.apProtection };
|
||||||
calc.containers = null;
|
calc.containers = null;
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = actor.derivedData({ items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true });
|
const actorCalc = actor.derivedData({ items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true, class: true });
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
calc.containers = actorCalc.gear.containers;
|
calc.containers = actorCalc.gear.containers;
|
||||||
}
|
}
|
||||||
|
|
@ -171,7 +173,7 @@ export class M5Item extends Item {
|
||||||
} else if (itemType === "spell") {
|
} else if (itemType === "spell") {
|
||||||
calc.fw = 0;
|
calc.fw = 0;
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = character.derivedData({ items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true });
|
const actorCalc = character.derivedData({ containers: true, items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true, class: true });
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
calc.ew = actorCalc.stats.spellCasting.value;
|
calc.ew = actorCalc.stats.spellCasting.value;
|
||||||
}
|
}
|
||||||
|
|
@ -183,7 +185,7 @@ export class M5Item extends Item {
|
||||||
calc.generalSkills = null;
|
calc.generalSkills = null;
|
||||||
|
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = character.derivedData({ items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true });
|
const actorCalc = character.derivedData({ containers: true, items: true, spells: true, effects: true, kampfkuenste: true, encumbrance: true, class: true });
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
calc.generalSkills = actorCalc.skills.general;
|
calc.generalSkills = actorCalc.skills.general;
|
||||||
}
|
}
|
||||||
|
|
@ -197,6 +199,9 @@ export class M5Item extends Item {
|
||||||
itemData.rolls.formulas[0].label = skill.name;
|
itemData.rolls.formulas[0].label = skill.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (itemType === "class") {
|
||||||
|
itemData.mods[0] = { type: "stat", id: "resistanceBody", operation: "add", value: itemData.resistanceBody };
|
||||||
|
itemData.mods[1] = { type: "stat", id: "resistanceMind", operation: "add", value: itemData.resistanceMind };
|
||||||
}
|
}
|
||||||
if (itemData?.mods) {
|
if (itemData?.mods) {
|
||||||
calc.mods = {};
|
calc.mods = {};
|
||||||
|
|
@ -318,7 +323,7 @@ export class M5Item extends Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const roll = new M5Roll(rollData, this.actor, item.name);
|
const roll = new M5Roll(rollData, this.actor, item.name, item.id);
|
||||||
return roll.toMessage();
|
return roll.toMessage();
|
||||||
} else {
|
} else {
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ 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) {
|
constructor(public data: M5RollData, public actor: any, public label: string, public id?: string) {
|
||||||
//super(null)
|
//super(null)
|
||||||
//this.data = rollData
|
//this.data = rollData
|
||||||
}
|
}
|
||||||
|
|
@ -88,6 +88,50 @@ export class M5Roll {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.data.res.label = this.label;
|
this.data.res.label = this.label;
|
||||||
|
if ((game as Game).settings.get("midgard5", "automatedPP")) {
|
||||||
|
if ((this.data.i.type === "language" || this.data.i.type === "general") && this.data.rolls[0].dice[0] >= 16) {
|
||||||
|
this.actor.items.get(this.id).update({
|
||||||
|
system: {
|
||||||
|
pp: this.data.i.pp + 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else if (this.data.rolls[0].dice[0] === 20) {
|
||||||
|
if (this.data.i.type === "combat") {
|
||||||
|
// Rolling through skill
|
||||||
|
this.actor.items.get(this.id).update({
|
||||||
|
system: {
|
||||||
|
pp: this.data.i.pp + 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else if (this.data.iType === "weapon") {
|
||||||
|
// Rolling through Weapon Item
|
||||||
|
const skill = this.actor.items.get(this.data.i.skillId);
|
||||||
|
skill.update({
|
||||||
|
system: {
|
||||||
|
pp: skill.system.pp + 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else if (this.data.iType === "defensiveWeapon") {
|
||||||
|
// Rolling through defensiveWeapon Item
|
||||||
|
const skill = this.actor.items.get(this.data.i.skillId);
|
||||||
|
skill.update({
|
||||||
|
system: {
|
||||||
|
pp: skill.system.pp + 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else if (this.data.iType === "spell") {
|
||||||
|
// Rolling through Spell Item
|
||||||
|
const klasse = this.actor.items.find((x) => x.type === "class" && x.system.equipped);
|
||||||
|
klasse.update({
|
||||||
|
system: {
|
||||||
|
lernKostenZauber: {
|
||||||
|
[this.data.i.process]: { pp: klasse.system.lernKostenZauber[this.data.i.process].pp + 1 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this._evaluated = true;
|
this._evaluated = true;
|
||||||
return this;
|
return this;
|
||||||
|
|
@ -246,6 +290,23 @@ export class M5Roll {
|
||||||
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.deprivationFood"));
|
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.deprivationFood"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static cleanSpell(actor: any) {
|
||||||
|
const rollData = actor.getRollData() as M5RollData;
|
||||||
|
|
||||||
|
rollData.rolls["0"] = {
|
||||||
|
formula: "1d20 + @c.calc.stats.spellCasting.value",
|
||||||
|
enabled: true,
|
||||||
|
label: (game as Game).i18n.localize("midgard5.spellCasting"),
|
||||||
|
result: "",
|
||||||
|
total: 0,
|
||||||
|
totalStr: "",
|
||||||
|
dice: {},
|
||||||
|
css: "",
|
||||||
|
} as M5RollResult;
|
||||||
|
|
||||||
|
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.spellCasting"));
|
||||||
|
}
|
||||||
|
|
||||||
static defense(actor: any) {
|
static defense(actor: any) {
|
||||||
const rollData = actor.getRollData() as M5RollData;
|
const rollData = actor.getRollData() as M5RollData;
|
||||||
rollData.i = {
|
rollData.i = {
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,11 @@ export default class M5CharacterSheet extends ActorSheet {
|
||||||
await roll.toMessage();
|
await roll.toMessage();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
html.find(".roll-cleanSpell-button").on("click", async (event) => {
|
||||||
|
const roll = M5Roll.cleanSpell(this.actor);
|
||||||
|
await roll.toMessage();
|
||||||
|
});
|
||||||
|
|
||||||
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();
|
await roll.toMessage();
|
||||||
|
|
@ -438,6 +443,14 @@ export default class M5CharacterSheet extends ActorSheet {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
html.find(".class-item-edit").on("click", async (event) => {
|
||||||
|
this.actor.items.find((x) => x.type === "class").sheet.render(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
html.find(".class-item-delete").on("click", async (event) => {
|
||||||
|
this.actor.items.find((x) => x.type === "class").delete();
|
||||||
|
});
|
||||||
|
|
||||||
// Drag & Drop
|
// Drag & Drop
|
||||||
const dragDrop = new DragDrop({
|
const dragDrop = new DragDrop({
|
||||||
dragSelector: ".items-list .item",
|
dragSelector: ".items-list .item",
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,13 @@ export class M5ItemSheet extends ItemSheet {
|
||||||
width: 640,
|
width: 640,
|
||||||
height: 480,
|
height: 480,
|
||||||
classes: ["midgard5", "sheet", "item"],
|
classes: ["midgard5", "sheet", "item"],
|
||||||
|
tabs: [
|
||||||
|
{
|
||||||
|
navSelector: ".sheet-navigation",
|
||||||
|
contentSelector: ".sheet-content",
|
||||||
|
initial: "base_values",
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
/* global game */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define all game settings here
|
||||||
|
* @return {Promise}
|
||||||
|
*/
|
||||||
|
export const loadSettings = async function () {
|
||||||
|
(game as Game).settings.register("midgard5", "automatedPP", {
|
||||||
|
name: "Automatische Praxispunkte",
|
||||||
|
hint: "Falls aktiv, werden Praxispunkte automatisch angerechnet.",
|
||||||
|
scope: "world",
|
||||||
|
config: true,
|
||||||
|
default: true,
|
||||||
|
type: Boolean,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
@ -365,4 +365,27 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chip {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 25px;
|
||||||
|
height: 35px;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 35px;
|
||||||
|
border-radius: 25px;
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closebtn {
|
||||||
|
padding-left: 10px;
|
||||||
|
color: #888;
|
||||||
|
font-weight: bold;
|
||||||
|
float: right;
|
||||||
|
font-size: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closebtn:hover {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// main: midgard5.less
|
// main: midgard5.less
|
||||||
|
|
||||||
.midgard5.sheet.item {
|
.midgard5.sheet.item {
|
||||||
form {
|
form {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -15,10 +15,11 @@
|
||||||
}
|
}
|
||||||
.item-img {
|
.item-img {
|
||||||
height: 64px;
|
height: 64px;
|
||||||
width: 64px;
|
width: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
td, th {
|
td,
|
||||||
|
th {
|
||||||
padding: 0 0.5rem 0 0.5rem;
|
padding: 0 0.5rem 0 0.5rem;
|
||||||
|
|
||||||
&.center {
|
&.center {
|
||||||
|
|
@ -40,7 +41,7 @@
|
||||||
.col-create {
|
.col-create {
|
||||||
width: 3rem;
|
width: 3rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background: rgba(255, 255, 255, 0.5);
|
background: rgba(255, 255, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"info": {
|
"info": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"background": "",
|
"background": "",
|
||||||
"class": "",
|
"class": {},
|
||||||
"race": "",
|
"race": "",
|
||||||
"magicUsing": false,
|
"magicUsing": false,
|
||||||
"showAllItems": false,
|
"showAllItems": false,
|
||||||
|
|
@ -101,7 +101,11 @@
|
||||||
"meditieren": { "fw": 0, "attribute": "wk", "initial": 8, "pp": 0 },
|
"meditieren": { "fw": 0, "attribute": "wk", "initial": 8, "pp": 0 },
|
||||||
"menschenkenntnis": { "fw": 3, "attribute": "in", "initial": 8, "pp": 0 },
|
"menschenkenntnis": { "fw": 3, "attribute": "in", "initial": 8, "pp": 0 },
|
||||||
"meucheln": { "fw": 0, "attribute": "gs", "initial": 8, "pp": 0 },
|
"meucheln": { "fw": 0, "attribute": "gs", "initial": 8, "pp": 0 },
|
||||||
"musizieren": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
|
"musizierenFloete": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
|
||||||
|
"musizierenBlas": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
|
||||||
|
"musizierenRythmus": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
|
||||||
|
"musizierenStreich": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
|
||||||
|
"musizierenZupf": { "fw": 0, "attribute": "gs", "initial": 12, "pp": 0 },
|
||||||
"ninjutsu": { "fw": 0, "attribute": "gw", "initial": 8, "pp": 0 },
|
"ninjutsu": { "fw": 0, "attribute": "gw", "initial": 8, "pp": 0 },
|
||||||
"naturkunde": { "fw": 0, "attribute": "in", "initial": 8, "pp": 0 },
|
"naturkunde": { "fw": 0, "attribute": "in", "initial": 8, "pp": 0 },
|
||||||
"orakelkunst": { "fw": 0, "attribute": "in", "initial": 8, "pp": 0 },
|
"orakelkunst": { "fw": 0, "attribute": "in", "initial": 8, "pp": 0 },
|
||||||
|
|
@ -142,12 +146,11 @@
|
||||||
"wahrsagen": { "fw": 0, "attribute": "zt", "initial": 8, "pp": 0 },
|
"wahrsagen": { "fw": 0, "attribute": "zt", "initial": 8, "pp": 0 },
|
||||||
"wasserkampf": { "fw": 0, "attribute": "gw", "initial": 8, "pp": 0 },
|
"wasserkampf": { "fw": 0, "attribute": "gw", "initial": 8, "pp": 0 },
|
||||||
"zauberkunde": { "fw": 0, "attribute": "in", "initial": 8, "pp": 0 }
|
"zauberkunde": { "fw": 0, "attribute": "in", "initial": 8, "pp": 0 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gear": {
|
"gear": {
|
||||||
"gear": {
|
"gear": {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"character": {
|
"character": {
|
||||||
|
|
@ -156,7 +159,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"types": ["skill", "weapon", "defensiveWeapon", "armor", "spell", "kampfkunst", "item", "effect", "container"],
|
"types": ["skill", "weapon", "defensiveWeapon", "armor", "spell", "kampfkunst", "item", "effect", "container", "class"],
|
||||||
"templates": {
|
"templates": {
|
||||||
"itemDescription": {
|
"itemDescription": {
|
||||||
"description": ""
|
"description": ""
|
||||||
|
|
@ -209,11 +212,11 @@
|
||||||
"equipped": false
|
"equipped": false
|
||||||
},
|
},
|
||||||
"valuable": {
|
"valuable": {
|
||||||
"valuable": false,
|
"valuable": false,
|
||||||
"item-wealth": true
|
"item-wealth": true
|
||||||
},
|
},
|
||||||
"hoarded": {
|
"hoarded": {
|
||||||
"hoarded": false,
|
"hoarded": false,
|
||||||
"inHoard": true
|
"inHoard": true
|
||||||
},
|
},
|
||||||
"physical": {
|
"physical": {
|
||||||
|
|
@ -234,29 +237,36 @@
|
||||||
"spellSelection": {
|
"spellSelection": {
|
||||||
"spellProcessSelection": {
|
"spellProcessSelection": {
|
||||||
"none": "midgard5.spell-process-none",
|
"none": "midgard5.spell-process-none",
|
||||||
|
"artefakte": "midgard5.spell-process-artefakte",
|
||||||
"beherrschen": "midgard5.spell-process-beherrschen",
|
"beherrschen": "midgard5.spell-process-beherrschen",
|
||||||
"bewegen": "midgard5.spell-process-bewegen",
|
"bewegen": "midgard5.spell-process-bewegen",
|
||||||
"blutzauber": "midgard5.spell-process-blutzauber",
|
"beschwoeren": "midgard5.spell-process-beschwoeren",
|
||||||
|
"blutmagie": "midgard5.spell-process-blutmagie",
|
||||||
"chaoswunder": "midgard5.spell-process-chaoswunder",
|
"chaoswunder": "midgard5.spell-process-chaoswunder",
|
||||||
|
"dweomer": "midgard5.spell-process-dweomer",
|
||||||
|
"erhaltung": "midgard5.spell-process-erhaltung",
|
||||||
"erkennen": "midgard5.spell-process-erkennen",
|
"erkennen": "midgard5.spell-process-erkennen",
|
||||||
"erschaffen": "midgard5.spell-process-erschaffen",
|
"erschaffen": "midgard5.spell-process-erschaffen",
|
||||||
"formen": "midgard5.spell-process-formen",
|
"formen": "midgard5.spell-process-formen",
|
||||||
"finstere_magie": "midgard5.spell-process-finstere_magie",
|
"finstere_magie": "midgard5.spell-process-finstere_magie",
|
||||||
"veraendern": "midgard5.spell-process-veraendern",
|
"kampfverse": "midgard5.spell-process-kampfverse",
|
||||||
"zerstoeren": "midgard5.spell-process-zerstoeren",
|
"namensmagie": "midgard5.spell-process-namensmagie",
|
||||||
"wundertat": "midgard5.spell-process-wundertat",
|
|
||||||
"dweomer": "midgard5.spell-process-dweomer",
|
|
||||||
"wilder_dweomer": "midgard5.spell-process-wilder_dweomer",
|
|
||||||
"zauberlied": "midgard5.spell-process-zauberlied",
|
|
||||||
"salz": "midgard5.spell-process-salz",
|
|
||||||
"thaumagraphie": "midgard5.spell-process-thaumagraphie",
|
|
||||||
"beschwoeren": "midgard5.spell-process-beschwoeren",
|
|
||||||
"nekromantie": "midgard5.spell-process-nekromantie",
|
"nekromantie": "midgard5.spell-process-nekromantie",
|
||||||
"thaumatherapie": "midgard5.spell-process-thaumatherapie",
|
"runenstaebe": "midgard5.spell-process-zauberrunen",
|
||||||
|
"thaumatherapie": "midgard5.spell-process-runenstaebe",
|
||||||
|
"veraendern": "midgard5.spell-process-veraendern",
|
||||||
|
"vigilsignien": "midgard5.spell-process-vigilsignien",
|
||||||
|
"wilder_dweomer": "midgard5.spell-process-wilder_dweomer",
|
||||||
|
"wundertat": "midgard5.spell-process-wundertat",
|
||||||
|
"zauberblaetter": "midgard5.spell-process-zauberblaetter",
|
||||||
|
"zauberlied": "midgard5.spell-process-zauberlied",
|
||||||
"zaubermittel": "midgard5.spell-process-zaubermittel",
|
"zaubermittel": "midgard5.spell-process-zaubermittel",
|
||||||
"zauberschutz": "midgard5.spell-process-zauberschutz",
|
|
||||||
"zauberrunen": "midgard5.spell-process-zauberrunen",
|
"zauberrunen": "midgard5.spell-process-zauberrunen",
|
||||||
"zaubersiegel": "midgard5.spell-process-siegel"
|
"zaubersalz": "midgard5.spell-process-zaubersalz",
|
||||||
|
"zauberschutz": "midgard5.spell-process-zauberschutz",
|
||||||
|
"zaubersiegel": "midgard5.spell-process-zaubersiegel",
|
||||||
|
"zaubertaenze": "midgard5.spell-process-zaubertaenze",
|
||||||
|
"zerstoeren": "midgard5.spell-process-zerstoeren"
|
||||||
},
|
},
|
||||||
"spellTypeSelection": {
|
"spellTypeSelection": {
|
||||||
"gedanke": "midgard5.spell-type-gedanke",
|
"gedanke": "midgard5.spell-type-gedanke",
|
||||||
|
|
@ -292,7 +302,7 @@
|
||||||
"fechten": "midgard5.kampfkunst-variante-fechten",
|
"fechten": "midgard5.kampfkunst-variante-fechten",
|
||||||
"schusstechnik": "midgard5.kampfkunst-variante-schusstechnik",
|
"schusstechnik": "midgard5.kampfkunst-variante-schusstechnik",
|
||||||
"finten": "midgard5.kampfkunst-variante-finten",
|
"finten": "midgard5.kampfkunst-variante-finten",
|
||||||
"geistestechnik": "midgard5.kampfkunst-variante-geistestechnik",
|
"geistestechnik": "midgard5.kampfkunst-variante-geistestechnik",
|
||||||
"verteidigung": "midgard5.kampfkunst-variante-verteidigung"
|
"verteidigung": "midgard5.kampfkunst-variante-verteidigung"
|
||||||
},
|
},
|
||||||
"kidoVarianteSelection": {
|
"kidoVarianteSelection": {
|
||||||
|
|
@ -328,7 +338,7 @@
|
||||||
"calc": {}
|
"calc": {}
|
||||||
},
|
},
|
||||||
"item": {
|
"item": {
|
||||||
"templates": ["itemDescription", "equippable", "physical","valuable","hoarded"],
|
"templates": ["itemDescription", "equippable", "physical", "valuable", "hoarded"],
|
||||||
"rolls": {
|
"rolls": {
|
||||||
"formulas": {},
|
"formulas": {},
|
||||||
"output": ""
|
"output": ""
|
||||||
|
|
@ -355,7 +365,7 @@
|
||||||
"calc": {}
|
"calc": {}
|
||||||
},
|
},
|
||||||
"weapon": {
|
"weapon": {
|
||||||
"templates": ["itemDescription", "stats", "equippable", "physical","valuable","hoarded"],
|
"templates": ["itemDescription", "stats", "equippable", "physical", "valuable", "hoarded"],
|
||||||
"special": false,
|
"special": false,
|
||||||
"ranged": false,
|
"ranged": false,
|
||||||
"valuable": false,
|
"valuable": false,
|
||||||
|
|
@ -380,7 +390,7 @@
|
||||||
"calc": {}
|
"calc": {}
|
||||||
},
|
},
|
||||||
"defensiveWeapon": {
|
"defensiveWeapon": {
|
||||||
"templates": ["itemDescription", "stats", "equippable", "physical","valuable","hoarded"],
|
"templates": ["itemDescription", "stats", "equippable", "physical", "valuable", "hoarded"],
|
||||||
"special": false,
|
"special": false,
|
||||||
"valuable": false,
|
"valuable": false,
|
||||||
"hoarded": false,
|
"hoarded": false,
|
||||||
|
|
@ -398,7 +408,7 @@
|
||||||
"calc": {}
|
"calc": {}
|
||||||
},
|
},
|
||||||
"armor": {
|
"armor": {
|
||||||
"templates": ["itemDescription", "stats", "equippable", "attributeMod", "physical","valuable","hoarded"],
|
"templates": ["itemDescription", "stats", "equippable", "attributeMod", "physical", "valuable", "hoarded"],
|
||||||
"lpProtection": 0,
|
"lpProtection": 0,
|
||||||
"apProtection": 0,
|
"apProtection": 0,
|
||||||
"valuable": false,
|
"valuable": false,
|
||||||
|
|
@ -462,6 +472,154 @@
|
||||||
"output": ""
|
"output": ""
|
||||||
},
|
},
|
||||||
"calc": {}
|
"calc": {}
|
||||||
|
},
|
||||||
|
"class": {
|
||||||
|
"templates": ["itemDescription"],
|
||||||
|
"magicUsing": false,
|
||||||
|
"equipped": true,
|
||||||
|
"resistanceBody": 1,
|
||||||
|
"resistanceMind": 0,
|
||||||
|
"calc": {},
|
||||||
|
"mods": {},
|
||||||
|
"lernKostenAllgemein": {
|
||||||
|
"alltag": 20,
|
||||||
|
"freiland": 20,
|
||||||
|
"halbwelt": 20,
|
||||||
|
"kampf": 20,
|
||||||
|
"koerper": 20,
|
||||||
|
"sozial": 20,
|
||||||
|
"unterwelt": 20,
|
||||||
|
"waffen": 20,
|
||||||
|
"wissen": 20
|
||||||
|
},
|
||||||
|
"lernKostenZauber": {
|
||||||
|
"beherrschen": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"bewegen": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"erkennen": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"erschaffen": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"formen": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"veraendern": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"zerstoeren": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"wundertat": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"dweomer": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"zauberlied": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"kampfverse": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"zaubertaenze": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"zaubersalz": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"runenstaebe": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"zaubersiegel": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"zauberrunen": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"thaumagraphie": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"erhaltung": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"zaubermittel": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"zauberschutz": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"zauberblaetter": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"vigilsignien": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"artefakte": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"chaoswunder": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"wilder_dweomer": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"nekromantie": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"finstere_magie": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"blutmagie": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"beschwoeren": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
},
|
||||||
|
"namensmagie": {
|
||||||
|
"kosten": 0,
|
||||||
|
"pp": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lernKostenKamptechnik": {
|
||||||
|
"kampfkunst": 90,
|
||||||
|
"fechtkunst": 90,
|
||||||
|
"schiesskunst": 90,
|
||||||
|
"kido": 90
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
<tr height = 10px></tr>
|
<tr height = 10px></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.magicUsing"}}</td>
|
<td>{{localize "midgard5.magicUsing"}}</td>
|
||||||
<td><input id="data.info.magicUsing" type="checkbox" name="data.info.magicUsing" {{checked data.info.magicUsing}}></td>
|
<td><input id="data.info.magicUsing" type="checkbox" disabled="true" name="data.info.magicUsing" {{checked data.info.magicUsing}}></td>
|
||||||
<td>{{localize "midgard5.movementRange"}}</td>
|
<td>{{localize "midgard5.movementRange"}}</td>
|
||||||
<td><input name="data.movement" type="text" value="{{data.movement}}" data-dtype="Number" /></td>
|
<td><input name="data.movement" type="text" value="{{data.movement}}" data-dtype="Number" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,14 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td >{{localize "midgard5.class"}}</td>
|
<td >{{localize "midgard5.class"}}</td>
|
||||||
<td><input name="data.info.class" type="text" value="{{data.info.class}}" data-dtype="String" /></td>
|
<td >
|
||||||
|
{{#each data.info.class as |class id|}}
|
||||||
|
<div class="chip" data-item-id="{{id}}">
|
||||||
|
<a class="edit-item" name="data.info.class" type="text" disabled="true" value="" data-dtype="String">{{class}}</a>
|
||||||
|
<span><a class="closebtn item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></span>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</td>
|
||||||
<td >{{localize "midgard5.level"}}</td>
|
<td >{{localize "midgard5.level"}}</td>
|
||||||
<td>{{data.calc.level}}</td>
|
<td>{{data.calc.level}}</td>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -132,26 +139,26 @@
|
||||||
{{> "systems/midgard5/templates/sheets/character/base_values.hbs"}}
|
{{> "systems/midgard5/templates/sheets/character/base_values.hbs"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab base_values flexcol" data-group="primary" data-tab="skills">
|
<div class="tab skills flexcol" data-group="primary" data-tab="skills">
|
||||||
{{> "systems/midgard5/templates/sheets/character/skills.hbs"}}
|
{{> "systems/midgard5/templates/sheets/character/skills.hbs"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab base_values flexcol" data-group="primary" data-tab="gear">
|
<div class="tab gear flexcol" data-group="primary" data-tab="gear">
|
||||||
{{> "systems/midgard5/templates/sheets/character/gear.hbs"}}
|
{{> "systems/midgard5/templates/sheets/character/gear.hbs"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab base_values flexcol" data-group="primary" data-tab="combat">
|
<div class="tab combat flexcol" data-group="primary" data-tab="combat">
|
||||||
{{> "systems/midgard5/templates/sheets/character/combat.hbs"}}
|
{{> "systems/midgard5/templates/sheets/character/combat.hbs"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab base_values flexcol" data-group="primary" data-tab="spells">
|
<div class="tab spells flexcol" data-group="primary" data-tab="spells">
|
||||||
{{> "systems/midgard5/templates/sheets/character/spells.hbs"}}
|
{{> "systems/midgard5/templates/sheets/character/spells.hbs"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab base_values flexcol" data-group="primary" data-tab="effects">
|
<div class="tab effects flexcol" data-group="primary" data-tab="effects">
|
||||||
{{> "systems/midgard5/templates/sheets/character/effects.hbs"}}
|
{{> "systems/midgard5/templates/sheets/character/effects.hbs"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab base_values flexcol" data-group="primary" data-tab="description">
|
<div class="tab description flexcol" data-group="primary" data-tab="description">
|
||||||
{{> "systems/midgard5/templates/sheets/character/description.hbs"}}
|
{{> "systems/midgard5/templates/sheets/character/description.hbs"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#eaead7" class="padding edit-item highlight" >{{localize "midgard5.spellCasting"}}</td>
|
<td bgcolor="#eaead7" class="padding edit-item highlight" >{{localize "midgard5.spellCasting"}}</td>
|
||||||
<td bgcolor="#eaead7" class="center">{{data.calc.stats.spellCasting.value}}</td>
|
<td bgcolor="#eaead7" class="center">{{data.calc.stats.spellCasting.value}}</td>
|
||||||
<td bgcolor="#eaead7" class="fixed-value" style="border-right: 1px solid black;"><button class="roll-button roll-weapon-button" /></td>
|
<td bgcolor="#eaead7" class="fixed-value" style="border-right: 1px solid black;"><button class="roll-button roll-cleanSpell-button" /></td>
|
||||||
<td class="padding edit-item highlight">{{localize "midgard5.defense"}}</td>
|
<td class="padding edit-item highlight">{{localize "midgard5.defense"}}</td>
|
||||||
<td class="center">{{add data.calc.stats.defense.value data.calc.stats.defenseBonus.value}}</td>
|
<td class="center">{{add data.calc.stats.defense.value data.calc.stats.defenseBonus.value}}</td>
|
||||||
<td class="fixed-value" style="border-right: 1px solid black;"><button class="roll-button roll-defense-button"></button></td>
|
<td class="fixed-value" style="border-right: 1px solid black;"><button class="roll-button roll-defense-button"></button></td>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
<form class="" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />
|
||||||
|
<h1><input name="name" type="text" value="{{item.name}}" placeholder="Name" /></h1>
|
||||||
|
</header>
|
||||||
|
<nav class="sheet-navigation tabs" data-group="primary">
|
||||||
|
<a class="item active" data-tab="base_values">{{localize "midgard5.base_values"}}</a>
|
||||||
|
<a class="item" data-tab="skills">{{localize "midgard5.skills"}}</a>
|
||||||
|
<a class="item" data-tab="combat">{{localize "midgard5.combat"}}</a>
|
||||||
|
{{#if data.magicUsing}}
|
||||||
|
<a class="item" data-tab="spells">{{localize "midgard5.spells"}}</a>
|
||||||
|
{{/if}}
|
||||||
|
<a class="item" data-tab="description">{{localize "midgard5.description"}}</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="sheet-content">
|
||||||
|
|
||||||
|
<div class="tab base_values flexcol" data-group="primary" data-tab="base_values">
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<div class="flexrow">
|
||||||
|
<span>
|
||||||
|
<input id="data.magicUsing" type="checkbox" name="data.magicUsing" {{checked data.magicUsing}} />
|
||||||
|
<label for="data.magicUsing">{{localize "midgard5.magicUsing"}}</label>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{localize "midgard5.resistanceMind"}}</td>
|
||||||
|
<td><input style="width:35px" name="data.resistanceMind" type="number" value="{{data.resistanceMind}}" data-dtype="Number" /></td>
|
||||||
|
|
||||||
|
<td>{{localize "midgard5.resistanceBody"}}</td>
|
||||||
|
<td><input style="width:35px" name="data.resistanceBody" type="number" value="{{data.resistanceBody}}" data-dtype="Number" /></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab skills flexcol" data-group="primary" data-tab="skills">
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<div class="flexrow">
|
||||||
|
{{#each data.lernKostenAllgemein as |wert name|}}
|
||||||
|
<span style="flex: 1 0 26%">
|
||||||
|
<label for="data.lernKostenAllgemein.{{name}}">{{localize (m5concat "midgard5." name)}}</label>
|
||||||
|
<input style="width:35px" name="data.lernKostenAllgemein.{{name}}" type="number" value={{wert}} data-dtype="Number" />
|
||||||
|
</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab combat flexcol" data-group="primary" data-tab="combat">
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<div class="flexrow">
|
||||||
|
{{#each data.lernKostenKamptechnik as |wert name|}}
|
||||||
|
<span style="flex: 1 0 26%">
|
||||||
|
<label for="data.lernKostenKamptechnik.{{name}}">{{localize (m5concat "midgard5." name)}}</label>
|
||||||
|
<input style="width:35px" name="data.lernKostenKamptechnik.{{name}}" type="number" value={{wert}} data-dtype="Number" />
|
||||||
|
</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab spells flexcol" data-group="primary" data-tab="spells">
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<div class="flexrow">
|
||||||
|
|
||||||
|
{{#each data.lernKostenZauber as |wert name|}}
|
||||||
|
<span style="flex: 1 0 26%">
|
||||||
|
<label for="data.lernKostenZauber.{{name}}">{{localize (m5concat "midgard5.spell-process-" name)}}</label>
|
||||||
|
<input style="width:35px" name="data.lernKostenZauber.{{name}}.wert" type="number" value={{wert.kosten}} data-dtype="Number" />
|
||||||
|
</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab description flexcol" data-group="primary" data-tab="description">
|
||||||
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</form>
|
||||||
Loading…
Reference in New Issue