diff --git a/client/src/dojo/contractModels.ts b/client/src/dojo/contractModels.ts index 34c69aa1..61e17d38 100644 --- a/client/src/dojo/contractModels.ts +++ b/client/src/dojo/contractModels.ts @@ -31,6 +31,8 @@ export function defineContractComponents(world: World) { combo_counter_in_tournament: RecsType.Number, max_combo_in_tournament: RecsType.Number, tournament_id: RecsType.Number, + combo_counter_2: RecsType.Number, + combo_counter_in_tournament_2: RecsType.Number, }, { metadata: { @@ -59,6 +61,8 @@ export function defineContractComponents(world: World) { "u8", "u8", "u64", + "u16", + "u16", ], customTypes: [], }, diff --git a/client/src/dojo/game/models/game.ts b/client/src/dojo/game/models/game.ts index 02f43a37..ee706fd6 100644 --- a/client/src/dojo/game/models/game.ts +++ b/client/src/dojo/game/models/game.ts @@ -10,6 +10,7 @@ import { GAME_MODE_PAID_MULTIPLIER, } from "../constants"; import { Mode } from "../types/mode"; +import { max } from "date-fns"; export interface Block { width: number; @@ -65,7 +66,7 @@ export class Game { this.hammer_used = game.hammer_used; this.wave_used = game.wave_used; this.totem_used = game.totem_used; - this.combo = game.combo_counter; + this.combo = Math.max(game.combo_counter, game.combo_counter_2); // because of the patch u8 u16 for combo_counter this.max_combo = game.max_combo; this.score = game.score; this.buyIn = 100; // Set default buy-in of $100 @@ -75,7 +76,10 @@ export class Game { this.seed = game.seed; this.start_time = new Date(game.start_time * 1000); this.score_in_tournament = game.score_in_tournament; - this.combo_counter_in_tournament = game.combo_counter_in_tournament; + this.combo_counter_in_tournament = Math.max( + game.combo_counter_in_tournament, + game.combo_counter_in_tournament_2, + ); // because of the patch u8 u16 for combo_counter_in_tournament this.max_combo_in_tournament = game.max_combo_in_tournament; this.tournament_id = game.tournament_id; diff --git a/client/src/ui/components/BonusButton.tsx b/client/src/ui/components/BonusButton.tsx index ac8de3db..3c326347 100644 --- a/client/src/ui/components/BonusButton.tsx +++ b/client/src/ui/components/BonusButton.tsx @@ -46,7 +46,7 @@ const BonusButton: React.FC = ({ transition={{ duration: 0.5 }} className={`relative`} > -
+
{bonusCount}