Buff IV Scanner item
This commit is contained in:
1 parent
36a8939f13
commit
307c84914e
4 files changed
+11
-4
No files matched your search
@@ -193,7 +193,14 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
||||
if (shownIvsCount < 6) {
|
||||
let statsPool = stats.slice(0);
|
||||
for (let i = 0; i < shownIvsCount; i++) {
|
||||
const shownStat = Utils.randSeedItem(statsPool);
|
||||
let shownStat: Stat;
|
||||
let highestIv = -1;
|
||||
statsPool.map(s => {
|
||||
if (ivs[s] > highestIv) {
|
||||
shownStat = s as Stat;
|
||||
highestIv = ivs[s];
|
||||
}
|
||||
});
|
||||
shownStats.push(shownStat);
|
||||
statsPool.splice(statsPool.indexOf(shownStat), 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user