Skip to content

Commit

Permalink
test option to analyze all shield scanarios
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisisth authored Jan 6, 2025
1 parent 07e0271 commit 4062430
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/js/battle/TeamRanker.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ var RankerMaster = (function () {
shieldTestArr.push([ overrideSettings[0].shields, overrideSettings[1].shields ]);
} else if(shieldMode == 'average'){
shieldTestArr.push([0,0], [1,1]);
} else if(shieldMode == 'all'){
shieldTestArr.push([0,0], [0,1], [0,2], [1,0], [1,1], [1,2], [2,0], [2,1], [2,2]);
}

var avgPokeRating = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/js/interface/TeamInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ var InterfaceMaster = (function () {

// Push to counter team

if(count < 500){
if(count <= alternativeCount){
counterTeam.push(pokemon);
}

Expand Down Expand Up @@ -854,6 +854,7 @@ var InterfaceMaster = (function () {
// Gather advanced settings
var team = multiSelectors[0].getPokemonList();
var scorecardCount = parseInt($(".scorecard-length-select option:selected").val());
var alternativeCount = parseInt($(".scorecard-length-select option:selected").val());
var allowShadows = $(".team-option .check.allow-shadows").hasClass("on");
var allowXL = $(".team-option .check.allow-xl").hasClass("on");
var baitShields = $(".team-option .check.shield-baiting").hasClass("on");
Expand Down
26 changes: 24 additions & 2 deletions src/team-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
<h3>Max Team Size</h3>
<select class="team-size-select">
<option value="3" selected>3</option>
<option value="6" selected>6</option>
<option value="6">6</option>
<option value="8">8</option>
</select>
</div>
<div class="team-option">
<h3>Scorecard Length</h3>
<select class="scorecard-length-select">
<option value="10">10</option>
<option value="20" selected>20</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
<option value="60">60</option>
Expand All @@ -46,6 +46,27 @@
<option value="500">700</option>
<option value="500">800</option>
<option value="500">900</option>
<option value="500" selected>1000</option>
</select>
</div>
<div>
<h3>Alternatives Length</h3>
<select class="alternatives-length-select">
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
<option value="60">60</option>
<option value="80">80</option>
<option value="100" selected>100</option>
<option value="200">200</option>
<option value="300">300</option>
<option value="400">400</option>
<option value="500">500</option>
<option value="500">600</option>
<option value="500">700</option>
<option value="500">800</option>
<option value="500">900</option>
<option value="500">1000</option>
</select>
</div>
Expand All @@ -69,6 +90,7 @@
<option value="0">No shields</option>
<option value="1">1 shield</option>
<option value="2">2 shields</option>
<option value="all">all</option>
</select>
</div>
<div class="team-option">
Expand Down

0 comments on commit 4062430

Please sign in to comment.