omniarena-nurvus-shared 0.34.0 → 0.36.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/dist/battle.d.ts CHANGED
@@ -77,6 +77,7 @@ export type SkillDto = {
77
77
  };
78
78
  export type EffectDto = {
79
79
  id: string;
80
+ isTrace?: boolean;
80
81
  skillId: string;
81
82
  userId: number;
82
83
  description: string;
@@ -103,6 +104,7 @@ export type TargetingOptionsDto = {
103
104
  partial: boolean;
104
105
  random: number;
105
106
  distinct: boolean;
107
+ oneType: boolean;
106
108
  };
107
109
  export type ChoosableDto = {
108
110
  id: string;
package/dist/common.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export type UserRole = 'user' | 'admin' | 'tester' | 'mod' | 'bot' | 'bot_easiest' | 'bot_easy' | 'bot_medium' | 'bot_hard' | 'bot_hardest' | 'skin_maker';
2
2
  export type BattleMode = 'ranked' | 'casual' | 'private';
3
- export type BattleEndReason = 'opponent_defeated' | 'opponent_surrendered' | 'opponent_left' | 'error';
3
+ export type BattleEndReason = 'opponent_defeated' | 'opponent_surrendered' | 'opponent_left' | 'error' | 'invalid_turn';
4
4
  export type UserHeaderDto = {
5
5
  id: string;
6
6
  username: string;
package/dist/socket.d.ts CHANGED
@@ -3,6 +3,12 @@ import type { UserHeaderDto } from './common.js';
3
3
  import type { ActionData } from './engine.js';
4
4
  export type ChallengeDenyReason = 'declined' | 'busy' | 'offline' | 'expired' | 'withdrawn';
5
5
  export type BotDifficulty = 'easiest' | 'easy' | 'medium' | 'hard' | 'hardest';
6
+ export type BattleOutcome = {
7
+ battleId: string;
8
+ winner: string;
9
+ reason: BattleEndReason;
10
+ error?: string;
11
+ };
6
12
  export type ClientToServerEvents = {
7
13
  team_changed: (members: number[]) => void;
8
14
  search: (mode: BattleMode, opponent?: string) => void;
@@ -18,7 +24,8 @@ export type ClientToServerEvents = {
18
24
  deny_challenge: (challengerId: string) => void;
19
25
  };
20
26
  export type ServerToClientEvents = {
21
- connexion_established: (inBattle: boolean) => void;
27
+ connexion_established: (inBattle: boolean, outcome?: BattleOutcome) => void;
28
+ connection_refused: (reason: 'practice_account_busy') => void;
22
29
  timer_started: () => void;
23
30
  timer_resumed: (durationLeft: number) => void;
24
31
  turn_received: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omniarena-nurvus-shared",
3
- "version": "0.34.0",
3
+ "version": "0.36.0",
4
4
  "type": "module",
5
5
  "description": "Shared contract types for OmniArena (nurvus slice). Type-only, zero dependencies.",
6
6
  "types": "./dist/index.d.ts",