Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16df142d45 | ||
|
|
0bfa224dae | ||
|
|
35a6b0fae9 | ||
|
|
db21ca93b0 | ||
|
|
7bf0fd90b0 | ||
|
|
a7bdd0434e | ||
|
|
97d4a35cd6 | ||
|
|
c2996aa974 | ||
|
|
bf4f49755a | ||
|
|
57bffd492a |
+1
-1
@@ -5,4 +5,4 @@ package-lock.json
|
|||||||
source/packs/
|
source/packs/
|
||||||
source/generators/
|
source/generators/
|
||||||
dist
|
dist
|
||||||
midgard5*.zip
|
*.zip
|
||||||
+1
-1
@@ -6,7 +6,7 @@ _**Warnung:** Das System befindet sich noch in der Entwicklung._
|
|||||||
|
|
||||||
Gehe auf die Setup-Seite deiner Foundry VTT Instanz. Klicke im Reiter **Game Systems** auf den Button **Install System**. In dem dann geöffneten Dialog, unten in der Zeile **Manifest URL** den Link zur aktuellen (oder gewünschten) Version der _system.json_ eintragen und auf **Install** klicken:
|
Gehe auf die Setup-Seite deiner Foundry VTT Instanz. Klicke im Reiter **Game Systems** auf den Button **Install System**. In dem dann geöffneten Dialog, unten in der Zeile **Manifest URL** den Link zur aktuellen (oder gewünschten) Version der _system.json_ eintragen und auf **Install** klicken:
|
||||||
|
|
||||||
https://github.com/michaelstein/foundry-vtt-system-midgard5/releases/download/v1.0.1/system.json
|
https://github.com/byroks/foundry-vtt-system-midgard5/releases/download/v1.3.0/system.json
|
||||||
|
|
||||||
Danach kann eine Spielwelt mit dem System erstellt werden.
|
Danach kann eine Spielwelt mit dem System erstellt werden.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -520,4 +520,4 @@ exports.clean = clean;
|
|||||||
exports.link = linkUserData;
|
exports.link = linkUserData;
|
||||||
exports.package = packageBuild;
|
exports.package = packageBuild;
|
||||||
exports.update = updateManifest;
|
exports.update = updateManifest;
|
||||||
exports.publish = gulp.series(clean, updateManifest, execBuild, bundleModule, packageBuild, gitTaskManifest, gitTaskBuild);
|
exports.publish = gulp.series(clean, updateManifest, execBuild, bundleModule, packageBuild, gitTaskManifest);
|
||||||
|
|||||||
+37
-6
@@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
"ACTOR.TypeCharacter": "Charakter",
|
"TYPES.Actor.character": "Charakter",
|
||||||
"ACTOR.TypeNpc": "Kreatur / Nichtspielerfigur",
|
"ACTOR.TypeNpc": "Kreatur / Nichtspielerfigur",
|
||||||
"ACTOR.TypeVehicle": "Transportmittel / Pferd etc.",
|
"ACTOR.TypeVehicle": "Transportmittel / Pferd etc.",
|
||||||
|
|
||||||
"ITEM.TypeItem": "Gegenstand",
|
"TYPES.Item.item": "Gegenstand",
|
||||||
"ITEM.TypeWeapon": "Waffe",
|
"TYPES.Item.weapon": "Waffe",
|
||||||
"ITEM.TypeDefensiveWeapon": "Verteidigungswaffe",
|
"ITEM.TypeDefensiveWeapon": "Verteidigungswaffe",
|
||||||
"ITEM.TypeArmor": "Rüstung",
|
"TYPES.Item.armor": "Rüstung",
|
||||||
"ITEM.TypeSpell": "Zauber",
|
"TYPES.Item.spell": "Zauber",
|
||||||
"ITEM.TypeEffect": "Aktive Effekte",
|
"TYPES.Item.effect": "Aktive Effekte",
|
||||||
|
"ITEM.type.kampfkunst": "Kampfkünste",
|
||||||
|
|
||||||
"midgard5.doRoll": "Würfeln",
|
"midgard5.doRoll": "Würfeln",
|
||||||
"midgard5.learn": "Lernen",
|
"midgard5.learn": "Lernen",
|
||||||
@@ -64,6 +65,7 @@
|
|||||||
"midgard5.gear": "Ausrüstung",
|
"midgard5.gear": "Ausrüstung",
|
||||||
"midgard5.spells": "Zauber",
|
"midgard5.spells": "Zauber",
|
||||||
"midgard5.effects": "Aktive Effekte",
|
"midgard5.effects": "Aktive Effekte",
|
||||||
|
"midgard5.kampfkuenste": "Kampfkünste",
|
||||||
|
|
||||||
"midgard5.class": "Klasse",
|
"midgard5.class": "Klasse",
|
||||||
"midgard5.race": "Rasse",
|
"midgard5.race": "Rasse",
|
||||||
@@ -238,6 +240,35 @@
|
|||||||
"midgard5.spell-effectDuration": "Wirkungsdauer",
|
"midgard5.spell-effectDuration": "Wirkungsdauer",
|
||||||
"midgard5.spell-origin": "Ursprung",
|
"midgard5.spell-origin": "Ursprung",
|
||||||
|
|
||||||
|
"midgard5.kampfkunst-type": "Kampfkunst Art",
|
||||||
|
"midgard5.kampfkunst-variante": "Kampfkunst Variante",
|
||||||
|
"midgard5.kido-type": "Kido Art",
|
||||||
|
"midgard5.kido-variante": "Kido Variante",
|
||||||
|
|
||||||
|
"midgard5.kampfkunst-type-angriff": "Angriffstechnik",
|
||||||
|
"midgard5.kampfkunst-type-verteidigung": "Verteidigungstechnik",
|
||||||
|
"midgard5.kampfkunst-type-finte": "Finte",
|
||||||
|
"midgard5.kampfkunst-type-geist": "Geistestechnik",
|
||||||
|
"midgard5.kampfkunst-type-schießkunst": "Schießkunst",
|
||||||
|
"midgard5.kampfkunst-type-fechten": "Fechtkunst",
|
||||||
|
"midgard5.kido-type-angriff": "Kido Angriffstechnik",
|
||||||
|
"midgard5.kido-type-verteidigung": "Kido Verteidigungstechnik",
|
||||||
|
"midgard5.kido-type-finte": "Kido Finte",
|
||||||
|
"midgard5.kido-type-leib": "Kido Leibestechnik",
|
||||||
|
|
||||||
|
"midgard5.kampfkunst-variante-anstuermen": "Anstürmen",
|
||||||
|
"midgard5.kampfkunst-variante-attackieren": "Attackieren",
|
||||||
|
"midgard5.kampfkunst-variante-entwaffnen": "Entwaffnen",
|
||||||
|
|
||||||
|
"midgard5.kido-variante-anspringen": "Anspringen",
|
||||||
|
"midgard5.kido-variante-attackieren": "Attackieren",
|
||||||
|
"midgard5.kido-variante-entwaffnen": "Entwaffnen",
|
||||||
|
"midgard5.kido-variante-werfen": "Werfen",
|
||||||
|
"midgard5.kido-variante-ausweichen": "Ausweichen",
|
||||||
|
"midgard5.kido-variante-blockieren": "Blockieren",
|
||||||
|
"midgard5.kido-variante-bewegen": "Bewegen",
|
||||||
|
"midgard5.kido-variante-kontrollieren": "Kontrollieren",
|
||||||
|
|
||||||
"midgard5.mod-operation-add100": "Addieren (max 100)",
|
"midgard5.mod-operation-add100": "Addieren (max 100)",
|
||||||
"midgard5.mod-operation-add": "Addieren",
|
"midgard5.mod-operation-add": "Addieren",
|
||||||
"midgard5.mod-operation-set": "Basiswert",
|
"midgard5.mod-operation-set": "Basiswert",
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "foundry-system-midgard5",
|
"name": "foundry-system-midgard5",
|
||||||
"version": "1.3.0",
|
"version": "2.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"name": "Kampfkunst",
|
||||||
|
"type": "kampfkunst",
|
||||||
|
"img": "icons/svg/item-bag.svg",
|
||||||
|
"data": {
|
||||||
|
"description": "",
|
||||||
|
"bonus": 0,
|
||||||
|
"type": "angriff",
|
||||||
|
"variante": "none",
|
||||||
|
"isKido": false,
|
||||||
|
"skillId": "",
|
||||||
|
"ap": 0,
|
||||||
|
"rolls": {
|
||||||
|
"formulas": {
|
||||||
|
"0": {
|
||||||
|
"formula": "1d20 + @i.calc.ew + @i.bonus",
|
||||||
|
"enabled": true,
|
||||||
|
"label": "Kampfkunst"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"output": ""
|
||||||
|
},
|
||||||
|
"calc": {}
|
||||||
|
},
|
||||||
|
"effects": [],
|
||||||
|
"folder": null,
|
||||||
|
"sort": 0,
|
||||||
|
"permission": {
|
||||||
|
"default": 0,
|
||||||
|
"XD0IpWT6bN4AJiYQ": 3
|
||||||
|
},
|
||||||
|
"_id": "HQ469FvZkwKfzFff"
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ const preloadTemplates = async (): Promise<Handlebars.TemplateDelegate<any>[]> =
|
|||||||
"sheets/character/skills.hbs",
|
"sheets/character/skills.hbs",
|
||||||
"sheets/character/gear.hbs",
|
"sheets/character/gear.hbs",
|
||||||
"sheets/character/spells.hbs",
|
"sheets/character/spells.hbs",
|
||||||
|
"sheets/character/kampfkuenste.hbs",
|
||||||
"sheets/character/effects.hbs",
|
"sheets/character/effects.hbs",
|
||||||
"sheets/item/rolls.hbs",
|
"sheets/item/rolls.hbs",
|
||||||
"chat/roll-m5.hbs",
|
"chat/roll-m5.hbs",
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ export interface M5CharacterCalculatedData {
|
|||||||
effects: {};
|
effects: {};
|
||||||
};
|
};
|
||||||
spells: {};
|
spells: {};
|
||||||
|
kampfkuenste: {};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function enumKeys<O extends object, K extends keyof O = keyof O>(obj: O): K[] {
|
export function enumKeys<O extends object, K extends keyof O = keyof O>(obj: O): K[] {
|
||||||
|
|||||||
@@ -25,7 +25,17 @@ export class M5Character extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
derivedData(
|
derivedData(
|
||||||
skip: { mods?: boolean; skills?: boolean; weapons?: boolean; defensiveWeapons?: boolean; armor?: boolean; items?: boolean; spells?: boolean; effects?: boolean } = {}
|
skip: {
|
||||||
|
mods?: boolean;
|
||||||
|
skills?: boolean;
|
||||||
|
weapons?: boolean;
|
||||||
|
defensiveWeapons?: boolean;
|
||||||
|
armor?: boolean;
|
||||||
|
items?: boolean;
|
||||||
|
spells?: boolean;
|
||||||
|
effects?: boolean;
|
||||||
|
kampfkuenste?: boolean;
|
||||||
|
} = {}
|
||||||
): M5CharacterCalculatedData {
|
): M5CharacterCalculatedData {
|
||||||
let ret: M5CharacterCalculatedData = {
|
let ret: M5CharacterCalculatedData = {
|
||||||
level: 0,
|
level: 0,
|
||||||
@@ -73,6 +83,7 @@ export class M5Character extends Actor {
|
|||||||
effects: {},
|
effects: {},
|
||||||
},
|
},
|
||||||
spells: {},
|
spells: {},
|
||||||
|
kampfkuenste: {},
|
||||||
} as M5CharacterCalculatedData;
|
} as M5CharacterCalculatedData;
|
||||||
|
|
||||||
const context = this as any;
|
const context = this as any;
|
||||||
@@ -119,7 +130,7 @@ export class M5Character extends Actor {
|
|||||||
);
|
);
|
||||||
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.brawlEw = ret.stats.brawl.value + ret.stats.attackBonus.value;
|
ret.stats.brawlEw = ret.stats.brawl.value + ret.stats.attackBonus.value + (data.info.race === "Zwerg" ? 1 : 0);
|
||||||
ret.stats.poisonResistance = this.modResult(30 + Math.floor(ret.attributes.ko.value / 2));
|
ret.stats.poisonResistance = this.modResult(30 + Math.floor(ret.attributes.ko.value / 2));
|
||||||
ret.stats.enduranceBonus = Math.floor(ret.attributes.ko.value / 10) + Math.floor(ret.attributes.st.value / 20);
|
ret.stats.enduranceBonus = Math.floor(ret.attributes.ko.value / 10) + Math.floor(ret.attributes.st.value / 20);
|
||||||
|
|
||||||
@@ -274,6 +285,22 @@ export class M5Character extends Actor {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!skip?.kampfkuenste) {
|
||||||
|
context.items
|
||||||
|
?.filter((item) => item.type === "kampfkunst")
|
||||||
|
.forEach((item) => {
|
||||||
|
item.prepareDerivedData();
|
||||||
|
|
||||||
|
ret.kampfkuenste[item.id] = {
|
||||||
|
label: item.name,
|
||||||
|
isKido: item.system.isKido,
|
||||||
|
type: item.system.type,
|
||||||
|
variante: item.system.variante,
|
||||||
|
calc: item.system.calc,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,7 +413,7 @@ export class M5Character extends Actor {
|
|||||||
value: value,
|
value: value,
|
||||||
mods: [
|
mods: [
|
||||||
{
|
{
|
||||||
item: (game as Game).i18n.localize("ACTOR.TypeCharacter"),
|
item: (game as Game).i18n.localize("TYPES.Actor.character"),
|
||||||
operation: M5ModOperation.SET,
|
operation: M5ModOperation.SET,
|
||||||
value: value,
|
value: value,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,158 +1,147 @@
|
|||||||
import { M5Attribute, M5AttributeCalculated, M5Attributes, M5CharacterCalculatedData, M5ItemMod, M5ModOperation, M5ModResult, M5ModSource, M5ModType, M5Stats, M5ModPair } from "../M5Base"
|
import { M5Attribute, M5AttributeCalculated, M5Attributes, M5CharacterCalculatedData, M5ItemMod, M5ModOperation, M5ModResult, M5ModSource, M5ModType, M5Stats, M5ModPair } from "../M5Base";
|
||||||
|
|
||||||
export default class M5ModAggregate {
|
export default class M5ModAggregate {
|
||||||
private attributes = new Map<string, Array<M5ModPair>>()
|
private attributes = new Map<string, Array<M5ModPair>>();
|
||||||
private stats = new Map<string, Array<M5ModPair>>()
|
private stats = new Map<string, Array<M5ModPair>>();
|
||||||
private skills = new Map<string, Array<M5ModPair>>()
|
private skills = new Map<string, Array<M5ModPair>>();
|
||||||
|
|
||||||
constructor(public data: any, public calc: M5CharacterCalculatedData) {
|
constructor(public data: any, public calc: M5CharacterCalculatedData) {
|
||||||
const characterString = (game as Game).i18n.localize("ACTOR.TypeCharacter")
|
const characterString = (game as Game).i18n.localize("TYPES.Actor.character");
|
||||||
|
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.ST, operation: M5ModOperation.SET, value: data.attributes.st.value }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.ST, operation: M5ModOperation.SET, value: data.attributes.st.value }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.GS, operation: M5ModOperation.SET, value: data.attributes.gs.value }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.GS, operation: M5ModOperation.SET, value: data.attributes.gs.value }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.GW, operation: M5ModOperation.SET, value: data.attributes.gw.value }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.GW, operation: M5ModOperation.SET, value: data.attributes.gw.value }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.KO, operation: M5ModOperation.SET, value: data.attributes.ko.value }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.KO, operation: M5ModOperation.SET, value: data.attributes.ko.value }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.IN, operation: M5ModOperation.SET, value: data.attributes.in.value }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.IN, operation: M5ModOperation.SET, value: data.attributes.in.value }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.ZT, operation: M5ModOperation.SET, value: data.attributes.zt.value }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.ZT, operation: M5ModOperation.SET, value: data.attributes.zt.value }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.AU, operation: M5ModOperation.SET, value: data.attributes.au.value }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.AU, operation: M5ModOperation.SET, value: data.attributes.au.value }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.PA, operation: M5ModOperation.SET, value: data.attributes.pa.value }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.PA, operation: M5ModOperation.SET, value: data.attributes.pa.value }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.WK, operation: M5ModOperation.SET, value: data.attributes.wk.value }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.WK, operation: M5ModOperation.SET, value: data.attributes.wk.value }, characterString);
|
||||||
|
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.ST, operation: M5ModOperation.ADD_100, value: data.attributes.st.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.ST, operation: M5ModOperation.ADD_100, value: data.attributes.st.bonus }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.GS, operation: M5ModOperation.ADD_100, value: data.attributes.gs.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.GS, operation: M5ModOperation.ADD_100, value: data.attributes.gs.bonus }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.GW, operation: M5ModOperation.ADD_100, value: data.attributes.gw.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.GW, operation: M5ModOperation.ADD_100, value: data.attributes.gw.bonus }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.KO, operation: M5ModOperation.ADD_100, value: data.attributes.ko.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.KO, operation: M5ModOperation.ADD_100, value: data.attributes.ko.bonus }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.IN, operation: M5ModOperation.ADD_100, value: data.attributes.in.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.IN, operation: M5ModOperation.ADD_100, value: data.attributes.in.bonus }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.ZT, operation: M5ModOperation.ADD_100, value: data.attributes.zt.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.ZT, operation: M5ModOperation.ADD_100, value: data.attributes.zt.bonus }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.AU, operation: M5ModOperation.ADD_100, value: data.attributes.au.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.AU, operation: M5ModOperation.ADD_100, value: data.attributes.au.bonus }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.PA, operation: M5ModOperation.ADD_100, value: data.attributes.pa.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.PA, operation: M5ModOperation.ADD_100, value: data.attributes.pa.bonus }, characterString);
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.WK, operation: M5ModOperation.ADD_100, value: data.attributes.wk.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.WK, operation: M5ModOperation.ADD_100, value: data.attributes.wk.bonus }, characterString);
|
||||||
|
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.DEFENSE, operation: M5ModOperation.SET, value: calc.stats.defenseBonus.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.DEFENSE, operation: M5ModOperation.SET, value: calc.stats.defenseBonus.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.ATTACK, operation: M5ModOperation.SET, value: calc.stats.attackBonus.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.ATTACK, operation: M5ModOperation.SET, value: calc.stats.attackBonus.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.DAMAGE, operation: M5ModOperation.SET, value: calc.stats.damageBonus.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.DAMAGE, operation: M5ModOperation.SET, value: calc.stats.damageBonus.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.MOVEMENT, operation: M5ModOperation.SET, value: calc.stats.movementBonus.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.MOVEMENT, operation: M5ModOperation.SET, value: calc.stats.movementBonus.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.RESISTANCE_MIND, operation: M5ModOperation.SET, value: calc.stats.resistanceMind.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.RESISTANCE_MIND, operation: M5ModOperation.SET, value: calc.stats.resistanceMind.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.RESISTANCE_BODY, operation: M5ModOperation.SET, value: calc.stats.resistanceBody.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.RESISTANCE_BODY, operation: M5ModOperation.SET, value: calc.stats.resistanceBody.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.SPELL_CASTING, operation: M5ModOperation.SET, value: calc.stats.spellCasting.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.SPELL_CASTING, operation: M5ModOperation.SET, value: calc.stats.spellCasting.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.BRAWL, operation: M5ModOperation.SET, value: calc.stats.brawl.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.BRAWL, operation: M5ModOperation.SET, value: calc.stats.brawl.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.POISON_RESISTANCE, operation: M5ModOperation.SET, value: calc.stats.poisonResistance.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.POISON_RESISTANCE, operation: M5ModOperation.SET, value: calc.stats.poisonResistance.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.LP, operation: M5ModOperation.SET, value: calc.stats.lp.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.LP, operation: M5ModOperation.SET, value: calc.stats.lp.value }, characterString);
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.AP, operation: M5ModOperation.SET, value: calc.stats.ap.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.AP, operation: M5ModOperation.SET, value: calc.stats.ap.value }, characterString);
|
||||||
}
|
}
|
||||||
|
|
||||||
push(mod: M5ItemMod, source: string) {
|
push(mod: M5ItemMod, source: string) {
|
||||||
if (!mod?.id || mod.id === "")
|
if (!mod?.id || mod.id === "") return;
|
||||||
return
|
|
||||||
|
|
||||||
let map: Map<string, Array<M5ModPair>> = null
|
let map: Map<string, Array<M5ModPair>> = null;
|
||||||
if (mod.type === M5ModType.ATTRIBUTE)
|
if (mod.type === M5ModType.ATTRIBUTE) map = this.attributes;
|
||||||
map = this.attributes
|
else if (mod.type === M5ModType.STAT) map = this.stats;
|
||||||
else if (mod.type === M5ModType.STAT)
|
else if (mod.type === M5ModType.SKILL) map = this.skills;
|
||||||
map = this.stats
|
|
||||||
else if (mod.type === M5ModType.SKILL)
|
|
||||||
map = this.skills
|
|
||||||
|
|
||||||
if (map) {
|
if (map) {
|
||||||
const pair: M5ModPair = {
|
const pair: M5ModPair = {
|
||||||
mod: mod,
|
mod: mod,
|
||||||
source: source
|
source: source,
|
||||||
}
|
};
|
||||||
|
|
||||||
if (map.has(mod.id))
|
if (map.has(mod.id)) map.get(mod.id).push(pair);
|
||||||
map.get(mod.id).push(pair)
|
else map.set(mod.id, [pair]);
|
||||||
else
|
|
||||||
map.set(mod.id, [pair])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
calculate() {
|
calculate() {
|
||||||
const calc = this.calc
|
const calc = this.calc;
|
||||||
|
|
||||||
this.attributes.forEach((pairs, id) => {
|
this.attributes.forEach((pairs, id) => {
|
||||||
const res = M5ModAggregate.processPairs(pairs)
|
const res = M5ModAggregate.processPairs(pairs);
|
||||||
calc.attributes[id] = {
|
calc.attributes[id] = {
|
||||||
value: res.value,
|
value: res.value,
|
||||||
bonus: M5ModAggregate.attributeBonus(res.value),
|
bonus: M5ModAggregate.attributeBonus(res.value),
|
||||||
mods: res.mods
|
mods: res.mods,
|
||||||
} as M5AttributeCalculated
|
} as M5AttributeCalculated;
|
||||||
//console.log("calc.attributes." + id, calc.attributes[id])
|
//console.log("calc.attributes." + id, calc.attributes[id])
|
||||||
})
|
});
|
||||||
|
|
||||||
this.stats.forEach((pairs, id) => {
|
this.stats.forEach((pairs, id) => {
|
||||||
const res = M5ModAggregate.processPairs(pairs)
|
const res = M5ModAggregate.processPairs(pairs);
|
||||||
calc.stats[id] = res
|
calc.stats[id] = res;
|
||||||
})
|
});
|
||||||
|
|
||||||
const ret = {}
|
const ret = {};
|
||||||
this.skills.forEach((pairs, id) => {
|
this.skills.forEach((pairs, id) => {
|
||||||
ret[id] = pairs
|
ret[id] = pairs;
|
||||||
})
|
});
|
||||||
|
|
||||||
return ret
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pairAsSource(pair: M5ModPair): M5ModSource {
|
static pairAsSource(pair: M5ModPair): M5ModSource {
|
||||||
return {
|
return {
|
||||||
operation: pair.mod.operation,
|
operation: pair.mod.operation,
|
||||||
value: pair.mod.value,
|
value: pair.mod.value,
|
||||||
item: pair.source
|
item: pair.source,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static processPairs(arr: Array<M5ModPair>): M5ModResult {
|
static processPairs(arr: Array<M5ModPair>): M5ModResult {
|
||||||
let ret: M5ModResult = {
|
let ret: M5ModResult = {
|
||||||
mods: [],
|
mods: [],
|
||||||
value: 0
|
value: 0,
|
||||||
}
|
};
|
||||||
|
|
||||||
let mods = arr.filter(pair => pair.mod.operation === M5ModOperation.FIXED).sort((a, b) => b.mod.value - a.mod.value)
|
let mods = arr.filter((pair) => pair.mod.operation === M5ModOperation.FIXED).sort((a, b) => b.mod.value - a.mod.value);
|
||||||
let pair = mods.length === 0 ? null : mods[0]
|
let pair = mods.length === 0 ? null : mods[0];
|
||||||
|
|
||||||
if (pair) {
|
if (pair) {
|
||||||
ret.mods.push(this.pairAsSource(pair))
|
ret.mods.push(this.pairAsSource(pair));
|
||||||
ret.value = pair.mod.value
|
ret.value = pair.mod.value;
|
||||||
} else {
|
} else {
|
||||||
mods = arr.filter(pair => pair.mod.operation === M5ModOperation.SET).sort((a, b) => b.mod.value - a.mod.value)
|
mods = arr.filter((pair) => pair.mod.operation === M5ModOperation.SET).sort((a, b) => b.mod.value - a.mod.value);
|
||||||
if (mods.length !== 0) {
|
if (mods.length !== 0) {
|
||||||
ret.mods.push(this.pairAsSource(mods[0]))
|
ret.mods.push(this.pairAsSource(mods[0]));
|
||||||
ret.value = mods[0].mod.value
|
ret.value = mods[0].mod.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
mods = arr.filter(pair => pair.mod.operation === M5ModOperation.ADD_100)
|
mods = arr.filter((pair) => pair.mod.operation === M5ModOperation.ADD_100);
|
||||||
if (mods.length !== 0) {
|
if (mods.length !== 0) {
|
||||||
ret.mods = ret.mods.concat(mods.map(this.pairAsSource))
|
ret.mods = ret.mods.concat(mods.map(this.pairAsSource));
|
||||||
const bonus = mods.map(p => p.mod.value).reduce((a, b) => a + b, 0)
|
const bonus = mods.map((p) => p.mod.value).reduce((a, b) => a + b, 0);
|
||||||
ret.value = Math.min(100, Math.max(0, ret.value + bonus))
|
ret.value = Math.min(100, Math.max(0, ret.value + bonus));
|
||||||
}
|
}
|
||||||
|
|
||||||
mods = arr.filter(pair => pair.mod.operation === M5ModOperation.ADD)
|
mods = arr.filter((pair) => pair.mod.operation === M5ModOperation.ADD);
|
||||||
if (mods.length !== 0) {
|
if (mods.length !== 0) {
|
||||||
ret.mods = ret.mods.concat(mods.map(this.pairAsSource))
|
ret.mods = ret.mods.concat(mods.map(this.pairAsSource));
|
||||||
const bonus = mods.map(p => p.mod.value).reduce((a, b) => a + b, 0)
|
const bonus = mods.map((p) => p.mod.value).reduce((a, b) => a + b, 0);
|
||||||
ret.value = Math.max(0, ret.value + bonus)
|
ret.value = Math.max(0, ret.value + bonus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static attributeMinMax(attribute: M5Attribute) {
|
static attributeMinMax(attribute: M5Attribute) {
|
||||||
return Math.min(100, Math.max(0, attribute.value + attribute.bonus))
|
return Math.min(100, Math.max(0, attribute.value + attribute.bonus));
|
||||||
}
|
}
|
||||||
|
|
||||||
static attributeBonus(value: number) {
|
static attributeBonus(value: number) {
|
||||||
if (value > 95)
|
if (value > 95) return 2;
|
||||||
return 2
|
if (value > 80) return 1;
|
||||||
if (value > 80)
|
if (value > 20) return 0;
|
||||||
return 1
|
if (value > 5) return -1;
|
||||||
if (value > 20)
|
return -2;
|
||||||
return 0
|
|
||||||
if (value > 5)
|
|
||||||
return -1
|
|
||||||
return -2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//static modToString(mod: M5ItemMod): string { }
|
//static modToString(mod: M5ItemMod): string { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class M5Item extends Item {
|
|||||||
];
|
];
|
||||||
|
|
||||||
if (character) {
|
if (character) {
|
||||||
const actorCalc = character.derivedData({ skills: true, weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
const actorCalc = character.derivedData({ skills: true, weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: 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]);
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ export class M5Item extends Item {
|
|||||||
calc.combatSkills = null;
|
calc.combatSkills = null;
|
||||||
|
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: 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;
|
||||||
@@ -89,7 +89,7 @@ export class M5Item extends Item {
|
|||||||
calc.combatSkills = null;
|
calc.combatSkills = null;
|
||||||
|
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: 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;
|
||||||
@@ -108,11 +108,32 @@ 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({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
calc.ew = actorCalc.stats.spellCasting.value;
|
calc.ew = actorCalc.stats.spellCasting.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (itemType === "kampfkunst") {
|
||||||
|
calc.fw = 0;
|
||||||
|
calc.bonus = 0;
|
||||||
|
calc.ew = 0;
|
||||||
|
calc.generalSkills = null;
|
||||||
|
|
||||||
|
if (actor) {
|
||||||
|
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
|
||||||
|
if (actorCalc) {
|
||||||
|
calc.generalSkills = actorCalc.skills.general;
|
||||||
|
}
|
||||||
|
|
||||||
|
const skill = character.getItem(itemData.skillId);
|
||||||
|
if (skill) {
|
||||||
|
skill.prepareDerivedData();
|
||||||
|
const skillData = skill.system;
|
||||||
|
calc.ew = skillData.calc.ew;
|
||||||
|
calc.fw = skillData.fw + calc.bonus;
|
||||||
|
itemData.rolls.formulas[0].label = skill.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (itemType === "item" || itemType === "effect") {
|
} else if (itemType === "item" || itemType === "effect") {
|
||||||
calc.mods = {};
|
calc.mods = {};
|
||||||
Object.keys(itemData?.mods).forEach((key) => {
|
Object.keys(itemData?.mods).forEach((key) => {
|
||||||
@@ -135,7 +156,7 @@ export class M5Item extends Item {
|
|||||||
}
|
}
|
||||||
case M5ModType.SKILL: {
|
case M5ModType.SKILL: {
|
||||||
if (character) {
|
if (character) {
|
||||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
let category = (game as Game).i18n.localize("midgard5.skill");
|
let category = (game as Game).i18n.localize("midgard5.skill");
|
||||||
Object.keys(actorCalc.skills.general).forEach((skillId) => {
|
Object.keys(actorCalc.skills.general).forEach((skillId) => {
|
||||||
@@ -215,6 +236,12 @@ export class M5Item extends Item {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (item.type === "spell" || item.type === "kampfkunst") {
|
||||||
|
if (this.actor["system"].ap.value >= item.system.ap) {
|
||||||
|
this.actor["system"].ap.value -= item.system.ap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const roll = new M5Roll(rollData, this.actor, item.name);
|
const roll = new M5Roll(rollData, this.actor, item.name);
|
||||||
return roll.toMessage();
|
return roll.toMessage();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ export class M5Roll {
|
|||||||
};
|
};
|
||||||
|
|
||||||
rollData.rolls["0"] = {
|
rollData.rolls["0"] = {
|
||||||
formula: "1d20 + @c.calc.stats.brawl + @c.calc.stats.attackBonus + @i.attackBonus",
|
formula: "1d20 + @c.calc.stats.brawlEw",
|
||||||
enabled: true,
|
enabled: true,
|
||||||
label: (game as Game).i18n.localize("midgard5.attack"),
|
label: (game as Game).i18n.localize("midgard5.attack"),
|
||||||
result: "",
|
result: "",
|
||||||
@@ -192,7 +192,7 @@ export class M5Roll {
|
|||||||
} as M5RollResult;
|
} as M5RollResult;
|
||||||
|
|
||||||
rollData.rolls["1"] = {
|
rollData.rolls["1"] = {
|
||||||
formula: "1d6 - 4 + @c.calc.stats.damageBonus + @i.damageBonus",
|
formula: "1d6 - 4 + @c.calc.stats.damageBonus.value",
|
||||||
enabled: true,
|
enabled: true,
|
||||||
label: (game as Game).i18n.localize("midgard5.damage"),
|
label: (game as Game).i18n.localize("midgard5.damage"),
|
||||||
result: "",
|
result: "",
|
||||||
@@ -245,6 +245,27 @@ export class M5Roll {
|
|||||||
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.resistanceMind"));
|
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.resistanceMind"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async initativeRoll(actor: any) {
|
||||||
|
let newInitiative; // the initiative value for the combatant
|
||||||
|
|
||||||
|
// ...
|
||||||
|
// The intnitiative value is calculated here
|
||||||
|
// ...
|
||||||
|
|
||||||
|
let combatant = game["combat"].getCombatantByActor(actor._id);
|
||||||
|
if (!combatant) {
|
||||||
|
await game["combat"].createEmbeddedDocuments("Combatant", [{ actorId: actor._id }]);
|
||||||
|
combatant = game["combat"].getCombatantByActor(actor._id);
|
||||||
|
}
|
||||||
|
|
||||||
|
const initiatives = {
|
||||||
|
_id: combatant._id,
|
||||||
|
initiative: actor.system.calc.attributes.gw.value,
|
||||||
|
};
|
||||||
|
|
||||||
|
await game["combat"].updateEmbeddedDocuments("Combatant", [initiatives]);
|
||||||
|
}
|
||||||
|
|
||||||
static resistanceBody(actor: any) {
|
static resistanceBody(actor: any) {
|
||||||
const rollData = actor.getRollData() as M5RollData;
|
const rollData = actor.getRollData() as M5RollData;
|
||||||
rollData.i = {
|
rollData.i = {
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ 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();
|
await item.roll();
|
||||||
|
this.render();
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find(".roll-brawl-button").on("click", async (event) => {
|
html.find(".roll-brawl-button").on("click", async (event) => {
|
||||||
@@ -205,7 +206,7 @@ export default class M5CharacterSheet extends ActorSheet {
|
|||||||
const item = this.actor.items.get(li.dataset.itemId);
|
const item = this.actor.items.get(li.dataset.itemId);
|
||||||
|
|
||||||
// limit transfer on personal weapons/armour/gear
|
// limit transfer on personal weapons/armour/gear
|
||||||
if (["skill", "item", "weapon", "defensiveWeapon", "armor", "spell", "effect"].includes(item.type)) {
|
if (["skill", "item", "weapon", "defensiveWeapon", "armor", "spell", "effect", "kampfkunst"].includes(item.type)) {
|
||||||
const dragData = {
|
const dragData = {
|
||||||
type: "Transfer",
|
type: "Transfer",
|
||||||
actorId: this.actor.id,
|
actorId: this.actor.id,
|
||||||
|
|||||||
+6
-5
@@ -3,10 +3,11 @@
|
|||||||
"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": "1.3.0",
|
"version": "2.0.0",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10"
|
"verified": "11",
|
||||||
|
"maximum": "11"
|
||||||
},
|
},
|
||||||
"authors": [{"name": "Byroks"}],
|
"authors": [{"name": "Byroks"}],
|
||||||
"scripts": ["bundle.js"],
|
"scripts": ["bundle.js"],
|
||||||
@@ -88,8 +89,8 @@
|
|||||||
"primaryTokenAttribute": "lp",
|
"primaryTokenAttribute": "lp",
|
||||||
"secondaryTokenAttribute": "ap",
|
"secondaryTokenAttribute": "ap",
|
||||||
"url": "https://github.com/Byroks/foundry-vtt-system-midgard5",
|
"url": "https://github.com/Byroks/foundry-vtt-system-midgard5",
|
||||||
"manifest": "https://github.com/Byroks/foundry-vtt-system-midgard5/releases/download/v1.3.0/system.json",
|
"manifest": "https://github.com/Byroks/foundry-vtt-system-midgard5/releases/download/v2.0.0/system.json",
|
||||||
"download": "https://github.com/Byroks/foundry-vtt-system-midgard5/releases/download/v1.3.0/midgard5-v1.3.0.zip",
|
"download": "https://github.com/Byroks/foundry-vtt-system-midgard5/releases/download/v2.0.0/midgard5-v2.0.0.zip",
|
||||||
"initiative": "@calc.attributes.gw.value",
|
"initiative": "@c.calc.attributes.gw.value",
|
||||||
"license": "LICENSE.txt"
|
"license": "LICENSE.txt"
|
||||||
}
|
}
|
||||||
+52
-1
@@ -145,7 +145,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"types": ["skill", "weapon", "defensiveWeapon", "armor", "spell", "item", "effect"],
|
"types": ["skill", "weapon", "defensiveWeapon", "armor", "spell", "kampfkunst", "item", "effect"],
|
||||||
"templates": {
|
"templates": {
|
||||||
"itemDescription": {
|
"itemDescription": {
|
||||||
"description": ""
|
"description": ""
|
||||||
@@ -232,6 +232,38 @@
|
|||||||
"geist": "midgard5.spell-target-geist",
|
"geist": "midgard5.spell-target-geist",
|
||||||
"koerper": "midgard5.spell-target-koerper"
|
"koerper": "midgard5.spell-target-koerper"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"kampfkunstSelection": {
|
||||||
|
"kampfkunstTypeSelection": {
|
||||||
|
"angriff": "midgard5.kampfkunst-type-angriff",
|
||||||
|
"verteidigung": "midgard5.kampfkunst-type-verteidigung",
|
||||||
|
"finte": "midgard5.kampfkunst-type-finte",
|
||||||
|
"geist": "midgard5.kampfkunst-type-geist",
|
||||||
|
"schießkunst": "midgard5.kampfkunst-type-schießkunst",
|
||||||
|
"fechten": "midgard5.kampfkunst-type-fechten"
|
||||||
|
},
|
||||||
|
"kidoTypeSelection": {
|
||||||
|
"angriff": "midgard5.kido-type-angriff",
|
||||||
|
"verteidigung": "midgard5.kido-type-verteidigung",
|
||||||
|
"finte": "midgard5.kido-type-finte",
|
||||||
|
"leib": "midgard5.kido-type-leib"
|
||||||
|
},
|
||||||
|
"kampfkunstVarianteSelection": {
|
||||||
|
"anstuermen": "midgard5.kampfkunst-variante-anstuermen",
|
||||||
|
"attackieren": "midgard5.kampfkunst-variante-attackieren",
|
||||||
|
"entwaffnen": "midgard5.kampfkunst-variante-entwaffnen"
|
||||||
|
},
|
||||||
|
"kidoVarianteSelection": {
|
||||||
|
"none": "midgard5.spell-process-none",
|
||||||
|
"anspringen": "midgard5.kido-variante-anspringen",
|
||||||
|
"attackieren": "midgard5.kido-variante-attackieren",
|
||||||
|
"entwaffnen": "midgard5.kido-variante-entwaffnen",
|
||||||
|
"werfen": "midgard5.kido-variante-werfen",
|
||||||
|
"ausweichen": "midgard5.kido-variante-ausweichen",
|
||||||
|
"blockieren": "midgard5.kido-variante-blockieren",
|
||||||
|
"bewegen": "midgard5.kido-variante-bewegen",
|
||||||
|
"kontrollieren": "midgard5.kido-variante-kontrollieren"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"skill": {
|
"skill": {
|
||||||
@@ -343,6 +375,25 @@
|
|||||||
"output": ""
|
"output": ""
|
||||||
},
|
},
|
||||||
"calc": {}
|
"calc": {}
|
||||||
|
},
|
||||||
|
"kampfkunst": {
|
||||||
|
"templates": ["itemDescription", "kampfkunstSelection"],
|
||||||
|
"bonus": 0,
|
||||||
|
"type": "",
|
||||||
|
"variante": "",
|
||||||
|
"isKido": false,
|
||||||
|
"ap": "",
|
||||||
|
"rolls": {
|
||||||
|
"formulas": {
|
||||||
|
"0": {
|
||||||
|
"formula": "1d20 + @i.calc.ew + @i.bonus",
|
||||||
|
"label": "Kampfkunst",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"output": ""
|
||||||
|
},
|
||||||
|
"calc": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="dice-roll m5-roll">
|
<div class="dice-roll m5-roll">
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<h3 class="roll-title">{{res.label}}</h3>
|
<h3 class="roll-title">{{res.label}}</h3>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#if (eq iType "spell")}}
|
{{#if (eq iType "spell")}}
|
||||||
@@ -43,6 +43,40 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if (eq iType "kampfkunst")}}
|
||||||
|
{{#unless i.isKido}}
|
||||||
|
<tr>
|
||||||
|
<td>{{localize "midgard5.actor-ap"}}</td>
|
||||||
|
<td class="roll-spell-details">{{i.ap}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{localize "midgard5.kampfkunst-type"}}</td>
|
||||||
|
<td class="roll-spell-details">{{localize (m5concat "midgard5.kampfkunst-type-" i.type)}}</td>
|
||||||
|
</tr>
|
||||||
|
{{#if (eq i.type "angriff")}}
|
||||||
|
<tr>
|
||||||
|
<td>{{localize "midgard5.kampfkunst-variante"}}</td>
|
||||||
|
<td class="roll-spell-details">{{localize (m5concat "midgard5.kampfkunst-variante-" i.variante)}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<tr>
|
||||||
|
<td>{{localize "midgard5.actor-ap"}}</td>
|
||||||
|
<td class="roll-spell-details">{{i.ap}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{localize "midgard5.kido-type"}}</td>
|
||||||
|
<td class="roll-spell-details">{{localize (m5concat "midgard5.kido-type-" i.type)}}</td>
|
||||||
|
</tr>
|
||||||
|
{{#if (eq i.type "angriff")}}
|
||||||
|
<tr>
|
||||||
|
<td>{{localize "midgard5.kido-variante"}}</td>
|
||||||
|
<td class="roll-spell-details">{{localize (m5concat "midgard5.kido-variante-" i.variante)}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{/unless}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#each rolls as |roll index|}}
|
{{#each rolls as |roll index|}}
|
||||||
{{#if roll.enabled}}
|
{{#if roll.enabled}}
|
||||||
<tr class="roll-row {{roll.css}}">
|
<tr class="roll-row {{roll.css}}">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{localize "ITEM.TypeEffect"}}</th>
|
<th>{{localize "TYPES.Item.effect"}}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{localize "ITEM.TypeWeapon"}}</th>
|
<th>{{localize "TYPES.Item.weapon"}}</th>
|
||||||
<th class="fixed-value">{{localize "midgard5.ew"}}</th>
|
<th class="fixed-value">{{localize "midgard5.ew"}}</th>
|
||||||
<th class="fixed-value"></th>
|
<th class="fixed-value"></th>
|
||||||
<th class="fixed-value"></th>
|
<th class="fixed-value"></th>
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{localize "ITEM.TypeArmor"}}</th>
|
<th>{{localize "TYPES.Item.armor"}}</th>
|
||||||
<th class="fixed-value">{{localize "midgard5.actor-lp-short"}}</th>
|
<th class="fixed-value">{{localize "midgard5.actor-lp-short"}}</th>
|
||||||
<th class="fixed-value">{{localize "midgard5.actor-ap-short"}}</th>
|
<th class="fixed-value">{{localize "midgard5.actor-ap-short"}}</th>
|
||||||
<th class="fixed-value">{{localize "midgard5.attackBonus-short"}}</th>
|
<th class="fixed-value">{{localize "midgard5.attackBonus-short"}}</th>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{localize "ITEM.TypeItem"}}</th>
|
<th>{{localize "TYPES.Item.item"}}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{{localize "ITEM.type.kampfkunst"}}</th>
|
||||||
|
<th>{{localize "midgard5.ew"}}</th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{#each data.calc.kampfkuenste as |item itemId|}}
|
||||||
|
<tr data-item="{{itemId}}">
|
||||||
|
<td class="padding edit-item">
|
||||||
|
<span>{{item.label}}</span>
|
||||||
|
{{#if item.isKido}}
|
||||||
|
<span class="spell-process">{{localize (m5concat "midgard5.kido-type-" item.type)}}</span>
|
||||||
|
{{#unless (eq item.type "finte")}}
|
||||||
|
<span class="spell-process">({{localize (m5concat "midgard5.kido-variante-" item.variante)}})</span>
|
||||||
|
{{/unless}}
|
||||||
|
{{else}}
|
||||||
|
<span class="spell-process">{{localize (m5concat "midgard5.kampfkunst-type-" item.type)}}</span>
|
||||||
|
{{#if (eq item.type "angriff")}}
|
||||||
|
<span class="spell-process">({{localize (m5concat "midgard5.kampfkunst-variante-" item.variante)}})</span>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
</td>
|
||||||
|
<td class="fixed-value">{{item.calc.ew}}</td>
|
||||||
|
<td class="fixed-value"><button class="roll-button roll-weapon-button" /></td>
|
||||||
|
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||||
|
</tr>
|
||||||
|
{{/each}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
@@ -9,7 +9,10 @@
|
|||||||
<a class="item active" data-tab="base_values">{{ localize "midgard5.base_values" }}</a>
|
<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="skills">{{ localize "midgard5.skills" }}</a>
|
||||||
<a class="item" data-tab="gear">{{ localize "midgard5.gear" }}</a>
|
<a class="item" data-tab="gear">{{ localize "midgard5.gear" }}</a>
|
||||||
<a class="item" data-tab="spells">{{ localize "midgard5.spells" }}</a>
|
{{#if actor.system.info.magicUsing }}
|
||||||
|
<a class="item" data-tab="spells">{{ localize "midgard5.spells" }}</a>
|
||||||
|
{{/if}}
|
||||||
|
<a class="item" data-tab="kampfkuenste">{{ localize "midgard5.kampfkuenste" }}</a>
|
||||||
<a class="item" data-tab="effects">{{ localize "midgard5.effects" }}</a>
|
<a class="item" data-tab="effects">{{ localize "midgard5.effects" }}</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@@ -31,9 +34,12 @@
|
|||||||
{{> "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="kampfkuenste">
|
||||||
|
{{> "systems/midgard5/templates/sheets/character/kampfkuenste.hbs"}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="tab base_values flexcol" data-group="primary" data-tab="effects">
|
<div class="tab base_values flexcol" data-group="primary" data-tab="effects">
|
||||||
{{> "systems/midgard5/templates/sheets/character/effects.hbs"}}
|
{{> "systems/midgard5/templates/sheets/character/effects.hbs"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{localize "ITEM.TypeSpell"}}</th>
|
<th>{{localize "TYPES.Item.spell"}}</th>
|
||||||
<th>{{localize "midgard5.ew"}}</th>
|
<th>{{localize "midgard5.ew"}}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@@ -20,4 +20,4 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
<form class="item-sheet {{cssClass}}" 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>
|
||||||
|
<div class="sheet-content">
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan=4>
|
||||||
|
<div class="flexrow">
|
||||||
|
<span>
|
||||||
|
<input id="data.isKido" type="checkbox" name="data.isKido" {{checked data.isKido}}>
|
||||||
|
<label for="data.isKido">{{localize "midgard5.kido"}}</label>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{localize "midgard5.bonus"}}</td>
|
||||||
|
<td><input name="data.bonus" type="text" value="{{data.bonus}}" data-dtype="Number" /></td>
|
||||||
|
<td>{{localize "midgard5.actor-ap"}}</td>
|
||||||
|
<td><input name="data.ap" type="text" value="{{data.ap}}" data-dtype="String" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
{{#unless item.system.isKido}}
|
||||||
|
<td>{{localize "midgard5.kampfkunst-type"}}</td>
|
||||||
|
<td>
|
||||||
|
<select class="select-type" name="data.type" data-type="String">
|
||||||
|
{{#select data.type}}
|
||||||
|
{{#each data.kampfkunstTypeSelection as |label key|}}
|
||||||
|
<option value="{{key}}">{{localize label}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
{{else}}
|
||||||
|
<td>{{localize "midgard5.kido-type"}}</td>
|
||||||
|
<td>
|
||||||
|
<select class="select-type" name="data.type" data-type="String">
|
||||||
|
{{#select data.type}}
|
||||||
|
{{#each data.kidoTypeSelection as |label key|}}
|
||||||
|
<option value="{{key}}">{{localize label}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
{{/unless}}
|
||||||
|
{{#unless item.system.isKido}}
|
||||||
|
{{#if (eq item.system.type "angriff")}}
|
||||||
|
<td>{{localize "midgard5.kampfkunst-variante"}}</td>
|
||||||
|
<td>
|
||||||
|
<select class="select-variante" name="data.variante" data-type="String">
|
||||||
|
{{#select data.variante}}
|
||||||
|
{{#each data.kampfkunstVarianteSelection as |label key|}}
|
||||||
|
<option value="{{key}}">{{localize label}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
{{#unless (eq item.system.type "finte")}}
|
||||||
|
<td>{{localize "midgard5.kido-variante"}}</td>
|
||||||
|
<td>
|
||||||
|
<select class="select-variante" name="data.variante" data-type="String">
|
||||||
|
{{#select data.variante}}
|
||||||
|
{{#each data.kidoVarianteSelection as |label key|}}
|
||||||
|
<option value="{{key}}">{{localize label}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
{{/unless}}
|
||||||
|
{{/unless}}
|
||||||
|
</tr>
|
||||||
|
<td>{{localize "midgard5.skill"}}</td>
|
||||||
|
<td>
|
||||||
|
{{!-- {{#if data.calc.skills.general}} --}}
|
||||||
|
<select class="select-skill" name="data.skillId" data-type="String">
|
||||||
|
{{#select data.skillId}}
|
||||||
|
<option value="">{{localize "midgard5.no-skill"}}</option>
|
||||||
|
{{#each data.calc.generalSkills as |skill key|}}
|
||||||
|
<option value="{{key}}">{{skill.label}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
{{!-- {{else}}
|
||||||
|
<span>{{localize "midgard5.assignItemToCharacter"}}</span>
|
||||||
|
{{/if}} --}}
|
||||||
|
</td>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
|
||||||
|
|
||||||
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
Reference in New Issue
Block a user