Skip to content

Commit

Permalink
fix golden eggs egg chance reset by mistake (#2291)
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainpolletvillard authored Oct 7, 2024
1 parent 2a00387 commit 1e44fef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/rooms/commands/game-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,12 @@ export class OnUpdatePhaseCommand extends Command<GameRoom> {
egg.positionX = x !== undefined ? x : -1
egg.positionY = 0
player.board.set(egg.id, egg)
player.eggChance = 0
if (
player.effects.has(Effect.HATCHER) ||
(player.effects.has(Effect.GOLDEN_EGGS) && shiny)
) {
player.eggChance = 0
}
}

player.board.forEach((pokemon, key) => {
Expand Down

0 comments on commit 1e44fef

Please sign in to comment.