@betorigami/games 1.11.4 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +88 -1
  2. package/dist/index.mjs +3068 -1977
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -29,7 +29,8 @@ declare enum OrigamiGame {
29
29
  LIMBO = "LIMBO",
30
30
  DIAMONDS = "DIAMONDS",
31
31
  WHEEL = "WHEEL",
32
- PLINKO = "PLINKO"
32
+ PLINKO = "PLINKO",
33
+ ADVANCED_DICE = "ADVANCED_DICE"
33
34
  }
34
35
  export type SeasonTheme = "DEFAULT" | "HORRORGAMI";
35
36
  declare const SUPPORTED_EDGE_PERCENTAGES: readonly [
@@ -4288,6 +4289,29 @@ declare enum OrigamiActionType {
4288
4289
  INTERMEDIATE_BET_ACTION = "INTERMEDIATE_BET_ACTION",// bet amount was increased without game ending, such as doubling down in blackjack
4289
4290
  INTERMEDIATE_NON_BET_ACTION = "INTERMEDIATE_NON_BET_ACTION"
4290
4291
  }
4292
+ export type Bounds = {
4293
+ lower: number;
4294
+ upper: number;
4295
+ };
4296
+ declare enum RollType {
4297
+ ROLL_BETWEEN = "ROLL_BETWEEN",
4298
+ ROLL_OUTSIDE = "ROLL_OUTSIDE",
4299
+ ROLL_BETWEEN_TWO = "ROLL_BETWEEN_TWO"
4300
+ }
4301
+ export type RollBetween = {
4302
+ mode: RollType.ROLL_BETWEEN;
4303
+ bounds: Bounds;
4304
+ };
4305
+ export type RollOutside = {
4306
+ mode: RollType.ROLL_OUTSIDE;
4307
+ bounds: Bounds;
4308
+ };
4309
+ export type RollBetweenTwo = {
4310
+ mode: RollType.ROLL_BETWEEN_TWO;
4311
+ firstBounds: Bounds;
4312
+ secondBounds: Bounds;
4313
+ };
4314
+ export type AdvancedDiceInputs = RollBetween | RollOutside | RollBetweenTwo;
4291
4315
  export type DiceStartAction = {
4292
4316
  direction: DiceDirection;
4293
4317
  selectedValue: number;
@@ -4321,6 +4345,7 @@ export interface PlinkoStartAction {
4321
4345
  riskLevel: PlinkoRiskLevel;
4322
4346
  numberOfRows: PlinkoRowCount;
4323
4347
  }
4348
+ export type AdvancedDiceStartAction = AdvancedDiceInputs;
4324
4349
  export interface Action {
4325
4350
  id: string;
4326
4351
  data: {
@@ -4331,6 +4356,7 @@ export interface Action {
4331
4356
  DIAMONDS?: DiamondsStartAction | EndAction;
4332
4357
  WHEEL?: WheelStartAction | EndAction;
4333
4358
  PLINKO?: PlinkoStartAction | EndAction;
4359
+ ADVANCED_DICE?: AdvancedDiceStartAction | EndAction;
4334
4360
  };
4335
4361
  betAmount: string | null;
4336
4362
  payoutAmount: string | null;
@@ -5168,5 +5194,66 @@ export declare class PlinkoGame extends GameComponent {
5168
5194
  private handleBinHit;
5169
5195
  render(): import("lit-html").TemplateResult<1>;
5170
5196
  }
5197
+ export type AdvancedDiceStartArgs = {
5198
+ currency: Currency;
5199
+ amount: string;
5200
+ language: Language;
5201
+ };
5202
+ declare class AdvancedDiceApi {
5203
+ private authToken;
5204
+ private baseUrl;
5205
+ constructor(authToken: string, baseUrl: string);
5206
+ startBet(data: AdvancedDiceStartArgs & {
5207
+ gameInputs: AdvancedDiceInputs;
5208
+ }): Promise<StartBetResponse>;
5209
+ }
5210
+ declare class MockAdvancedDiceApi {
5211
+ private readonly edge;
5212
+ constructor(edge: number);
5213
+ startBet(data: AdvancedDiceStartArgs & {
5214
+ gameInputs: AdvancedDiceInputs;
5215
+ }): Promise<{
5216
+ success: true;
5217
+ data: BetResult;
5218
+ }>;
5219
+ }
5220
+ export declare class AdvancedDiceGame extends GameComponent {
5221
+ static styles: import("lit").CSSResult[];
5222
+ private isManualPlaying;
5223
+ private showDice;
5224
+ private isWin;
5225
+ private resultValue;
5226
+ private history;
5227
+ private rollType;
5228
+ private bounds;
5229
+ private secondBounds;
5230
+ private _multiplierInputValid;
5231
+ private _winChanceInputValid;
5232
+ private _boundsInputValid;
5233
+ private _diceManualEl?;
5234
+ private _diceAutoEl?;
5235
+ get isToggleDisabled(): boolean;
5236
+ get areInputsDisabled(): boolean;
5237
+ /** Roll type cycle order for hotkey */
5238
+ private static readonly ROLL_TYPE_ORDER;
5239
+ constructor();
5240
+ /** Cycles through roll types: Inside → Outside → Between → Inside */
5241
+ private cycleRollType;
5242
+ get advancedDiceApi(): AdvancedDiceApi | MockAdvancedDiceApi;
5243
+ private buildGameInputs;
5244
+ private calculateWinChance;
5245
+ private calculateMultiplier;
5246
+ private isValidWinChance;
5247
+ dicePlay(): Promise<void>;
5248
+ private handleBetExecution;
5249
+ addToHistory(multiplier: number, won: boolean, id: string): void;
5250
+ protected executeAutobet(_autobetSettings: AutobetSettings, currentBetAmount: string): Promise<GameBetResult>;
5251
+ private handleRollTypeChange;
5252
+ private handleBoundsChange;
5253
+ private handleMultiplierInputChange;
5254
+ private handleWinChanceInputChange;
5255
+ private handleBoundsInputValidityChange;
5256
+ render(): import("lit-html").TemplateResult<1>;
5257
+ }
5171
5258
 
5172
5259
  export {};