diff --git a/less/character-sheet.less b/less/character-sheet.less index 9b6df37..33f8384 100644 --- a/less/character-sheet.less +++ b/less/character-sheet.less @@ -688,7 +688,7 @@ // text-shadow: none; } - .effectiveness2 { + .effectiveness4 { background-color: lime; color: yellow; // text-shadow: none; diff --git a/modules/sheets/pokemonCharacterSheet.js b/modules/sheets/pokemonCharacterSheet.js index 956f6fc..1cf669f 100644 --- a/modules/sheets/pokemonCharacterSheet.js +++ b/modules/sheets/pokemonCharacterSheet.js @@ -103,14 +103,6 @@ export default class pokemonCharacterSheet extends api.HandlebarsApplicationMixi effectiveness *= this.effectivenessChart[type][context.system.type2] ?? 1; } - if (effectiveness == 0.5) { - effectiveness = "½"; - } - - if (effectiveness == 0.25) { - effectiveness = "¼"; - } - return effectiveness } diff --git a/pokemon.css b/pokemon.css index 3d65dc7..273f615 100644 --- a/pokemon.css +++ b/pokemon.css @@ -570,7 +570,7 @@ background-color: green; color: yellow; } -.pokemon.sheet.characterSheet .effectiveness2 { +.pokemon.sheet.characterSheet .effectiveness4 { background-color: lime; color: yellow; } diff --git a/pokemon.js b/pokemon.js index c756671..958ed54 100644 --- a/pokemon.js +++ b/pokemon.js @@ -52,6 +52,13 @@ function preloadHandlebarsTemplates() { function registerHandlebarsHelpers() { + Handlebars.registerHelper("symbol", function(s1) { + if (s1 == 0.5 || s1 == 0.25) { + return "½"; + } + return s1; + }); + Handlebars.registerHelper("upper", function(s1) {return s1.toUpperCase()}); Handlebars.registerHelper("short", function(s1) {return s1.slice(0,3).toUpperCase()}); diff --git a/system.json b/system.json index 4b344f1..1078364 100644 --- a/system.json +++ b/system.json @@ -1,5 +1,5 @@ { - "version": "0.1.17", + "version": "0.1.18", "id": "pokemon", "title": "Pokémon TTRPG", "description": "A Pokémon TTRPG", diff --git a/system.zip b/system.zip index 29db3ff..ea182c4 100644 Binary files a/system.zip and b/system.zip differ diff --git a/templates/partials/character-sheet-character.hbs b/templates/partials/character-sheet-character.hbs index 35be469..5d63ce2 100644 --- a/templates/partials/character-sheet-character.hbs +++ b/templates/partials/character-sheet-character.hbs @@ -68,7 +68,7 @@ {{#each defenses}} - {{this}} + {{this}} {{/each}}