fix: Correctly adds all ball modifiers

- Ensures the ball capture modifier is added to the d100 roll every time
This commit is contained in:
Ian Merryweather
2025-08-16 20:34:00 +01:00
parent 86ca101afb
commit 3aef924007
2 changed files with 6 additions and 3 deletions
+3 -3
View File
@@ -1458,7 +1458,7 @@
<div>
<hr class="sheet-skill-separator" />
<div class="sheet-collapsible-skill sheet-capture">
<input name="attr_capture_skill_roll" type="hidden" value="[[ 1d20 + @{capture_total} ]] Capture Roll: [[ d100 @{ball_capture_modifier} [@{selected_ball}] + @{capture_roll_bonus} ]]" />
<input name="attr_capture_skill_roll" type="hidden" value="[[ 1d20 + @{capture_total} ]] Capture Roll: [[ d100 @{ball_capture_modifier} + [@{selected_ball}] + @{capture_roll_bonus} ]]" />
<input class="sheet-skill-color-setting" name="attr_capture_ability_mod" type="hidden" value="SPD" />
<button class="sheet-skill-roller" name="roll_capturecheck" type="roll"
value="@{publicity_roll} &{template:@{skill_template}} {{base-attribute=@{capture_ability_mod}}} {{character-id=@{character_id}}} {{character-name=@{character_name}}} {{skill-name=Capture Pokémon}} {{skill-roll=@{capture_skill_roll}}}">
@@ -5052,8 +5052,8 @@ const skillOptionsFlags = [
selectedBallModifier = "0";
}
const showSkillRoll = `[[ 1d20 + @{capture_total} ]] Capture Roll: [[ d100 @{ball_capture_modifier} [${values.selected_ball}}] + @{capture_roll_bonus} ]]`;
const skipSkillRoll = `[[ d100 @{ball_capture_modifier} [${values.selected_ball}] + @{capture_roll_bonus} ]]`;
const showSkillRoll = `[[ 1d20 + @{capture_total} ]] Capture Roll: [[ d100 + @{ball_capture_modifier} [${values.selected_ball}}] + @{capture_roll_bonus} ]]`;
const skipSkillRoll = `[[ d100 + @{ball_capture_modifier} [${values.selected_ball}] + @{capture_roll_bonus} ]]`;
const skillRoll = values.capture_skill_roll_flag == "on" ? showSkillRoll : skipSkillRoll;
const ball = values.ball_capture_modifier;
const bonus = parseInt(values.capture_roll_bonus) || 0;
+3
View File
@@ -23,6 +23,9 @@ Things we want to add to the character sheet, presented in no particular order o
## Changelog
### Aug 16, 2025
- Resolved an issue with capture rolls not adding all ball modifiers correctly
### Jul 26, 2025
- Resolved a few niggling issue with skills
- Sleight of Hand had a mismatch in attribute name for the selected ability modifier