Skip to content

Commit

Permalink
Fix Gen 5 Randoms damage calc
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisXV committed Oct 14, 2023
1 parent 00985cb commit d079590
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/js/shared_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ $(".set-selector").change(function () {
$(this).closest('.poke-info').find(".extraSetAbilities").text(listAbilities.join(', '));
if (gen >= 2) $(this).closest('.poke-info').find(".item-pool").show();
$(this).closest('.poke-info').find(".extraSetItems").text(listItems.join(', '));
if (gen >= 9 || gen === 7 || gen === 6) {
if (gen >= 9 || gen === 7 || gen === 6 || gen === 5) {
$(this).closest('.poke-info').find(".role-pool").show();
if (gen >= 9) $(this).closest('.poke-info').find(".tera-type-pool").show();
}
Expand Down Expand Up @@ -631,7 +631,7 @@ $(".set-selector").change(function () {
}
var setMoves = set.moves;
if (randset) {
if (gen < 9 && gen !== 7 && gen !== 6) {
if (gen < 9 && gen !== 7 && gen !== 6 && gen !== 5) {
setMoves = randset.moves;
} else {
setMoves = [];
Expand Down Expand Up @@ -896,7 +896,7 @@ function createPokemon(pokeInfo) {
evs[stat] = (set.evs && typeof set.evs[legacyStat] !== "undefined") ? set.evs[legacyStat] : 0;
}
var moveNames = set.moves;
if (isRandoms && (gen >= 9 || gen === 7 || gen === 6)) {
if (isRandoms && (gen >= 9 || gen === 7 || gen === 6 || gen === 5)) {
moveNames = [];
for (var role in set.roles) {
for (var q = 0; q < set.roles[role].moves.length; q++) {
Expand Down
6 changes: 3 additions & 3 deletions src/randoms.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
<div>Tera Type Pool</div>
<small class="extraSetTeraTypes"></small>
</div>
<div class="role-pool gen-specific g9">
<div class="role-pool gen-specific g5 g6 g7 g9">
<div>Role Pool</div>
<small class="extraSetRoles"></small>
</div>
Expand Down Expand Up @@ -1339,7 +1339,7 @@
<option value="spe">Speed</option>
</select>
</div>
<div class="gen-specific g2 g3 g4 g5 g6 g7 g8 g9">
<div class="gen-specific g2 g3 g4 g5 g6 g7 g8 g9">
<label for="itemR1">Item</label>
<select class="item terrain-trigger calc-trigger" id="itemR1"></select>
</div>
Expand All @@ -1356,7 +1356,7 @@
<div>Tera Type Pool</div>
<small class="extraSetTeraTypes"></small>
</div>
<div class="role-pool gen-specific g6 g7 g9">
<div class="role-pool gen-specific g5 g6 g7 g9">
<div>Role Pool</div>
<small class="extraSetRoles"></small>
</div>
Expand Down

0 comments on commit d079590

Please sign in to comment.