diff --git a/less/character-sheet.less b/less/character-sheet.less index ebf94bf..9b6df37 100644 --- a/less/character-sheet.less +++ b/less/character-sheet.less @@ -646,6 +646,7 @@ } .defenseTable { + margin-top: 10px; border-radius: 5px; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; @@ -663,6 +664,12 @@ // text-shadow: none; } + .effectiveness¼ { + background-color: red; + color: yellow; + // text-shadow: none; + } + .effectiveness½ { background-color: red; color: yellow; @@ -670,14 +677,25 @@ } .effectiveness1 { - background-color: white; - color: white; + background-color: #fff8; + color: transparent; text-shadow: none; } - .effectiveness½ { + .effectiveness2 { background-color: green; color: yellow; // text-shadow: none; } + + .effectiveness2 { + background-color: lime; + color: yellow; + // text-shadow: none; + } + + .header { + font-size: 25px; + text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000; + } } diff --git a/modules/sheets/pokemonCharacterSheet.js b/modules/sheets/pokemonCharacterSheet.js index 1cf669f..956f6fc 100644 --- a/modules/sheets/pokemonCharacterSheet.js +++ b/modules/sheets/pokemonCharacterSheet.js @@ -103,6 +103,14 @@ 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 55e0370..3d65dc7 100644 --- a/pokemon.css +++ b/pokemon.css @@ -539,6 +539,7 @@ right: 10px; } .pokemon.sheet.characterSheet .defenseTable { + margin-top: 10px; border-radius: 5px; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; } @@ -552,16 +553,28 @@ background-color: black; color: yellow; } +.pokemon.sheet.characterSheet .effectiveness¼ { + background-color: red; + color: yellow; +} .pokemon.sheet.characterSheet .effectiveness½ { background-color: red; color: yellow; } .pokemon.sheet.characterSheet .effectiveness1 { - background-color: white; - color: white; + background-color: #fff8; + color: transparent; text-shadow: none; } -.pokemon.sheet.characterSheet .effectiveness½ { +.pokemon.sheet.characterSheet .effectiveness2 { background-color: green; color: yellow; } +.pokemon.sheet.characterSheet .effectiveness2 { + background-color: lime; + color: yellow; +} +.pokemon.sheet.characterSheet .header { + font-size: 25px; + text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000; +} diff --git a/pokemon.js b/pokemon.js index 1b7da73..c756671 100644 --- a/pokemon.js +++ b/pokemon.js @@ -52,9 +52,11 @@ function preloadHandlebarsTemplates() { function registerHandlebarsHelpers() { + Handlebars.registerHelper("upper", function(s1) {return s1.toUpperCase()}); + Handlebars.registerHelper("short", function(s1) {return s1.slice(0,3).toUpperCase()}); - Handlebars.registerHelper("equals", function(v1, v2) { console.log("v1: "+v1+"\nv2: "+v2); return (v1 === v2)}); + Handlebars.registerHelper("equals", function(v1, v2) { return (v1 === v2)}); Handlebars.registerHelper("contains", function(element, search) { return (element.includes(search))}); diff --git a/system.json b/system.json index 6909df8..4b344f1 100644 --- a/system.json +++ b/system.json @@ -1,5 +1,5 @@ { - "version": "0.1.16", + "version": "0.1.17", "id": "pokemon", "title": "Pokémon TTRPG", "description": "A Pokémon TTRPG", diff --git a/system.zip b/system.zip index 933144f..29db3ff 100644 Binary files a/system.zip and b/system.zip differ diff --git a/templates/sheets/character/header.hbs b/templates/sheets/character/header.hbs index e65f285..a74aaf5 100644 --- a/templates/sheets/character/header.hbs +++ b/templates/sheets/character/header.hbs @@ -6,13 +6,13 @@