@adiakys/feeling-lucky 0.1.0 → 0.2.0
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.
- package/README.md +20 -4
- package/dist/config/types.d.ts +6 -0
- package/dist/{de-Cp-ILcpM.js → de-B56NsnDF.js} +8 -2
- package/dist/developer/panel.d.ts +1 -0
- package/dist/developer/settings.d.ts +1 -0
- package/dist/engine/dealer.d.ts +21 -0
- package/dist/{es-DHZIstf4.js → es-9iWwCe8s.js} +8 -2
- package/dist/feeling-lucky.iife.js +259 -243
- package/dist/feeling-lucky.js +6 -4
- package/dist/{fr-BPFoerSF.js → fr-Y2BcCS3U.js} +8 -2
- package/dist/games/blackjack/blackjack.d.ts +1 -0
- package/dist/games/cards/dealer.d.ts +9 -0
- package/dist/games/cards/table.d.ts +4 -0
- package/dist/games/holdem/holdem.d.ts +2 -0
- package/dist/{i18n-CihzHMU5.js → i18n-it2FlmVZ.js} +12 -6
- package/dist/{it-B95CFDto.js → it-CNSOLgaT.js} +8 -2
- package/dist/locales/de/developer.d.ts +4 -0
- package/dist/locales/de/room.d.ts +2 -0
- package/dist/locales/en/developer.d.ts +4 -0
- package/dist/locales/en/room.d.ts +2 -0
- package/dist/locales/es/developer.d.ts +4 -0
- package/dist/locales/es/room.d.ts +2 -0
- package/dist/locales/fr/developer.d.ts +4 -0
- package/dist/locales/fr/room.d.ts +2 -0
- package/dist/locales/it/developer.d.ts +4 -0
- package/dist/locales/it/room.d.ts +2 -0
- package/dist/{mount-BxDaFww2.js → mount-CBUkAcVV.js} +937 -862
- package/dist/{panel-D1hKmQL7.js → panel-tWJMt9kl.js} +16 -1
- package/dist/room/boost.d.ts +1 -1
- package/dist/room/lobby.d.ts +1 -0
- package/dist/room/room.d.ts +5 -1
- package/dist/room/stage.d.ts +2 -1
- package/dist/runtime/context.d.ts +2 -1
- package/dist/runtime/sound.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,7 @@ Every field takes a value, a function, or a function returning a Promise.
|
|
|
64
64
|
| `locale` | language code, e.g. `'it'` or `'pt-BR'` | follows the host page, see [Languages](#languages) |
|
|
65
65
|
| `messages` | `{ [locale]: Messages }`: new languages, or overrides of the built-in ones | none |
|
|
66
66
|
| `logo` | image URL of your brand mark, on the certificate, the wheel's hub and the scratch card | a clover |
|
|
67
|
+
| `dealers` | `Dealer[]`: the dealers who take the Salon Privé's shifts, see [Dealers](#dealers) | the library's own dealer |
|
|
67
68
|
| `player` | `{ name, avatar? }`, shown at the card tables | anonymous seat |
|
|
68
69
|
| `onWin` | `(win: Win) => void` | none |
|
|
69
70
|
| `onClaim` | `(win: Win) => Promise<void>`; shows **Claim** on the certificate | no claim button |
|
|
@@ -159,8 +160,23 @@ createFeelingLucky({
|
|
|
159
160
|
- Takeoff or Breakaway in place of the slot
|
|
160
161
|
- Double Luck or Forever in place of the scratch card
|
|
161
162
|
- colour Pachinko
|
|
163
|
+
- **Dealers:** three shifts a day, the same for everyone, from the date's hash, see [Dealers](#dealers).
|
|
162
164
|
- **Room themes:** Christmas, Halloween, Easter and August, taken from the calendar.
|
|
163
165
|
|
|
166
|
+
## Dealers
|
|
167
|
+
|
|
168
|
+
A dealer stands at the Salon Privé's tables during three shifts a day of 30 to 90 minutes between 10:00 and 23:00, local time. The shifts come from the date's hash, and the dealers in the list take them in turn. While a dealer is on shift, Blackjack and Texas Hold'em win twice as often. A dealer arriving or leaving mid-game walks in or out of the table, and the odds change from the next hand.
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
interface Dealer {
|
|
172
|
+
image: string; // waist-up portrait, transparent background, forearms resting forward at the bottom
|
|
173
|
+
name?: string;
|
|
174
|
+
hands?: string; // CSS clip-path of the forearms and hands, drawn over the table's rim
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Without `dealers`, the library's own illustrated dealer takes every shift; `dealers: []` leaves the tables without one.
|
|
179
|
+
|
|
164
180
|
## Structure
|
|
165
181
|
|
|
166
182
|
```
|
|
@@ -201,11 +217,11 @@ npm run build:demo # site/: the playground, as on GitHub Pages
|
|
|
201
217
|
|
|
202
218
|
## Release
|
|
203
219
|
|
|
204
|
-
|
|
220
|
+
Publish a GitHub release or pre-release on a `v<version>` tag, e.g. `v1.2.0` or `v1.3.0-beta.1`: the version comes from the tag, `package.json` only holds a placeholder. The release workflow:
|
|
205
221
|
- runs the checks;
|
|
206
|
-
- publishes the package to npm;
|
|
207
|
-
- attaches the packed `.tgz` to
|
|
208
|
-
- deploys the playground to GitHub Pages.
|
|
222
|
+
- publishes the package to npm: `latest` for a release, `next` for a pre-release;
|
|
223
|
+
- attaches the packed `.tgz` to the release;
|
|
224
|
+
- deploys the playground to GitHub Pages, for releases only.
|
|
209
225
|
|
|
210
226
|
## License
|
|
211
227
|
|
package/dist/config/types.d.ts
CHANGED
|
@@ -24,6 +24,11 @@ export interface Win<V extends Variant = Variant> {
|
|
|
24
24
|
tier: PrizeTier;
|
|
25
25
|
game: GameId;
|
|
26
26
|
}
|
|
27
|
+
export interface Dealer {
|
|
28
|
+
image: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
hands?: string;
|
|
31
|
+
}
|
|
27
32
|
export interface Player {
|
|
28
33
|
name: string;
|
|
29
34
|
avatar?: string;
|
|
@@ -37,6 +42,7 @@ export interface FeelingLuckyConfig<V extends Variant = Variant> {
|
|
|
37
42
|
messages?: Resolvable<Record<string, Messages>>;
|
|
38
43
|
player?: Resolvable<Player>;
|
|
39
44
|
logo?: Resolvable<string>;
|
|
45
|
+
dealers?: Resolvable<Dealer[]>;
|
|
40
46
|
onWin?: (win: Win<V>) => void;
|
|
41
47
|
onClaim?: (win: Win<V>) => Promise<void>;
|
|
42
48
|
developer?: Resolvable<boolean | {
|
|
@@ -34,7 +34,9 @@ var t = e({
|
|
|
34
34
|
boost: {
|
|
35
35
|
badge: "×{n}",
|
|
36
36
|
title: "Bonus des Tages",
|
|
37
|
-
odds: "Bonus des Tages: Gewinne {n}-mal so wahrscheinlich"
|
|
37
|
+
odds: "Bonus des Tages: Gewinne {n}-mal so wahrscheinlich",
|
|
38
|
+
dealer: "Croupier am Tisch",
|
|
39
|
+
dealerOdds: "Croupier am Tisch: Gewinne {n}-mal so wahrscheinlich"
|
|
38
40
|
},
|
|
39
41
|
themes: {
|
|
40
42
|
christmas: {
|
|
@@ -447,6 +449,10 @@ var t = e({
|
|
|
447
449
|
calendar: "Nach Kalender",
|
|
448
450
|
noTheme: "Keins",
|
|
449
451
|
language: "Sprache",
|
|
450
|
-
autoLanguage: "Automatisch"
|
|
452
|
+
autoLanguage: "Automatisch",
|
|
453
|
+
dealer: "Croupier",
|
|
454
|
+
dealerShifts: "Nach den Schichten des Tages",
|
|
455
|
+
dealerAbsent: "Abwesend",
|
|
456
|
+
dealerNumber: "Croupier {n}"
|
|
451
457
|
} });
|
|
452
458
|
export { t as default };
|
|
@@ -16,6 +16,7 @@ export declare const settings: Partial<Record<GameId, GameSettings>>;
|
|
|
16
16
|
export declare const room: {
|
|
17
17
|
theme?: Theme | 'none';
|
|
18
18
|
locale?: string;
|
|
19
|
+
dealer?: number | 'none';
|
|
19
20
|
prizes: Prize[];
|
|
20
21
|
};
|
|
21
22
|
export declare const blankSettings: () => GameSettings;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare module './rig' {
|
|
2
|
+
interface Decisions {
|
|
3
|
+
dealer: {
|
|
4
|
+
context: {
|
|
5
|
+
count: number;
|
|
6
|
+
};
|
|
7
|
+
value: number | null;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare const DEALER_BOOST = 2;
|
|
12
|
+
export interface Shift {
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
dealer: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function dealerShifts(date: Date, count: number): Shift[];
|
|
18
|
+
export declare function shiftAt(date: Date, count: number): number | null;
|
|
19
|
+
export declare const roster: import("../runtime/signal").Signal<number>;
|
|
20
|
+
export declare const onDuty: import("../runtime/signal").Signal<number | null>;
|
|
21
|
+
export declare function checkDuty(now?: Date): void;
|
|
@@ -34,7 +34,9 @@ var t = e({
|
|
|
34
34
|
boost: {
|
|
35
35
|
badge: "×{n}",
|
|
36
36
|
title: "Bonus del día",
|
|
37
|
-
odds: "Bonus del día: premios {n} veces más probables"
|
|
37
|
+
odds: "Bonus del día: premios {n} veces más probables",
|
|
38
|
+
dealer: "Crupier en la mesa",
|
|
39
|
+
dealerOdds: "Crupier en la mesa: premios {n} veces más probables"
|
|
38
40
|
},
|
|
39
41
|
themes: {
|
|
40
42
|
christmas: {
|
|
@@ -447,6 +449,10 @@ var t = e({
|
|
|
447
449
|
calendar: "Según el calendario",
|
|
448
450
|
noTheme: "Ninguno",
|
|
449
451
|
language: "Idioma",
|
|
450
|
-
autoLanguage: "Automático"
|
|
452
|
+
autoLanguage: "Automático",
|
|
453
|
+
dealer: "Crupier",
|
|
454
|
+
dealerShifts: "Según los turnos del día",
|
|
455
|
+
dealerAbsent: "Ausente",
|
|
456
|
+
dealerNumber: "Crupier {n}"
|
|
451
457
|
} });
|
|
452
458
|
export { t as default };
|