mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-28 11:12:24 +02:00
Added options to cost reduction filter for consistency with starter select screen
This commit is contained in:
parent
6c34c820b4
commit
379f1976d7
@ -1314,13 +1314,18 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
||||
});
|
||||
|
||||
// Cost Reduction Filter
|
||||
const isCostReduced = starterData.valueReduction > 0;
|
||||
const isCostReducedByOne = starterData.valueReduction === 1;
|
||||
const isCostReducedByTwo = starterData.valueReduction === 2;
|
||||
const isCostReductionUnlockable = this.isValueReductionAvailable(container.species.speciesId);
|
||||
const fitsCostReduction = this.filterBar.getVals(DropDownColumn.UNLOCKS).some(unlocks => {
|
||||
if (unlocks.val === "COST_REDUCTION" && unlocks.state === DropDownState.ON) {
|
||||
return isCostReduced;
|
||||
return isCostReducedByOne || isCostReducedByTwo;
|
||||
} else if (unlocks.val === "COST_REDUCTION" && unlocks.state === DropDownState.ONE) {
|
||||
return isCostReducedByOne;
|
||||
} else if (unlocks.val === "COST_REDUCTION" && unlocks.state === DropDownState.TWO) {
|
||||
return isCostReducedByTwo;
|
||||
} else if (unlocks.val === "COST_REDUCTION" && unlocks.state === DropDownState.EXCLUDE) {
|
||||
return isStarterProgressable && !isCostReduced;
|
||||
return isStarterProgressable && !(isCostReducedByOne || isCostReducedByTwo);
|
||||
} else if (unlocks.val === "COST_REDUCTION" && unlocks.state === DropDownState.UNLOCKABLE) {
|
||||
return isCostReductionUnlockable;
|
||||
} else if (unlocks.val === "COST_REDUCTION" && unlocks.state === DropDownState.OFF) {
|
||||
|
Loading…
Reference in New Issue
Block a user