Skip to content

Commit

Permalink
UI: Fix Loaded Dice & Skill Link
Browse files Browse the repository at this point in the history
  • Loading branch information
thejetou committed Oct 6, 2023
1 parent a0015be commit 72ffd2e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/js/shared_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ $(".percent-hp").keyup(function () {
});

$(".ability").bind("keyup change", function () {
$(this).closest(".poke-info").find(".move-hits").val($(this).val() === 'Skill Link' ? 5 : 3);
var moveHits =
$(this).val() === 'Skill Link' ? 5 :
$(this).closest(".poke-info").find(".item").val() === 'Loaded Dice' ? 4 : 3;
$(this).closest(".poke-info").find(".move-hits").val(moveHits);

var ability = $(this).closest(".poke-info").find(".ability").val();

Expand Down Expand Up @@ -523,7 +526,10 @@ $(".item").change(function () {
} else {
$metronomeControl.hide();
}
$(this).closest(".poke-info").find(".move-hits").val($(this).val() === 'Loaded Dice' ? 4 : 3);
var moveHits =
$(this).closest(".poke-info").find(".ability").val() === 'Skill Link' ? 5 :
itemName === 'Loaded Dice' ? 4 : 3;
$(this).closest(".poke-info").find(".move-hits").val(moveHits);
autosetQP($(this).closest(".poke-info"));
});

Expand Down

0 comments on commit 72ffd2e

Please sign in to comment.