diff --git a/PokemonTabletopAdventures_v3/PTA3.css b/PokemonTabletopAdventures_v3/PTA3.css index e3c3619444..dcdc880397 100644 --- a/PokemonTabletopAdventures_v3/PTA3.css +++ b/PokemonTabletopAdventures_v3/PTA3.css @@ -287,6 +287,7 @@ div.sheet-character-stat-grid p { .sheet-configuration-grid { align-items: start; + column-gap: 10px; display: grid; grid-template-columns: 1fr 1fr; padding: 6px; @@ -454,13 +455,29 @@ div.sheet-skill-selection .sheet-no-dropdown { } .sheet-capture-pokemon-skill { - display: grid; - grid-template-columns: 2fr 10fr 4fr; align-items: center; + display: grid; + grid-template-columns: 2fr 3fr 7fr 2fr 2fr; +} + +div.sheet-capture-pokemon-skill input[type="text"] { + margin-left: -1px; + width: 65% !important; +} + +div.sheet-capture-pokemon-skill .sheet-skill-roller { + grid-column: 2 / end; +} + +div.sheet-capture-pokemon-skill select.sheet-ball-picker { + grid-column: 1 / span 2; +} + +div.sheet-capture-pokemon-skill > span { + padding-left: 10px; } select.sheet-ball-picker { - border: none; width: auto; } @@ -668,10 +685,15 @@ input.sheet-skill-color-setting[value="SPD"] + .sheet-skill-total + button[type= background-color: var(--stat-ro-spd); } -input[type="number"].sheet-skill-total { +input.sheet-skill-total { border: none; font-style: italic; font-weight: bold; + width: 3.5em; +} + +input[type="text"].sheet-skill-total { + text-align: center; } .sheet-stat-ball-color[type="number"] { diff --git a/PokemonTabletopAdventures_v3/PTA3.html b/PokemonTabletopAdventures_v3/PTA3.html index 86220d4510..30b5e981a0 100644 --- a/PokemonTabletopAdventures_v3/PTA3.html +++ b/PokemonTabletopAdventures_v3/PTA3.html @@ -578,14 +578,17 @@
- + - + + + Ball Mod: + + + +
@@ -933,12 +945,12 @@ - + - +

@@ -984,6 +996,14 @@ selector, and then assign the stat you want to use with the right selector.

+
+ Custom Ball Default: + +
+

+ 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. +

+
@@ -2299,7 +2319,7 @@ }); // Capture - on("change:SPDMOD change:capture sheet:opened", function () { + 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; @@ -2308,6 +2328,35 @@ }); }); + 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; + + var display; + var isCustomPokeball = false; + if (ball.includes("Custom")) { + display = values.capture_default_custom_modifier; + isCustomPokeball = true; + } else { + display = ball; + } + + var 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; diff --git a/PokemonTabletopAdventures_v3/README.md b/PokemonTabletopAdventures_v3/README.md index 4c3c71be17..86d6f2fda8 100644 --- a/PokemonTabletopAdventures_v3/README.md +++ b/PokemonTabletopAdventures_v3/README.md @@ -23,6 +23,13 @@ Things we want to add to the character sheet, presented in no particular order o ## Changelog +### Feb 18th, 2021 + +- Expanded the Capture Pokémon skill, allowing modifiers such as Capture Point to be applied +- Improved the display of the Pokéball selection, and added a display of the effect that each has on the capture roll +- Added a display of the total modifier to capture rolls +- Added the option of configuring the default value for Custom Pokéballs + ### Feb 11th, 2021 - Resolved a small issue with the move repeating section where the button to collapse the fields would show a `+` instead of a `-`