Integer to number in bounceanim signature

This commit is contained in:
AJ Fontaine 2024-11-04 23:39:19 -05:00
parent ddf9e6792a
commit 8fa75f6874
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ export function getCriticalCaptureChance(scene: BattleScene, modifiedCatchRate:
return Math.floor(catchingCharmMultiplier.value * dexMultiplier * Math.min(255, modifiedCatchRate) / 6);
}
export function doPokeballBounceAnim(scene: BattleScene, pokeball: Phaser.GameObjects.Sprite, y1: number, y2: number, baseBounceDuration: integer, callback: Function, isCritical: boolean = false) {
export function doPokeballBounceAnim(scene: BattleScene, pokeball: Phaser.GameObjects.Sprite, y1: number, y2: number, baseBounceDuration: number, callback: Function, isCritical: boolean = false) {
let bouncePower = 1;
let bounceYOffset = y1;
let bounceY = y2;

View File

@ -98,13 +98,13 @@ export class AttemptCapturePhase extends PokemonPhase {
this.scene.time.delayedCall(17, () => this.pokeball.setTexture("pb", `${pokeballAtlasKey}`));
const doShake = () => {
// After the overall catch rate check, the game does 4 shake checks before confirming the catch.
// After the overall catch rate check, the game does 3 shake checks before confirming the catch.
let shakeCount = 0;
const pbX = this.pokeball.x;
const shakeCounter = this.scene.tweens.addCounter({
from: 0,
to: 1,
repeat: isCritical ? 2 : 4, // Critical captures only perform 2 shake checks
repeat: isCritical ? 2 : 4, // Critical captures only perform 1 shake check
yoyo: true,
ease: "Cubic.easeOut",
duration: 250,