Skip to content

Commit

Permalink
Support Loaded Dice in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
thejetou committed Oct 4, 2023
1 parent b9e91b0 commit 3ef93f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/shared_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,9 @@ $(".move-selector").change(function () {
moveGroupObj.children(".stat-drops").hide();
moveGroupObj.children(".move-hits").show();
var pokemon = $(this).closest(".poke-info");
var moveHits = (pokemon.find(".ability").val() === 'Skill Link') ? 5 : 3;
var moveHits =
pokemon.find(".ability").val() === 'Skill Link' ? 5 :
pokemon.find(".item").val() === 'Loaded Dice' ? 4 : 3;
moveGroupObj.children(".move-hits").val(moveHits);
} else if (dropsStats) {
moveGroupObj.children(".move-hits").hide();
Expand All @@ -512,6 +514,7 @@ $(".item").change(function () {
} else {
$metronomeControl.hide();
}
$(this).closest(".poke-info").find(".move-hits").val($(this).val() === 'Loaded Dice' ? 4 : 3);
autosetQP($(this).closest(".poke-info"));
});

Expand Down

0 comments on commit 3ef93f0

Please sign in to comment.