mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 14:02:18 +02:00
[Bug] fix and condition of shiny and passive (#3136)
This commit is contained in:
parent
8f30befe5b
commit
29a5dd0068
@ -1949,7 +1949,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
const fitsGen = this.filterBar.getVals(DropDownColumn.GEN).includes(container.species.generation);
|
const fitsGen = this.filterBar.getVals(DropDownColumn.GEN).includes(container.species.generation);
|
||||||
const fitsType = this.filterBar.getVals(DropDownColumn.TYPES).some(type => container.species.isOfType((type as number) - 1));
|
const fitsType = this.filterBar.getVals(DropDownColumn.TYPES).some(type => container.species.isOfType((type as number) - 1));
|
||||||
const fitsUnlocks = this.filterBar.getVals(DropDownColumn.UNLOCKS).some(variant => {
|
const fitsShiny = this.filterBar.getVals(DropDownColumn.UNLOCKS).some(variant => {
|
||||||
if (variant === "SHINY3") {
|
if (variant === "SHINY3") {
|
||||||
return isVariant3Caught;
|
return isVariant3Caught;
|
||||||
} else if (variant === "SHINY2") {
|
} else if (variant === "SHINY2") {
|
||||||
@ -1960,7 +1960,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
return isCaught && !isVariantCaught && !isVariant2Caught && !isVariant3Caught;
|
return isCaught && !isVariantCaught && !isVariant2Caught && !isVariant3Caught;
|
||||||
} else if (variant === "UNCAUGHT") {
|
} else if (variant === "UNCAUGHT") {
|
||||||
return isUncaught;
|
return isUncaught;
|
||||||
} else if (variant === "PASSIVEUNLOCKED") {
|
}
|
||||||
|
});
|
||||||
|
const fitsPassive = this.filterBar.getVals(DropDownColumn.UNLOCKS).some(variant => {
|
||||||
|
if (variant === "PASSIVEUNLOCKED") {
|
||||||
return isPassiveUnlocked;
|
return isPassiveUnlocked;
|
||||||
} else if (variant === "PASSIVELOCKED") {
|
} else if (variant === "PASSIVELOCKED") {
|
||||||
return !isPassiveUnlocked;
|
return !isPassiveUnlocked;
|
||||||
@ -1978,7 +1981,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (fitsGen && fitsType && fitsUnlocks && fitsWin) {
|
if (fitsGen && fitsType && fitsShiny && fitsPassive && fitsWin) {
|
||||||
this.filteredStarterContainers.push(container);
|
this.filteredStarterContainers.push(container);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user