diff --git a/lang/en.json b/lang/en.json index 1d98a4a..564735d 100644 --- a/lang/en.json +++ b/lang/en.json @@ -5,7 +5,8 @@ "LevelShort": "LvL", "ExperienceShort": "EXP", "ArmorClass": "AC", - "Speed": "Speed" + "Speed": "Speed", + "Attack": "Attack" } } } \ No newline at end of file diff --git a/less/character-sheet.less b/less/character-sheet.less index e3bc26d..2e4a9ee 100644 --- a/less/character-sheet.less +++ b/less/character-sheet.less @@ -416,4 +416,18 @@ top: 186px; border-top-left-radius: 101px 60px; } + + .statsBox { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-items: space-evenly; + } + + .categorySelectBox { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-items: space-evenly; + } } diff --git a/modules/sheets/pokemonCharacterSheet.js b/modules/sheets/pokemonCharacterSheet.js index 9a408ce..9b78165 100644 --- a/modules/sheets/pokemonCharacterSheet.js +++ b/modules/sheets/pokemonCharacterSheet.js @@ -63,11 +63,20 @@ export default class pokemonCharacterSheet extends api.HandlebarsApplicationMixi effects: baseData.document.effects }; + context = this.calculateDerivated(context) + this.sheetContext = context; return context; } + calculateDerivated(context) { + context.system.armorClass = 10+context.system.stats.defense + context.system.speed = 30+5*context.system.stats.speed + + return context + } + /** @override */ _onRender(context, options) { diff --git a/pokemon.css b/pokemon.css index dd51b49..5441d38 100644 --- a/pokemon.css +++ b/pokemon.css @@ -349,3 +349,15 @@ top: 186px; border-top-left-radius: 101px 60px; } +.pokemon.sheet.characterSheet .statsBox { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-items: space-evenly; +} +.pokemon.sheet.characterSheet .categorySelectBox { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-items: space-evenly; +} diff --git a/system.zip b/system.zip index 3062b4e..0813d15 100644 Binary files a/system.zip and b/system.zip differ diff --git a/template.json b/template.json index 1008013..1373e44 100644 --- a/template.json +++ b/template.json @@ -17,9 +17,11 @@ "stats": { "attack": 0, "defense": 0, - "move": 0, + "speed": 0, "hp": 0 }, + "attackCategory": 0, + "defenseCategory": 0, "speed": 0, "hp": { "max": 0, diff --git a/templates/partials/character-sheet-character.hbs b/templates/partials/character-sheet-character.hbs index 7a4d011..c0240c2 100644 --- a/templates/partials/character-sheet-character.hbs +++ b/templates/partials/character-sheet-character.hbs @@ -1,2 +1,26 @@ -
+
+
+
Attack
+
+ +
+
+
+
Defense
+
+ +
+
+
+
Speed
+
+
+
HP
+
\ No newline at end of file diff --git a/templates/sheets/character/sidebar.hbs b/templates/sheets/character/sidebar.hbs index 066749a..0751f9f 100644 --- a/templates/sheets/character/sidebar.hbs +++ b/templates/sheets/character/sidebar.hbs @@ -17,7 +17,7 @@
HP
-
Max
{{system.hp.max}}
+
Max
{{localize "POKEMON.System.ArmorClass"}}
{{system.armorClass}}