@@ -181,11 +181,11 @@ public PokeDist getPossiblePokemon(@NonNull ScanData scanData) {
181181 }
182182
183183
184- //6. Check if the found pokemon should be alolan variant or not.
184+ //6. Check if the found pokemon should be its variant(e.g. Alolan, Galarian, or its specific form) or not.
185185 if (scanData != null && scanData .getPokemonType () != null ) {
186- PokeDist alolanGuess = checkAlolanVariant (guess , scanData );
187- if (alolanGuess != null ) {
188- guess = alolanGuess ;
186+ PokeDist variantGuess = checkVariant (guess , scanData );
187+ if (variantGuess != null ) {
188+ guess = variantGuess ;
189189 }
190190
191191 }
@@ -289,7 +289,7 @@ private PokeDist createFormPokeDistances(PokeDist guess, ScanData scanData, Type
289289 return null ;
290290 }
291291
292- private PokeDist checkAlolanVariant (PokeDist guess , ScanData scanData ) {
292+ private PokeDist checkVariant (PokeDist guess , ScanData scanData ) {
293293 try {
294294 switch (guess .pokemon .number ) {
295295 case (102 ): // Exeggutor (dex 103)
@@ -323,8 +323,7 @@ private PokeDist checkAlolanVariant(PokeDist guess, ScanData scanData) {
323323 // check types including steel
324324 return createFormPokeDist (guess , scanData , Type .STEEL , 1 );
325325 case (51 ): // Meowth
326- // check types including dark
327- return createFormPokeDist (guess , scanData , Type .DARK , 1 );
326+ return createFormPokeDistances (guess , scanData , Type .NORMAL , Type .DARK , Type .STEEL );
328327 case (52 ): // Persian
329328 // check types including dark
330329 return createFormPokeDist (guess , scanData , Type .DARK , 1 );
@@ -337,6 +336,8 @@ private PokeDist checkAlolanVariant(PokeDist guess, ScanData scanData) {
337336 case (75 ): // Golem
338337 // check types including electric
339338 return createFormPokeDist (guess , scanData , Type .ELECTRIC , 1 );
339+ case (82 ): // Farfetch'd
340+ return createFormPokeDist (guess , scanData , Type .FIGHTING , 1 );
340341 case (87 ): // Grimer
341342 // check types including dark
342343 return createFormPokeDist (guess , scanData , Type .DARK , 1 );
@@ -346,6 +347,12 @@ private PokeDist checkAlolanVariant(PokeDist guess, ScanData scanData) {
346347 case (104 ): // Marowak
347348 // check types including fire
348349 return createFormPokeDist (guess , scanData , Type .FIRE , 1 );
350+ case (109 ): // Weezing
351+ return createFormPokeDist (guess , scanData , Type .FAIRY , 1 );
352+ case (262 ): // Zigzagoon
353+ return createFormPokeDist (guess , scanData , Type .DARK , 1 );
354+ case (263 ): // Linoone
355+ return createFormPokeDist (guess , scanData , Type .DARK , 1 );
349356 case (412 ): // Wormadam
350357 return createFormPokeDistances (guess , scanData , Type .DARK , Type .GROUND , Type .STEEL );
351358 case (478 ): // Rotom
@@ -357,10 +364,33 @@ private PokeDist checkAlolanVariant(PokeDist guess, ScanData scanData) {
357364 dist = new PokeDist (guess .pokemon .base .forms .get (0 ), 0 );
358365 }
359366 return dist ;
360- case (492 ): // Rotom
367+ case (492 ): // Arceus
361368 return createFormPokeDistances (guess , scanData , Type .NORMAL , Type .FIGHTING , Type .FLYING , Type .POISON ,
362369 Type .GROUND , Type .ROCK , Type .BUG , Type .GHOST , Type .STEEL , Type .FIRE , Type .WATER , Type .GRASS ,
363370 Type .ELECTRIC , Type .PSYCHIC , Type .ICE , Type .DRAGON , Type .DARK , Type .FAIRY );
371+ case (553 ): // Darumaka
372+ return createFormPokeDist (guess , scanData , Type .ICE , 1 );
373+ case (554 ): // Darmanitan
374+ dist = createFormPokeDist (guess , scanData , Type .PSYCHIC , 1 );
375+ // check Zen Form
376+ if (dist == null ) {
377+ // check Standard Form
378+ if (createFormPokeDist (guess , scanData , Type .ICE , 1 ) == null ) {
379+ dist = createFormPokeDist (guess , scanData , Type .FIRE , 0 );
380+ }
381+ // check Galarian Standard Form
382+ else if (createFormPokeDist (guess , scanData , Type .FIRE , 1 ) == null ) {
383+ dist = createFormPokeDist (guess , scanData , Type .ICE , 2 );
384+ }
385+ // Galarian Zen Form
386+ else {
387+ dist = createFormPokeDist (guess , scanData , Type .ICE , 3 );
388+ }
389+ }
390+ return dist ;
391+ case (617 ): // Stunfisk
392+ return createFormPokeDist (guess , scanData , Type .STEEL , 1 );
393+
364394 default :
365395 // do nothing
366396
0 commit comments