@crowdedkingdoms/crowdyjs 8.2.0 → 8.3.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 +21 -3
- package/dist/crowdy-client.d.ts.map +1 -1
- package/dist/crowdy-client.js +5 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/kit/blueprints/combat.d.ts +75 -0
- package/dist/kit/blueprints/combat.d.ts.map +1 -0
- package/dist/kit/blueprints/combat.js +351 -0
- package/dist/kit/blueprints/core.d.ts +222 -0
- package/dist/kit/blueprints/core.d.ts.map +1 -0
- package/dist/kit/blueprints/core.js +185 -0
- package/dist/kit/blueprints/decks.d.ts +50 -0
- package/dist/kit/blueprints/decks.d.ts.map +1 -0
- package/dist/kit/blueprints/decks.js +163 -0
- package/dist/kit/blueprints/economy.d.ts +88 -0
- package/dist/kit/blueprints/economy.d.ts.map +1 -0
- package/dist/kit/blueprints/economy.js +533 -0
- package/dist/kit/blueprints/guild.d.ts +51 -0
- package/dist/kit/blueprints/guild.d.ts.map +1 -0
- package/dist/kit/blueprints/guild.js +50 -0
- package/dist/kit/blueprints/index.d.ts +21 -0
- package/dist/kit/blueprints/index.d.ts.map +1 -0
- package/dist/kit/blueprints/index.js +20 -0
- package/dist/kit/blueprints/inventory.d.ts +38 -0
- package/dist/kit/blueprints/inventory.d.ts.map +1 -0
- package/dist/kit/blueprints/inventory.js +157 -0
- package/dist/kit/blueprints/leaderboards.d.ts +49 -0
- package/dist/kit/blueprints/leaderboards.d.ts.map +1 -0
- package/dist/kit/blueprints/leaderboards.js +126 -0
- package/dist/kit/blueprints/locks.d.ts +82 -0
- package/dist/kit/blueprints/locks.d.ts.map +1 -0
- package/dist/kit/blueprints/locks.js +155 -0
- package/dist/kit/blueprints/loot.d.ts +84 -0
- package/dist/kit/blueprints/loot.d.ts.map +1 -0
- package/dist/kit/blueprints/loot.js +228 -0
- package/dist/kit/blueprints/matches.d.ts +59 -0
- package/dist/kit/blueprints/matches.d.ts.map +1 -0
- package/dist/kit/blueprints/matches.js +246 -0
- package/dist/kit/blueprints/npcs.d.ts +71 -0
- package/dist/kit/blueprints/npcs.d.ts.map +1 -0
- package/dist/kit/blueprints/npcs.js +122 -0
- package/dist/kit/blueprints/plots.d.ts +54 -0
- package/dist/kit/blueprints/plots.d.ts.map +1 -0
- package/dist/kit/blueprints/plots.js +146 -0
- package/dist/kit/blueprints/progression.d.ts +68 -0
- package/dist/kit/blueprints/progression.d.ts.map +1 -0
- package/dist/kit/blueprints/progression.js +324 -0
- package/dist/kit/blueprints/quests.d.ts +65 -0
- package/dist/kit/blueprints/quests.d.ts.map +1 -0
- package/dist/kit/blueprints/quests.js +284 -0
- package/dist/kit/blueprints/worldsim.d.ts +84 -0
- package/dist/kit/blueprints/worldsim.d.ts.map +1 -0
- package/dist/kit/blueprints/worldsim.js +461 -0
- package/dist/kit/combat.d.ts +103 -0
- package/dist/kit/combat.d.ts.map +1 -0
- package/dist/kit/combat.js +151 -0
- package/dist/kit/decks.d.ts +123 -0
- package/dist/kit/decks.d.ts.map +1 -0
- package/dist/kit/decks.js +138 -0
- package/dist/kit/economy.d.ts +244 -0
- package/dist/kit/economy.d.ts.map +1 -0
- package/dist/kit/economy.js +365 -0
- package/dist/kit/features.d.ts +60 -0
- package/dist/kit/features.d.ts.map +1 -0
- package/dist/kit/features.js +65 -0
- package/dist/kit/index.d.ts +13 -2
- package/dist/kit/index.d.ts.map +1 -1
- package/dist/kit/index.js +12 -1
- package/dist/kit/inventory.d.ts +5 -0
- package/dist/kit/inventory.d.ts.map +1 -1
- package/dist/kit/inventory.js +14 -1
- package/dist/kit/kit.d.ts +58 -2
- package/dist/kit/kit.d.ts.map +1 -1
- package/dist/kit/kit.js +24 -2
- package/dist/kit/leaderboards.d.ts +66 -0
- package/dist/kit/leaderboards.d.ts.map +1 -0
- package/dist/kit/leaderboards.js +94 -0
- package/dist/kit/loot.d.ts +106 -0
- package/dist/kit/loot.d.ts.map +1 -0
- package/dist/kit/loot.js +120 -0
- package/dist/kit/matches.d.ts +140 -0
- package/dist/kit/matches.d.ts.map +1 -0
- package/dist/kit/matches.js +253 -0
- package/dist/kit/objects.js +1 -1
- package/dist/kit/plots.js +1 -1
- package/dist/kit/progression.d.ts +181 -0
- package/dist/kit/progression.d.ts.map +1 -0
- package/dist/kit/progression.js +265 -0
- package/dist/kit/quests.d.ts +110 -0
- package/dist/kit/quests.d.ts.map +1 -0
- package/dist/kit/quests.js +158 -0
- package/dist/kit/social.d.ts +267 -0
- package/dist/kit/social.d.ts.map +1 -0
- package/dist/kit/social.js +230 -0
- package/dist/kit/worldsim.d.ts +225 -0
- package/dist/kit/worldsim.d.ts.map +1 -0
- package/dist/kit/worldsim.js +231 -0
- package/package.json +1 -1
- package/dist/kit/blueprints.d.ts +0 -370
- package/dist/kit/blueprints.d.ts.map +0 -1
- package/dist/kit/blueprints.js +0 -643
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { ChannelsAPI } from '../domains/channels.js';
|
|
2
|
+
import type { GameModelAPI } from '../domains/gameModel.js';
|
|
3
|
+
import type { UdpAPI } from '../domains/udp.js';
|
|
4
|
+
import type { Scalars } from '../generated/graphql.js';
|
|
5
|
+
import { type KitInvokeResult } from './shared.js';
|
|
6
|
+
/** Options for {@link MatchesKit}. Must match the deployed matches blueprint. */
|
|
7
|
+
export interface MatchesKitOptions {
|
|
8
|
+
/** The `typePrefix` the matches blueprint was deployed with. */
|
|
9
|
+
typePrefix?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The 32-ASCII-char actor uuid used as the sender id on channel pings.
|
|
12
|
+
* Defaults to a random uuid per kit instance.
|
|
13
|
+
*/
|
|
14
|
+
actorUuid?: string;
|
|
15
|
+
}
|
|
16
|
+
/** A parsed view of one match. */
|
|
17
|
+
export interface KitMatch {
|
|
18
|
+
/** The session backing the match (participants + turn order). */
|
|
19
|
+
sessionId: string;
|
|
20
|
+
/** The MatchMeta container id (the `self` of the lifecycle functions). */
|
|
21
|
+
metaId: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
creatorUserId: number;
|
|
24
|
+
mode: string;
|
|
25
|
+
state: string;
|
|
26
|
+
round: number;
|
|
27
|
+
maxPlayers: number;
|
|
28
|
+
winnerUserId: number;
|
|
29
|
+
/** The per-match notification channel (0 when none was wired). */
|
|
30
|
+
channelId: string;
|
|
31
|
+
/** Present when the blueprint was deployed with `turnTick`. */
|
|
32
|
+
tickCount?: number;
|
|
33
|
+
}
|
|
34
|
+
/** One row of the match standings. */
|
|
35
|
+
export interface KitMatchScore {
|
|
36
|
+
containerId: string;
|
|
37
|
+
ownerUserId: string | null;
|
|
38
|
+
points: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Runtime helpers for the {@link matchesBlueprint} conventions: sessions ARE
|
|
42
|
+
* the match primitive — `create` makes a session + a `MatchMeta` + a
|
|
43
|
+
* per-match channel; turn order goes through the platform's session-turn
|
|
44
|
+
* authority; lifecycle functions ping the channel post-commit and
|
|
45
|
+
* {@link onMatchChanged} wraps the notify-to-pull loop (subscribe →
|
|
46
|
+
* `"match_changed"` ping → re-pull state).
|
|
47
|
+
*
|
|
48
|
+
* Obtained via `client.kit(appId).matches`.
|
|
49
|
+
*/
|
|
50
|
+
export declare class MatchesKit {
|
|
51
|
+
private readonly appId;
|
|
52
|
+
private readonly gameModel;
|
|
53
|
+
private readonly channels;
|
|
54
|
+
private readonly udp;
|
|
55
|
+
private readonly names;
|
|
56
|
+
private readonly actorUuid;
|
|
57
|
+
constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI, channels: ChannelsAPI | undefined, udp: UdpAPI | undefined, options?: MatchesKitOptions);
|
|
58
|
+
private requireChannels;
|
|
59
|
+
private requireUdp;
|
|
60
|
+
/**
|
|
61
|
+
* Create a match: a session (the platform match primitive), a per-match
|
|
62
|
+
* notification channel, and the session-scoped `MatchMeta`.
|
|
63
|
+
*
|
|
64
|
+
* @param input.creatorUserId - The calling player's user id (stored so the
|
|
65
|
+
* creator may start/advance/end the match).
|
|
66
|
+
*/
|
|
67
|
+
create(input: {
|
|
68
|
+
creatorUserId: Scalars['BigInt']['input'];
|
|
69
|
+
mode?: string;
|
|
70
|
+
maxPlayers?: number;
|
|
71
|
+
displayName?: string;
|
|
72
|
+
}): Promise<KitMatch>;
|
|
73
|
+
/** List joinable matches (metas still in the lobby state). */
|
|
74
|
+
open(): Promise<KitMatch[]>;
|
|
75
|
+
/** Read one match by its MatchMeta container. */
|
|
76
|
+
get(metaId: string): Promise<KitMatch>;
|
|
77
|
+
/** Join a match: session participation + the notification channel. */
|
|
78
|
+
join(match: KitMatch): Promise<{
|
|
79
|
+
__typename?: "GmSessionParticipant";
|
|
80
|
+
sessionId: string;
|
|
81
|
+
userId: string;
|
|
82
|
+
role: string;
|
|
83
|
+
}>;
|
|
84
|
+
/** Start the match (creator or host). Pings the match channel post-commit. */
|
|
85
|
+
start(match: KitMatch): Promise<KitInvokeResult<string>>;
|
|
86
|
+
/** Advance to the next round (creator or host). */
|
|
87
|
+
advanceRound(match: KitMatch): Promise<KitInvokeResult<number>>;
|
|
88
|
+
/** Whether it is `userId`'s session turn right now. */
|
|
89
|
+
myTurn(match: KitMatch, userId: Scalars['BigInt']['input']): Promise<boolean>;
|
|
90
|
+
/**
|
|
91
|
+
* Pass the turn to the next player via the platform's session-turn
|
|
92
|
+
* authority (current holder, host, or admin — enforced by the service),
|
|
93
|
+
* then ping the match channel so everyone re-pulls.
|
|
94
|
+
*/
|
|
95
|
+
endTurn(match: KitMatch, nextUserId: Scalars['BigInt']['input']): Promise<{
|
|
96
|
+
__typename?: "GmSession";
|
|
97
|
+
sessionId: string;
|
|
98
|
+
appId: string;
|
|
99
|
+
name: string | null;
|
|
100
|
+
status: string;
|
|
101
|
+
createdByUserId: string | null;
|
|
102
|
+
currentTurnUserId: string | null;
|
|
103
|
+
metadataJson: string;
|
|
104
|
+
}>;
|
|
105
|
+
/** Find-or-create a player's session-scoped Score row. */
|
|
106
|
+
ensureScore(match: KitMatch, ownerUserId: Scalars['BigInt']['input']): Promise<{
|
|
107
|
+
__typename?: "GmContainer";
|
|
108
|
+
containerId: string;
|
|
109
|
+
appId: string;
|
|
110
|
+
sessionId: string | null;
|
|
111
|
+
typeName: string;
|
|
112
|
+
displayName: string;
|
|
113
|
+
description: string | null;
|
|
114
|
+
ownerUserId: string | null;
|
|
115
|
+
metadataJson: string;
|
|
116
|
+
}>;
|
|
117
|
+
/**
|
|
118
|
+
* Add points to a Score row — trusted (host-refereed by default).
|
|
119
|
+
* Resolves with the new points.
|
|
120
|
+
*/
|
|
121
|
+
score(match: KitMatch, scoreId: string, points: number): Promise<KitInvokeResult<number>>;
|
|
122
|
+
/** The match standings, highest points first (client-side sort). */
|
|
123
|
+
standings(match: KitMatch): Promise<KitMatchScore[]>;
|
|
124
|
+
/** Finish the match and record the winner (creator or host). */
|
|
125
|
+
finish(match: KitMatch, winnerUserId: Scalars['BigInt']['input']): Promise<KitInvokeResult<string>>;
|
|
126
|
+
/**
|
|
127
|
+
* Manually ping the match channel with `"match_changed"` (the lifecycle
|
|
128
|
+
* functions do this automatically via their declared notifications; use
|
|
129
|
+
* this after out-of-band changes such as `endTurn`).
|
|
130
|
+
*/
|
|
131
|
+
notifyChanged(match: KitMatch): Promise<boolean>;
|
|
132
|
+
/**
|
|
133
|
+
* The notify-to-pull loop, wrapped: subscribe to the app's notifications,
|
|
134
|
+
* and on every ping of THIS match's channel re-pull the match state and
|
|
135
|
+
* hand it to `callback`. Returns the unsubscribe function.
|
|
136
|
+
*/
|
|
137
|
+
onMatchChanged(match: KitMatch, callback: (match: KitMatch) => void): () => void;
|
|
138
|
+
private toMatch;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=matches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matches.d.ts","sourceRoot":"","sources":["../../src/kit/matches.ts"],"names":[],"mappings":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;;;;;IAUrE,0DAA0D;IACpD,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;;;;;;;;;;;IAqB1E;;;OAGG;IACG,KAAK,CACT,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAUnC,oEAAoE;IAC9D,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAuB1D,gEAAgE;IAC1D,MAAM,CACV,KAAK,EAAE,QAAQ,EACf,YAAY,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAUnC;;;;OAIG;IACG,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAStD;;;;OAIG;IACH,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,MAAM,IAAI;YAYlE,OAAO;CA0BtB"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { encodeBase64, generateCrowdyUuid } from '../utils.js';
|
|
2
|
+
import { matchesNames } from './blueprints/index.js';
|
|
3
|
+
import { kitContainerProperties, kitInvoke, } from './shared.js';
|
|
4
|
+
/**
|
|
5
|
+
* Runtime helpers for the {@link matchesBlueprint} conventions: sessions ARE
|
|
6
|
+
* the match primitive — `create` makes a session + a `MatchMeta` + a
|
|
7
|
+
* per-match channel; turn order goes through the platform's session-turn
|
|
8
|
+
* authority; lifecycle functions ping the channel post-commit and
|
|
9
|
+
* {@link onMatchChanged} wraps the notify-to-pull loop (subscribe →
|
|
10
|
+
* `"match_changed"` ping → re-pull state).
|
|
11
|
+
*
|
|
12
|
+
* Obtained via `client.kit(appId).matches`.
|
|
13
|
+
*/
|
|
14
|
+
export class MatchesKit {
|
|
15
|
+
constructor(appId, gameModel, channels, udp, options = {}) {
|
|
16
|
+
this.appId = appId;
|
|
17
|
+
this.gameModel = gameModel;
|
|
18
|
+
this.channels = channels;
|
|
19
|
+
this.udp = udp;
|
|
20
|
+
this.names = matchesNames(options.typePrefix ?? '');
|
|
21
|
+
this.actorUuid = options.actorUuid ?? generateCrowdyUuid();
|
|
22
|
+
}
|
|
23
|
+
requireChannels() {
|
|
24
|
+
if (!this.channels) {
|
|
25
|
+
throw new Error('kit.matches needs the channels domain — construct the kit via client.kit(appId)');
|
|
26
|
+
}
|
|
27
|
+
return this.channels;
|
|
28
|
+
}
|
|
29
|
+
requireUdp() {
|
|
30
|
+
if (!this.udp) {
|
|
31
|
+
throw new Error('kit.matches needs the udp domain — construct the kit via client.kit(appId)');
|
|
32
|
+
}
|
|
33
|
+
return this.udp;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create a match: a session (the platform match primitive), a per-match
|
|
37
|
+
* notification channel, and the session-scoped `MatchMeta`.
|
|
38
|
+
*
|
|
39
|
+
* @param input.creatorUserId - The calling player's user id (stored so the
|
|
40
|
+
* creator may start/advance/end the match).
|
|
41
|
+
*/
|
|
42
|
+
async create(input) {
|
|
43
|
+
const session = await this.gameModel.createSession({
|
|
44
|
+
appId: this.appId,
|
|
45
|
+
name: input.displayName ?? `match-${input.mode ?? 'default'}`,
|
|
46
|
+
});
|
|
47
|
+
const channel = await this.requireChannels().create({
|
|
48
|
+
appId: this.appId,
|
|
49
|
+
name: `match-${session.sessionId}`,
|
|
50
|
+
description: 'Per-match notification channel (kit.matches notify-to-pull).',
|
|
51
|
+
});
|
|
52
|
+
const meta = await this.gameModel.createContainer({
|
|
53
|
+
appId: this.appId,
|
|
54
|
+
typeName: this.names.metaType,
|
|
55
|
+
displayName: input.displayName ?? `Match ${session.sessionId}`,
|
|
56
|
+
sessionId: session.sessionId,
|
|
57
|
+
properties: [
|
|
58
|
+
{
|
|
59
|
+
key: 'creator_user_id',
|
|
60
|
+
valueType: 'int',
|
|
61
|
+
valueJson: String(input.creatorUserId),
|
|
62
|
+
},
|
|
63
|
+
{ key: 'mode', valueType: 'string', valueJson: JSON.stringify(input.mode ?? '') },
|
|
64
|
+
{
|
|
65
|
+
key: 'max_players',
|
|
66
|
+
valueType: 'int',
|
|
67
|
+
valueJson: String(input.maxPlayers ?? 0),
|
|
68
|
+
},
|
|
69
|
+
{ key: 'channel_id', valueType: 'int', valueJson: String(channel.groupId) },
|
|
70
|
+
],
|
|
71
|
+
});
|
|
72
|
+
return this.toMatch(meta.containerId, session.sessionId, meta.displayName);
|
|
73
|
+
}
|
|
74
|
+
/** List joinable matches (metas still in the lobby state). */
|
|
75
|
+
async open() {
|
|
76
|
+
const metas = await this.gameModel.containers({
|
|
77
|
+
appId: this.appId,
|
|
78
|
+
typeName: this.names.metaType,
|
|
79
|
+
});
|
|
80
|
+
const matches = await Promise.all(metas
|
|
81
|
+
.filter((m) => m.sessionId != null)
|
|
82
|
+
.map((m) => this.toMatch(m.containerId, String(m.sessionId), m.displayName)));
|
|
83
|
+
return matches.filter((m) => m.state === 'lobby');
|
|
84
|
+
}
|
|
85
|
+
/** Read one match by its MatchMeta container. */
|
|
86
|
+
async get(metaId) {
|
|
87
|
+
const meta = await this.gameModel.container({
|
|
88
|
+
appId: this.appId,
|
|
89
|
+
containerId: metaId,
|
|
90
|
+
});
|
|
91
|
+
return this.toMatch(meta.containerId, meta.sessionId != null ? String(meta.sessionId) : '', meta.displayName);
|
|
92
|
+
}
|
|
93
|
+
/** Join a match: session participation + the notification channel. */
|
|
94
|
+
async join(match) {
|
|
95
|
+
const participant = await this.gameModel.joinSession({
|
|
96
|
+
appId: this.appId,
|
|
97
|
+
sessionId: match.sessionId,
|
|
98
|
+
});
|
|
99
|
+
if (match.channelId !== '0' && match.channelId !== '') {
|
|
100
|
+
await this.requireChannels().join(match.channelId);
|
|
101
|
+
}
|
|
102
|
+
return participant;
|
|
103
|
+
}
|
|
104
|
+
/** Start the match (creator or host). Pings the match channel post-commit. */
|
|
105
|
+
async start(match) {
|
|
106
|
+
return kitInvoke(this.gameModel, {
|
|
107
|
+
appId: String(this.appId),
|
|
108
|
+
functionName: this.names.startFn,
|
|
109
|
+
selfContainerId: match.metaId,
|
|
110
|
+
sessionId: match.sessionId,
|
|
111
|
+
params: {},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/** Advance to the next round (creator or host). */
|
|
115
|
+
async advanceRound(match) {
|
|
116
|
+
return kitInvoke(this.gameModel, {
|
|
117
|
+
appId: String(this.appId),
|
|
118
|
+
functionName: this.names.advanceRoundFn,
|
|
119
|
+
selfContainerId: match.metaId,
|
|
120
|
+
sessionId: match.sessionId,
|
|
121
|
+
params: {},
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/** Whether it is `userId`'s session turn right now. */
|
|
125
|
+
async myTurn(match, userId) {
|
|
126
|
+
const session = await this.gameModel.session({
|
|
127
|
+
appId: this.appId,
|
|
128
|
+
sessionId: match.sessionId,
|
|
129
|
+
});
|
|
130
|
+
return (session.currentTurnUserId != null &&
|
|
131
|
+
String(session.currentTurnUserId) === String(userId));
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Pass the turn to the next player via the platform's session-turn
|
|
135
|
+
* authority (current holder, host, or admin — enforced by the service),
|
|
136
|
+
* then ping the match channel so everyone re-pulls.
|
|
137
|
+
*/
|
|
138
|
+
async endTurn(match, nextUserId) {
|
|
139
|
+
const session = await this.gameModel.setSessionTurn({
|
|
140
|
+
appId: this.appId,
|
|
141
|
+
sessionId: match.sessionId,
|
|
142
|
+
userId: nextUserId,
|
|
143
|
+
});
|
|
144
|
+
await this.notifyChanged(match);
|
|
145
|
+
return session;
|
|
146
|
+
}
|
|
147
|
+
/** Find-or-create a player's session-scoped Score row. */
|
|
148
|
+
async ensureScore(match, ownerUserId) {
|
|
149
|
+
const scores = await this.gameModel.containers({
|
|
150
|
+
appId: this.appId,
|
|
151
|
+
typeName: this.names.scoreType,
|
|
152
|
+
sessionId: match.sessionId,
|
|
153
|
+
});
|
|
154
|
+
const mine = scores.find((c) => c.ownerUserId != null && String(c.ownerUserId) === String(ownerUserId));
|
|
155
|
+
if (mine)
|
|
156
|
+
return mine;
|
|
157
|
+
return this.gameModel.createContainer({
|
|
158
|
+
appId: this.appId,
|
|
159
|
+
typeName: this.names.scoreType,
|
|
160
|
+
displayName: `Score ${ownerUserId}`,
|
|
161
|
+
sessionId: match.sessionId,
|
|
162
|
+
properties: [
|
|
163
|
+
{ key: 'owner_user_id', valueType: 'int', valueJson: String(ownerUserId) },
|
|
164
|
+
],
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Add points to a Score row — trusted (host-refereed by default).
|
|
169
|
+
* Resolves with the new points.
|
|
170
|
+
*/
|
|
171
|
+
async score(match, scoreId, points) {
|
|
172
|
+
return kitInvoke(this.gameModel, {
|
|
173
|
+
appId: String(this.appId),
|
|
174
|
+
functionName: this.names.scoreFn,
|
|
175
|
+
selfContainerId: scoreId,
|
|
176
|
+
sessionId: match.sessionId,
|
|
177
|
+
params: { points },
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/** The match standings, highest points first (client-side sort). */
|
|
181
|
+
async standings(match) {
|
|
182
|
+
const scores = await this.gameModel.containers({
|
|
183
|
+
appId: this.appId,
|
|
184
|
+
typeName: this.names.scoreType,
|
|
185
|
+
sessionId: match.sessionId,
|
|
186
|
+
});
|
|
187
|
+
const rows = await Promise.all(scores.map(async (c) => {
|
|
188
|
+
const props = await kitContainerProperties(this.gameModel, String(this.appId), c.containerId);
|
|
189
|
+
return {
|
|
190
|
+
containerId: c.containerId,
|
|
191
|
+
ownerUserId: c.ownerUserId != null ? String(c.ownerUserId) : null,
|
|
192
|
+
points: Number(props.points ?? 0),
|
|
193
|
+
};
|
|
194
|
+
}));
|
|
195
|
+
return rows.sort((a, b) => b.points - a.points);
|
|
196
|
+
}
|
|
197
|
+
/** Finish the match and record the winner (creator or host). */
|
|
198
|
+
async finish(match, winnerUserId) {
|
|
199
|
+
return kitInvoke(this.gameModel, {
|
|
200
|
+
appId: String(this.appId),
|
|
201
|
+
functionName: this.names.endFn,
|
|
202
|
+
selfContainerId: match.metaId,
|
|
203
|
+
sessionId: match.sessionId,
|
|
204
|
+
params: { winner_user_id: Number(winnerUserId) },
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Manually ping the match channel with `"match_changed"` (the lifecycle
|
|
209
|
+
* functions do this automatically via their declared notifications; use
|
|
210
|
+
* this after out-of-band changes such as `endTurn`).
|
|
211
|
+
*/
|
|
212
|
+
async notifyChanged(match) {
|
|
213
|
+
if (match.channelId === '0' || match.channelId === '')
|
|
214
|
+
return false;
|
|
215
|
+
return this.requireUdp().sendChannelMessage({
|
|
216
|
+
channelId: match.channelId,
|
|
217
|
+
uuid: this.actorUuid,
|
|
218
|
+
payload: encodeBase64(new TextEncoder().encode('match_changed')),
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The notify-to-pull loop, wrapped: subscribe to the app's notifications,
|
|
223
|
+
* and on every ping of THIS match's channel re-pull the match state and
|
|
224
|
+
* hand it to `callback`. Returns the unsubscribe function.
|
|
225
|
+
*/
|
|
226
|
+
onMatchChanged(match, callback) {
|
|
227
|
+
return this.requireUdp().subscribe({
|
|
228
|
+
channelMessage: (notification) => {
|
|
229
|
+
if (String(notification.channelId) !== String(match.channelId))
|
|
230
|
+
return;
|
|
231
|
+
void this.get(match.metaId).then(callback);
|
|
232
|
+
},
|
|
233
|
+
}, String(this.appId));
|
|
234
|
+
}
|
|
235
|
+
async toMatch(metaId, sessionId, displayName) {
|
|
236
|
+
const props = await kitContainerProperties(this.gameModel, String(this.appId), metaId);
|
|
237
|
+
return {
|
|
238
|
+
sessionId,
|
|
239
|
+
metaId,
|
|
240
|
+
displayName,
|
|
241
|
+
creatorUserId: Number(props.creator_user_id ?? 0),
|
|
242
|
+
mode: String(props.mode ?? ''),
|
|
243
|
+
state: String(props.state ?? ''),
|
|
244
|
+
round: Number(props.round ?? 0),
|
|
245
|
+
maxPlayers: Number(props.max_players ?? 0),
|
|
246
|
+
winnerUserId: Number(props.winner_user_id ?? 0),
|
|
247
|
+
channelId: String(props.channel_id ?? '0'),
|
|
248
|
+
...(props.tick_count !== undefined
|
|
249
|
+
? { tickCount: Number(props.tick_count) }
|
|
250
|
+
: {}),
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
}
|
package/dist/kit/objects.js
CHANGED
package/dist/kit/plots.js
CHANGED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { GameModelAPI } from '../domains/gameModel.js';
|
|
2
|
+
import type { Scalars, SeedPropertyInput } from '../generated/graphql.js';
|
|
3
|
+
import { type KitInvokeResult } from './shared.js';
|
|
4
|
+
/** Options for {@link ProgressionKit}. Must match the deployed blueprint. */
|
|
5
|
+
export interface ProgressionKitOptions {
|
|
6
|
+
/** The `typePrefix` the progression blueprint was deployed with. */
|
|
7
|
+
typePrefix?: string;
|
|
8
|
+
}
|
|
9
|
+
/** A parsed view of one player's progression. */
|
|
10
|
+
export interface KitProgress {
|
|
11
|
+
containerId: string;
|
|
12
|
+
displayName: string;
|
|
13
|
+
ownerUserId: string | null;
|
|
14
|
+
xp: number;
|
|
15
|
+
level: number;
|
|
16
|
+
skillPoints: number;
|
|
17
|
+
rating: number;
|
|
18
|
+
}
|
|
19
|
+
/** A parsed view of one skill catalog row. */
|
|
20
|
+
export interface KitSkillDef {
|
|
21
|
+
containerId: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
skillId: string;
|
|
24
|
+
cost: number;
|
|
25
|
+
requiresSkillId: string;
|
|
26
|
+
maxRank: number;
|
|
27
|
+
}
|
|
28
|
+
/** A parsed view of one player skill rank. */
|
|
29
|
+
export interface KitSkillRank {
|
|
30
|
+
containerId: string;
|
|
31
|
+
displayName: string;
|
|
32
|
+
ownerUserId: string | null;
|
|
33
|
+
skillId: string;
|
|
34
|
+
rank: number;
|
|
35
|
+
}
|
|
36
|
+
/** A parsed view of one achievement definition. */
|
|
37
|
+
export interface KitAchievementDef {
|
|
38
|
+
containerId: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
achievementId: string;
|
|
41
|
+
threshold: number;
|
|
42
|
+
}
|
|
43
|
+
/** A parsed view of one player achievement unlock. */
|
|
44
|
+
export interface KitAchievementUnlock {
|
|
45
|
+
containerId: string;
|
|
46
|
+
displayName: string;
|
|
47
|
+
ownerUserId: string | null;
|
|
48
|
+
achievementId: string;
|
|
49
|
+
unlocked: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Runtime helpers for the {@link progressionBlueprint} conventions: ensure a
|
|
53
|
+
* player's `Progress`, grant XP (trusted — app admins by default), buy
|
|
54
|
+
* skills against the catalog's costs and prerequisites, unlock threshold
|
|
55
|
+
* achievements, and apply match rating results. Everything is
|
|
56
|
+
* authority-checked server-side; denials resolve with `success: false`.
|
|
57
|
+
*
|
|
58
|
+
* Obtained via `client.kit(appId).progression`.
|
|
59
|
+
*/
|
|
60
|
+
export declare class ProgressionKit {
|
|
61
|
+
private readonly appId;
|
|
62
|
+
private readonly gameModel;
|
|
63
|
+
private readonly names;
|
|
64
|
+
constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI, options?: ProgressionKitOptions);
|
|
65
|
+
/**
|
|
66
|
+
* Find the player's Progress container, creating it when absent (with the
|
|
67
|
+
* `owner_user_id` mirror the guards read).
|
|
68
|
+
*/
|
|
69
|
+
ensure(ownerUserId: Scalars['BigInt']['input'], options?: {
|
|
70
|
+
displayName?: string;
|
|
71
|
+
sessionId?: string;
|
|
72
|
+
}): Promise<{
|
|
73
|
+
__typename?: "GmContainer";
|
|
74
|
+
containerId: string;
|
|
75
|
+
appId: string;
|
|
76
|
+
sessionId: string | null;
|
|
77
|
+
typeName: string;
|
|
78
|
+
displayName: string;
|
|
79
|
+
description: string | null;
|
|
80
|
+
ownerUserId: string | null;
|
|
81
|
+
metadataJson: string;
|
|
82
|
+
}>;
|
|
83
|
+
/** Read one player's progression state. */
|
|
84
|
+
state(progressId: string): Promise<KitProgress>;
|
|
85
|
+
/**
|
|
86
|
+
* Grant XP — a **trusted** call (default blueprint authority: app admins
|
|
87
|
+
* via server scope; or drive it from an event automation). Awards skill
|
|
88
|
+
* points and levels up when the curve is crossed. Resolves with the new
|
|
89
|
+
* level.
|
|
90
|
+
*/
|
|
91
|
+
grantXp(progressId: string, amount: number): Promise<KitInvokeResult<number>>;
|
|
92
|
+
/** List the skill catalog (admin-seeded SkillDef containers). */
|
|
93
|
+
skillCatalog(): Promise<KitSkillDef[]>;
|
|
94
|
+
/** Define a skill (admin — the catalog type is admin-instantiable). */
|
|
95
|
+
defineSkill(input: {
|
|
96
|
+
skillId: string;
|
|
97
|
+
cost?: number;
|
|
98
|
+
requiresSkillId?: string;
|
|
99
|
+
maxRank?: number;
|
|
100
|
+
displayName?: string;
|
|
101
|
+
properties?: SeedPropertyInput[];
|
|
102
|
+
}): Promise<{
|
|
103
|
+
__typename?: "GmContainer";
|
|
104
|
+
containerId: string;
|
|
105
|
+
appId: string;
|
|
106
|
+
sessionId: string | null;
|
|
107
|
+
typeName: string;
|
|
108
|
+
displayName: string;
|
|
109
|
+
description: string | null;
|
|
110
|
+
ownerUserId: string | null;
|
|
111
|
+
metadataJson: string;
|
|
112
|
+
}>;
|
|
113
|
+
/**
|
|
114
|
+
* Find-or-create the caller's SkillRank row for a skill (rank 0 until
|
|
115
|
+
* bought).
|
|
116
|
+
*/
|
|
117
|
+
ensureSkillRank(ownerUserId: Scalars['BigInt']['input'], skillId: string, options?: {
|
|
118
|
+
displayName?: string;
|
|
119
|
+
}): Promise<{
|
|
120
|
+
__typename?: "GmContainer";
|
|
121
|
+
containerId: string;
|
|
122
|
+
appId: string;
|
|
123
|
+
sessionId: string | null;
|
|
124
|
+
typeName: string;
|
|
125
|
+
displayName: string;
|
|
126
|
+
description: string | null;
|
|
127
|
+
ownerUserId: string | null;
|
|
128
|
+
metadataJson: string;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* Buy one rank of a skill. `prereqRankId` is the caller's SkillRank for
|
|
132
|
+
* the prerequisite skill; omit it for skills without one (the rank row
|
|
133
|
+
* itself is passed to satisfy the required param — the condition ignores
|
|
134
|
+
* it when the def declares no prerequisite).
|
|
135
|
+
*/
|
|
136
|
+
buySkill(input: {
|
|
137
|
+
skillRankId: string;
|
|
138
|
+
progressId: string;
|
|
139
|
+
skillDefId: string;
|
|
140
|
+
prereqRankId?: string;
|
|
141
|
+
}): Promise<KitInvokeResult<number>>;
|
|
142
|
+
/** List a player's skill ranks. */
|
|
143
|
+
skills(ownerUserId: Scalars['BigInt']['input']): Promise<KitSkillRank[]>;
|
|
144
|
+
/** List the achievement catalog (admin-seeded AchievementDef containers). */
|
|
145
|
+
achievementCatalog(): Promise<KitAchievementDef[]>;
|
|
146
|
+
/** Define an achievement (admin). */
|
|
147
|
+
defineAchievement(input: {
|
|
148
|
+
achievementId: string;
|
|
149
|
+
threshold: number;
|
|
150
|
+
displayName?: string;
|
|
151
|
+
}): Promise<{
|
|
152
|
+
__typename?: "GmContainer";
|
|
153
|
+
containerId: string;
|
|
154
|
+
appId: string;
|
|
155
|
+
sessionId: string | null;
|
|
156
|
+
typeName: string;
|
|
157
|
+
displayName: string;
|
|
158
|
+
description: string | null;
|
|
159
|
+
ownerUserId: string | null;
|
|
160
|
+
metadataJson: string;
|
|
161
|
+
}>;
|
|
162
|
+
/** List a player's achievement unlocks. */
|
|
163
|
+
achievements(ownerUserId: Scalars['BigInt']['input']): Promise<KitAchievementUnlock[]>;
|
|
164
|
+
/**
|
|
165
|
+
* Unlock an achievement once its xp threshold is met. Creates the caller's
|
|
166
|
+
* unlock row when absent, then invokes the gated function (idempotent).
|
|
167
|
+
*/
|
|
168
|
+
unlockAchievement(input: {
|
|
169
|
+
ownerUserId: Scalars['BigInt']['input'];
|
|
170
|
+
progressId: string;
|
|
171
|
+
achievementDefId: string;
|
|
172
|
+
achievementId: string;
|
|
173
|
+
}): Promise<KitInvokeResult<boolean>>;
|
|
174
|
+
/**
|
|
175
|
+
* Apply a match result as a rating delta (trusted — host-gated by
|
|
176
|
+
* default; `kit.matches` computes the delta). Resolves with the new
|
|
177
|
+
* rating.
|
|
178
|
+
*/
|
|
179
|
+
applyMatchResult(progressId: string, delta: number): Promise<KitInvokeResult<number>>;
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=progression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progression.d.ts","sourceRoot":"","sources":["../../src/kit/progression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAK1E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,6EAA6E;AAC7E,MAAM,WAAW,qBAAqB;IACpC,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iDAAiD;AACjD,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,8CAA8C;AAC9C,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAA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