Skip to content

Commit

Permalink
update gurps
Browse files Browse the repository at this point in the history
fixed ranged tool reset button
  • Loading branch information
MadCoder253 committed Oct 9, 2023
1 parent 8b7409a commit f66423b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
49 changes: 32 additions & 17 deletions GURPS/gurps.html
Original file line number Diff line number Diff line change
Expand Up @@ -4372,13 +4372,19 @@ <h4>
<!-- current version notes: 2.9.17 -->
<ul>
<li>
<b>NEW</b> Added custom macro text boxes for Skills, Defense, Melee, Ranged, and Spell rolls. To view the custom macros, expand the notes section at the top of each section.
<b>NEW:</b> Added custom macro text boxes for Skills, Defense, Melee, Ranged, and Spell rolls. To view the custom macros, expand the notes section at the top of each section.
</li>
<li>
<b>ENHANCEMENT</b> On the Option Rules tab, added a <b>Reset Spell Notes</b> button. If clicked, the existing notes are replaced with the original notes.
<b>ENHANCEMENT:</b> On the Option Rules tab, added a <b>Reset Spell Notes</b> button. If clicked, the existing notes are replaced with the original notes.
</li>
<li>
<b>ENHANCEMENT</b> Under Sheet Options\Rules, added text entries for the Success\Fail\Crit Success\Crit Fail text for Fright Check, Unstun, Knockdown and Stunning, and Unconsciousness.
<b>ENHANCEMENT:</b> Under Sheet Options\Rules, added text entries for the Success\Fail\Crit Success\Crit Fail text for Fright Check, Unstun, Knockdown and Stunning, and Unconsciousness.
</li>
<li>
<b>ENHANCEMENT:</b> Under the General Page for HT, updated the ToolTip.
</li>
<li>
<b>FIX:</b> Under Combat\Ranged for the Ranged Calculator Tool, fixed a synchronization issue with the <b>Reset</b> button that wasn't applying the updates to modifier tool.
</li>
</ul>

Expand Down Expand Up @@ -4615,7 +4621,9 @@ <h4>
</div>
<span class="tooltip">
<span data-i18n="attributes-health-tooltip">Health 10pts/level - Unmodified:</span>
<span name="attr_health_base"></span>
<span name="attr_health_base"></span><br />
<span data-i18n="attributes-health-detailed-tooltip"></span>

</span>
</div>
<div class="cell col1">
Expand Down Expand Up @@ -15705,13 +15713,19 @@ <h4>Version: <span name="attr_announcement_version"></span></h4>
<!-- current version notes: 2.9.17 -->
<ul>
<li>
<b>NEW</b> Added custom macro text boxes for Skills, Defense, Melee, Ranged, and Spell rolls. To view the custom macros, expand the notes section at the top of each section.
<b>NEW:</b> Added custom macro text boxes for Skills, Defense, Melee, Ranged, and Spell rolls. To view the custom macros, expand the notes section at the top of each section.
</li>
<li>
<b>ENHANCEMENT:</b> On the Option Rules tab, added a <b>Reset Spell Notes</b> button. If clicked, the existing notes are replaced with the original notes.
</li>
<li>
<b>ENHANCEMENT:</b> Under Sheet Options\Rules, added text entries for the Success\Fail\Crit Success\Crit Fail text for Fright Check, Unstun, Knockdown and Stunning, and Unconsciousness.
</li>
<li>
<b>ENHANCEMENT</b> On the Option Rules tab, added a <b>Reset Spell Notes</b> button. If clicked, the existing notes are replaced with the original notes.
<b>ENHANCEMENT:</b> Under the General Page for HT, updated the ToolTip.
</li>
<li>
<b>ENHANCEMENT</b> Under Sheet Options\Rules, added text entries for the Success\Fail\Crit Success\Crit Fail text for Fright Check, Unstun, Knockdown and Stunning, and Unconsciousness.
<b>FIX:</b> Under Combat\Ranged for the Ranged Calculator Tool, fixed a synchronization issue with the <b>Reset</b> button that wasn't applying the updates to modifier tool.
</li>
</ul>

Expand Down Expand Up @@ -25437,19 +25451,20 @@ <h3> Your feedback is most welcomed! See link below.</h3>

}

on("clicked:range_calc_reset", function () {
on("clicked:range_calc_reset", async () => {

await resetRangeCalculator();

await setAttrsAsync({roll_modifier_types: "ranged"});

resetRollModifiersToolBox(applyRollModifiers);

resetRangeCalculator(() => {
setAttrs({roll_modifier_types: "range"}, {select: false}, resetRollModifiersToolBox(applyRollModifiers));
});

});

function resetRangeCalculator(callback) {
resetRangeCalculator = async () => {

callback = callback || noop;

setAttrs(
await setAttrsAsync(
{
"firing_distance": 0,
"firing_speed_difference": 0,
Expand All @@ -25459,7 +25474,7 @@ <h3> Your feedback is most welcomed! See link below.</h3>
"firing_braced": 0,
"firing_aiming_bonus": 0,
"firing_rof": 0,
}, null, callback);
});

}

Expand Down Expand Up @@ -30042,7 +30057,7 @@ <h3> Your feedback is most welcomed! See link below.</h3>

["melee", "ranged", "spell", "skill", "technique", "defense"].forEach(section => {

setAttrs({roll_modifier_types: section}, {select: false}, resetRollModifiersToolBox(applyRollModifiers));
setAttrs({roll_modifier_types: section}, null, resetRollModifiersToolBox(applyRollModifiers));

});

Expand Down
1 change: 1 addition & 0 deletions GURPS/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@
"attributes-intelligence-tooltip": "Intelligence 20pts/level -Unmodified:",
"abbreviation-health": "HT",
"attributes-health-tooltip": "Health 10pts/level - Unmodified:",
"attributes-health-detailed-tooltip": "With the advent of the new Success/Fail results for the sections of <b>Unstun</b>, (Roll to check if recovering from a Stun result from the previous tun), <b>K Down</b> (Knockdown and Stunning), <b>Unconsciousness</b>, and <b>Death</b>, the HT roll should not be used for these. Instead, you should be using those specific sections as these rolls will have specific Success/Fail results associated with said topics.",
"abbreviation-perception": "Per",
"attributes-perception-tooltip": "Perception: Based on Intelligence<br>5pts/level.<br>Unmodified: <span name=\"attr_perception_base\"></span>",
"attribute-vision": "Vision",
Expand Down

0 comments on commit f66423b

Please sign in to comment.