Lashtw commited on
Commit
5d979f9
·
verified ·
1 Parent(s): 800d5d5

Upload 9 files

Browse files
Files changed (1) hide show
  1. src/utils/monsterUtils.js +2 -1
src/utils/monsterUtils.js CHANGED
@@ -450,7 +450,8 @@ export function getNextMonster(currentStage, likes, classSize, currentMonsterId
450
  // Extract path suffix (e.g. "A" from "L1_A", "AB" from "L2_AB")
451
  const currentPath = currentMonsterId.split('_')[1];
452
  // Filter candidates: Must start with L{nextStage}_{currentPath}
453
- const strictMatches = candidates.filter(m => m.id.startsWith(`L${currentStage + 1}_${currentPath}`));
 
454
 
455
  if (strictMatches.length > 0) {
456
  candidates = strictMatches;
 
450
  // Extract path suffix (e.g. "A" from "L1_A", "AB" from "L2_AB")
451
  const currentPath = currentMonsterId.split('_')[1];
452
  // Filter candidates: Must start with L{nextStage}_{currentPath}
453
+ // FIXED: currentStage IS the target stage (e.g. 3), so we look for L3_...
454
+ const strictMatches = candidates.filter(m => m.id.startsWith(`L${currentStage}_${currentPath}`));
455
 
456
  if (strictMatches.length > 0) {
457
  candidates = strictMatches;