@@ -984,6 +989,22 @@
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.
+
+
+
+ Feature Bonus to Capture:
+ ℹ
+
+
+ This setting allows you to define a numerical bonus to your capture rolls. This value will be subtracted from your capture rolls.
+
+
@@ -2299,7 +2320,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 +2329,51 @@
});
});
+ on("change:ball_capture_modifier change:capture_roll_bonus change:capture_roll_feature_bonus sheet:opened", function () {
+ getAttrs(["ball_capture_modifier", "capture_default_custom_modifier", "capture_roll_bonus", "capture_roll_feature_bonus"], function (values) {
+
+ const ball = values.ball_capture_modifier;
+ const bonus = parseInt(values.capture_roll_bonus) || 0;
+
+ var display;
+ var showAsterisk = false;
+ if (ball.includes("Custom")) {
+ display = values.capture_default_custom_modifier;
+ showAsterisk = true;
+ } else {
+ display = ball;
+ }
+
+
+ const feature = values.capture_roll_feature_bonus;
+ if (feature.includes("@{")) {
+ const stripped = feature.replace('@{', '').replace('}', '');
+
+ getAttrs([stripped], function (innerValue) {
+ const value = innerValue[`${stripped}`];
+ assignCaptureAttributesWith(bonus, value, display, showAsterisk);
+ });
+ } else {
+ const intFeature = parseInt(feature) || 0;
+ assignCaptureAttributesWith(bonus, intFeature, display, showAsterisk);
+ }
+ });
+ })
+
+ function assignCaptureAttributesWith(bonus, feature, display, isCustomPokeball) {
+ var total = bonus - feature;
+ 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;
From ad623d62766486dff054626c0b2e00676f41014f Mon Sep 17 00:00:00 2001
From: Ian Merryweather
Date: Thu, 18 Feb 2021 13:04:19 +0000
Subject: [PATCH 2/2] feature: Improved capture pokemon appearance
- removes the feature bonus configuration option as it was unnecessary and made the sheet worker bloated
- updated the styling of various capture pokemon skill sub-elements
- added more descriptive titles to the capture pokemon skill sub-elements
- updated the README
---
PokemonTabletopAdventures_v3/PTA3.css | 6 ++-
PokemonTabletopAdventures_v3/PTA3.html | 73 ++++++++++----------------
PokemonTabletopAdventures_v3/README.md | 7 +++
3 files changed, 40 insertions(+), 46 deletions(-)
diff --git a/PokemonTabletopAdventures_v3/PTA3.css b/PokemonTabletopAdventures_v3/PTA3.css
index 1d6bb13161..dcdc880397 100644
--- a/PokemonTabletopAdventures_v3/PTA3.css
+++ b/PokemonTabletopAdventures_v3/PTA3.css
@@ -462,6 +462,7 @@ div.sheet-skill-selection .sheet-no-dropdown {
div.sheet-capture-pokemon-skill input[type="text"] {
margin-left: -1px;
+ width: 65% !important;
}
div.sheet-capture-pokemon-skill .sheet-skill-roller {
@@ -472,8 +473,11 @@ 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;
}
diff --git a/PokemonTabletopAdventures_v3/PTA3.html b/PokemonTabletopAdventures_v3/PTA3.html
index bb1228f33c..30b5e981a0 100644
--- a/PokemonTabletopAdventures_v3/PTA3.html
+++ b/PokemonTabletopAdventures_v3/PTA3.html
@@ -578,13 +578,15 @@
@@ -997,14 +1004,6 @@
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.
-
- Feature Bonus to Capture:
- ℹ
-
-
- This setting allows you to define a numerical bonus to your capture rolls. This value will be subtracted from your capture rolls.
-
-
@@ -2329,50 +2328,34 @@
});
});
- on("change:ball_capture_modifier change:capture_roll_bonus change:capture_roll_feature_bonus sheet:opened", function () {
- getAttrs(["ball_capture_modifier", "capture_default_custom_modifier", "capture_roll_bonus", "capture_roll_feature_bonus"], function (values) {
+ 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 showAsterisk = false;
+ var isCustomPokeball = false;
if (ball.includes("Custom")) {
display = values.capture_default_custom_modifier;
- showAsterisk = true;
+ isCustomPokeball = true;
} else {
display = ball;
}
-
- const feature = values.capture_roll_feature_bonus;
- if (feature.includes("@{")) {
- const stripped = feature.replace('@{', '').replace('}', '');
-
- getAttrs([stripped], function (innerValue) {
- const value = innerValue[`${stripped}`];
- assignCaptureAttributesWith(bonus, value, display, showAsterisk);
- });
+ var total = bonus;
+ if (isCustomPokeball) {
+ total = `${total}*`;
} else {
- const intFeature = parseInt(feature) || 0;
- assignCaptureAttributesWith(bonus, intFeature, display, showAsterisk);
+ total += parseInt(display) || 0;
}
+
+ setAttrs({
+ "capture_display": display,
+ "capture_roll_total": total
+ });
});
- })
-
- function assignCaptureAttributesWith(bonus, feature, display, isCustomPokeball) {
- var total = bonus - feature;
- 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) {
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 `-`