Files
roll20-character-sheets/PokemonTabletopAdventures_v3/PTA3.html
T

3011 lines
166 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- Background coloring strategy inspired by the GURPS sheet -->
<input class="sheet-color-setting" name="attr_type1" type="hidden" value="typeless" />
<div class="sheet-wrapper sheet-color-background">
<div class="sheet-page-selection">
<button class="sheet-page-selection-option" name="act_character-page" type="action">Character</button>
<button class="sheet-page-selection-option" name="act_configuration-page" type="action">Configuration</button>
</div>
<input class="sheet-selected-page" name="attr_selected-page" type="hidden" value="character-page" />
<div class="sheet-character-page">
<input class="sheet-character-type" name="attr_character-type" type="hidden" value="trainer" />
<p class="sheet-logo">
<img src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/PokemonTabletopAdventures_v3/images/PTA3SmallLogo.png" />
</p>
<div class="sheet-tab-trainer">
<div class="sheet-2col-centered">
<div class="sheet-character-name-grid">
<b>Name</b>
<input class="sheet-top-information" name="attr_character_name" spellcheck="false" title="Attribute: character_name" type="text" />
<b>Origin</b>
<input class="sheet-top-information" name="attr_origin" spellcheck="false" title="Attribute: origin" type="text" />
<b>Honors</b>
<input class="sheet-top-information" name="attr_honor_count" title="Attribute: honor_count" type="number" />
<b>Credits</b>
<input class="sheet-top-information long-number" name="attr_credits" title="Attribute: credits" type="number" />
</div>
<div class="sheet-character-class-grid">
<b>Class</b>
<input class="sheet-top-information" name="attr_class1" spellcheck="false" title="Attribute: class1" type="text" />
<b>Level</b>
<input class="sheet-top-information" name="attr_level1" title="Attribute: level1" type="number" />
<b>Class</b>
<input class="sheet-top-information" name="attr_class2" spellcheck="false" title="Attribute: class2" type="text" />
<b>Level</b>
<input class="sheet-top-information" name="attr_level2" title="Attribute: level2" type="number" />
<b>Class</b>
<input class="sheet-top-information" name="attr_class3" spellcheck="false" title="Attribute: class3" type="text" />
<b>Level</b>
<input class="sheet-top-information" name="attr_level3" title="Attribute: level3" type="number" />
<b>Class</b>
<input class="sheet-top-information" name="attr_class4" spellcheck="false" title="Attribute: class4" type="text" />
<b>Level</b>
<input class="sheet-top-information" name="attr_level4" title="Attribute: level4" type="number" />
</div>
</div>
</div>
<div class="sheet-tab-pokemon">
<div class="sheet-2col-centered">
<div class="sheet-character-name-grid">
<b>Name</b>
<input class="sheet-top-information" name="attr_character_name" spellcheck="false" title="Attribute: character_name" type="text" />
<b>Species</b>
<input class="sheet-top-information" name="attr_species" spellcheck="false" title="Attribute: species" type="text" />
<b>Type</b>
<span>
<select class="sheet-half-text sheet-no-dropdown" name="attr_type1" title="Attribute: type1">
<option value="bug">Bug</option>
<option value="dark">Dark</option>
<option value="dragon">Dragon</option>
<option value="electric">Electric</option>
<option value="fairy">Fairy</option>
<option value="fighting">Fighting</option>
<option value="fire">Fire</option>
<option value="flying">Flying</option>
<option value="ghost">Ghost</option>
<option value="grass">Grass</option>
<option value="ground">Ground</option>
<option value="ice">Ice</option>
<option value="normal" selected>Normal</option>
<option value="poison">Poison</option>
<option value="psychic">Psychic</option>
<option value="rock">Rock</option>
<option value="steel">Steel</option>
<option value="typeless">Typeless</option>
<option value="water">Water</option>
</select>
<select class="sheet-half-text sheet-no-dropdown" name="attr_type2" title="Attribute: type2">
<option value=""></option>
<option value="bug">Bug</option>
<option value="dark">Dark</option>
<option value="dragon">Dragon</option>
<option value="electric">Electric</option>
<option value="fairy">Fairy</option>
<option value="fighting">Fighting</option>
<option value="fire">Fire</option>
<option value="flying">Flying</option>
<option value="ghost">Ghost</option>
<option value="grass">Grass</option>
<option value="ground">Ground</option>
<option value="ice">Ice</option>
<option value="normal">Normal</option>
<option value="poison">Poison</option>
<option value="psychic">Psychic</option>
<option value="rock">Rock</option>
<option value="steel">Steel</option>
<option value="typeless">Typeless</option>
<option value="water">Water</option>
</select>
</span>
<b>Nature</b>
<select class="sheet-no-dropdown sheet-top-select" name="attr_nature-type" title="Attribute: nature-type">
<option value=""></option>
<option value="lonely">Lonely (+Atk, -Def)</option>
<option value="brave">Brave (+Atk, -Spd)</option>
<option value="adamant">Adamant (+Atk, -SpAtk)</option>
<option value="naughty">Naughty (+Atk, -SpDef)</option>
<option value="bold">Bold (+Def, -Atk)</option>
<option value="relaxed">Relaxed (+Def, -Spd)</option>
<option value="impish">Impish (+Def, -SpAtk)</option>
<option value="lax">Lax (+Def, -SpDef)</option>
<option value="timid">Timid (+Spd, -Atk)</option>
<option value="hasty">Hasty (+Spd, -Def)</option>
<option value="jolly">Jolly (+Spd, -SpAtk)</option>
<option value="naïve">Naïve (+Spd, -SpDef)</option>
<option value="modest">Modest (+SpAtk, -Atk)</option>
<option value="mild">Mild (+SpAtk, -Def)</option>
<option value="quiet">Quiet (+SpAtk, -Spd)</option>
<option value="rash">Rash (+SpAtk, -SpDef)</option>
<option value="calm">Calm (+SpDef, -Atk)</option>
<option value="gentle">Gentle (+SpDef, -Def)</option>
<option value="sassy">Sassy (+SpDef, -Spd)</option>
<option value="careful">Careful (+SpDef, -SpAtk)</option>
<option value="hardy">Hardy</option>
<option value="docile">Docile</option>
<option value="serious">Serious</option>
<option value="bashful">Bashful</option>
<option value="quirky">Quirky</option>
<option value="other">Other</option>
</select>
<b>Held Item</b>
<input class="sheet-top-information" name="attr_item" spellcheck="false" title="Attribute: item" type="text" />
</div>
<div class="sheet-character-name-grid">
<b>Size</b>
<input class="sheet-top-information" name="attr_size" spellcheck="false" title="Attribute: size" type="text" />
<b>Weight</b>
<input class="sheet-top-information" name="attr_weight" spellcheck="false" title="Attribute: weight" type="text" />
<b>Sex</b>
<input class="sheet-top-information" name="attr_pokemon_sex" spellcheck="false" title="Attribute: pokemon_sex" type="text" />
<b>Egg Group</b>
<input class="sheet-top-information" name="attr_egg_group" spellcheck="false" title="Attribute: egg_group" type="text" />
<b>Diet</b>
<input class="sheet-top-information" name="attr_diet" spellcheck="false" title="Attribute: diet" type="text" />
</div>
</div>
</div>
<div class="sheet-tab-hybrid">
<div class="sheet-2col-centered">
<div class="sheet-character-name-grid">
<b>Name</b>
<input class="sheet-top-information" name="attr_character_name" spellcheck="false" title="Attribute: character_name" type="text" />
<b>Species</b>
<input class="sheet-top-information" name="attr_species" spellcheck="false" title="Attribute: species" type="text" />
<b>Nature</b>
<select class="sheet-no-dropdown sheet-top-select" name="attr_nature-type" title="Attribute: nature-type">
<option value=""></option>
<option value="lonely">Lonely (+Atk, -Def)</option>
<option value="brave">Brave (+Atk, -Spd)</option>
<option value="adamant">Adamant (+Atk, -SpAtk)</option>
<option value="naughty">Naughty (+Atk, -SpDef)</option>
<option value="bold">Bold (+Def, -Atk)</option>
<option value="relaxed">Relaxed (+Def, -Spd)</option>
<option value="impish">Impish (+Def, -SpAtk)</option>
<option value="lax">Lax (+Def, -SpDef)</option>
<option value="timid">Timid (+Spd, -Atk)</option>
<option value="hasty">Hasty (+Spd, -Def)</option>
<option value="jolly">Jolly (+Spd, -SpAtk)</option>
<option value="naïve">Naïve (+Spd, -SpDef)</option>
<option value="modest">Modest (+SpAtk, -Atk)</option>
<option value="mild">Mild (+SpAtk, -Def)</option>
<option value="quiet">Quiet (+SpAtk, -Spd)</option>
<option value="rash">Rash (+SpAtk, -SpDef)</option>
<option value="calm">Calm (+SpDef, -Atk)</option>
<option value="gentle">Gentle (+SpDef, -Def)</option>
<option value="sassy">Sassy (+SpDef, -Spd)</option>
<option value="careful">Careful (+SpDef, -SpAtk)</option>
<option value="hardy">Hardy</option>
<option value="docile">Docile</option>
<option value="serious">Serious</option>
<option value="bashful">Bashful</option>
<option value="quirky">Quirky</option>
<option value="other">Other</option>
</select>
<b>Origin</b>
<input class="sheet-top-information" name="attr_origin" spellcheck="false" title="Attribute: origin" type="text" />
<b>Level / Honors</b>
<span>
<input class="sheet-top-information" name="attr_level1" title="Attribute: level1" type="number" />
<input class="sheet-top-information" name="attr_honor_count" title="Attribute: honor_count" type="number" />
</span>
<b>Credits</b>
<input class="sheet-top-information sheet-long-number" name="attr_credits" title="Attribute: credits" type="number" />
</div>
<div class="sheet-character-name-grid">
<b>Type</b>
<span>
<select class="sheet-half-text sheet-no-dropdown" name="attr_type1" title="type1">
<option value="bug">Bug</option>
<option value="dark">Dark</option>
<option value="dragon">Dragon</option>
<option value="electric">Electric</option>
<option value="fairy">Fairy</option>
<option value="fighting">Fighting</option>
<option value="fire">Fire</option>
<option value="flying">Flying</option>
<option value="ghost">Ghost</option>
<option value="grass">Grass</option>
<option value="ground">Ground</option>
<option value="ice">Ice</option>
<option value="normal" selected>Normal</option>
<option value="poison">Poison</option>
<option value="psychic">Psychic</option>
<option value="rock">Rock</option>
<option value="steel">Steel</option>
<option value="typeless">Typeless</option>
<option value="water">Water</option>
</select>
<select class="sheet-half-text sheet-no-dropdown" name="attr_type2" title="type2">
<option value=""></option>
<option value="bug">Bug</option>
<option value="dark">Dark</option>
<option value="dragon">Dragon</option>
<option value="electric">Electric</option>
<option value="fairy">Fairy</option>
<option value="fighting">Fighting</option>
<option value="fire">Fire</option>
<option value="flying">Flying</option>
<option value="ghost">Ghost</option>
<option value="grass">Grass</option>
<option value="ground">Ground</option>
<option value="ice">Ice</option>
<option value="normal">Normal</option>
<option value="poison">Poison</option>
<option value="psychic">Psychic</option>
<option value="rock">Rock</option>
<option value="steel">Steel</option>
<option value="typeless">Typeless</option>
<option value="water">Water</option>
</select>
</span>
<b>Size / Weight</b>
<span>
<input class="sheet-half-text sheet-top-information" name="attr_size" spellcheck="false" title="Attribute: size" type="text" />
<input class="sheet-half-text sheet-top-information" name="attr_weight" spellcheck="false" title="Attribute: weight" type="text" />
</span>
<b>Sex</b>
<input class="sheet-top-information" name="attr_pokemon_sex" spellcheck="false" title="Attribute: pokemon_sex" type="text" />
<b>Egg Group</b>
<input class="sheet-top-information" name="attr_egg_group" spellcheck="false" title="Attribute: egg_group" type="text" />
<b>Diet</b>
<input class="sheet-top-information" name="attr_diet" spellcheck="false" title="Attribute: diet" type="text" />
<b>Held Item</b>
<input class="sheet-top-information" name="attr_item" spellcheck="false" title="Attribute: item" type="text" />
</div>
</div>
</div>
<br />
<div class="sheet-tab-trainer sheet-tab-pokemon sheet-tab-hybrid">
<div class="sheet-character-stat-grid">
<div class="sheet-ball sheet-hp-ball">
<b>Current HP</b><br />
<input class="sheet-stat-ball-color" name="attr_HP" title="Attribute: HP" type="number" /><br />
<input class="sheet-stat-ball-color" name="attr_HP_max" title="Attribute: HP_max" type="number" /><br />
<p>Max HP</p>
</div>
<div class="sheet-ball sheet-atk-ball">
<b>Attack</b><br />
<input class="sheet-stat-ball-color" name="attr_ATK" title="Attribute: ATK" type="number" readonly /><br />
<button class="sheet-stat-roller" name="roll_attack_check" type="roll"
value="&{template:skill-roll} {{base-attribute=atk}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Generic Attack Check}} {{skill-roll=[[ 1d20 + [[ @{ATKMOD} + ?{Temp Modifier|0} ]] ]]}}">
<span name="attr_ATKMOD" title="Attribute: ATKMOD"></span>
</button>
<br />
<p>ATK mod</p>
</div>
<div class="sheet-ball sheet-def-ball">
<b>Defense</b><br />
<input class="sheet-stat-ball-color" name="attr_DEF" title="Attribute: DEF" type="number" readonly /><br />
<button class="sheet-stat-roller" name="roll_defense_check" type="roll"
value="&{template:skill-roll} {{base-attribute=def}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Generic Defense Check}} {{skill-roll=[[ 1d20 + [[ @{DEFMOD} + ?{Temp Modifier|0} ]] ]]}}">
<span name="attr_DEFMOD" title="Attribute: DEFMOD"></span>
</button>
<br />
<p>DEF mod</p>
</div>
<div class="sheet-ball sheet-spatk-ball">
<b>Special Attack</b><br />
<input class="sheet-stat-ball-color" name="attr_SPATK" title="Attribute: SPATK" type="number" readonly /><br />
<button class="sheet-stat-roller" name="roll_special_attack_check" type="roll"
value="&{template:skill-roll} {{base-attribute=spatk}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Generic Special Attack Check}} {{skill-roll=[[ 1d20 + [[ @{SPATKMOD} + ?{Temp Modifier|0} ]] ]]}}">
<span name="attr_SPATKMOD" title="Attribute: SPATKMOD"></span>
</button>
<br />
<p>SPATK mod</p>
</div>
<div class="sheet-ball sheet-spdef-ball">
<b>Special Defense</b><br />
<input class="sheet-stat-ball-color" name="attr_SPDEF" title="Attribute: SPDEF" type="number" readonly /><br />
<button class="sheet-stat-roller" name="roll_special_defense_check" type="roll"
value="&{template:skill-roll} {{base-attribute=spdef}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Generic Special Defense Check}} {{skill-roll=[[ 1d20 + [[ @{SPDEFMOD} + ?{Temp Modifier|0} ]] ]]}}">
<span name="attr_SPDEFMOD" title="Attribute: SPDEFMOD"></span>
</button>
<br />
<p>SPDEF mod</p>
</div>
<div class="sheet-ball sheet-spd-ball">
<b>Speed</b><br />
<input class="sheet-stat-ball-color" name="attr_SPD" title="Attribute: SPD" type="number" readonly /><br />
<button class="sheet-stat-roller" name="roll_speed_check" type="roll"
value="&{template:skill-roll} {{base-attribute=spd}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Generic Speed Check}} {{skill-roll=[[ 1d20 + [[ @{SPDMOD} + ?{Temp Modifier|0} ]] ]]}}">
<span name="attr_SPDMOD" title="Attribute: SPDMOD"></span>
</button>
<br />
<p>SPD mod</p>
</div>
</div>
</div>
<div class="sheet-tab-trainer">
<div class="sheet-collapsible-feature" style="position: relative;">
<input checked class="sheet-options-flag" name="attr_options_stat_flag" type="checkbox" />
<span name="attr_stat_flag">-</span>
<div class="sheet-display">
<div class="sheet-below-stats">
<input class="sheet-affliction-display" name="attr_afflictions_text" readonly type="text" value="" />
<span>
<b>Movement: </b>
<input class="sheet-speed-read-color" name="attr_movement" readonly title="Attribute: movement" type="number" />
<b>ft</b>
</span>
</div>
<div class="sheet-pokemon-extra-stats-grid">
<b>Temp Stat Changes</b>
<input class="sheet-attack-color" name="attr_atkbonus" title="Attribute: atkbonus" type="number" />
<input class="sheet-defense-color" name="attr_defbonus" title="Attribute: defbonus" type="number" />
<input class="sheet-spatk-color" name="attr_spatkbonus" title="Attribute: spatkbonus" type="number" />
<input class="sheet-spdef-color" name="attr_spdefbonus" title="Attribute: spdefbonus" type="number" />
<input class="sheet-speed-color" name="attr_spdbonus" title="Attribute: spdbonus" type="number" />
</div>
</div>
<div class="sheet-options">
<div class="sheet-below-stats">
<div class="sheet-afflictions-grid">
<p><label><input name="attr_Asleep" value="1" title="Attribute: Asleep" type="checkbox" /> Asleep</label></p>
<p><label><input name="attr_Burned" value="1" title="Attribute: Burned" type="checkbox" /> Burned</label></p>
<p><label><input name="attr_Confused" value="1" title="Attribute: Confused" type="checkbox" /> Confused</label></p>
<p><label><input name="attr_Cursed" value="1" title="Attribute: Cursed" type="checkbox" /> Cursed</label></p>
<p><label><input name="attr_Frozen" value="1" title="Attribute: Frozen" type="checkbox" /> Frozen</label></p>
<p><label><input name="attr_Infatuated" value="1" title="Attribute: Infatuated" type="checkbox" /> Infatuated</label></p>
<p><label><input name="attr_Paralyzed" value="1" title="Attribute: Paralyzed" type="checkbox" /> Paralyzed</label></p>
<p><label><input name="attr_Poisoned" value="1" title="Attribute: Poisoned" type="checkbox" /> Poisoned</label></p>
<p><label><input name="attr_Toxified" value="1" title="Attribute: Toxified" type="checkbox" /> Toxified</label></p>
<p><label><input name="attr_Stunned" value="1" title="Attribute: Stunned" type="checkbox" /> Stunned</label></p>
</div>
<div class="sheet-2col-centered">
<b>Movement</b>
<b>Bonus</b>
<span><input class="sheet-speed-read-color" name="attr_movement" readonly title="Attribute: movement" type="number" /><b>ft</b></span>
<span><input name="attr_movebonus" title="Attribute: movebonus" type="number" /><b>ft</b></span>
</div>
</div>
<div class="sheet-pokemon-extra-stats-grid">
<p></p>
<b>Attack</b>
<b>Defense</b>
<b>Special Attack</b>
<b>Special Defense</b>
<b>Speed</b>
<b>Base Stats</b>
<input class="sheet-attack-color" name="attr_atkbase" title="Attribute: atkbase" type="number" />
<input class="sheet-defense-color" name="attr_defbase" title="Attribute: defbase" type="number" />
<input class="sheet-spatk-color" name="attr_spatkbase" title="Attribute: spatkbase" type="number" />
<input class="sheet-spdef-color" name="attr_spdefbase" title="Attribute: spdefbase" type="number" />
<input class="sheet-speed-color" name="attr_spdbase" title="Attribute: spdbase" type="number" />
<b>Temp Stat Changes</b>
<input class="sheet-attack-color" name="attr_atkbonus" title="Attribute: atkbonus" type="number" />
<input class="sheet-defense-color" name="attr_defbonus" title="Attribute: defbonus" type="number" />
<input class="sheet-spatk-color" name="attr_spatkbonus" title="Attribute: spatkbonus" type="number" />
<input class="sheet-spdef-color" name="attr_spdefbonus" title="Attribute: spdefbonus" type="number" />
<input class="sheet-speed-color" name="attr_spdbonus" title="Attribute: spdbonus" type="number" />
</div>
</div>
</div>
</div>
<div class="sheet-tab-pokemon sheet-tab-hybrid">
<div class="sheet-collapsible-feature" style="position: relative;">
<input checked class="sheet-options-flag" name="attr_options_stat_flag" type="checkbox" />
<span name="attr_stat_flag">-</span>
<div class="sheet-display">
<div class="sheet-below-stats">
<input class="sheet-affliction-display" name="attr_afflictions_text" readonly type="text" value="" />
<span>
<b>Movement: </b>
<input class="sheet-speed-read-color" name="attr_movement" readonly title="Attribute: movement" type="number" />
<b>ft</b>
</span>
</div>
<div class="sheet-pokemon-extra-stats-grid">
<b>Temp Stat Changes</b>
<input class="sheet-attack-color" name="attr_atkbonus" title="Attribute: atkbonus" type="number" />
<input class="sheet-defense-color" name="attr_defbonus" title="Attribute: defbonus" type="number" />
<input class="sheet-spatk-color" name="attr_spatkbonus" title="Attribute: spatkbonus" type="number" />
<input class="sheet-spdef-color" name="attr_spdefbonus" title="Attribute: spdefbonus" type="number" />
<input class="sheet-speed-color" name="attr_spdbonus" title="Attribute: spdbonus" type="number" />
</div>
</div>
<div class="sheet-options">
<div class="sheet-below-stats">
<div class="sheet-afflictions-grid">
<p><label><input name="attr_Asleep" value="1" title="Attribute: Asleep" type="checkbox" /> Asleep</label></p>
<p><label><input name="attr_Burned" value="1" title="Attribute: Burned" type="checkbox" /> Burned</label></p>
<p><label><input name="attr_Confused" value="1" title="Attribute: Confused" type="checkbox" /> Confused</label></p>
<p><label><input name="attr_Cursed" value="1" title="Attribute: Cursed" type="checkbox" /> Cursed</label></p>
<p><label><input name="attr_Frozen" value="1" title="Attribute: Frozen" type="checkbox" /> Frozen</label></p>
<p><label><input name="attr_Infatuated" value="1" title="Attribute: Infatuated" type="checkbox" /> Infatuated</label></p>
<p><label><input name="attr_Paralyzed" value="1" title="Attribute: Paralyzed" type="checkbox" /> Paralyzed</label></p>
<p><label><input name="attr_Poisoned" value="1" title="Attribute: Poisoned" type="checkbox" /> Poisoned</label></p>
<p><label><input name="attr_Toxified" value="1" title="Attribute: Toxified" type="checkbox" /> Toxified</label></p>
<p><label><input name="attr_Stunned" value="1" title="Attribute: Stunned" type="checkbox" /> Stunned</label></p>
</div>
<div class="sheet-2col-centered">
<b>Movement</b>
<b>Bonus</b>
<span><input class="sheet-speed-read-color" name="attr_movement" readonly title="Attribute: movement" type="number" /><b>ft</b></span>
<span><input name="attr_movebonus" title="Attribute: movebonus" type="number" /><b>ft</b></span>
</div>
</div>
<div class="sheet-pokemon-extra-stats-grid">
<p></p>
<b>Attack</b>
<b>Defense</b>
<b>Special Attack</b>
<b>Special Defense</b>
<b>Speed</b>
<b>Base Stats</b>
<input class="sheet-attack-color" name="attr_atkbase" title="Attribute: atkbase" type="number" />
<input class="sheet-defense-color" name="attr_defbase" title="Attribute: defbase" type="number" />
<input class="sheet-spatk-color" name="attr_spatkbase" title="Attribute: spatkbase" type="number" />
<input class="sheet-spdef-color" name="attr_spdefbase" title="Attribute: spdefbase" type="number" />
<input class="sheet-speed-color" name="attr_spdbase" title="Attribute: spdbase" type="number" />
<b>Nature</b>
<input class="sheet-attack-color" name="attr_atknature" title="Attribute: atknature" type="number" readonly />
<input class="sheet-defense-color" name="attr_defnature" title="Attribute: defnature" type="number" readonly />
<input class="sheet-spatk-color" name="attr_spatknature" title="Attribute: spatknature" type="number" readonly />
<input class="sheet-spdef-color" name="attr_spdefnature" title="Attribute: spdefnature" type="number" readonly />
<input class="sheet-speed-color" name="attr_spdnature" title="Attribute: spdnature" type="number" readonly />
<b>Temp Stat Changes</b>
<input class="sheet-attack-color" name="attr_atkbonus" title="Attribute: atkbonus" type="number" />
<input class="sheet-defense-color" name="attr_defbonus" title="Attribute: defbonus" type="number" />
<input class="sheet-spatk-color" name="attr_spatkbonus" title="Attribute: spatkbonus" type="number" />
<input class="sheet-spdef-color" name="attr_spdefbonus" title="Attribute: spdefbonus" type="number" />
<input class="sheet-speed-color" name="attr_spdbonus" title="Attribute: spdbonus" type="number" />
<p></p>
<b>Cool</b>
<b>Tough</b>
<b>Beauty</b>
<b>Clever</b>
<b>Cute</b>
<b>Contest Stats</b>
<input class="sheet-attack-color" name="attr_cool" title="Attribute: cool" type="number" />
<input class="sheet-defense-color" name="attr_tough" title="Attribute: tough" type="number" />
<input class="sheet-spatk-color" name="attr_beauty" title="Attribute: beauty" type="number" />
<input class="sheet-spdef-color" name="attr_clever" title="Attribute: clever" type="number" />
<input class="sheet-speed-color" name="attr_cute" title="Attribute: cute" type="number" />
</div>
</div>
</div>
</div>
<div class="sheet-tab-trainer sheet-tab-pokemon sheet-tab-hybrid">
<br />
<div class="sheet-character-skill-labels">
<b>Total</b>
<b>Skill Name</b>
<b>Talent</b>
<b>Bonus</b>
<b>Total</b>
<b>Skill Name</b>
<b>Talent</b>
<b>Bonus</b>
</div>
<div class="sheet-2col-centered">
<div class="sheet-character-skills">
<input class="sheet-skill-color-setting" name="attr_acrobatics_ability_mod" type="hidden" value="SPD" />
<input class="sheet-skill-total" name="attr_acrobatics_total" readonly title="Attribute: acrobatics_total" type="number" />
<button class="sheet-skill-roller" name="roll_acrobaticscheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spd}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Acrobatics}} {{skill-roll=[[ 1d20!kh2 + [[ @{acrobatics_total} + ?{Temporary Bonus|0} ]] ]]}}">
Acrobatics (<span name="attr_acrobatics_ability_mod"></span>)
</button>
<input name="attr_acrobaticstalent1" value="2" title="Attribute: acrobaticstalent1" type="checkbox" />
<input name="attr_acrobaticstalent2" value="2" title="Attribute: acrobaticstalent2" type="checkbox" />
<input name="attr_acrobatics" value="0" title="Attribute: acrobatics" type="number" />
<input class="sheet-skill-color-setting" name="attr_athletics_ability_mod" type="hidden" value="ATK" />
<input class="sheet-skill-total" name="attr_athletics_total" readonly title="Attribute: athletics_total" type="number" />
<button class="sheet-skill-roller" name="roll_athleticscheck" type="roll"
value="&{template:skill-roll} {{base-attribute=atk}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Athletics}} {{skill-roll=[[ 1d20!kh2 + [[ @{athletics_total} + ?{Temporary Bonus|0} ]] ]]}}">
Athletics (<span name="attr_athletics_ability_mod"></span>)
</button>
<input name="attr_athleticstalent1" value="2" title="Attribute: athleticstalent1" type="checkbox" />
<input name="attr_athleticstalent2" value="2" title="Attribute: athleticstalent2" type="checkbox" />
<input name="attr_athletics" value="0" title="Attribute: athletics" type="number" />
<input class="sheet-skill-color-setting" name="attr_bluff_ability_mod" type="hidden" value="SPDEF" />
<input class="sheet-skill-total" name="attr_bluff_total" readonly title="Attribute: bluff_total" type="number" />
<button class="sheet-skill-roller" name="roll_bluffcheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spdef}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Bluff/Deception}} {{skill-roll=[[ 1d20!kh2 + [[ @{bluff_total} + ?{Temporary Bonus|0} ]] ]]}}">
Bluff/Deception (<span name="attr_bluff_ability_mod"></span>)
</button>
<input name="attr_blufftalent1" value="2" title="Attribute: blufftalent1" type="checkbox" />
<input name="attr_blufftalent2" value="2" title="Attribute: blufftalent2" type="checkbox" />
<input name="attr_bluff" value="0" title="Attribute: bluff" type="number" />
<input class="sheet-skill-color-setting" name="attr_concentration_ability_mod" type="hidden" value="DEF" />
<input class="sheet-skill-total" name="attr_concentration_total" readonly title="Attribute: concentration_total" type="number" />
<button class="sheet-skill-roller" name="roll_concentrationcheck" type="roll"
value="&{template:skill-roll} {{base-attribute=def}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Concentration}} {{skill-roll=[[ 1d20!kh2 + [[ @{concentration_total} + ?{Temporary Bonus|0} ]] ]]}}">
Concentration (<span name="attr_concentration_ability_mod"></span>)
</button>
<input name="attr_concentrationtalent1" value="2" title="Attribute: concentrationtalent1" type="checkbox" />
<input name="attr_concentrationtalent2" value="2" title="Attribute: concentrationtalent2" type="checkbox" />
<input name="attr_concentration" value="0" title="Attribute: concentration" type="number" />
<input class="sheet-skill-color-setting" name="attr_constitution_ability_mod" type="hidden" value="DEF" />
<input class="sheet-skill-total" name="attr_constitution_total" readonly title="Attribute: constitution_total" type="number" />
<button class="sheet-skill-roller" name="roll_constitutioncheck" type="roll"
value="&{template:skill-roll} {{base-attribute=def}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Constitution}} {{skill-roll=[[ 1d20!kh2 + [[ @{constitution_total} + ?{Temporary Bonus|0} ]] ]]}}">
Constitution (<span name="attr_constitution_ability_mod"></span>)
</button>
<input name="attr_constitutiontalent1" value="2" title="Attribute: constitutiontalent1" type="checkbox" />
<input name="attr_constitutiontalent2" value="2" title="Attribute: constitutiontalent2" type="checkbox" />
<input name="attr_constitution" value="0" title="Attribute: constitution" type="number" />
<input class="sheet-skill-color-setting" name="attr_diplomacy_ability_mod" type="hidden" value="SPDEF" />
<input class="sheet-skill-total" name="attr_diplomacy_total" readonly title="Attribute: diplomacy_total" type="number" />
<button class="sheet-skill-roller" name="roll_diplomacycheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spdef}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Diplomacy/Persuasion}} {{skill-roll=[[ 1d20!kh2 + [[ @{diplomacy_total} + ?{Temporary Bonus|0} ]] ]]}}">
Diplomacy/Persuasion (<span name="attr_diplomacy_ability_mod"></span>)
</button>
<input name="attr_diplomacytalent1" value="2" title="Attribute: diplomacytalent1" type="checkbox" />
<input name="attr_diplomacytalent2" value="2" title="Attribute: diplomacytalent2" type="checkbox" />
<input name="attr_diplomacy" value="0" title="Attribute: diplomacy" type="number" />
<input class="sheet-skill-color-setting" name="attr_engineering_ability_mod" type="hidden" value="SPATK" />
<input class="sheet-skill-total" name="attr_engineering_total" readonly title="Attribute: engineering_total" type="number" />
<button class="sheet-skill-roller" name="roll_engineeringcheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spatk}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Engineering/Operation}} {{skill-roll=[[ 1d20!kh2 + [[ @{engineering_total} + ?{Temporary Bonus|0} ]] ]]}}">
Engineering/Operation (<span name="attr_engineering_ability_mod"></span>)
</button>
<input name="attr_engineeringtalent1" value="2" title="Attribute: engineeringtalent1" type="checkbox" />
<input name="attr_engineeringtalent2" value="2" title="Attribute: engineeringtalent2" type="checkbox" />
<input name="attr_engineering" value="0" title="Attribute: engineering" type="number" />
<input class="sheet-skill-color-setting" name="attr_history_ability_mod" type="hidden" value="SPATK" />
<input class="sheet-skill-total" name="attr_history_total" readonly title="Attribute: history_total" type="number" />
<button class="sheet-skill-roller" name="roll_historycheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spatk}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=History}} {{skill-roll=[[ 1d20!kh2 + [[ @{history_total} + ?{Temporary Bonus|0} ]] ]]}}">
History (<span name="attr_history_ability_mod"></span>)
</button>
<input name="attr_historytalent1" value="2" title="Attribute: historytalent1" type="checkbox" />
<input name="attr_historytalent2" value="2" title="Attribute: historytalent2" type="checkbox" />
<input name="attr_history" value="0" title="Attribute: history" type="number" />
<input class="sheet-skill-color-setting" name="attr_insight_ability_mod" type="hidden" value="SPDEF" />
<input class="sheet-skill-total" name="attr_insight_total" readonly title="Attribute: insight_total" type="number" />
<button class="sheet-skill-roller" name="roll_insightcheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spdef}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Insight}} {{skill-roll=[[ 1d20!kh2 + [[ @{insight_total} + ?{Temporary Bonus|0} ]] ]]}}">
Insight (<span name="attr_insight_ability_mod"></span>)
</button>
<input name="attr_insighttalent1" value="2" title="Attribute: insighttalent1" type="checkbox" />
<input name="attr_insighttalent2" value="2" title="Attribute: insighttalent2" type="checkbox" />
<input name="attr_insight" value="0" title="Attribute: insight" type="number" />
</div>
<div class="sheet-character-skills">
<input class="sheet-skill-color-setting" name="attr_investigate_ability_mod" type="hidden" value="SPATK" />
<input class="sheet-skill-total" name="attr_investigate_total" readonly title="Attribute: investigate_total" type="number" />
<button class="sheet-skill-roller" name="roll_investigatecheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spatk}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Investigate}} {{skill-roll=[[ 1d20!kh2 + [[ @{investigate_total} + ?{Temporary Bonus|0} ]] ]]}}">
Investigate (<span name="attr_investigate_ability_mod"></span>)
</button>
<input name="attr_investigatetalent1" value="2" title="Attribute: investigatetalent1" type="checkbox" />
<input name="attr_investigatetalent2" value="2" title="Attribute: investigatetalent2" type="checkbox" />
<input name="attr_investigate" value="0" title="Attribute: investigate" type="number" />
<input class="sheet-skill-color-setting" name="attr_medicine_ability_mod" type="hidden" value="SPATK" />
<input class="sheet-skill-total" name="attr_medicine_total" readonly title="Attribute: medicine_total" type="number" />
<button class="sheet-skill-roller" name="roll_medicinecheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spatk}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Medicine}} {{skill-roll=[[ 1d20!kh2 + [[ @{medicine_total} + ?{Temporary Bonus|0} ]] ]]}}">
Medicine (<span name="attr_medicine_ability_mod"></span>)
</button>
<input name="attr_medicinetalent1" value="2" title="Attribute: medicinetalent1" type="checkbox" />
<input name="attr_medicinetalent2" value="2" title="Attribute: medicinetalent2" type="checkbox" />
<input name="attr_medicine" value="0" title="Attribute: medicine" type="number" />
<input class="sheet-skill-color-setting" name="attr_nature_ability_mod" type="hidden" value="SPATK" />
<input class="sheet-skill-total" name="attr_nature_total" readonly title="Attribute: nature_total" type="number" />
<button class="sheet-skill-roller" name="roll_naturecheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spatk}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Nature}} {{skill-roll=[[ 1d20!kh2 + [[ @{nature_total} + ?{Temporary Bonus|0} ]] ]]}}">
Nature (<span name="attr_nature_ability_mod"></span>)
</button>
<input name="attr_naturetalent1" value="2" title="Attribute: naturetalent1" type="checkbox" />
<input name="attr_naturetalent2" value="2" title="Attribute: naturetalent2" type="checkbox" />
<input name="attr_nature" value="0" title="Attribute: nature" type="number" />
<input class="sheet-skill-color-setting" name="attr_perception_ability_mod" type="hidden" value="SPDEF" />
<input class="sheet-skill-total" name="attr_perception_total" readonly title="Attribute: perception_total" type="number" />
<button class="sheet-skill-roller" name="roll_perceptioncheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spdef}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Perception}} {{skill-roll=[[ 1d20!kh2 + [[ @{perception_total} + ?{Temporary Bonus|0} ]] ]]}}">
Perception (<span name="attr_perception_ability_mod"></span>)
</button>
<input name="attr_perceptiontalent1" value="2" title="Attribute: perceptiontalent1" type="checkbox" />
<input name="attr_perceptiontalent2" value="2" title="Attribute: perceptiontalent2" type="checkbox" />
<input name="attr_perception" value="0" title="Attribute: perception" type="number" />
<input class="sheet-skill-color-setting" name="attr_perform_ability_mod" type="hidden" value="SPDEF" />
<input class="sheet-skill-total" name="attr_perform_total" readonly title="Attribute: perform_total" type="number" />
<button class="sheet-skill-roller" name="roll_performcheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spdef}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Perform}} {{skill-roll=[[ 1d20!kh2 + [[ @{perform_total} + ?{Temporary Bonus|0} ]] ]]}}">
Perform (<span name="attr_perform_ability_mod"></span>)
</button>
<input name="attr_performtalent1" value="2" title="Attribute: performtalent1" type="checkbox" />
<input name="attr_performtalent2" value="2" title="Attribute: performtalent2" type="checkbox" />
<input name="attr_perform" value="0" title="Attribute: perform" type="number" />
<input class="sheet-skill-color-setting" name="attr_handling_ability_mod" type="hidden" value="SPDEF" />
<input class="sheet-skill-total" name="attr_handling_total" readonly title="Attribute: handling_total" type="number" />
<button class="sheet-skill-roller" name="roll_handlingcheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spdef}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Pokemon Handling}} {{skill-roll=[[ 1d20!kh2 + [[ @{handling_total} + ?{Temporary Bonus|0} ]] ]]}}">
Pokémon Handling (<span name="attr_handling_ability_mod"></span>)
</button>
<input name="attr_handlingtalent1" value="2" title="Attribute: handlingtalent1" type="checkbox" />
<input name="attr_handlingtalent2" value="2" title="Attribute: handlingtalent2" type="checkbox" />
<input name="attr_handling" value="0" title="Attribute: handling" type="number" />
<input class="sheet-skill-color-setting" name="attr_programming_ability_mod" type="hidden" value="SPATK" />
<input class="sheet-skill-total" name="attr_programming_total" readonly title="Attribute: programming_total" type="number" />
<button class="sheet-skill-roller" name="roll_programmingcheck" type="roll" value="&{template:skill-roll} {{base-attribute=spatk}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Programming}} {{skill-roll=[[ 1d20!kh2 + [[ @{programming_total} + ?{Temporary Bonus|0} ]] ]]}}">
Programming (<span name="attr_programming_ability_mod"></span>)
</button>
<input name="attr_programmingtalent1" value="2" title="Attribute: programmingtalent1" type="checkbox" />
<input name="attr_programmingtalent2" value="2" title="Attribute: programmingtalent2" type="checkbox" />
<input name="attr_programming" value="0" title="Attribute: programming" type="number" />
<input class="sheet-skill-color-setting" name="attr_sleight_ability_mod" type="hidden" value="SPD" />
<input class="sheet-skill-total" name="attr_sleightofhand_total" readonly title="Attribute: sleightofhand_total" type="number" />
<button class="sheet-skill-roller" name="roll_sleightofhandcheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spd}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Sleight of Hand}} {{skill-roll=[[ 1d20!kh2 + [[ @{sleightofhand_total} + ?{Temporary Bonus|0} ]] ]]}}">
Sleight of Hand (<span name="attr_sleight_ability_mod"></span>)
</button>
<input name="attr_sleightofhandtalent1" value="2" title="Attribute: sleightofhandtalent1" type="checkbox" />
<input name="attr_sleightofhandtalent2" value="2" title="Attribute: sleightofhandtalent2" type="checkbox" />
<input name="attr_sleightofhand" value="0" title="Attribute: sleightofhand" type="number" />
<input class="sheet-skill-color-setting" name="attr_stealth_ability_mod" type="hidden" value="SPD" />
<input class="sheet-skill-total" name="attr_stealth_total" readonly title="Attribute: stealth_total" type="number" />
<button class="sheet-skill-roller" name="roll_stealthcheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spd}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Stealth}} {{skill-roll=[[ 1d20!kh2 + [[ @{stealth_total} + ?{Temporary Bonus|0} ]] ]]}}">
Stealth (<span name="attr_stealth_ability_mod"></span>)
</button>
<input name="attr_stealthtalent1" value="2" title="Attribute: stealthtalent1" type="checkbox" />
<input name="attr_stealthtalent2" value="2" title="Attribute: stealthtalent2" type="checkbox" />
<input name="attr_stealth" value="0" title="Attribute: stealth" type="number" />
</div>
</div>
</div>
<div class="sheet-tab-trainer">
<div>
<hr class="sheet-skill-separator" />
<div class="sheet-capture-pokemon-skill sheet-tab-trainer">
<input class="sheet-skill-color-setting" name="attr_capture_ability_mod" type="hidden" value="SPD" />
<input class="sheet-skill-total" name="attr_capture_total" readonly title="The value added to your skill check to hit a Pokémon with a Pokéball. Note - this can be ignored if the target Pokémon is at or below half of their max HP.
Attribute: capture_total" type="number" />
<button class="sheet-skill-roller" name="roll_capturecheck" type="roll"
value="&{template:skill-roll} {{base-attribute=spd}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Capture Pokémon}} {{skill-roll=[[ 1d20 + @{capture_total} ]] Capture Roll: [[ d100 @{ball_capture_modifier} + @{capture_roll_bonus} ]] }}">
Capture Pokémon (<span name="attr_capture_ability_mod"></span>)
</button>
<input name="attr_capture_default_custom_modifier" type="hidden" value="0" />
<select class="sheet-ball-picker" name="attr_ball_capture_modifier" title="Select which Pokéball you want to use - this presumes the benefit is applied for conditional balls such as Quick Ball.
Attribute: ball_capture_modifier">
<option value="+5" selected>Basic Ball</option>
<option value="+0">Great Ball</option>
<option value="-5">Ultra Ball</option>
<option value="-20">Park Ball</option>
<option value="-20">Safari Ball</option>
<option value="-20">Sport Ball</option>
<option value="-5">Cherish Ball</option>
<option value="-5">Luxury Ball</option>
<option value="-5">Premier Ball</option>
<option value="-12">Dive Ball</option>
<option value="-7">Dusk Ball</option>
<option value="-8">Fast Ball</option>
<option value="-10">Lure Ball</option>
<option value="-20">Quick Ball</option>
<option value="-10">Repeat Ball</option>
<option value="-10">1m Timer Ball</option>
<option value="-25">2m Timer Ball</option>
<option value="+0">Friend Ball</option>
<option value="+0">Heal Ball</option>
<option value="-10">Dream Ball</option>
<option value="-15">Heavy Ball</option>
<option value="-10">Level Ball</option>
<option value="-10">Love Ball</option>
<option value="-10">Moon Ball</option>
<option value="-10">Nest Ball</option>
<option value="-15">Type Ball</option>
<option value="-12">Terrain Ball</option>
<option value="-10">Save Ball</option>
<option value="-100">Master Ball</option>
<option value="+ ?{Custom Ball Modifier|@{capture_default_custom_modifier}}">Custom Ball</option>
</select>
<span title="The modifier applied to your capture rolls because of your selected Pokéball. This value can be configured for custom balls in the Configuration page.
Attribute: capture_display">
<b>Ball Mod:</b>
<input class="sheet-total-display" name="attr_capture_display" readonly type="text" />
</span>
<input name="attr_capture_roll_bonus" title="Use this field to assign a static modifier to your capture rolls - things like a Capture Specialist's Capture Point feature.
Attribute: capture_roll_bonus" type="number" value="0" />
<input class="sheet-skill-total sheet-total-display" name="attr_capture_roll_total" readonly title="The total modifier applied to your d100 capture rolls. If an asterisk * is shown, that means you've selected a custom ball.
Attribute: capture_roll_total" type="text" />
</div>
</div>
</div>
<br />
<div class="sheet-tab-trainer sheet-tab-hybrid">
<b>Origin Feature</b>
<div class="sheet-collapsible-feature" style="position: relative;">
<input checked class="sheet-options-flag" name="attr_origin_options_flag" type="checkbox" />
<span name="attr_origin_flag">-</span>
<div class="sheet-display">
<div class="sheet-pokemon-move-info-header">
<span class="sheet-fill-space">
<button class="sheet-inline-roller sheet-skill-roller" name="roll-origin-feature-output" title="Click this to send this feature to the chat log. Click the Plus to allow editing the information." type="roll"
value="&{template:feature-output} {{type-color=@{type1}}} {{character-name=@{character_name}}} {{character-id=@{character_id}}} {{feature-name=@{originfeaturename}}} {{feature-text=@{originfeaturedesc}}}">
<span name="attr_originfeaturename"></span>
</button>
<b class="sheet-info-tooltip" title="Click this to send this feature to the chat log. Click the Plus to allow editing the information."></b>
</span>
<span>
<b>Feature Usage</b>
<input name="attr_origin_usage" type="number" value="0" />
<button name="act_incrementoriginusage" type="action">+</button>
<button name="act_resetoriginusage" type="action">Reset</button>
</span>
</div>
</div>
<div class="sheet-options">
<div class="sheet-pokemon-move-info-header">
<input name="attr_originfeaturename" placeholder="Feature Name" spellcheck="false" type="text" />
<span class="sheet-fill-space">
<button class="sheet-inline-roller sheet-skill-roller" name="roll-origin-feature-output" title="Click this to send this feature to the chat log." type="roll"
value="&{template:feature-output} {{type-color=@{type1}}} {{character-name=@{character_name}}} {{character-id=@{character_id}}} {{feature-name=@{originfeaturename}}} {{feature-text=@{originfeaturedesc}}}">
Send to Chat
</button>
<b class="sheet-info-tooltip" title="Click this to send this feature to the chat log."></b>
</span>
<span>
<b>Feature Usage</b>
<input name="attr_origin_usage" type="number" value="0" />
<button name="act_incrementoriginusage" type="action">+</button>
<button name="act_resetoriginusage" type="action">Reset</button>
</span>
</div>
<textarea name="attr_originfeaturedesc" placeholder="Feature Description" spellcheck="false"></textarea>
</div>
</div>
<br />
<b>Class Features</b>
<fieldset class="repeating_features">
<div class="sheet-collapsible-feature">
<input checked class="sheet-options-flag" name="attr_options_flag" type="checkbox" />
<span name="attr_flag">-</span>
<div class="sheet-display">
<div class="sheet-pokemon-move-info-header">
<span class="sheet-fill-space">
<button class="sheet-inline-roller sheet-skill-roller" name="roll-class-feature-output" title="Click this to send this feature to the chat log. Click the Plus to allow editing the information." type="roll"
value="&{template:feature-output} {{type-color=@{type1}}} {{character-name=@{character_name}}} {{character-id=@{character_id}}} {{feature-name=@{classfeaturename}}} {{feature-text=@{classfeaturedesc}}}">
<span name="attr_classfeaturename"></span>
</button>
<b class="sheet-info-tooltip" title="Click this to send this feature to the chat log. Click the Plus to allow editing the information."></b>
</span>
<span>
<b>Feature Usage</b>
<input name="attr_feature_usage" type="number" value="0" />
<button name="act_incrementfeatureusage" type="action">+</button>
<button name="act_resetfeatureusage" type="action">Reset</button>
</span>
</div>
</div>
<div class="sheet-options">
<div class="sheet-pokemon-move-info-header">
<input name="attr_classfeaturename" placeholder="Feature Name" spellcheck="false" type="text" />
<span class="sheet-fill-space">
<button class="sheet-inline-roller sheet-skill-roller" name="roll-class-feature-output" title="Click this to send this feature to the chat log." type="roll"
value="&{template:feature-output} {{type-color=@{type1}}} {{character-name=@{character_name}}} {{character-id=@{character_id}}} {{feature-name=@{classfeaturename}}} {{feature-text=@{classfeaturedesc}}}">
Send to Chat
</button>
<b class="sheet-info-tooltip" title="Click this to send this feature to the chat log."></b>
</span>
<span>
<b>Feature Usage</b>
<input name="attr_feature_usage" type="number" value="0" />
<button name="act_incrementfeatureusage" type="action">+</button>
<button name="act_resetfeatureusage" type="action">Reset</button>
</span>
</div>
<textarea name="attr_classfeaturedesc" placeholder="Feature Description" spellcheck="false"></textarea>
</div>
</div>
</fieldset>
<br />
</div>
<div class="sheet-tab-hybrid sheet-tab-pokemon">
<b>Skills</b>
<textarea class="sheet-3row-textarea" name="attr_pokemonskills" placeholder="Capabilities to be used both in and out of battle, such as Firestarter, Invisibility, and Telekinetic" spellcheck="false" title="Attribute: pokemonskills"></textarea>
<b>Stat Passives</b>
<textarea class="sheet-3row-textarea" name="attr_statpassives" placeholder="Passives that affect Pokémon stats, such as Nasty Plot and Play Nice" spellcheck="false" title="Attribute: statpassives"></textarea>
<b>Other Passives</b>
<textarea class="sheet-4row-textarea" name="attr_otherpassives" placeholder="Passives that do not affect stats, such as Cute Charm and Static" spellcheck="false" title="Attribute: otherpassives"></textarea>
</div>
<b>Modifiers for All Moves</b>
<div>
<span class="sheet-fill-space">
<span>
<b title="This value will be added to all accuracy checks">Accuracy Modifier</b>
<b class="sheet-info-tooltip" title="This value will be added to all accuracy checks"></b>
<input class="sheet-top-information sheet-thin-number" name="attr_move_bonusaccuracy" title="Attribute: move_bonusaccuracy" type="number" value="0" />
</span>
<span>
<b title="Modify to change critical hits based on the dice roll, as per Focus Energy and Super Luck. For moves like Slash, see Effect Threshold">Critical Threshold</b>
<b class="sheet-info-tooltip" title="Modify to change critical hits based on the dice roll, as per Focus Energy and Super Luck. For moves like Slash, see Effect Threshold"></b>
<input class="sheet-top-information sheet-thin-number" max="20" min="1" name="attr_move_critthreshold" title="Attribute: move_critthreshold" type="number" value="20" />
</span>
<span>
<b title="Additional damage for moves that use the Attack stat, such as for Ace Trainer">Attack Damage Bonus</b>
<b class="sheet-info-tooltip" title="Additional damage for moves that use the Attack stat, such as for Ace Trainer"></b>
<input class="sheet-top-information sheet-thin-number" name="attr_move_bonusattack" title="Attribute: move_bonusattack" type="number" value="0" />
</span>
<span>
<b title="Additional damage for moves that use the Special Attack stat, such as for Ace Trainer">Special Attack Damage Bonus</b>
<b class="sheet-info-tooltip" title="Additional damage for moves that use the Special Attack stat, such as for Ace Trainer"></b>
<input class="sheet-top-information sheet-thin-number" name="attr_move_bonusspecialattack" title="Attribute: move_bonusspecialattack" type="number" value="0" />
</span>
</span>
</div>
<b>Moves</b>
<fieldset class="repeating_moves">
<input name="attr_move_category_defense" type="hidden" />
<input class="sheet-color-setting-move" name="attr_move_type" type="hidden" value="normal" />
<div class="sheet-pokemon-move">
<input checked class="sheet-options-flag" name="attr_options_flag" type="checkbox" />
<span name="attr_flag">-</span>
<div class="sheet-display">
<div class="sheet-pokemon-move-info-header">
<span class="sheet-fill-space">
<button class="sheet-inline-roller sheet-skill-roller" name="roll-movetemplate" title="Click this to roll this attack with the option of choosing temporary modifiers or effectiveness." type="roll"
value="&{template:@{move_template}} {{move-type=@{move_type}}} {{character-name=@{character_name}}} {{character-id=@{character_id}}} {{move-name=@{move_name}}} {{accuracy=[[ d20cf0cs>@{move_critthreshold} + [[ @{move_totalaccuracy} + ?{Temp Accuracy Bonus|0} ]] ]]}} {{target=@{move_category_defense}}} {{effectiveness=?{Effectiveness|Neutral, 0|Super Effective, 1|Extremely Effective, 2|Resisted, -1|Shielded, -2}}} {{effectiveness-roll=[[ 1d1 + 1 + ?{Effectiveness} ]]}} {{critical-damage=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]]) * @{damage_dice} + [[ @{move_totaldamage} + ?{Temp Damage Bonus|0} ]] ]]}} {{damage=[[ ([[@{move_dicenumber} + ?{Effectiveness}]])d@{damage_dice} + [[ @{move_totaldamage} + ?{Temp Damage Bonus}]] ]]}} {{effect1=@{move_effect1}}} {{effect1_roll=[[ 0 + @{move_effect1} ]]}} {{effect1_name=@{move_effect1_name}}} {{effect1_threshold=[[ 0 + @{move_effect1_threshold} ]]}} {{effect2=@{move_effect2}}} {{effect2_roll=[[ 0 + @{move_effect2} ]]}} {{effect2_name=@{move_effect2_name}}} {{effect2_threshold=[[ 0 + @{move_effect2_threshold} ]]}} {{notes=@{move_effect}}} {{accuracy-2=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-3=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-4=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-5=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{critical-damage-extra=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]]) * @{damage_dice} ]]}} {{damage-2=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]])d@{damage_dice} ]]}} {{damage-3=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]])d@{damage_dice} ]]}} {{damage-4=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]])d@{damage_dice} ]]}} {{damage-5=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]])d@{damage_dice} ]]}}">
<span name="attr_move_name"></span>
</button>
<b class="sheet-info-tooltip" title="Click this to roll this attack with the option of choosing temporary modifiers or effectiveness."></b>
</span>
<span class="sheet-fill-space">
<button class="sheet-inline-roller sheet-skill-roller" name="roll-quick-move" title="Click this to roll this attack without the fuss of choosing temporary modifiers or effectiveness - it will be rolled with Neutral effectiveness, and no modifiers." type="roll"
value="&{template:@{move_template}} {{move-type=@{move_type}}} {{character-name=@{character_name}}} {{character-id=@{character_id}}} {{move-name=@{move_name}}} {{accuracy=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{target=@{move_category_defense}}} {{effectiveness=0}} {{effectiveness-roll=[[2]]}} {{critical-damage=[[ @{move_dicenumber} * @{damage_dice} + @{move_totaldamage} ]]}} {{damage=[[ @{move_dicenumber}d@{damage_dice} + @{move_totaldamage} ]]}} {{effect1=@{move_effect1}}} {{effect1_roll=[[ 0 + @{move_effect1} ]]}} {{effect1_name=@{move_effect1_name}}} {{effect1_threshold=[[ 0 + @{move_effect1_threshold} ]]}} {{effect2=@{move_effect2}}} {{effect2_roll=[[ 0 + @{move_effect2} ]]}} {{effect2_name=@{move_effect2_name}}} {{effect2_threshold=[[ 0 + @{move_effect2_threshold} ]]}} {{notes=@{move_effect}}} {{accuracy-2=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-3=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-4=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-5=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{critical-damage-extra=[[ @{move_dicenumber} * @{damage_dice} ]]}} {{damage-2=[[ @{move_dicenumber}d@{damage_dice} ]]}} {{damage-3=[[ @{move_dicenumber}d@{damage_dice} ]]}} {{damage-4=[[ @{move_dicenumber}d@{damage_dice} ]]}} {{damage-5=[[ @{move_dicenumber}d@{damage_dice} ]]}}">
Quick Roll
</button>
<b class="sheet-info-tooltip" title="Click this to roll this attack without the fuss of choosing temporary modifiers or effectiveness - it will be rolled with Neutral effectiveness, and no modifiers."></b>
</span>
<span>
<b>Move Usage</b>
<input name="attr_move_usage" title="Attribute: move_usage" type="number" value="0" />
<button name="act_incrementmoveusage" type="action">+</button>
<button name="act_resetmoveusage" type="action">Reset</button>
</span>
</div>
</div>
<div class="sheet-options">
<div class="sheet-pokemon-move-info-header">
<input name="attr_move_name" placeholder="Move" spellcheck="false" title="Attribute: move_name" type="text" />
<span class="sheet-fill-space">
<button class="sheet-inline-roller sheet-skill-roller" name="roll-quick-move" title="Click this to roll this attack without the fuss of choosing temporary modifiers or effectiveness - it will be rolled with Neutral effectiveness, and no modifiers." type="roll"
value="&{template:@{move_template}} {{move-type=@{move_type}}} {{character-name=@{character_name}}} {{character-id=@{character_id}}} {{move-name=@{move_name}}} {{accuracy=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{target=@{move_category_defense}}} {{effectiveness=0}} {{effectiveness-roll=[[2]]}} {{critical-damage=[[ @{move_dicenumber} * @{damage_dice} + @{move_totaldamage} ]]}} {{damage=[[ @{move_dicenumber}d@{damage_dice} + @{move_totaldamage} ]]}} {{effect1=@{move_effect1}}} {{effect1_roll=[[ 0 + @{move_effect1} ]]}} {{effect1_name=@{move_effect1_name}}} {{effect1_threshold=[[ 0 + @{move_effect1_threshold} ]]}} {{effect2=@{move_effect2}}} {{effect2_roll=[[ 0 + @{move_effect2} ]]}} {{effect2_name=@{move_effect2_name}}} {{effect2_threshold=[[ 0 + @{move_effect2_threshold} ]]}} {{notes=@{move_effect}}} {{accuracy-2=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-3=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-4=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-5=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{critical-damage-extra=[[ @{move_dicenumber} * @{damage_dice} ]]}} {{damage-2=[[ @{move_dicenumber}d@{damage_dice} ]]}} {{damage-3=[[ @{move_dicenumber}d@{damage_dice} ]]}} {{damage-4=[[ @{move_dicenumber}d@{damage_dice} ]]}} {{damage-5=[[ @{move_dicenumber}d@{damage_dice} ]]}}">
Quick Roll
</button>
<b class="sheet-info-tooltip" title="Click this to roll this attack without the fuss of choosing temporary modifiers or effectiveness - it will be rolled with Neutral effectiveness, and no modifiers."></b>
</span>
<span>
<b>Move Usage</b>
<input name="attr_move_usage" title="Attribute: move_usage" type="number" value="0" />
<button name="act_incrementmoveusage" type="action">+</button>
<button name="act_resetmoveusage" type="action">Reset</button>
</span>
</div>
<div class="sheet-pokemon-move-info-grid-1">
<input class="sheet-move-text" name="attr_move_range" placeholder="Range" spellcheck="false" title="Attribute: move_range" type="text" />
<select class="sheet-move-text sheet-no-dropdown" name="attr_move_type" title="Attribute: move_type">
<option value="bug">Bug</option>
<option value="dark">Dark</option>
<option value="dragon">Dragon</option>
<option value="electric">Electric</option>
<option value="fairy">Fairy</option>
<option value="fighting">Fighting</option>
<option value="fire">Fire</option>
<option value="flying">Flying</option>
<option value="ghost">Ghost</option>
<option value="grass">Grass</option>
<option value="ground">Ground</option>
<option value="ice">Ice</option>
<option value="normal" selected>Normal</option>
<option value="poison">Poison</option>
<option value="psychic">Psychic</option>
<option value="rock">Rock</option>
<option value="steel">Steel</option>
<option value="typeless">Typeless</option>
<option value="water">Water</option>
</select>
<select class="sheet-move-text sheet-no-dropdown" name="attr_move_category" title="Attribute: move_category">
<option value="0">Category</option>
<option value="1">Attack</option>
<option value="2">Special Attack</option>
<option value="3">Effect</option>
</select>
<select class="sheet-move-text sheet-no-dropdown" name="attr_move_frequency" title="Attribute: move_frequency">
<option value="">Frequency</option>
<option value="atwill">At-Will</option>
<!-- 1day and 3day are switched, I know, but if we fix it we mess up existing sheets -->
<option value="1day">3/day</option>
<option value="3day">1/day</option>
<option value="1combat">1/combat</option>
</select>
<span>
<b>Damage</b>
<input class="sheet-damage-dice-count sheet-top-information" name="attr_move_dicenumber" title="Attribute: move_dicenumber" type="number" value="0" />
<select class="sheet-damage-dice" name="attr_damage_dice">
<option value="4">d4</option>
<option value="6">d6</option>
<option value="8">d8</option>
<option value="10">d10</option>
<option value="12">d12</option>
<option value="20">d20</option>
</select>
</span>
</div>
<div class="sheet-pokemon-move-info-grid-2">
<span>
<b>Accuracy Modifier</b>
<input class="sheet-top-information sheet-thin-number" name="attr_move_acmod" title="Attribute: move_acmod" type="number" value="0" />
</span>
<span>
<b>Extra Damage</b>
<input class="sheet-top-information sheet-thin-number" name="attr_move_damagebonus" title="Attribute: move_damagebonus" type="number" value="0" />
</span>
<span>
<b title="Choose the Scatter type of the attack. This will effect which roll template is used for the chat log output.">Scatter</b>
<b class="sheet-info-tooltip" title="Choose the Scatter type of the attack. This will effect which roll template is used for the chat log output."></b>
</span>
<span>
<select class="sheet-move-text" name="attr_move_template" title="Attribute: move_template">
<option value="move-roll" selected>None</option>
<option value="dual-hit-move-roll">Dual Hit</option>
<option value="multi-hit-move-roll">Multi Hit</option>
<option value="triple-hit-move-roll">Triple Hit</option>
</select>
</span>
<span>
<b title="Enter the value shown in the move notes for effects like Burned, Poisoned, and Stunned">Effect Threshold</b>
<b class="sheet-info-tooltip" title="Enter the value shown in the move notes for effects like Burned, Poisoned, and Stunned"></b>
<input class="sheet-top-information sheet-thin-number" max="20" min="0" name="attr_move_effect1_threshold" title="Attribute: move_effect1_threshold" type="number" value="0" />
</span>
<span>
<select class="sheet-move-text" name="attr_move_effect1" title="Attribute: move_effect1_name (move_effect1 for the numerical value used in calculations)">
<option value="98" selected>None</option>
<option value="99">Critical Hit</option>
<option value="1">Asleep</option>
<option value="2">Burned</option>
<option value="3">Confused</option>
<option value="4">Cursed</option>
<option value="5">Frozen</option>
<option value="6">Infatuated</option>
<option value="7">Paralyzed</option>
<option value="8">Poisoned</option>
<option value="9">Toxified</option>
<option value="10">Stunned</option>
<option value="11">Other</option>
</select>
<input type="hidden" name="attr_move_effect1_name" />
<b class="sheet-info-tooltip" title="Choose Critical Hit for moves where a high accuracy check scores a critical hit, like Slash and Karate Chop"></b>
</span>
<span>
<b>Effect Threshold</b>
<input class="sheet-top-information sheet-thin-number" max="20" min="0" name="attr_move_effect2_threshold" title="Attribute: move_effect2_threshold" type="number" value="0" />
</span>
<span>
<input name="attr_move_effect2_name" type="hidden" />
<select class="sheet-move-text" name="attr_move_effect2" title="Attribute: move_effect2_name (move_effect2 for the numerical value used in calculations)">
<option value="98" selected>None</option>
<option value="1">Asleep</option>
<option value="2">Burned</option>
<option value="3">Confused</option>
<option value="4">Cursed</option>
<option value="5">Frozen</option>
<option value="6">Infatuated</option>
<option value="7">Paralyzed</option>
<option value="8">Poisoned</option>
<option value="9">Toxified</option>
<option value="10">Stunned</option>
<option value="11">Other</option>
</select>
</span>
</div>
<div class="sheet-pokemon-move-info-grid-3">
<span class="sheet-readonly-field">
<b>Accuracy Roll:</b>
<input name="attr_move_totalaccuracy" type="hidden" />
<input class="sheet-top-information sheet-total-display" name="attr_move_totalaccuracy_display" readonly title="Attribute: move_totalaccuracy_display (move_totalaccuracy for only the numerical bonus)" type="text" value="d20 + 0" />
</span>
<span class="sheet-readonly-field">
<b>Damage Roll:</b>
<input name="attr_move_totaldamage" type="hidden" />
<input class="sheet-top-information sheet-total-display" name="attr_move_totaldamage_display" readonly title="Attribute: move_totaldamage_display (move_totaldamage for only the numerical bonus)" type="text" value="" />
</span>
</div>
<div class="sheet-move-notes-roller">
<textarea class="sheet-3row-textarea" name="attr_move_effect" placeholder="Additional Effect Notes" spellcheck="false" title="Attribute: move_effect"></textarea>
<button class="sheet-move-roller" name="roll-movetemplate" type="roll"
value="&{template:@{move_template}} {{move-type=@{move_type}}} {{character-name=@{character_name}}} {{character-id=@{character_id}}} {{move-name=@{move_name}}} {{accuracy=[[ d20cf0cs>@{move_critthreshold} + [[ @{move_totalaccuracy} + ?{Temp Accuracy Bonus|0} ]] ]]}} {{target=@{move_category_defense}}} {{effectiveness=?{Effectiveness|Neutral, 0|Super Effective, 1|Extremely Effective, 2|Resisted, -1|Shielded, -2}}} {{effectiveness-roll=[[ 1d1 + 1 + ?{Effectiveness} ]]}} {{critical-damage=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]]) * @{damage_dice} + [[ @{move_totaldamage} + ?{Temp Damage Bonus|0} ]] ]]}} {{damage=[[ ([[@{move_dicenumber} + ?{Effectiveness}]])d@{damage_dice} + [[ @{move_totaldamage} + ?{Temp Damage Bonus}]] ]]}} {{effect1=@{move_effect1}}} {{effect1_roll=[[ 0 + @{move_effect1} ]]}} {{effect1_name=@{move_effect1_name}}} {{effect1_threshold=[[ 0 + @{move_effect1_threshold} ]]}} {{effect2=@{move_effect2}}} {{effect2_roll=[[ 0 + @{move_effect2} ]]}} {{effect2_name=@{move_effect2_name}}} {{effect2_threshold=[[ 0 + @{move_effect2_threshold} ]]}} {{notes=@{move_effect}}} {{accuracy-2=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-3=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-4=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{accuracy-5=[[ d20cf0cs>@{move_critthreshold} + @{move_totalaccuracy} ]]}} {{critical-damage-extra=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]]) * @{damage_dice} ]]}} {{damage-2=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]])d@{damage_dice} ]]}} {{damage-3=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]])d@{damage_dice} ]]}} {{damage-4=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]])d@{damage_dice} ]]}} {{damage-5=[[ ([[ @{move_dicenumber} + ?{Effectiveness} ]])d@{damage_dice} ]]}}">
T
</button>
</div>
</div>
</div>
</fieldset>
<div class="sheet-tab-hybrid sheet-tab-trainer">
<b>Inventory</b>
<textarea name="attr_inventory" placeholder="Pokéballs, Berries, Medicine, Accessories, etc."
spellcheck="false" title="Attribute: inventory"></textarea>
<b>Honors</b>
<textarea spellcheck="false" name="attr_honors" placeholder="Gym Badges, Contest Ribbons, Recognitions, etc."></textarea>
</div>
<div class="sheet-tab-trainer">
<b>Owned Pokémon</b>
<textarea name="attr_ownedpokemon" placeholder="All Pokémon owned by this Trainer" spellcheck="false" title="Attribute: ownedpokemon"></textarea>
</div>
<b>Notes</b>
<textarea name="attr_notes" spellcheck="false" title="Attribute: notes"></textarea>
</div>
<div class="sheet-configuration-page">
<h2>Configuration Options</h2>
<div class="sheet-configuration-grid sheet-text-background">
<div class="sheet-character-type">
<b title="Default value: Trainer">Character Type:</b>
<b class="sheet-info-tooltip" title="Default value: Trainer"> </b>
<select class="sheet-character-type sheet-no-dropdown" name="attr_character-type" title="Attribute: character-type">
<option value="trainer" selected>Trainer</option>
<option value="pokemon">Pokémon</option>
<option value="hybrid">Pokémon (Character Class)</option>
</select>
<p class="sheet-dark-text">
This setting will change which options are available to use in the 'Character' page.<br />
The Pokémon Character Class option is best used to represent the Pokémon class from the PHB2, but can also be used for other things, and is especially
suited to custom classes.
</p>
</div>
<div class="sheet-type-color-selection">
<b title="Default value: Normal">Type & Background Color:</b>
<b class="sheet-info-tooltip" title="Default value: Normal"> </b>
<select class="sheet-no-dropdown" name="attr_type1" title="Attribute: type1">
<option value="bug">Bug</option>
<option value="dark">Dark</option>
<option value="dragon">Dragon</option>
<option value="electric">Electric</option>
<option value="fairy">Fairy</option>
<option value="fighting">Fighting</option>
<option value="fire">Fire</option>
<option value="flying">Flying</option>
<option value="ghost">Ghost</option>
<option value="grass">Grass</option>
<option value="ground">Ground</option>
<option value="ice">Ice</option>
<option value="normal">Normal</option>
<option value="poison">Poison</option>
<option value="psychic">Psychic</option>
<option value="rock">Rock</option>
<option value="steel">Steel</option>
<option value="typeless" selected>Typeless</option>
<option value="water">Water</option>
</select>
<p class="sheet-dark-text">
This setting will update the first type for Pokémon-type characters, and also change the character sheet color theme for all types of characters.
</p>
</div>
<div class="sheet-initiative-macro">
<b title="Default value: @{SPD}+(@{initiative-tie-breaker}/100)">Initiative Macro:</b>
<b class="sheet-info-tooltip" title="Default value: @{SPD}+(@{initiative-tie-breaker}/100)"> </b>
<input name="attr_initiative-macro" title="Attribute: initiative-macro" type="text" value="@{SPD}+(@{initiative-tie-breaker}/100)" /><br />
<p class="sheet-dark-text">
If a Token is associated with a character, they will automatically gain an 'initiative' token action. By clicking the token action on the top
left of the screen, the token will automatically roll the macro above, and add the token to the turn order. By default, it will use the character's
speed stat, plus 1/100th of the initiative tie breaker, which defaults to 1d20.
</p>
<!-- This is super not supported so be warned that it might break one day -->
<button class="tokenaction sheet-hidden-setting" type="roll" name="attr_Initiative" title="Initiative"
value="@{character_name}'s Initiative: [[@{initiative-macro}&{tracker}]]"></button>
</div>
<div class="sheet-initiative-breaker">
<b title="Default value: [[d20]]">Initiative Tie Breaker:</b>
<b class="sheet-info-tooltip" title="Default value: [[d20]]"> </b>
<input name="attr_initiative-tie-breaker" title="Attribute: initiative-tie-breaker" type="text" value="[[d20]]" /><br />
<p class="sheet-dark-text">
This is included so that you can, if you wish, add it to the character's speed when determining their initiative order.
(Note this isn't an official rule, but it's helpful when characters have the same speed!)
<br />For best results, leave this as something you can add to a die-roll.
</p>
</div>
<div class="sheet-skill-modifier-selection">
<b>Skill Modifier Selection</b>
<div class="sheet-skill-selection">
<select class="sheet-no-dropdown" name="attr_skill_modifier_selection" title="Select the skill you want to modify">
<option selected value="acrobatics">Acrobatics</option>
<option value="athletics">Athletics</option>
<option value="bluff">Bluff/Deception</option>
<option value="concentration">Concentration</option>
<option value="constitution">Constitution</option>
<option value="diplomacy">Diplomacy/Persuasion</option>
<option value="engineering">Engineering/Operation</option>
<option value="history">History</option>
<option value="insight">Insight</option>
<option value="investigate">Investigate</option>
<option value="medicine">Medicine</option>
<option value="nature">Nature</option>
<option value="perception">Perception</option>
<option value="perform">Perform</option>
<option value="handling">Pokémon Handling</option>
<option value="programming">Programming</option>
<option value="sleight">Sleight of Hand</option>
<option value="stealth">Stealth</option>
<option value="capture">Capture Pokémon</option>
</select>
<b class="sheet-info-tooltip" title="Select the skill you want to modify"> </b>
<select class="sheet-no-dropdown" name="attr_skill_modifier_ability" title="Select the attribute you want to use for the selected skill.">
<option value="ATK">Attack</option>
<option value="DEF">Defense</option>
<option value="SPATK">Special Attack</option>
<option value="SPDEF">Special Defense</option>
<option selected value="SPD">Speed</option>
</select>
<b class="sheet-info-tooltip" title="Select the attribute you want to use for the selected skill."> </b>
</div>
<p class="sheet-dark-text">
This setting allows you to change the stat each skill is associated with. Select the skill you want to modify with the left
field, and then assign the stat you want to use with the right field. Use this for features like the Ninja's "Ninjutsu".
</p>
</div>
<div class="sheet-custom-ball-default-selecton">
<b title="Default value: 0">Custom Ball Default:</b>
<b class="sheet-info-tooltip" title="Default value: 0"> </b>
<input name="attr_capture_default_custom_modifier" title="Attribute: capture_default_custom_modifier" type="text" value="0" /><br />
<p class="sheet-dark-text">
This setting allows you to specify a default modifier to be used for the Custom Ball when capturing pokémon. You can use an attribute for this value.
</p>
</div>
<div class="sheet-json-import">
<b>Character Data Import</b>
<p class="sheet-dark-text">
Warning! This feature should only be used on blank character sheets.<br />
Enter data for a PTA3 character to automatically fill this character sheet.
Currently supported formats: roll20, Pokelicious Google Sheets (minimum version Saffron)
</p>
</div>
<div class="sheet-json-export">
<b>Character Data Export</b>
<p class="sheet-dark-text">
Export data for this character sheet. Click the button to generate the data, and then copy it from the box below.
This data can be imported into blank roll20 character sheets, even in other games.
</p>
<button name="act_generate-export" type="action">Export</button>
</div>
<div class="sheet-json-import">
<textarea name="attr_json_import" title="Attribute: json_import" type="text"></textarea>
<span name="attr_json_import_response" ></span>
</div>
<div class="sheet-json-export">
<textarea name="attr_json_export" title="Attribute: json_export" type="text"></textarea>
</div>
</div>
</div>
</div>
<!-- ROLL TEMPLATES -->
<div class="rolltemplates">
<rolltemplate class="sheet-rolltemplate-move-roll">
<div class="sheet-container sheet-rolltemplate-color-setting-{{move-type}}-move">
<table class="sheet-move-template">
<tr>
<th colspan="2">{{move-name}}</th>
</tr>
<tr>
<td colspan="2" class="sheet-subhead">[{{character-name}}](https://journal.roll20.net/character/{{character-id}}" name="name-link")</td>
</tr>
<!-- Accuracy Check -->
{{#accuracy}}
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">
{{accuracy}} {{#target}}
<span class="sheet-targeted-defense">vs {{target}}</span>
{{/target}}
</td>
</tr>
{{/accuracy}}
<!-- Effectiveness -->
{{#^rollTotal() effectiveness-roll 2}}
<tr>
<!--<td class="sheet-label"><span>Effect:</span></td>-->
<td class="sheet-effectiveness-text" colspan="2">
<span>
<!-- Shielded -->
{{#rollTotal() effectiveness-roll 0}} It was *really* ineffective... {{/rollTotal() effectiveness-roll 0}}
<!-- Resisted -->
{{#rollTotal() effectiveness-roll 1}} It wasn't very effective... {{/rollTotal() effectiveness-roll 1}}
<!-- Super -->
{{#rollTotal() effectiveness-roll 3}} It was super effective! {{/rollTotal() effectiveness-roll 3}}
<!-- Extreme -->
{{#rollTotal() effectiveness-roll 4}} It was extremely effective! {{/rollTotal() effectiveness-roll 4}}
</span>
</td>
</tr>
{{/^rollTotal() effectiveness-roll 2}}
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy}} {{#rollGreater() critical-damage 0}}
<tr>
<td class="sheet-label"><span>{{move-type}} Damage:</span></td>
<td>
<span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color">
{{critical-damage}}
<span class="sheet-crit-damage-text sheet-{{effectiveness}}-effectiveness-text-color"> Critical Hit! </span>
</span>
</td>
</tr>
{{/rollGreater() critical-damage 0}} {{/rollWasCrit() accuracy}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy}} {{#rollGreater() critical-damage 0}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy effect1_threshold}}
<tr>
<td class="sheet-label"><span>{{move-type}} Damage:</span></td>
<td>
<span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color">
{{critical-damage}}
<span class="sheet-crit-damage-text sheet-{{effectiveness}}-effectiveness-text-color"> Critical Hit! </span>
</span>
</td>
</tr>
{{/^rollLess() accuracy effect1_threshold}}
<!-- Effect-Based Critical Hit Dealing Regular Damage -->
{{#rollLess() accuracy effect1_threshold}}
<tr>
<td class="sheet-label"><span>{{move-type}} Damage:</span></td>
<td>
<span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage}} </span>
</td>
</tr>
{{/rollLess() accuracy effect1_threshold}}
<!-- Closing The Critical Hit Section -->
{{/rollTotal() effect1_roll 99}} {{/rollGreater() critical-damage 0}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}} {{#rollGreater() damage 0}}
<tr>
<td class="sheet-label"><span>{{move-type}} Damage:</span></td>
<td>
<span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage}} </span>
</td>
</tr>
{{/rollGreater() damage 0}} {{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy}}
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="2">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="2">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Additional Notes - if there are any -->
{{#notes}}
<tr>
<td class="sheet-notes-text" colspan="2"><span>{{notes}}</span></td>
</tr>
{{/notes}}
</table>
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-dual-hit-move-roll">
<div class="sheet-container sheet-rolltemplate-color-setting-{{move-type}}-move">
<table class="sheet-move-template">
<tbody>
<tr>
<th colspan="4">{{move-name}}</th>
</tr>
<tr>
<td colspan="4" class="sheet-subhead">[{{character-name}}](https://journal.roll20.net/character/{{character-id}}" name="name-link")</td>
</tr>
<!-- Targeted Defense -->
{{#target}}
<tr>
<td class="sheet-targeted-defense" colspan="4">Attacking against {{target}}</td>
</tr>
{{/target}}
<!-- Effectiveness -->
{{#^rollTotal() effectiveness-roll 2}}
<tr>
<!--<td class="sheet-label"><span>Effect:</span></td>-->
<td class="sheet-effectiveness-text" colspan="4">
<span>
<!-- Shielded -->
{{#rollTotal() effectiveness-roll 0}} It was *really* ineffective... {{/rollTotal() effectiveness-roll 0}}
<!-- Resisted -->
{{#rollTotal() effectiveness-roll 1}} It wasn't very effective... {{/rollTotal() effectiveness-roll 1}}
<!-- Super -->
{{#rollTotal() effectiveness-roll 3}} It was super effective! {{/rollTotal() effectiveness-roll 3}}
<!-- Extreme -->
{{#rollTotal() effectiveness-roll 4}} It was extremely effective! {{/rollTotal() effectiveness-roll 4}}
</span>
</td>
</tr>
{{/^rollTotal() effectiveness-roll 2}}
<!-- Scatter Attack 1 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage}} </span></td>
{{/rollWasCrit() accuracy}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage}} </span></td>
{{/^rollLess() accuracy effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage}} </span></td>
{{/rollLess() accuracy effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Scatter Attack 2 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy-2}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy-2}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/rollWasCrit() accuracy-2}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy-2}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy-2 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/^rollLess() accuracy-2 effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy-2 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-2}} </span></td>
{{/rollLess() accuracy-2 effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-2}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy-2}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy-2 effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-2 effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy-2 effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-2 effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Notes -->
{{#notes}}
<tr>
<td class="sheet-notes-text" colspan="4"><span>{{notes}}</span></td>
</tr>
{{/notes}}
</tbody>
</table>
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-multi-hit-move-roll">
<div class="sheet-container sheet-rolltemplate-color-setting-{{move-type}}-move">
<table class="sheet-move-template">
<tbody>
<tr>
<th colspan="4">{{move-name}}</th>
</tr>
<tr>
<td colspan="4" class="sheet-subhead">[{{character-name}}](https://journal.roll20.net/character/{{character-id}}" name="name-link")</td>
</tr>
<!-- Targeted Defense -->
{{#target}}
<tr>
<td class="sheet-targeted-defense" colspan="4">Attacking against {{target}}</td>
</tr>
{{/target}}
<!-- Effectiveness -->
{{#^rollTotal() effectiveness-roll 2}}
<tr>
<!--<td class="sheet-label"><span>Effect:</span></td>-->
<td class="sheet-effectiveness-text" colspan="4">
<span>
<!-- Shielded -->
{{#rollTotal() effectiveness-roll 0}} It was *really* ineffective... {{/rollTotal() effectiveness-roll 0}}
<!-- Resisted -->
{{#rollTotal() effectiveness-roll 1}} It wasn't very effective... {{/rollTotal() effectiveness-roll 1}}
<!-- Super -->
{{#rollTotal() effectiveness-roll 3}} It was super effective! {{/rollTotal() effectiveness-roll 3}}
<!-- Extreme -->
{{#rollTotal() effectiveness-roll 4}} It was extremely effective! {{/rollTotal() effectiveness-roll 4}}
</span>
</td>
</tr>
{{/^rollTotal() effectiveness-roll 2}}
<!-- Scatter Attack 1 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage}} </span></td>
{{/rollWasCrit() accuracy}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage}} </span></td>
{{/^rollLess() accuracy effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage}} </span></td>
{{/rollLess() accuracy effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Scatter Attack 2 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy-2}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy-2}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/rollWasCrit() accuracy-2}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy-2}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy-2 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/^rollLess() accuracy-2 effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy-2 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-2}} </span></td>
{{/rollLess() accuracy-2 effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-2}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy-2}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy-2 effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-2 effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy-2 effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-2 effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Scatter Attack 3 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy-3}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy-3}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/rollWasCrit() accuracy-3}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy-3}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy-3 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/^rollLess() accuracy-3 effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy-3 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-3}} </span></td>
{{/rollLess() accuracy-3 effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-3}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy-3}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy-3 effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-3 effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy-3 effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-3 effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Scatter Attack 4 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy-4}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy-4}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/rollWasCrit() accuracy-4}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy-4}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy-4 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/^rollLess() accuracy-4 effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy-4 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-4}} </span></td>
{{/rollLess() accuracy-4 effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-4}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy-4}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy-4 effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-4 effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy-4 effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-4 effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Scatter Attack 5 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy-5}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy-5}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/rollWasCrit() accuracy-5}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy-5}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy-5 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/^rollLess() accuracy-5 effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy-5 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-5}} </span></td>
{{/rollLess() accuracy-5 effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-5}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy-5}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy-5 effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-5 effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy-5 effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-5 effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Notes -->
{{#notes}}
<tr>
<td class="sheet-notes-text" colspan="4"><span>{{notes}}</span></td>
</tr>
{{/notes}}
</tbody>
</table>
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-triple-hit-move-roll">
<div class="sheet-container sheet-rolltemplate-color-setting-{{move-type}}-move">
<table class="sheet-move-template">
<tbody>
<tr>
<th colspan="4">{{move-name}}</th>
</tr>
<tr>
<td colspan="4" class="sheet-subhead">[{{character-name}}](https://journal.roll20.net/character/{{character-id}}" name="name-link")</td>
</tr>
<!-- Targeted Defense -->
{{#target}}
<tr>
<td class="sheet-targeted-defense" colspan="4">Attacking against {{target}}</td>
</tr>
{{/target}}
<!-- Effectiveness -->
{{#^rollTotal() effectiveness-roll 2}}
<tr>
<!--<td class="sheet-label"><span>Effect:</span></td>-->
<td class="sheet-effectiveness-text" colspan="4">
<span>
<!-- Shielded -->
{{#rollTotal() effectiveness-roll 0}} It was *really* ineffective... {{/rollTotal() effectiveness-roll 0}}
<!-- Resisted -->
{{#rollTotal() effectiveness-roll 1}} It wasn't very effective... {{/rollTotal() effectiveness-roll 1}}
<!-- Super -->
{{#rollTotal() effectiveness-roll 3}} It was super effective! {{/rollTotal() effectiveness-roll 3}}
<!-- Extreme -->
{{#rollTotal() effectiveness-roll 4}} It was extremely effective! {{/rollTotal() effectiveness-roll 4}}
</span>
</td>
</tr>
{{/^rollTotal() effectiveness-roll 2}}
<!-- Scatter Attack 1 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage}} </span></td>
{{/rollWasCrit() accuracy}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage}} </span></td>
{{/^rollLess() accuracy effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage}} </span></td>
{{/rollLess() accuracy effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Scatter Attack 2 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy-2}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy-2}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/rollWasCrit() accuracy-2}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy-2}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy-2 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/^rollLess() accuracy-2 effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy-2 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-2}} </span></td>
{{/rollLess() accuracy-2 effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-2}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy-2}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy-2 effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-2 effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy-2 effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-2 effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Scatter Attack 3 -->
<tr>
<td class="sheet-label"><span>Accuracy Check:</span></td>
<td class="sheet-accuracy-roll">{{accuracy-3}}</td>
<!-- Damage Rolls -->
<!-- Dice-Based Critical Hit -->
{{#rollWasCrit() accuracy-3}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/rollWasCrit() accuracy-3}}
<!-- Effect-Based Critical Hit -->
<!-- Not a Natural Crit, and we deal Critical Damage -->
{{#^rollWasCrit() accuracy-3}}
<!-- Effect 1 is Critical Hit and we hit the Threshold -->
{{#rollTotal() effect1_roll 99}} {{#^rollLess() accuracy-3 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{critical-damage-extra}} </span></td>
{{/^rollLess() accuracy-3 effect1_threshold}}
<!-- Effect 1 is Critical Hit but we missed the Threshold -->
{{#rollLess() accuracy-3 effect1_threshold}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-3}} </span></td>
{{/rollLess() accuracy-3 effect1_threshold}} {{/rollTotal() effect1_roll 99}}
<!-- Regular Hit -->
{{#rollLess() effect1_roll 99}}
<td class="sheet-label"><span>Damage:</span></td>
<td class="sheet-damage-roll"><span class="sheet-damage-roll sheet-{{effectiveness}}-effectiveness-color"> {{damage-3}} </span></td>
{{/rollLess() effect1_roll 99}} {{/^rollWasCrit() accuracy-3}}
</tr>
<!-- Effect Resoluton -->
<!-- Effect 1 -->
{{#rollBetween() effect1_roll 1 10}} {{#^rollLess() accuracy-3 effect1_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect1_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-3 effect1_threshold}} {{/rollBetween() effect1_roll 1 10}}
<!-- Effect 2 -->
{{#rollBetween() effect2_roll 1 10}} {{#^rollLess() accuracy-3 effect2_threshold}}
<tr>
<td class="sheet-effectiveness-text" colspan="4">
<span>The opponent was {{effect2_name}}</span>
</td>
</tr>
{{/^rollLess() accuracy-3 effect2_threshold}} {{/rollBetween() effect2_roll 1 10}}
<!-- Notes -->
{{#notes}}
<tr>
<td class="sheet-notes-text" colspan="4"><span>{{notes}}</span></td>
</tr>
{{/notes}}
</tbody>
</table>
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-skill-roll">
<div class="sheet-container sheet-rolltemplate-color-setting-{{base-attribute}}-skill">
<table class="sheet-skill-template">
<tr>
<th colspan="2">{{skill-name}}</th>
</tr>
<tr>
<td colspan="2" class="sheet-subhead">[{{character-name}}](https://journal.roll20.net/character/{{character-id}}" name="name-link")</td>
</tr>
<!-- Skill Check -->
<tr>
<td class="sheet-label"><span>Skill Check:</span></td>
<td class="sheet-skill-roll">{{skill-roll}}</td>
</tr>
</table>
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-feature-output">
<div class="sheet-container sheet-rolltemplate-color-setting-{{type-color}}-move">
<table class="sheet-feature-template">
<tr><th>{{feature-name}}</th></tr>
<tr><td class="sheet-subhead">[{{character-name}}](https://journal.roll20.net/character/{{character-id}}" name="name-link")</td></tr>
<tr>
<td class="sheet-notes-text"><span>{{feature-text}}</span></td>
</tr>
</table>
</div>
</rolltemplate>
</div>
<!-- SCRIPTS -->
<script type="text/worker">
// Page Selection
const pageButtons = ["character-page", "configuration-page"];
pageButtons.forEach((page) => {
on(`clicked:${page}`, function () {
setAttrs({ "selected-page": page });
});
});
// Natures (must be before stat calculation)
const allNatures = {
lonely : [ 1, -1, 0, 0, 0],
brave : [ 1, 0, 0, 0, -1],
adamant : [ 1, 0, -1, 0, 0],
naughty : [ 1, 0, 0, -1, 0],
bold : [-1, 1, 0, 0, 0],
relaxed : [ 0, 1, 0, 0, -1],
impish : [ 0, 1, -1, 0, 0],
lax : [ 0, 1, 0, -1, 0],
timid : [-1, 0, 0, 0, 1],
hasty : [ 0, -1, 0, 0, 1],
jolly : [ 0, 0, -1, 0, 1],
naïve : [ 0, 0, 0, -1, 1],
modest : [-1, 0, 1, 0, 0],
mild : [ 0, -1, 1, 0, 0],
quiet : [ 0, 0, 1, 0, -1],
rash : [ 0, 0, 1, -1, 0],
calm : [-1, 0, 0, 1, 0],
gentle : [ 0, -1, 0, 1, 0],
sassy : [ 0, 0, 0, 1, -1],
careful : [ 0, 0, -1, 1, 0]
};
on("change:nature-type sheet:opened", function (eventInfo) {
getAttrs(["nature-type"], function (values) {
setAttrs(createNatureAttrs(values["nature-type"]));
});
});
function createNatureAttrs(nature){
const [atknature, defnature, spatknature, spdefnature, spdnature] = allNatures[nature] || [0,0,0,0,0];
return {
atknature,
defnature,
spatknature,
spdefnature,
spdnature
};
}
// Handling Stat Changes
on("change:atkbase change:atknature change:atkbonus change:Burned sheet:opened", function () {
recalculateStat("atk");
});
on("change:defbase change:defnature change:defbonus sheet:opened", function () {
recalculateStat("def");
});
on("change:spatkbase change:spatknature change:spatkbonus change:Poisoned change:Toxified sheet:opened", function () {
recalculateStat("spatk");
});
on("change:spdefbase change:spdefnature change:spdefbonus sheet:opened", function () {
recalculateStat("spdef");
});
on("change:spdbase change:spdnature change:spdbonus change:movebonus change:Paralyzed sheet:opened", function () {
recalculateStat("spd");
});
function recalculateStat(abilityPrefix) {
const ability = abilityPrefix.toUpperCase();
const baseStat = `${abilityPrefix}base`;
const natureStat = `${abilityPrefix}nature`;
const bonusStat = `${abilityPrefix}bonus`;
getAttrs([ability, baseStat, natureStat, bonusStat, "character-type", "movebonus", "Burned", "Poisoned", "Toxified", "Paralyzed"], function(values) {
let baseValue = parseInt(values[baseStat]) || 0;
if(baseValue == 0) return; // Needed to avoid wiping out old data too quickly
let natureValue = parseInt(values[natureStat]) || 0;
let bonusValue = parseInt(values[bonusStat]) || 0;
let totalValue = baseValue + natureValue + bonusValue;
if(ability == "ATK" && values["Burned"] == 1) totalValue = totalValue - 2;
if(ability == "SPATK" && (values["Poisoned"] == 1 || values["Toxified"] == 1)) totalValue = totalValue - 2;
if(ability == "SPD" && values["Paralyzed"] == 1) totalValue = totalValue - 2;
const attrs = {
[ability] : totalValue,
[`${ability}MOD`] : Math.floor(totalValue / 2)
};
if(ability == "SPD"){
if(values["character-type"] == "trainer"){
attrs["movement"] = 30 + (parseInt(values["movebonus"]) || 0);
} else {
attrs["movement"] = totalValue * 5 + (parseInt(values["movebonus"]) || 0);
}
}
setAttrs(attrs);
});
}
on("sheet:opened change:Asleep change:Burned change:Confused change:Cursed change:Frozen change:Infatuated change:Paralyzed change:Poisoned change:Toxified change:Stunned", function () {
const afflictionList = ["Asleep", "Burned", "Confused", "Cursed", "Frozen", "Infatuated", "Paralyzed", "Poisoned", "Toxified", "Stunned"];
getAttrs(afflictionList, function(values) {
const activeAfflicts = afflictionList.filter(afflict => values[afflict] == 1);
let afflictionsText = activeAfflicts.join(", ");
if (afflictionsText != "") afflictionsText = "Afflictions: " + afflictionsText;
const attrs = {
"afflictions_text" : afflictionsText
};
setAttrs(attrs);
});
});
// Handling Targeted Defense Changes
defenses = ["", "Defense", "Special Defense", "Speed"];
on("sheet:opened", function (eventInfo) {
getSectionIDs("repeating_moves", function (idArray) {
const categories = idArray.map((id) => `repeating_moves_${id}_move_category`);
getAttrs([...categories], function (values) {
const rows = categories.reduce((obj, rowName) => {
const cat = parseInt(values[rowName]) || 0;
const defense = defenses[cat];
obj[rowName + "_defense"] = defense;
return obj;
}, {});
if (rows) setAttrs(rows);
});
});
});
on(`change:repeating_moves:move_category`, function (event) {
getAttrs(["repeating_moves_move_name", "repeating_moves_move_category"], function (values) {
let attrs = {};
let cat = parseInt(values.repeating_moves_move_category) || 0;
attrs["repeating_moves_move_category_defense"] = defenses[cat];
setAttrs(attrs);
});
});
// Handling Move and Feature Usage
on("clicked:repeating_moves:incrementmoveusage", function () {
getAttrs(["repeating_moves_move_usage"], function (values) {
const currentusage = +values.repeating_moves_move_usage || 0;
const newusage = currentusage + 1;
setAttrs({
repeating_moves_move_usage: newusage,
});
});
});
on("clicked:repeating_moves:resetmoveusage", function () {
getAttrs(["repeating_moves_move_usage"], function (values) {
setAttrs({
repeating_moves_move_usage: 0,
});
});
});
on("clicked:incrementoriginusage", function () {
getAttrs(["origin_usage"], function (values) {
const currentusage = +values.origin_usage || 0;
const newusage = currentusage + 1;
setAttrs({
origin_usage: newusage,
});
});
});
on("clicked:resetoriginusage", function () {
getAttrs(["origin_usage"], function (values) {
setAttrs({
origin_usage: 0,
});
});
});
on("clicked:repeating_features:incrementfeatureusage", function () {
getAttrs(["repeating_features_feature_usage"], function (values) {
const currentusage = +values.repeating_features_feature_usage || 0;
const newusage = currentusage + 1;
setAttrs({
repeating_features_feature_usage: newusage,
});
});
});
on("clicked:repeating_features:resetfeatureusage", function () {
getAttrs(["repeating_features_feature_usage"], function (values) {
setAttrs({
repeating_features_feature_usage: 0,
});
});
});
// Handling Move Effects
effects = ["Critical Hit", "put to Sleep", "Burned", "Confused", "Cursed", "Frozen", "Infatuated", "Paralyzed", "Poisoned", "Toxified", "Stunned", "Other"];
on("sheet:opened", function (eventInfo) {
getSectionIDs("repeating_moves", function (idArray) {
const rowNames = idArray.map((id) => `repeating_moves_${id}`);
const effect1s = idArray.map((id) => `repeating_moves_${id}_move_effect1`);
const effect2s = idArray.map((id) => `repeating_moves_${id}_move_effect2`);
getAttrs([...effect1s, ...effect2s], function (values) {
const rows = rowNames.reduce((obj, rowName) => {
const index1 = parseInt(values[rowName + "_move_effect1"]) || 99;
const index2 = parseInt(values[rowName + "_move_effect2"]) || 99;
let name = "";
if (index1 < effects.length) {
name = effects[index1];
}
obj[rowName + "_move_effect1_name"] = name;
name = "";
if (index2 < effects.length) {
name = effects[index2];
}
obj[rowName + "_move_effect2_name"] = name;
return obj;
}, {});
if (rows) setAttrs(rows);
});
});
});
on("change:repeating_moves:move_effect1 change:repeating_moves:move_effect2", function (eventInfo) {
getAttrs(["repeating_moves_move_effect1", "repeating_moves_move_effect2"], function (values) {
let index1 = parseInt(values.repeating_moves_move_effect1) || 99;
let index2 = parseInt(values.repeating_moves_move_effect2) || 99;
let effectNames = {};
let name = "";
if (index1 < effects.length) {
name = effects[index1];
}
effectNames["repeating_moves_move_effect1_name"] = name;
name = "";
if (index2 < effects.length) {
name = effects[index2];
}
effectNames["repeating_moves_move_effect2_name"] = name;
if (effectNames) setAttrs(effectNames);
});
});
// Handling Move Damage Bonuses
categoryDamageModifiers = ["", "ATKMOD", "SPATKMOD", ""];
categoryDamageBonuses = ["", "move_bonusattack", "move_bonusspecialattack", ""];
on("change:ATKMOD change:SPATKMOD change:type1 change:type2 change:move_bonusattack change:move_bonusspecialattack sheet:opened", function (eventInfo) {
getSectionIDs("repeating_moves", function (idArray) {
const rowNames = idArray.map((id) => `repeating_moves_${id}`);
const categories = idArray.map((id) => `repeating_moves_${id}_move_category`);
const extraBonuses = idArray.map((id) => `repeating_moves_${id}_move_damagebonus`);
const diceNumbers = idArray.map((id) => `repeating_moves_${id}_move_dicenumber`);
const damageDice = idArray.map((id) => `repeating_moves_${id}_damage_dice`);
const types = idArray.map((id) => `repeating_moves_${id}_move_type`);
getAttrs([`ATKMOD`, `SPATKMOD`, `type1`, `type2`, `move_bonusattack`, `move_bonusspecialattack`, "character-type",
...categories, ...extraBonuses, ...diceNumbers, ...damageDice, ...types], function (values) {
const rows = rowNames.reduce((obj, rowName) => {
const category = parseInt(values[rowName + `_move_category`]) || 0;
const extra = parseInt(values[rowName + "_move_damagebonus"]) || 0;
const dice = parseInt(values[rowName + "_move_dicenumber"]) || 0;
const points = parseInt(values[rowName + "_damage_dice"]) || 0;
const movetype = values[rowName + "_move_type"];
let stab = 0;
if(values["character-type"] != "trainer" &&
(category == 1 || category == 2) &&
(movetype == values.type1 || movetype == values.type2)) stab = 4;
const categoryModifier = parseInt(values[`${categoryDamageModifiers[category]}`]) || 0;
const categoryBonus = parseInt(values[`${categoryDamageBonuses[category]}`]) || 0;
const total = categoryModifier + categoryBonus + extra + stab;
let display = `${total}`;
if (dice > 0) display = `${dice}d${points} ${total < 0 ? "" : "+ "}${total}`;
obj[rowName + "_move_totaldamage"] = total;
obj[rowName + "_move_totaldamage_display"] = display;
return obj;
}, {});
if (rows) setAttrs(rows);
});
});
});
on(
"change:repeating_moves:move_category change:repeating_moves:move_damagebonus change:repeating_moves:move_type change:repeating_moves:move_dicenumber change:repeating_moves:damage_dice",
function (eventInfo) {
getAttrs(
[
"ATKMOD",
"SPATKMOD",
"move_bonusattack",
"move_bonusspecialattack",
"repeating_moves_move_category",
"repeating_moves_move_damagebonus",
"repeating_moves_move_type",
"repeating_moves_move_dicenumber",
"repeating_moves_damage_dice",
"type1",
"type2",
"character-type"
],
function (values) {
const category = parseInt(values.repeating_moves_move_category) || 0;
const extra = parseInt(values.repeating_moves_move_damagebonus) || 0;
const dice = parseInt(values.repeating_moves_move_dicenumber) || 0;
const points = parseInt(values.repeating_moves_damage_dice) || 0;
let stab = 0;
if(values["character-type"] != "trainer" &&
(category == 1 || category == 2) &&
(values.repeating_moves_move_type == values.type1 || values.repeating_moves_move_type == values.type2)) stab = 4;
const categoryModifier = parseInt(values[`${categoryDamageModifiers[category]}`]) || 0;
const categoryBonus = parseInt(values[`${categoryDamageBonuses[category]}`]) || 0;
const total = categoryModifier + categoryBonus + extra + stab;
let display = `${total}`;
if (dice > 0) display = `${dice}d${points} ${total < 0 ? "" : "+ "}${total}`;
setAttrs({
repeating_moves_move_totaldamage: total,
repeating_moves_move_totaldamage_display: display,
});
}
);
}
);
// Handling Move Accuracy Bonuses
categoryAccuracyModifiers = ["", "ATKMOD", "SPATKMOD", "SPDMOD"];
on("change:ATKMOD change:SPATKMOD change:SPDMOD change:move_bonusaccuracy sheet:opened", function (eventInfo) {
getSectionIDs("repeating_moves", function (idArray) {
const rowNames = idArray.map((id) => `repeating_moves_${id}`);
const categories = idArray.map((id) => `repeating_moves_${id}_move_category`);
const accuracyMods = idArray.map((id) => `repeating_moves_${id}_move_acmod`);
getAttrs([`ATKMOD`, `SPATKMOD`, `SPDMOD`, `move_bonusaccuracy`, ...categories, ...accuracyMods], function (values) {
const rows = rowNames.reduce((obj, rowName) => {
const category = parseInt(values[rowName + `_move_category`]) || 0;
const accuracy = parseInt(values[rowName + `_move_acmod`]) || 0;
const bonusaccuracy = parseInt(values[`move_bonusaccuracy`]) || 0;
const categoryModifier = parseInt(values[`${categoryAccuracyModifiers[category]}`]) || 0;
const total = categoryModifier + accuracy + bonusaccuracy;
const roll = `d20 ${total < 0 ? "" : "+ "}${total}`;
obj[rowName + "_move_totalaccuracy"] = total;
obj[rowName + "_move_totalaccuracy_display"] = roll;
return obj;
}, {});
if (rows) setAttrs(rows);
});
});
});
on("change:repeating_moves:move_category change:repeating_moves:move_acmod", function (eventInfo) {
getAttrs([`ATKMOD`, `SPATKMOD`, `SPDMOD`, `move_bonusaccuracy`, `repeating_moves_move_category`, `repeating_moves_move_acmod`], function (values) {
const category = parseInt(values.repeating_moves_move_category) || 0;
const accuracy = parseInt(values.repeating_moves_move_acmod) || 0;
const bonusaccuracy = parseInt(values[`move_bonusaccuracy`]) || 0;
const categoryModifier = parseInt(values[`${categoryAccuracyModifiers[category]}`]) || 0;
const total = categoryModifier + accuracy + bonusaccuracy;
const roll = `d20 ${total < 0 ? "" : "+ "}${total}`;
setAttrs({
repeating_moves_move_totalaccuracy: total,
repeating_moves_move_totalaccuracy_display: roll,
});
});
});
// Skills Sheet Workers
const cMods = "change:ATKMOD change:DEFMOD change:SPATKMOD change:SPDEFMOD change:SPDMOD";
const abilities = ["ATKMOD", "DEFMOD", "SPATKMOD", "SPDEFMOD", "SPDMOD"];
// Acrobatics
on(`${cMods} change:acrobatics_ability_mod change:acrobaticstalent1 change:acrobaticstalent2 change:acrobatics sheet:opened`, function (event) {
getAttrs(["acrobatics_ability_mod"], function (mod) {
const abiMod = `${mod.acrobatics_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "acrobaticstalent1", "acrobaticstalent2", "acrobatics", "acrobatics_total");
});
});
// Athletics
on(`${cMods} change:athletics_ability_mod change:athleticstalent1 change:athleticstalent2 change:athletics sheet:opened`, function (event) {
getAttrs(["athletics_ability_mod"], function (mod) {
const abiMod = `${mod.athletics_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "athleticstalent1", "athleticstalent2", "athletics", "athletics_total");
});
});
// Bluff/Deception
on(`${cMods} change:bluff_ability_mod change:blufftalent1 change:blufftalent2 change:bluff sheet:opened`, function (event) {
getAttrs(["bluff_ability_mod"], function (mod) {
const abiMod = `${mod.bluff_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "blufftalent1", "blufftalent2", "bluff", "bluff_total");
});
});
// Concentration
on(`${cMods} change:concentration_ability_mod change:concentrationtalent1 change:concentrationtalent2 change:concentration sheet:opened`, function (event) {
getAttrs(["concentration_ability_mod"], function (mod) {
const abiMod = `${mod.concentration_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "concentrationtalent1", "concentrationtalent2", "concentration", "concentration_total");
});
});
// Constitution
on(`${cMods} change:constitution_ability_mod change:constitutiontalent1 change:constitutiontalent2 change:constitution sheet:opened`, function (event) {
getAttrs(["constitution_ability_mod"], function (mod) {
const abiMod = `${mod.constitution_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "constitutiontalent1", "constitutiontalent2", "constitution", "constitution_total");
});
});
// Diplomacy/Persuasion
on(`${cMods} change:diplomacy_ability_mod change:diplomacytalent1 change:diplomacytalent2 change:diplomacy sheet:opened`, function (event) {
getAttrs(["diplomacy_ability_mod"], function (mod) {
const abiMod = `${mod.diplomacy_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "diplomacytalent1", "diplomacytalent2", "diplomacy", "diplomacy_total");
});
});
// Engineering/Operation
on(`${cMods} change:engineering_ability_mod change:engineeringtalent1 change:engineeringtalent2 change:engineering sheet:opened`, function (event) {
getAttrs(["engineering_ability_mod"], function (mod) {
const abiMod = `${mod.engineering_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "engineeringtalent1", "engineeringtalent2", "engineering", "engineering_total");
});
});
// History
on(`${cMods} change:history_ability_mod change:historytalent1 change:historytalent2 change:history sheet:opened`, function (event) {
getAttrs(["history_ability_mod"], function (mod) {
const abiMod = `${mod.history_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "historytalent1", "historytalent2", "history", "history_total");
});
});
// Insight
on(`${cMods} change:insight_ability_mod change:insighttalent1 change:insighttalent2 change:insight sheet:opened`, function (event) {
getAttrs(["insight_ability_mod"], function (mod) {
const abiMod = `${mod.insight_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "insighttalent1", "insighttalent2", "insight", "insight_total");
});
});
// Investigate
on(`${cMods} change:investigate_ability_mod change:investigatetalent1 change:investigatetalent2 change:investigate sheet:opened`, function (event) {
getAttrs(["investigate_ability_mod"], function (mod) {
const abiMod = `${mod.investigate_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "investigatetalent1", "investigatetalent2", "investigate", "investigate_total");
});
});
// Medicine
on(`${cMods} change:medicine_ability_mod change:medicinetalent1 change:medicinetalent2 change:medicine sheet:opened`, function (event) {
getAttrs(["medicine_ability_mod"], function (mod) {
const abiMod = `${mod.medicine_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "medicinetalent1", "medicinetalent2", "medicine", "medicine_total");
});
});
// Nature
on(`${cMods} change:nature_ability_mod change:naturetalent1 change:naturetalent2 change:nature sheet:opened`, function (event) {
getAttrs(["nature_ability_mod"], function (mod) {
const abiMod = `${mod.nature_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "naturetalent1", "naturetalent2", "nature", "nature_total");
});
});
// Perception
on(`${cMods} change:perception_ability_mod change:perceptiontalent1 change:perceptiontalent2 change:perception sheet:opened`, function (event) {
getAttrs(["perception_ability_mod"], function (mod) {
const abiMod = `${mod.perception_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "perceptiontalent1", "perceptiontalent2", "perception", "perception_total");
});
});
// Perform
on(`${cMods} change:perform_ability_mod change:performtalent1 change:performtalent2 change:perform sheet:opened`, function (event) {
getAttrs(["perform_ability_mod"], function (mod) {
const abiMod = `${mod.perform_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "performtalent1", "performtalent2", "perform", "perform_total");
});
});
// Pokémon Handling
on(`${cMods} change:handling_ability_mod change:handlingtalent1 change:handlingtalent2 change:handling sheet:opened`, function (event) {
getAttrs(["handling_ability_mod"], function (mod) {
const abiMod = `${mod.handling_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "handlingtalent1", "handlingtalent2", "handling", "handling_total");
});
});
// Programming
on(`${cMods} change:programming_ability_mod change:programmingtalent1 change:programmingtalent2 change:programming sheet:opened`, function (event) {
getAttrs(["programming_ability_mod"], function (mod) {
const abiMod = `${mod.programming_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "programmingtalent1", "programmingtalent2", "programming", "programming_total");
});
});
// Sleight of Hand
on(`${cMods} change:sleight_ability_mod change:sleightofhandtalent1 change:sleightofhandtalent2 change:sleightofhand sheet:opened`, function (event) {
getAttrs(["sleight_ability_mod"], function (mod) {
const abiMod = `${mod.sleight_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "sleightofhandtalent1", "sleightofhandtalent2", "sleightofhand", "sleightofhand_total");
});
});
// Stealth
on(`${cMods} change:stealth_ability_mod change:stealthtalent1 change:stealthtalent2 change:stealth sheet:opened`, function (event) {
getAttrs(["stealth_ability_mod"], function (mod) {
const abiMod = `${mod.stealth_ability_mod}MOD`;
const source = event.sourceAttribute;
if (source && abilities.includes(source.toUpperCase()) && source.toUpperCase() != abiMod) return;
getSkillAttributes(abiMod, "stealthtalent1", "stealthtalent2", "stealth", "stealth_total");
});
});
// Capture
on("change:SPDMOD sheet:opened", function () {
getAttrs([`SPDMOD`, `capture_total`], function (values) {
const stat = parseInt(values.SPDMOD) || 0;
const total = parseInt(values.capture_total) || -1;
assignSkillTotal("capture_total", stat, 0, 0, total, 0);
});
});
on("change:ball_capture_modifier change:capture_roll_bonus sheet:opened", function () {
getAttrs(["ball_capture_modifier", "capture_default_custom_modifier", "capture_roll_bonus"], function (values) {
const ball = values.ball_capture_modifier;
const bonus = parseInt(values.capture_roll_bonus) || 0;
let display;
let isCustomPokeball = false;
if (ball.includes("Custom")) {
display = values.capture_default_custom_modifier;
isCustomPokeball = true;
} else {
display = ball;
}
let total = bonus;
if (isCustomPokeball) {
total = `${total}*`;
} else {
total += parseInt(display) || 0;
}
setAttrs({
"capture_display": display,
"capture_roll_total": total
});
});
});
function getSkillAttributes(statLabel, talent1Label, talent2Label, userBonusLabel, totalLabel) {
getAttrs([statLabel, talent1Label, talent2Label, totalLabel, userBonusLabel], function (attributes) {
const stat = parseInt(attributes[statLabel]) || 0;
const talent1 = parseInt(attributes[talent1Label]) || 0;
const talent2 = parseInt(attributes[talent2Label]) || 0;
const total = parseInt(attributes[totalLabel]) || -1;
const userBonus = parseInt(attributes[userBonusLabel]) || 0;
assignSkillTotal(totalLabel, stat, talent1, talent2, total, userBonus);
});
}
function assignSkillTotal(skillName, stat, leftTalent, rightTalent, oldTotal, userBonus) {
const talentAccumulator = leftTalent + rightTalent == 4 ? 1 : 0;
const talent = leftTalent + rightTalent + talentAccumulator;
const newBonus = stat + talent + userBonus;
const attrs = { [skillName]: newBonus };
if (newBonus != oldTotal) setAttrs(attrs);
}
// Collapsing Blocks
on("change:repeating_features:options_flag", function (eventInfo) {
const flag = eventInfo.newValue == "on" ? "-" : "+";
setAttrs({ repeating_features_flag: flag });
});
on("change:repeating_moves:options_flag", function (eventInfo) {
const flag = eventInfo.newValue == "on" ? "-" : "+";
setAttrs({ repeating_moves_flag: flag });
});
on("change:origin_options_flag", function (eventInfo) {
const flag = eventInfo.newValue == "on" ? "-" : "+";
setAttrs({ origin_flag: flag });
});
on("change:options_stat_flag", function (eventInfo) {
const flag = eventInfo.newValue == "on" ? "-" : "+";
setAttrs({ stat_flag: flag });
});
on("change:options_afflictions_flag", function (eventInfo) {
const flag = eventInfo.newValue == "on" ? "-" : "+";
setAttrs({ afflictions_flag: flag });
});
// Changing Skill Ability Modifiers
let skills = ["acrobatics", "athletics", "bluff", "concentration", "constitution", "diplomacy", "engineering", "history", "insight"];
skills.push("investigate", "medicine", "nature", "perception", "perform", "handling", "programming", "sleight", "stealth");
on("change:skill_modifier_selection", function (eventInfo) {
const abilityMod = eventInfo.newValue + "_ability_mod";
getAttrs([abilityMod], function (attributes) {
setAttrs({ skill_modifier_ability: attributes[abilityMod] });
});
});
on("change:skill_modifier_ability", function (eventInfo) {
getAttrs(["skill_modifier_selection"], function (attributes) {
const skill = attributes.skill_modifier_selection;
const skillMod = skill + "_ability_mod";
setAttrs({ [skillMod]: eventInfo.newValue });
});
});
// ATTRIBUTE DEPRECATION SHEET WORKERS
// Push so that it gets linted to two lines instead of 18. Huzzah!
let styles = ["style-bug", "style-dark", "style-dragon", "style-electric", "style-fairy", "style-fighting", "style-fire", "style-flying", "style-ghost"];
styles.push("style-grass", "style-ground", "style-ice", "style-normal", "style-poison", "style-psychic", "style-rock", "style-steel", "style-water");
on("sheet:opened", function () {
// Get every attribute involved with migrations:
let migrants = ["character-type", "nature", "nature-type", "tab", "type1",
"ATK", "DEF", "SPATK", "SPDEF", "SPD",
"atkbase", "defbase", "spatkbase", "spdefbase", "spdbase",
"atknature", "defnature", "spatknature", "spdefnature", "spdnature"];
getAttrs([...migrants, ...styles], function (attributes) {
// Hold the settable attributes
let settable = {};
migrateCharacterType(settable, attributes);
migrateNature(settable, attributes);
migrateStyle(settable, attributes);
migrateStats(settable, attributes);
// Finally, update attributes accordingly
if (settable) setAttrs(settable);
});
});
// Character Type Migration
function migrateCharacterType(settable, attributes) {
if (attributes["tab"] == undefined) return;
settable["tab"] = "";
let characters = ["trainer", "trainer", "pokemon", "hybrid"];
const tab = parseInt(attributes["tab"]) || 0;
const charTab = characters[tab];
if (attributes["character-type"] != charTab) settable["character-type"] = charTab;
}
// Nature Migration
function migrateNature(settable, attributes) {
const nature = attributes["nature"];
if (nature === nature + 0) return;
const type = attributes["nature-type"];
settable["nature"] = 0;
if (nature != type) settable["nature-type"] = nature;
}
// Sheet Style Migration
function migrateStyle(settable, attributes) {
styles = styles.filter((style) => attributes[style] != undefined);
const values = styles.map((style) => attributes[style]);
if (values[0] == undefined) return;
styles.forEach((style) => (settable[style] = ""));
const onStyle = styles.filter((style) => attributes[style] == "on").shift();
if (onStyle == undefined) return;
const type = onStyle.replace("style-", "");
const type1 = attributes["type1"];
if (type != type1) settable["type1"] = type;
}
// Stat Migration
function migrateStats(settable, attributes) {
if (attributes["atkbase"] != 0 || attributes["defbase"] != 0 || attributes["spatkbase"] != 0 || attributes["spdefbase"] != 0 || attributes["spdbase"] != 0) return;
settable["atkbase"] = attributes["ATK"] - attributes["atknature"];
settable["defbase"] = attributes["DEF"] - attributes["defnature"];
settable["spatkbase"] = attributes["SPATK"] - attributes["spatknature"];
settable["spdefbase"] = attributes["SPDEF"] - attributes["spdefnature"];
settable["spdbase"] = attributes["SPD"] - attributes["spdnature"];
}
// Import and Export
const r20export_attrs = [
"character_name", "character-type",
// Pokemon
"species", "type1", "type2", "nature-type", "item", "size", "weight", "pokemon_sex", "egg_group", "diet",
// Trainer
"origin", "honor_count", "credits", "class1", "level1", "class2", "level2", "class3", "level3", "class4", "level4",
// Stats
"HP", "HP_max", "atkbase", "defbase", "spatkbase", "spdefbase", "spdbase",
"atkbonus", "defbonus", "spatkbonus", "spdefbonus", "spdbonus", "movebonus",
"cool", "tough", "beauty", "clever", "cute",
// Skills
"acrobatics", "acrobaticstalent1", "acrobaticstalent2",
"athletics", "athleticstalent1", "athleticstalent2",
"bluff", "blufftalent1", "blufftalent2",
"concentration", "concentrationtalent1", "concentrationtalent2",
"constitution", "constitutiontalent1", "constitutiontalent2",
"diplomacy", "diplomacytalent1", "diplomacytalent2",
"engineering", "engineeringtalent1", "engineeringtalent2",
"history", "historytalent1", "historytalent2",
"insight", "insighttalent1", "insighttalent2",
"investigate", "investigatetalent1", "investigatetalent2",
"medicine", "medicinetalent1", "medicinetalent2",
"nature", "naturetalent1", "naturetalent2",
"perception", "perceptiontalent1", "perceptiontalent2",
"perform", "performtalent1", "performtalent2",
"handling", "handlingtalent1", "handlingtalent2",
"programming", "programmingtalent1", "programmingtalent2",
"sleightofhand", "sleightofhandtalent1", "sleightofhandtalent2",
"stealth", "stealthtalent1", "stealthtalent2",
// Move Bonuses
"move_bonusaccuracy", "move_bonusattack", "move_bonusspecialattack", "move_critthreshold",
// Text boxes
"pokemonskills", "statpassives", "otherpassives", "notes", "inventory", "honors", "ownedpokemon",
// Origin
"originfeaturename", "originfeaturedesc"
];
const r20export_features = ["classfeaturename", "classfeaturedesc"];
const r20export_moves = [
"move_name", "move_range", "move_type", "move_category", "move_frequency", "move_dicenumber", "damage_dice",
"move_acmod", "move_damagebonus", "move_template", "move_effect1_threshold", "move_effect1_name",
"move_effect2_threshold", "move_effect2_name", "move_effect"
];
on("change:json_import", function() {
getAttrs(["json_import"], function (values) {
const json = tryParseJson(values.json_import);
if(json){
const newCharacterData = parseCharacterData(json);
setAttrs(newCharacterData);
} else {
setAttrs({ ["json_import_response"]: "Error - JSON string appears invalid" });
}
});
});
on("clicked:generate-export", function() {
getSectionIDs("repeating_moves", function (moveIDs) {
getSectionIDs("repeating_features", function (featureIDs) {
const idmoves = moveIDs.flatMap(id =>
r20export_moves.map(moveAttr => `repeating_moves_${id}_${moveAttr}`)
);
const idfeatures = featureIDs.flatMap(id =>
r20export_features.map(featureAttr => `repeating_features_${id}_${featureAttr}`)
);
getAttrs([...r20export_attrs, ...idmoves, ...idfeatures], function (values) {
let topLevelAttrs = includeOnlyKeysInArray(values, r20export_attrs);
let moveAttrs = includeOnlyKeysInArray(values, idmoves);
let featureAttrs = includeOnlyKeysInArray(values, idfeatures);
let chunkedMoves = partitionObject(moveAttrs, r20export_moves);
let chunkedFeatures = partitionObject(featureAttrs, r20export_features);
topLevelAttrs["exportmoves"] = chunkedMoves;
topLevelAttrs["exportfeatures"] = chunkedFeatures;
topLevelAttrs["Source"] = "roll20 [" + new Date().toUTCString() + "]";
setAttrs({
"json_export": JSON.stringify(topLevelAttrs, null, 2)
});
});
});
});
});
function includeOnlyKeysInArray(sourceObject, filterArray) {
return _.pick(sourceObject, ...filterArray);
}
//This relies on elements in the object being in the correct order, which seems to be true always?
function partitionObject(sourceObject, baseKeys) {
const sourceArray = Object.entries(sourceObject);
const chunkSize = baseKeys.length;
const chunkCount = sourceArray.length / chunkSize;
let results = [];
let totalCount = 0;
for (chunk = 0; chunk < chunkCount; chunk++) {
let partition = {};
for(count = 0; count < chunkSize; count++){
const baseName = baseKeys[count];
partition[baseName] = sourceArray[totalCount][1];
totalCount++;
}
results.push(partition);
}
return results;
}
function tryParseJson(jsonString) {
// https://stackoverflow.com/a/20392392
try {
var o = JSON.parse(jsonString);
if (o && typeof o === "object") {
return o;
}
} catch (e) { }
return false;
}
function parseCharacterData(characterData) {
const source = characterData["Source"];
if(!source) return { ["json_import_response"]: "Error - Unable to identify source of JSON data" };
if(source.startsWith("Pokelicious")) {
// Identify as a Pokelicious sheet
let response = { ["json_import_response"]: "Error - Unable to parse all attributes" }
const innerData = characterData["Attributes"];
if(innerData["Species"]) {
response["species"] = innerData["Species"];
response["character-type"] = "pokemon";
}
remapIfExists(innerData, response, "Nickname", "character_name");
remapIfExists(innerData, response, "Gender", "pokemon_sex");
if(innerData["Nature"]) response["nature-type"] = innerData["Nature"].split("[")[0].toLowerCase();
remapIfExists(innerData, response, "Size", "size");
remapIfExists(innerData, response, "Weight", "weight");
remapIfExists(innerData, response, "Egg1", "egg_group");
if(innerData["Egg2"]) response["egg_group"] += "/" + innerData["Egg2"];
remapIfExists(innerData, response, "Diet", "diet");
remapIfExists(innerData, response, "Type_1", "type1");
if(innerData["Type_1"]) response["type1"] = innerData["Type_1"].toLowerCase();
if(innerData["Type_2"]) response["type2"] = innerData["Type_2"].toLowerCase();
remapIfExists(innerData, response, "Held_Item", "item");
characterData["Moves"]?.forEach(function(move) {
const id = generateRowID();
remapIfExists(move, response, "Name", `repeating_moves_${id}_move_name`);
remapMoveFrequency(move, response, id);
remapIfExists(move, response, "Range", `repeating_moves_${id}_move_range`);
if(move["num_dice"]) response[`repeating_moves_${id}_move_dicenumber`] = parseInt(move["num_dice"]) || 0;
if(move["die_size"]) response[`repeating_moves_${id}_damage_dice`] = move["die_size"].substring(1);
if(move["Type"]) response[`repeating_moves_${id}_move_type`] = (move["Type"] == "No-Type" ? "typeless" : move["Type"].toLowerCase());
remapMoveCategory(move, response, id);
remapIfExists(move, response, "Effect", `repeating_moves_${id}_move_effect`);
});
if(characterData["Stats"]) {
const innerData = characterData["Stats"];
remapIfExists(innerData, response, "Max_HP", "HP_max");
remapIfExists(innerData, response, "Max_HP", "HP");
const natureModifiers = createNatureAttrs(response["nature-type"]); // Returns 0 array if doesn't exist or not a typical nature
if(innerData["ATK"]) response["atkbase"] = innerData["ATK"] - natureModifiers["atknature"];
if(innerData["DEF"]) response["defbase"] = innerData["DEF"] - natureModifiers["defnature"];
if(innerData["SPATK"]) response["spatkbase"] = innerData["SPATK"] - natureModifiers["spatknature"];
if(innerData["SPDEF"]) response["spdefbase"] = innerData["SPDEF"] - natureModifiers["spdefnature"];
if(innerData["SPD"]) response["spdbase"] = innerData["SPD"] - natureModifiers["spdnature"];
}
remapIfExists(characterData, response, "Stat_Passives", "statpassives");
remapIfExists(characterData, response, "Non-Stat_Passives", "otherpassives");
remapIfExists(characterData, response, "Skills", "pokemonskills");
response["json_import_response"] = "Pokemon data successfully imported from " + source + "!";
return response;
} else if (source.startsWith("roll20")) {
// Identify as a roll20 sheet
let response = includeOnlyKeysInArray(characterData, r20export_attrs);
response["json_import_response"] = "Error - Unable to parse all attributes";
characterData["exportmoves"].forEach(function(move) {
const id = generateRowID();
Object.entries(move).forEach(([key, value]) => response[`repeating_moves_${id}_${key}`] = value);
});
characterData["exportfeatures"].forEach(function(feature) {
const id = generateRowID();
Object.entries(feature).forEach(([key, value]) => response[`repeating_features_${id}_${key}`] = value);
});
response["json_import_response"] = "Character sheet data successfully imported from " + source + "!";
return response;
} else {
return { ["json_import_response"]: "Error - " + source + " is not a supported data source" };
}
}
function remapIfExists(inputData, responseData, inputKey, responseKey) {
if(inputData[inputKey]) responseData[responseKey] = inputData[inputKey];
}
function remapMoveFrequency(inputData, responseData, id) {
const moveFrequency = inputData["Frequency"];
if(moveFrequency == "At-Will"){
responseData[`repeating_moves_${id}_move_frequency`] = "atwill";
} else if(moveFrequency == "3/day"){
responseData[`repeating_moves_${id}_move_frequency`] = "1day"; // Yes these are swapped
} else if(moveFrequency == "1/day"){
responseData[`repeating_moves_${id}_move_frequency`] = "3day";
}
}
function remapMoveCategory(inputData, responseData, id) {
const moveClass = inputData["move_class"];
if(moveClass == "Attack"){
responseData[`repeating_moves_${id}_move_category`] = 1;
} else if(moveClass == "Special Attack" || moveClass == "Special"){
responseData[`repeating_moves_${id}_move_category`] = 2;
} else if(moveClass == "Effect"){
responseData[`repeating_moves_${id}_move_category`] = 3;
}
}
</script>