Move shake check for crit captures to after first shake

This commit is contained in:
AJ Fontaine 2024-11-04 13:51:46 -05:00
parent 3b2fb87917
commit fd12027dc6

View File

@ -122,13 +122,17 @@ export class AttemptCapturePhase extends PokemonPhase {
shakeCounter.stop(); shakeCounter.stop();
this.failCatch(shakeCount); this.failCatch(shakeCount);
} else if (shakeCount++ < (isCritical ? 1 : 3)) { } else if (shakeCount++ < (isCritical ? 1 : 3)) {
// Shake check (skip the first for critical captures) // Shake check (skip check for critical captures, but still play the sound)
if (pokeballMultiplier === -1 || isCritical && shakeCount === 1 || pokemon.randSeedInt(65536) < shakeProbability) { if (pokeballMultiplier === -1 || isCritical || pokemon.randSeedInt(65536) < shakeProbability) {
this.scene.playSound("se/pb_move"); this.scene.playSound("se/pb_move");
} else { } else {
shakeCounter.stop(); shakeCounter.stop();
this.failCatch(shakeCount); this.failCatch(shakeCount);
} }
} else if (isCritical && pokemon.randSeedInt(65536) >= shakeProbability) {
// Above, perform the one shake check for critical captures after the ball shakes once
shakeCounter.stop();
this.failCatch(shakeCount);
} else { } else {
this.scene.playSound("se/pb_lock"); this.scene.playSound("se/pb_lock");
addPokeballCaptureStars(this.scene, this.pokeball); addPokeballCaptureStars(this.scene, this.pokeball);