✨
This commit is contained in:
@@ -646,6 +646,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.defenseTable {
|
.defenseTable {
|
||||||
|
margin-top: 10px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
|
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;
|
// text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.effectiveness¼ {
|
||||||
|
background-color: red;
|
||||||
|
color: yellow;
|
||||||
|
// text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
.effectiveness½ {
|
.effectiveness½ {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
color: yellow;
|
color: yellow;
|
||||||
@@ -670,14 +677,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.effectiveness1 {
|
.effectiveness1 {
|
||||||
background-color: white;
|
background-color: #fff8;
|
||||||
color: white;
|
color: transparent;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.effectiveness½ {
|
.effectiveness2 {
|
||||||
background-color: green;
|
background-color: green;
|
||||||
color: yellow;
|
color: yellow;
|
||||||
// text-shadow: none;
|
// 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,14 @@ export default class pokemonCharacterSheet extends api.HandlebarsApplicationMixi
|
|||||||
effectiveness *= this.effectivenessChart[type][context.system.type2] ?? 1;
|
effectiveness *= this.effectivenessChart[type][context.system.type2] ?? 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (effectiveness == 0.5) {
|
||||||
|
effectiveness = "½";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (effectiveness == 0.25) {
|
||||||
|
effectiveness = "¼";
|
||||||
|
}
|
||||||
|
|
||||||
return effectiveness
|
return effectiveness
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
19
pokemon.css
19
pokemon.css
@@ -539,6 +539,7 @@
|
|||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
.pokemon.sheet.characterSheet .defenseTable {
|
.pokemon.sheet.characterSheet .defenseTable {
|
||||||
|
margin-top: 10px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
|
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;
|
background-color: black;
|
||||||
color: yellow;
|
color: yellow;
|
||||||
}
|
}
|
||||||
|
.pokemon.sheet.characterSheet .effectiveness¼ {
|
||||||
|
background-color: red;
|
||||||
|
color: yellow;
|
||||||
|
}
|
||||||
.pokemon.sheet.characterSheet .effectiveness½ {
|
.pokemon.sheet.characterSheet .effectiveness½ {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
color: yellow;
|
color: yellow;
|
||||||
}
|
}
|
||||||
.pokemon.sheet.characterSheet .effectiveness1 {
|
.pokemon.sheet.characterSheet .effectiveness1 {
|
||||||
background-color: white;
|
background-color: #fff8;
|
||||||
color: white;
|
color: transparent;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
.pokemon.sheet.characterSheet .effectiveness½ {
|
.pokemon.sheet.characterSheet .effectiveness2 {
|
||||||
background-color: green;
|
background-color: green;
|
||||||
color: yellow;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -52,9 +52,11 @@ function preloadHandlebarsTemplates() {
|
|||||||
|
|
||||||
function registerHandlebarsHelpers() {
|
function registerHandlebarsHelpers() {
|
||||||
|
|
||||||
|
Handlebars.registerHelper("upper", function(s1) {return s1.toUpperCase()});
|
||||||
|
|
||||||
Handlebars.registerHelper("short", function(s1) {return s1.slice(0,3).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))});
|
Handlebars.registerHelper("contains", function(element, search) { return (element.includes(search))});
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.1.16",
|
"version": "0.1.17",
|
||||||
"id": "pokemon",
|
"id": "pokemon",
|
||||||
"title": "Pokémon TTRPG",
|
"title": "Pokémon TTRPG",
|
||||||
"description": "A Pokémon TTRPG",
|
"description": "A Pokémon TTRPG",
|
||||||
|
|||||||
BIN
system.zip
BIN
system.zip
Binary file not shown.
@@ -6,13 +6,13 @@
|
|||||||
<div class="typeSelectBox">
|
<div class="typeSelectBox">
|
||||||
<select class="{{system.type1}}" name="system.type1">
|
<select class="{{system.type1}}" name="system.type1">
|
||||||
{{#each types}}
|
{{#each types}}
|
||||||
<option value="{{this}}" {{#if (equals ../system.type1 this)}}selected{{/if}}>{{this}}</option>
|
<option value="{{this}}" {{#if (equals ../system.type1 this)}}selected{{/if}}>{{upper this}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</select>
|
</select>
|
||||||
<select class="{{system.type2}}" name="system.type2">
|
<select class="{{system.type2}}" name="system.type2">
|
||||||
<option value="" {{#if (eq system.type2 "")}}selected{{/if}}></option>
|
<option value="" {{#if (eq system.type2 "")}}selected{{/if}}></option>
|
||||||
{{#each types}}
|
{{#each types}}
|
||||||
<option value="{{this}}" {{#if (equals ../system.type2 this)}}selected{{/if}}>{{this}}</option>
|
<option value="{{this}}" {{#if (equals ../system.type2 this)}}selected{{/if}}>{{upper this}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user