This commit is contained in:
Nikolaj
2025-08-05 10:15:03 +02:00
parent 38e52a3371
commit ce5c9534b4
7 changed files with 84 additions and 55 deletions

View File

@@ -340,7 +340,7 @@
position: absolute; position: absolute;
right: 0px; right: 0px;
height: 5px; height: 5px;
bottom: 496px; bottom: 511px;
background-color: #5e0000; background-color: #5e0000;
} }
@@ -633,4 +633,9 @@
.fairy { .fairy {
background-color: #D685AD; background-color: #D685AD;
} }
.charInfoBox {
display: flex;
flex-direction: column;
}
} }

View File

@@ -84,6 +84,8 @@ export default class pokemonCharacterSheet extends api.HandlebarsApplicationMixi
context.system.spArmorClass += 2; context.system.spArmorClass += 2;
} }
context.defenses = ["1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"]
context.system.speed = 30+5*context.system.stats.speed; context.system.speed = 30+5*context.system.stats.speed;
return context; return context;

View File

@@ -290,7 +290,7 @@
position: absolute; position: absolute;
right: 0px; right: 0px;
height: 5px; height: 5px;
bottom: 496px; bottom: 511px;
background-color: #5e0000; background-color: #5e0000;
} }
.pokemon.sheet.characterSheet nav { .pokemon.sheet.characterSheet nav {
@@ -529,3 +529,7 @@
.pokemon.sheet.characterSheet .fairy { .pokemon.sheet.characterSheet .fairy {
background-color: #D685AD; background-color: #D685AD;
} }
.pokemon.sheet.characterSheet .charInfoBox {
display: flex;
flex-direction: column;
}

View File

@@ -52,6 +52,8 @@ function preloadHandlebarsTemplates() {
function registerHandlebarsHelpers() { function registerHandlebarsHelpers() {
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) { console.log("v1: "+v1+"\nv2: "+v2); return (v1 === v2)});
Handlebars.registerHelper("contains", function(element, search) { return (element.includes(search))}); Handlebars.registerHelper("contains", function(element, search) { return (element.includes(search))});

View File

@@ -1,5 +1,5 @@
{ {
"version": "0.1.6", "version": "0.1.7",
"id": "pokemon", "id": "pokemon",
"title": "Pokémon TTRPG", "title": "Pokémon TTRPG",
"description": "A Pokémon TTRPG", "description": "A Pokémon TTRPG",

Binary file not shown.

View File

@@ -1,58 +1,74 @@
<div class="statsBox"> <div class="charInfoBox">
<div class="row"> <div class="statsBox">
<div class="charHex statHex"><span class="charHexHead">Attack</span></br><input class="charHexValue invisibleInput" type="number" name="system.stats.attack" value="{{system.stats.attack}}"></div> <div class="row">
<div class="categorySelectBox"> <div class="charHex statHex"><span class="charHexHead">Attack</span></br><input class="charHexValue invisibleInput" type="number" name="system.stats.attack" value="{{system.stats.attack}}"></div>
<div class="row"> <div class="categorySelectBox">
<label class="container"> <div class="row">
<input class="radioButton" type="radio" name="system.attackCategory" value="Physical" <label class="container">
{{#if (equals system.attackCategory "Physical")}}checked{{/if}}> <input class="radioButton" type="radio" name="system.attackCategory" value="Physical"
<span class="checkmark"></span> {{#if (equals system.attackCategory "Physical")}}checked{{/if}}>
Physical <span class="checkmark"></span>
</label> Physical
</label>
</div>
<div class="row">
<label class="container">
<input class="radioButton" type="radio" name="system.attackCategory" value="Special"
{{#if (equals system.attackCategory "Special")}}checked{{/if}}>
<span class="checkmark"></span>
Special
</label>
</div>
{{!-- <select name="system.attackCategory">
<option value="Physical" {{#if (eq system.attackCategory "Physical")}}selected{{/if}}>Physical</option>
<option value="Special" {{#if (eq system.attackCategory "Special")}}selected{{/if}}>Special</option>
</select> --}}
</div> </div>
<div class="row">
<label class="container">
<input class="radioButton" type="radio" name="system.attackCategory" value="Special"
{{#if (equals system.attackCategory "Special")}}checked{{/if}}>
<span class="checkmark"></span>
Special
</label>
</div>
{{!-- <select name="system.attackCategory">
<option value="Physical" {{#if (eq system.attackCategory "Physical")}}selected{{/if}}>Physical</option>
<option value="Special" {{#if (eq system.attackCategory "Special")}}selected{{/if}}>Special</option>
</select> --}}
</div> </div>
</div> <div class="row">
<div class="row"> <div class="charHex statHex"><span class="charHexHead">Defense</span></br><input class="charHexValue invisibleInput" type="number" name="system.stats.defense" value="{{system.stats.defense}}"></div>
<div class="charHex statHex"><span class="charHexHead">Defense</span></br><input class="charHexValue invisibleInput" type="number" name="system.stats.defense" value="{{system.stats.defense}}"></div> <div class="categorySelectBox">
<div class="categorySelectBox"> <div class="row">
<div class="row"> <label class="container">
<label class="container"> <input class="radioButton" type="radio" name="system.defenseCategory" value="Physical"
<input class="radioButton" type="radio" name="system.defenseCategory" value="Physical" {{#if (equals system.defenseCategory "Physical")}}checked{{/if}}>
{{#if (equals system.defenseCategory "Physical")}}checked{{/if}}> <span class="checkmark"></span>
<span class="checkmark"></span> Physical
Physical </label>
</label> </div>
<div class="row">
<label class="container">
<input class="radioButton" type="radio" name="system.defenseCategory" value="Special"
{{#if (equals system.defenseCategory "Special")}}checked{{/if}}>
<span class="checkmark"></span>
Special
</label>
</div>
{{!-- <select name="system.defenseCategory">
<option value="Physical" {{#if (eq system.defenseCategory "Physical")}}selected{{/if}}>Physical</option>
<option value="Special" {{#if (eq system.defenseCategory "Special")}}selected{{/if}}>Special</option>
</select> --}}
</div> </div>
<div class="row">
<label class="container">
<input class="radioButton" type="radio" name="system.defenseCategory" value="Special"
{{#if (equals system.defenseCategory "Special")}}checked{{/if}}>
<span class="checkmark"></span>
Special
</label>
</div>
{{!-- <select name="system.defenseCategory">
<option value="Physical" {{#if (eq system.defenseCategory "Physical")}}selected{{/if}}>Physical</option>
<option value="Special" {{#if (eq system.defenseCategory "Special")}}selected{{/if}}>Special</option>
</select> --}}
</div> </div>
</div> <div class="row">
<div class="row"> <div class="charHex statHex"><span class="charHexHead">Speed</span></br><input class="charHexValue invisibleInput" type="number" name="system.stats.speed" value="{{system.stats.speed}}"></div>
<div class="charHex statHex"><span class="charHexHead">Speed</span></br><input class="charHexValue invisibleInput" type="number" name="system.stats.speed" value="{{system.stats.speed}}"></div> </div>
</div> <div class="row">
<div class="row"> <div class="charHex statHex"><span class="charHexHead">HP</span></br><input class="charHexValue invisibleInput" type="number" name="system.stats.hp" value="{{system.stats.hp}}"></div>
<div class="charHex statHex"><span class="charHexHead">HP</span></br><input class="charHexValue invisibleInput" type="number" name="system.stats.hp" value="{{system.stats.hp}}"></div> </div>
<div class="defenseBox">
<table class="defenseTable">
<tr>
{{#each types}}
<th>{{this}}</th>
{{/each}}
</tr>
<tr>
{{#each defenses}}
<th>{{this}}</th>
{{/each}}
</tr>
</table>
</div>
</div> </div>
</div> </div>