Finish draft 1 character sheet
This commit is contained in:
		
							parent
							
								
									92f03e3fab
								
							
						
					
					
						commit
						8269cb4ac1
					
				
							
								
								
									
										12
									
								
								hench.mjs
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								hench.mjs
									
									
									
									
									
								
							| @ -3,9 +3,15 @@ import { HenchDataModel } from "./module/data-models.mjs"; | |||||||
| import { HenchActorSheet } from "./module/sheets/hench-actor-sheet.mjs"; | import { HenchActorSheet } from "./module/sheets/hench-actor-sheet.mjs"; | ||||||
| 
 | 
 | ||||||
| Handlebars.registerHelper('int2checkbox', (size, threshold, options) => { | Handlebars.registerHelper('int2checkbox', (size, threshold, options) => { | ||||||
|     return new Array(size).fill(0).map( |     return Array(size).fill(0).map( | ||||||
|         (e, i) => options.fn({index: i + 1, marked: i < threshold}) |         (e, i) => options.fn({index: i + 1, marked: i < threshold}) | ||||||
|     ); |     ).reduce((prev, next) => (prev + next), ""); | ||||||
|  | }); | ||||||
|  | 
 | ||||||
|  | Handlebars.registerHelper('partialList', (list, start, end, options) => { | ||||||
|  |     return list.slice(start, end).map( | ||||||
|  |         (e, i) => options.fn({ item: e, index: (start + i)}) | ||||||
|  |     ).reduce((prev, next) => (prev + next), ""); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| Hooks.once("init", () => { | Hooks.once("init", () => { | ||||||
| @ -16,6 +22,6 @@ Hooks.once("init", () => { | |||||||
|     Actors.unregisterSheet('core', ActorSheet); |     Actors.unregisterSheet('core', ActorSheet); | ||||||
|     Actors.registerSheet('hench', HenchActorSheet, { |     Actors.registerSheet('hench', HenchActorSheet, { | ||||||
|         makeDefault: true, |         makeDefault: true, | ||||||
|         label: 'Hench Debug Sheet', |         label: 'Hench Sheet', | ||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
| @ -70,7 +70,7 @@ function getDataPathFromString(dataPathString) { | |||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export function updateField(actor, dataPathString, value) { | export async function updateField(actor, dataPathString, value) { | ||||||
|     const dataPath = getDataPathFromString(dataPathString); |     const dataPath = getDataPathFromString(dataPathString); | ||||||
| 
 | 
 | ||||||
|     console.log(`Converted ${dataPathString} to:`); |     console.log(`Converted ${dataPathString} to:`); | ||||||
| @ -85,11 +85,11 @@ export function updateField(actor, dataPathString, value) { | |||||||
|         console.log(`Array write at index ${dataPath.index}`); |         console.log(`Array write at index ${dataPath.index}`); | ||||||
|         console.log(copy); |         console.log(copy); | ||||||
| 
 | 
 | ||||||
|         actor.update({ |         await actor.update({ | ||||||
|             [dataPath.path]: copy, |             [dataPath.path]: copy, | ||||||
|         }); |         }); | ||||||
|     } else { |     } else { | ||||||
|         actor.update({ |         await actor.update({ | ||||||
|             [dataPath.path]: value |             [dataPath.path]: value | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -52,12 +52,25 @@ export class HenchActorSheet extends ActorSheet { | |||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         // text fields
 |         // text fields
 | ||||||
|         html.find('.hench-text-input').on('change', (event) => { |         html.find('.hench-text-input').on('change', async (event) => { | ||||||
|             const element = event.currentTarget; |             const element = event.currentTarget; | ||||||
|             const path = element.dataset.fieldPath; |             const path = element.dataset.fieldPath; | ||||||
|             const value = element.value; |             const value = element.value; | ||||||
| 
 | 
 | ||||||
|             updateField(this.actor, path, value); |             await updateField(this.actor, path, value); | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  |         // harm auto-marking
 | ||||||
|  |         html.find('.hench-harm-field').on('change', async (event) => { | ||||||
|  |             const element = event.currentTarget; | ||||||
|  |             const primaryPath = element.dataset.fieldPath; | ||||||
|  |             const secondaryPath = element.dataset.dependentPath; | ||||||
|  |             const stringValue = element.value; | ||||||
|  | 
 | ||||||
|  |             const markedValue = stringValue !== null && stringValue !== undefined && stringValue !== ""; | ||||||
|  | 
 | ||||||
|  |             await updateField(this.actor, primaryPath, stringValue) | ||||||
|  |             await updateField(this.actor, secondaryPath, markedValue); | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										140
									
								
								styles/hench.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										140
									
								
								styles/hench.css
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,140 @@ | |||||||
|  | /* Color tags */ | ||||||
|  | .hench-white { | ||||||
|  |     background-color: #FFFFFF; | ||||||
|  |     color: #000000; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-l-grey { | ||||||
|  |     background-color: #DDDDDD; | ||||||
|  |     color: #000000; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-m-grey { | ||||||
|  |     background-color: #BBBBBB; | ||||||
|  |     color: #000000; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-d-grey { | ||||||
|  |     background-color: #444444; | ||||||
|  |     color: #FFFFFF; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-black { | ||||||
|  |     background-color: #111111; | ||||||
|  |     color: #FFFFFF; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /* Flexbox */ | ||||||
|  | .hench-row { | ||||||
|  |     display: flex; | ||||||
|  |     flex-direction: row; | ||||||
|  |     align-items: stretch; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-sheet-container { | ||||||
|  |     display: flex; | ||||||
|  |     flex-direction: column; | ||||||
|  |     justify-content: center; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-box { | ||||||
|  |     display: flex; | ||||||
|  |     flex-direction: column; | ||||||
|  |     justify-content: center; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-box > * { | ||||||
|  |     flex-grow: 1; | ||||||
|  |     flex-shrink: 0; | ||||||
|  |     align-items: center; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-flex-fixed { | ||||||
|  |     flex-grow: 0; | ||||||
|  |     flex-shrink: 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-flex-resizeable { | ||||||
|  |     flex-grow: 1; | ||||||
|  |     flex-shrink: 1; | ||||||
|  |     flex-basis: 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-gap-narrow { | ||||||
|  |     gap: 0.5em; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-gap-wide { | ||||||
|  |     gap: 1em; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-padding-narrow { | ||||||
|  |     padding: 0.5em; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-padding-wide { | ||||||
|  |     padding: 1em; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /* Labels */ | ||||||
|  | .hench-centered { | ||||||
|  |     text-align: center; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /* Inputs */ | ||||||
|  | .hench-sheet-container input[type="text"], .hench-sheet-container select { | ||||||
|  |     border: 0px; | ||||||
|  |     border-bottom: 1px solid #000; | ||||||
|  |     border-radius: 0px; | ||||||
|  | 
 | ||||||
|  |     background-color: #00000000; | ||||||
|  |     height: auto; | ||||||
|  |     padding: 0; | ||||||
|  |     padding-top: 1px; | ||||||
|  |     margin: 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /* Specific */ | ||||||
|  | 
 | ||||||
|  | .hench-row-even{ | ||||||
|  |     justify-content: space-evenly; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-stress-checkboxes-2-rows { | ||||||
|  |     display: flex; | ||||||
|  |     flex-wrap: wrap; | ||||||
|  |     gap: 3.5%; | ||||||
|  |     padding: 3.5%; | ||||||
|  |     justify-content: center; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-stress-checkboxes-2-rows > input[type="checkbox"] { | ||||||
|  |     width: 12.5%; | ||||||
|  |     flex-basis: 12.5%; | ||||||
|  |     margin-left: 0; | ||||||
|  |     margin-right: 0; | ||||||
|  |     margin-bottom: 0.5em; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-icon { | ||||||
|  |     aspect-ratio: 1; | ||||||
|  |     width: 10em; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-harm-fixed-width { | ||||||
|  |     width: 8em; | ||||||
|  |     text-align: center; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-harm-input-cell { | ||||||
|  |     border-left: 1px solid #000; | ||||||
|  |     border-right: 1px solid #000; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-harm-input-cell > input[type=text] { | ||||||
|  |     border: 0px solid #000; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .hench-harm-row { | ||||||
|  |     border-bottom: 1px solid #000; | ||||||
|  | } | ||||||
| @ -4,8 +4,8 @@ | |||||||
|     "description": "HENCH (2025)", |     "description": "HENCH (2025)", | ||||||
|     "version": "0.0.0", |     "version": "0.0.0", | ||||||
|     "compatibility": { |     "compatibility": { | ||||||
|         "minimum": "11", |         "minimum": "12", | ||||||
|         "verified": "11" |         "verified": "12" | ||||||
|     }, |     }, | ||||||
|     "authors": [ |     "authors": [ | ||||||
|         { |         { | ||||||
| @ -17,7 +17,7 @@ | |||||||
|     "esmodules": [ |     "esmodules": [ | ||||||
|         "hench.mjs" |         "hench.mjs" | ||||||
|     ], |     ], | ||||||
|     "styles": [], |     "styles": ["styles/hench.css"], | ||||||
|     "packs": [], |     "packs": [], | ||||||
|     "languages": [], |     "languages": [], | ||||||
|     "documentTypes": { |     "documentTypes": { | ||||||
|  | |||||||
| @ -1,148 +1,290 @@ | |||||||
| <form> | <form> | ||||||
|     <h1> {{ actor.name }} </h1> |     <div class="hench-sheet-container hench-padding-wide hench-gap-wide hench-white"> | ||||||
|     <button id="hench-console-log">Log data to console.</button> |         <!-- ID row --> | ||||||
|     <h2> Details: </h2> |         <div class="hench-row hench-gap-wide"> | ||||||
| 
 |             <!-- Core - Name, Look, Playbook --> | ||||||
|     <div id="hench-explicit-details"> |             <div class="hench-box hench-l-grey hench-flex-resizeable hench-padding-narrow"> | ||||||
|         <p>Name: <input type="text" class="hench-text-input" value="{{actor.name}}" data-field-path="name" /></p> |                 <!-- Name --> | ||||||
|         <p>Look: <input type="text" class="hench-text-input" value="{{actor.system.look}}" data-field-path="actor.system.look" /></p> |                 <div class="hench-field hench-row hench-gap-narrow"> | ||||||
|         <div> |                     <label class="hench-flex-fixed" for="hench-name">Name: </label> | ||||||
|             <span><b>Playbook:</b></span> |                     <input type="text" name="hench-name" class="hench-text-input hench-flex-resizeable" value="{{actor.name}}" data-field-path="name" /> | ||||||
|             <select class="hench-hench-sheet-playbook-dropdown"> |                 </div> | ||||||
|                 {{#each playbookKeys}} |                 <!-- Look --> | ||||||
|                     <option value="{{this.key}}" {{#if this.selected}}selected{{/if}}>{{this.key}}</option> |                 <div class="hench-field hench-row hench-gap-narrow"> | ||||||
|                 {{/each}} |                     <label class="hench-flex-fixed" for="hench-look">Look: </label> | ||||||
|             </select> |                     <input type="text" name="hench-look" class="hench-text-input hench-flex-resizeable" value="{{actor.system.look}}" data-field-path="system.look" /> | ||||||
|  |                 </div> | ||||||
|  |                 <!-- Playbook --> | ||||||
|  |                 <div class="hench-field hench-row hench-gap-narrow"> | ||||||
|  |                     <label class="hench-flex-fixed" for="hench-playbook">Playbook: </label> | ||||||
|  |                     <select name="hench-playbook" class="hench-hench-sheet-playbook-dropdown hench-flex-resizeable"> | ||||||
|  |                         {{#each playbookKeys}} | ||||||
|  |                             <option value="{{this.key}}" {{#if this.selected}}selected{{/if}}>{{this.key}}</option> | ||||||
|  |                         {{/each}} | ||||||
|  |                     </select> | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|  |             <!-- Inclinations --> | ||||||
|  |             <div class="hench-box hench-l-grey hench-flex-resizeable hench-padding-narrow"> | ||||||
|  |                 <div class="hench-centered"> | ||||||
|  |                     Inclinations | ||||||
|  |                 </div> | ||||||
|  |                 <ul> | ||||||
|  |                     {{#each actor.system.fixedInclinations}} | ||||||
|  |                         <li> | ||||||
|  |                             {{this}} | ||||||
|  |                         </li> | ||||||
|  |                     {{/each}} | ||||||
|  |                     <li> | ||||||
|  |                         <input type="text" class="hench-text-input" data-field-path="system.customInclination" value="{{actor.system.customInclination}}" /> | ||||||
|  |                     </li> | ||||||
|  |                 </ul> | ||||||
|  |             </div> | ||||||
|  |             <!-- Icon --> | ||||||
|  |             <div class="hench-box hench-l-grey hench-flex-fixed"> | ||||||
|  |                 <img src="{{actor.img}}" data-edit="img" class="hench-icon" /> | ||||||
|  |             </div> | ||||||
|         </div> |         </div> | ||||||
|         <h3> Details </h3> |         <!-- Details row --> | ||||||
|         <div> |         <div class="hench-row hench-gap-wide"> | ||||||
|             <ul> |             <!-- Details -->  | ||||||
|  |             <div class="hench-box hench-l-grey hench-flex-resizeable hench-padding-narrow"> | ||||||
|                 {{#each actor.system.details}} |                 {{#each actor.system.details}} | ||||||
|                     <li> |                     <div class="hench-row"> | ||||||
|                         <b>{{this.question}}:</b> |                         <label for="hench-detail-{{@index}}">{{this.question}}</label> | ||||||
|                         <input type="text" class="hench-text-input" data-field-path="system.details[{{@index}}].answer" value="{{this.answer}}" /> |                     </div> | ||||||
|                     </li> |                     <div class="hench-row"> | ||||||
|  |                         <input name="hench-detail-{{@index}}" type="text" class="hench-text-input" data-field-path="system.details[{{@index}}].answer" value="{{this.answer}}" /> | ||||||
|  |                     </div> | ||||||
|                 {{/each}} |                 {{/each}} | ||||||
|             </ul> |             </div> | ||||||
|  |             <!-- Mission Planning --> | ||||||
|  |             <div class="hench-box hench-l-grey hench-flex-resizeable hench-padding-narrow"> | ||||||
|  |                 <div class="hench-centered"> | ||||||
|  |                     Mission Planning | ||||||
|  |                 </div> | ||||||
|  |                 <ul> | ||||||
|  |                     {{#each actor.system.missionPlanning}} | ||||||
|  |                         <li>{{this}}</li> | ||||||
|  |                     {{/each}} | ||||||
|  |                 </ul> | ||||||
|  |             </div> | ||||||
|         </div> |         </div> | ||||||
|         <h3> Inclinations </h3> |         <!-- Stress --> | ||||||
|         <div> |         <div class="hench-row hench-gap-wide"> | ||||||
|             <ul> |             <div class="hench-box hench-l-grey hench-flex-resizeable hench-padding-narrow"> | ||||||
|                 {{#each actor.system.fixedInclinations}} |                 <div class="hench-centered"> | ||||||
|                     <li>{{this}}</li> |                     <label for="hench-stress"> | ||||||
|                 {{/each}} |                         Stress | ||||||
|                 <li> |                     </label> | ||||||
|                     <input type="text" class="hench-text-input" data-field-path="system.customInclination" value="{{actor.system.customInclination}}" /> |                 </div> | ||||||
|                 </li> |                 <div class="hench-row hench-row-even hench-gap-narrow"> | ||||||
|             </ul> |                     {{#int2checkbox maxStress actor.system.stress}} | ||||||
|  |                         <input name="hench-stress" type="checkbox" class="hench-checkbox hench-checkbox-int-field" data-field-path="system.stress" data-value="{{index}}" {{#if marked}}checked {{/if}} /> | ||||||
|  |                     {{/int2checkbox}} | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|         </div> |         </div> | ||||||
|         <h3>Mission Planning</h3> |         <!-- Gear --> | ||||||
|         <ul> |         <div class="hench-row hench-gap-wide"> | ||||||
|             {{#each actor.system.missionPlanning}} |             <div class="hench-box hench-l-grey hench-flex-resizeable hench-padding-narrow"> | ||||||
|                 <li>{{this}}</li> |                 <div class="hench-centered"> | ||||||
|             {{/each}} |                     Gear | ||||||
|         </ul> |                 </div> | ||||||
| 
 |                 <div class="hench-row hench-gap-wide"> | ||||||
|         <p><b>Gear Limit</b>: {{actor.system.gearLimit}}</p> |                     <div class="hench-box hench-flex-resizeable"> | ||||||
| 
 |                         {{#partialList actor.system.fixedGear 0 5}} | ||||||
|         <h3>Gear</h3> |                             <div class="hench-row hench-gap-narrow"> | ||||||
|         <ul> |                                 <div class="hench-flex-fixed"> | ||||||
|             {{#each actor.system.fixedGear}} |                                     <input type="checkbox" name="hench-gear-{{index}}" class="hench-checkbox hench-checkbox-toggle-field" data-field-path="system.fixedGear[{{index}}].marked" {{#if item.marked}}checked{{/if}} /> | ||||||
|                 <li> |                                 </div> | ||||||
|                     <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.fixedGear[{{@index}}].marked" {{#if this.marked}}checked{{/if}}/> |                                 <div class="hench-box hench-flex-resizeable"> | ||||||
|                     {{this.description}} |                                     <div> | ||||||
|                 </li> |                                         {{item.description}} | ||||||
|             {{/each}} |                                     </div> | ||||||
|             <li> |                                 </div> | ||||||
|                 <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.customGear.marked" {{#if actor.system.customGear.marked}}checked{{/if}}/> |                             </div> | ||||||
|                 <input type="text" class="hench-text-input" data-field-path="system.customGear.description" value="{{actor.system.customGear.description}}" /> |                         {{/partialList}} | ||||||
|             </li> |                     </div> | ||||||
|         </ul> |                     <div class="hench-box hench-flex-resizeable"> | ||||||
| 
 |                         {{#partialList actor.system.fixedGear 5 9}} | ||||||
|         <h3>Abilities</h3> |                             <div class="hench-row hench-gap-narrow"> | ||||||
|         <ul> |                                 <div class="hench-flex-fixed"> | ||||||
|             {{#each actor.system.moves}} |                                     <input type="checkbox" name="hench-gear-{{index}}" class="hench-checkbox hench-checkbox-toggle-field" data-field-path="system.fixedGear[{{index}}].marked" {{#if item.marked}}checked{{/if}} /> | ||||||
|                 <li> |                                 </div> | ||||||
|                     <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.moves[{{@index}}].marked" {{#if this.marked}}checked{{/if}} /> |                                 <div class="hench-box hench-flex-resizeable"> | ||||||
|                     <span><b>{{this.name}}:</b> {{this.description}}</span> |                                     <div> | ||||||
|                     {{#if this.hasWriteIn}} |                                         {{item.description}} | ||||||
|                         <input type="text" class="hench-text-input" data-field-path="system.moves[{{@index}}.writein]" value="{{this.writein}}" /> |                                     </div> | ||||||
|                     {{/if}} |                                 </div> | ||||||
|                 </li> |                             </div> | ||||||
|             {{/each}} |                         {{/partialList}} | ||||||
|             <li> |                         <div class="hench-row hench-gap-narrow"> | ||||||
|                 <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.customMove.marked" {{#if actor.system.customMove.marked}}checked{{/if}} /> |                             <div class="hench-flex-fixed"> | ||||||
|                 <textarea class="hench-text-input" data-field-path="system.customMove.description" {{#if actor.system.customMove.marked}}{{else}}disabled{{/if}}>{{actor.system.customMove.description}}</textarea> |                                 <input type="checkbox" name="hench-gear-9" class="hench-checkbox hench-checkbox-toggle-field" data-field-path="system.customGear.marked" {{#if actor.system.customGear.marked}}checked{{/if}} /> | ||||||
|             </li> |                             </div> | ||||||
|         </ul> |                             <div class="hench-box hench-flex-resizeable"> | ||||||
| 
 |                                 <div> | ||||||
|         <h3> Harm: </h3> |                                     <input type="text" class="hench-text-input" data-field-path="system.customGear.description" value="{{actor.system.customGear.description}}" /> | ||||||
|         <div> |                                 </div> | ||||||
|             <h4>Level 1:</h4> |                             </div> | ||||||
|             <ul> |                         </div> | ||||||
|                 {{#each actor.system.harm.levelOne}} |                     </div> | ||||||
|                     <li> |                 </div> | ||||||
|                         <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.harm.levelOne[{{@index}}].marked" {{#if this.marked}}checked{{/if}} /> |             </div> | ||||||
|                         <input type="text" class="hench-text-input" data-field-path="system.harm.levelOne[{{@index}}].description" value="{{this.description}}" /> |  | ||||||
|                     </li> |  | ||||||
|                 {{/each}} |  | ||||||
|             </ul> |  | ||||||
|             <h4>Level 2:</h4> |  | ||||||
|             <ul> |  | ||||||
|                 {{#each actor.system.harm.levelTwo}} |  | ||||||
|                     <li> |  | ||||||
|                         <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.harm.levelTwo[{{@index}}].marked" {{#if this.marked}}checked{{/if}} /> |  | ||||||
|                         <input type="text" class="hench-text-input" data-field-path="system.harm.levelTwo[{{@index}}].description" value="{{this.description}}" /> |  | ||||||
|                     </li> |  | ||||||
|                 {{/each}} |  | ||||||
|             </ul> |  | ||||||
|             <h4>Level 3:</h4> |  | ||||||
|             <ul> |  | ||||||
|                 {{#each actor.system.harm.levelThree}} |  | ||||||
|                     <li> |  | ||||||
|                         <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.harm.levelThree[{{@index}}].marked" {{#if this.marked}}checked{{/if}} /> |  | ||||||
|                         <input type="text" class="hench-text-input" data-field-path="system.harm.levelThree[{{@index}}].description" value="{{this.description}}" /> |  | ||||||
|                     </li> |  | ||||||
|                 {{/each}} |  | ||||||
|             </ul> |  | ||||||
|             <h4>Level 3:</h4> |  | ||||||
|             <ul> |  | ||||||
|                 {{#each actor.system.harm.levelFour}} |  | ||||||
|                     <li> |  | ||||||
|                         <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.harm.levelFour[{{@index}}].marked" {{#if this.marked}}checked{{/if}} /> |  | ||||||
|                         <input type="text" class="hench-text-input" data-field-path="system.harm.levelFour[{{@index}}].description" value="{{this.description}}" /> |  | ||||||
|                     </li> |  | ||||||
|                 {{/each}} |  | ||||||
|             </ul> |  | ||||||
|         </div> |         </div> | ||||||
|         <p>Stress: {{ actor.system.stress }}</p> |         <!-- Moves --> | ||||||
|         <ul> |         <div class="hench-row hench-gap-wide"> | ||||||
|             {{#int2checkbox maxStress actor.system.stress}} |             <div class="hench-box hench-m-grey hench-flex-resizeable hench-padding-narrow hench-gap-narrow"> | ||||||
|                 <li style="display:inline"><input type="checkbox" class="hench-checkbox-int-field" data-field-path="system.stress" data-value="{{index}}" {{#if marked}}checked{{/if}} /> </li> |                 <div class="hench-centered"> | ||||||
|             {{/int2checkbox}} |                     Abilities | ||||||
|         </ul> |                 </div> | ||||||
|         <h3>Experience Triggers</h3> |                 {{#each actor.system.moves}} | ||||||
|         <ul> |                     <div class="hench-row hench-l-grey hench-flex-resizeable hench-gap-narrow"> | ||||||
|             {{#each actor.system.experienceTriggers}} |                         <div class="hench-box hench-flex-fixed"> | ||||||
|                 <li><input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.experienceTriggers[{{@index}}].marked" {{#if this.marked}}checked{{/if}} /> {{this.description}}</li> |                             <input type="checkbox" name="hench-move-checkbox-{{@index}}" class="hench-checkbox-toggle-field" data-field-path="system.moves[{{@index}}].marked" {{#if this.marked}}checked{{/if}} />  | ||||||
|             {{/each}} |                         </div> | ||||||
|         </ul> |                         <div class="hench-box hench-flex-resizeable hench-gap-narrow hench-padding-narrow"> | ||||||
|         <p>Experience: {{ actor.system.experience }}</p> |                             <div> | ||||||
|         <ul> |                                 <label for="hench-move-checkbox-{{@index}}">{{this.name}}</label> | ||||||
|             {{#int2checkbox maxExp actor.system.experience}} |                             </div> | ||||||
|                 <li style="display:inline"><input type="checkbox" class="hench-checkbox-int-field" data-field-path="system.experience" data-value="{{index}}" {{#if marked}}checked{{/if}} /> </li> |                             <div> | ||||||
|             {{/int2checkbox}} |                                 {{this.description}} | ||||||
|         </ul> |                             </div> | ||||||
|  |                             {{#if this.hasWriteIn}} | ||||||
|  |                                 <div> | ||||||
|  |                                     <input type="text" name="hench-move-writein-{{@index}}" class="hench-text-field" data-field-path="system.moves[{{@index}}].writein" value="{{this.writein}}" /> | ||||||
|  |                                 </div> | ||||||
|  |                             {{/if}} | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|  |                 {{/each}} | ||||||
|  |                 <div class="hench-row hench-l-grey hench-flex-resizeable hench-gap-narrow"> | ||||||
|  |                     <div class="hench-box hench-flex-fixed"> | ||||||
|  |                         <input type="checkbox" name="hench-move-checkbox-custom" class="hench-checkbox-toggle-field" data-field-path="system.customMove.marked" {{#if actor.system.customMove.marked}}checked{{/if}} />  | ||||||
|  |                     </div> | ||||||
|  |                     <div class="hench-box hench-flex-resizeable hench-gap-narrow hench-padding-narrow"> | ||||||
|  |                         <div> | ||||||
|  |                             <input type="text" name="hench-move-name-custom" class="hench-text-field" data-field-path="system.customMove.name" value="{{actor.system.customMove.name}}" {{#if actor.system.customMove.marked}} {{else}} disabled {{/if}} /> | ||||||
|  |                         </div> | ||||||
|  |                         <div> | ||||||
|  |                             <input type="text" name="hench-move-description-custom" class="hench-text-field" data-field-path="system.customMove.description" value="{{actor.system.customMove.description}}" {{#if actor.system.customMove.marked}} {{else}} disabled {{/if}} /> | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |         <!-- Harm --> | ||||||
|  |         <div class="hench-row hench-gap-wide"> | ||||||
|  |             <div class="hench-box hench-black hench-padding-narrow hench-flex-resizeable"> | ||||||
|  |                 <div class="hench-row"> | ||||||
|  |                     <div class="hench-flex-resizeable hench-centered"> | ||||||
|  |                         Harm | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |                 <!-- tier 3 --> | ||||||
|  |                 <div class="hench-row hench-m-grey hench-harm-row hench-flex-resizeable"> | ||||||
|  |                     <div class="hench-flex-fixed hench-m-grey hench-harm-fixed-width"> | ||||||
|  |                         3: | ||||||
|  |                     </div> | ||||||
|  |                     {{#each actor.system.harm.levelThree}} | ||||||
|  |                         <div class="{{#if this.marked}}hench-white{{else}}hench-l-grey{{/if}} hench-flex-resizeable hench-padding-narrow hench-harm-input-cell"> | ||||||
|  |                             <input type="text" class="hench-harm-field" data-field-path="system.harm.levelThree[{{@index}}].description" data-dependent-path="system.harm.levelThree[{{@index}}].marked" value="{{this.description}}" /> | ||||||
|  |                         </div> | ||||||
|  |                     {{/each}} | ||||||
|  |                     <div class="hench-flex-fixed hench-m-grey hench-harm-fixed-width"> | ||||||
|  |                         Need help. | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |                 <!-- tier 2 --> | ||||||
|  |                 <div class="hench-row hench-m-grey hench-harm-row hench-flex-resizeable"> | ||||||
|  |                     <div class="hench-flex-fixed hench-m-grey hench-harm-fixed-width"> | ||||||
|  |                         2: | ||||||
|  |                     </div> | ||||||
|  |                     {{#each actor.system.harm.levelTwo}} | ||||||
|  |                         <div class="{{#if this.marked}}hench-white{{else}}hench-l-grey{{/if}} hench-flex-resizeable hench-padding-narrow hench-harm-input-cell"> | ||||||
|  |                             <input type="text" class="hench-harm-field" data-field-path="system.harm.levelTwo[{{@index}}].description" data-dependent-path="system.harm.levelTwo[{{@index}}].marked" value="{{this.description}}" /> | ||||||
|  |                         </div> | ||||||
|  |                     {{/each}} | ||||||
|  |                     <div class="hench-flex-fixed hench-m-grey hench-harm-fixed-width"> | ||||||
|  |                         -1 Card | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |                 <!-- tier 1--> | ||||||
|  |                 <div class="hench-row hench-m-grey hench-harm-row hench-flex-resizeable"> | ||||||
|  |                     <div class="hench-flex-fixed hench-m-grey hench-harm-fixed-width"> | ||||||
|  |                         1: | ||||||
|  |                     </div> | ||||||
|  |                     {{#each actor.system.harm.levelOne}} | ||||||
|  |                         <div class="{{#if this.marked}}hench-white{{else}}hench-l-grey{{/if}} hench-flex-resizeable hench-padding-narrow hench-harm-input-cell"> | ||||||
|  |                             <input type="text" class="hench-harm-field" data-field-path="system.harm.levelOne[{{@index}}].description" data-dependent-path="system.harm.levelOne[{{@index}}].marked" value="{{this.description}}" /> | ||||||
|  |                         </div> | ||||||
|  |                     {{/each}} | ||||||
|  |                     <div class="hench-flex-fixed hench-m-grey hench-harm-fixed-width"> | ||||||
|                          |                          | ||||||
|         <h3>Advancements</h3> |                     </div> | ||||||
|         <ul> |                 </div> | ||||||
|             {{#each actor.system.baseAdvancements}} |             </div> | ||||||
|                 <li><input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.baseAdvancements[{{@index}}].marked" {{#if this.marked}}checked{{/if}} /> {{this.description}}</li> |         </div> | ||||||
|             {{/each}} |         <!-- Experience --> | ||||||
|             <hr /> |         <div class="hench-row hench-gap-wide"> | ||||||
|             {{#each actor.system.exAdvancements}} |             <div class="hench-box hench-l-grey hench-padding-narrow hench-gap-narrow hench-flex-resizeable"> | ||||||
|                 <li><input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.exAdvancements[{{@index}}].marked" {{#if this.marked}}checked{{/if}} /> {{this.description}}</li> |                 <div class="hench-centered"> | ||||||
|             {{/each}} |                     Experience | ||||||
|         </ul> |                 </div> | ||||||
|  |                 <div class="hench-row hench-row-even hench-gap-narrow hench-padding-narrow"> | ||||||
|  |                     {{#int2checkbox maxExp actor.system.experience}} | ||||||
|  |                         <div> | ||||||
|  |                             <input type="checkbox" class="hench-checkbox-int-field" data-field-path="system.experience" data-value="{{index}}" {{#if marked}} checked {{/if}} /> | ||||||
|  |                         </div> | ||||||
|  |                     {{/int2checkbox}} | ||||||
|  |                 </div> | ||||||
|  |                 <ul> | ||||||
|  |                     {{#each actor.system.experienceTriggers}} | ||||||
|  |                         <li> | ||||||
|  |                             {{this.description}} | ||||||
|  |                         </li> | ||||||
|  |                     {{/each}} | ||||||
|  |                 </ul> | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |         <!-- Advancements --> | ||||||
|  |         <div class="hench-row hench-gap-wide"> | ||||||
|  |             <!-- base advancements --> | ||||||
|  |             <div class="hench-box hench-m-grey hench-flex-resizeable hench-padding-narrow hench-gap-narrow"> | ||||||
|  |                 <div class="hench-flex-fixed hench-centered"> | ||||||
|  |                     Advancements | ||||||
|  |                 </div> | ||||||
|  |                 {{#each actor.system.baseAdvancements}} | ||||||
|  |                     <div class="hench-row hench-flex-resizeable hench-l-grey hench-padding-narrow hench-gap-narrow"> | ||||||
|  |                         <div class="hench-box hench-flex-fixed"> | ||||||
|  |                             <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.baseAdvancements[{{@index}}].marked" {{#if this.marked}} checked {{/if}} /> | ||||||
|  |                         </div> | ||||||
|  |                         <div class="hench-box hench-flex-resizeable"> | ||||||
|  |                             {{this.description}} | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|  |                 {{/each}} | ||||||
|  |             </div> | ||||||
|  |             <!-- advanced advancements --> | ||||||
|  |             <div class="hench-box hench-black hench-flex-resizeable hench-gap-narrow hench-padding-narrow"> | ||||||
|  |                 <div class="hench-flex-fixed hench-centered"> | ||||||
|  |                     Advancements | ||||||
|  |                 </div> | ||||||
|  |                 <div class="hench-flex-fixed hench-centered"> | ||||||
|  |                     <em>(Take only after 3 or more advancements)</em> | ||||||
|  |                 </div> | ||||||
|  |                 {{#each actor.system.exAdvancements}} | ||||||
|  |                     <div class="hench-row hench-flex-resizeable hench-l-grey hench-padding-narrow hench-gap-narrow"> | ||||||
|  |                         <div class="hench-box hench-flex-fixed"> | ||||||
|  |                             <input type="checkbox" class="hench-checkbox-toggle-field" data-field-path="system.exAdvancements[{{@index}}].marked" {{#if this.marked}} checked {{/if}} /> | ||||||
|  |                         </div> | ||||||
|  |                         <div class="hench-box hench-flex-resizeable"> | ||||||
|  |                             {{this.description}} | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|  |                 {{/each}} | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|     </div> |     </div> | ||||||
| </form> | </form> | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 walcutt
						walcutt