-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventsDoc.txt
More file actions
139 lines (135 loc) · 4.18 KB
/
EventsDoc.txt
File metadata and controls
139 lines (135 loc) · 4.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
-- Server ( GameServer ) --
+ error
* Description: An error occurred
* Args: Error error
+ RoomConnectionSuccess
* Description: Connection to room succeed
* Args: Object roomJSON
+ RoomCreationSuccess
* Description:
* Args: Object roomJSON
+ PlayerChangeName
* Description: Player changed name
+ PlayerDeckUpdated
* Description: Player deck changed
* Args: [cards]
+ AnnouncePlayerIsReady
* Description: Announces to everyone that a player is ready
* Args: Object playerJSON
+ AnnouncePlayerIsNotReady
* Description: Announces to everyone that a player is ready
* Args: Object playerJSON
+ RoomFlipCard
* Description: The czar fliped a card
* Args: String card_id
+ RoomConnectionDenied
+ RoomConnectionSuccess
+ RoomConnectionRequestPrompt
-- Server/Room --
+ RoomCzarChanged
* Description: Room czar changed
* Args: Object playerJSON
+ RoomPlayerConnection
* Description: New player connected
* Args: Object playerJSON
+ RoomPlayerDisconnection
* Description: A player disconnected
* Args: Object playerJSON
+ RoomRemoved
* Description: Room removed
* Args: Object roomJSON
+ RoomStart
* Description: The game started
* Args: Object roomJSON
+ LobbyAddCardpackSuccess
* Description: Added a cardpack to the lobby
* Args: {
id: string;
author: string;
name: {
es: string;
en: string;
};
};
+ LobbyRemoveCardpackSuccess
* Description: Removed a cardpack to the lobby
* Args: String cardpack_id
+ RoomCardsDealed
* Description: Room has given cards to every player
+ RoomBlackCardChanged
* Description: Room black card changed
* Args: BlackCard bCard
+ RoomStartVoting
* Description: Room is now in voting status
* Args: Player's cards with id
+ AnnounceRoomSelectWinner
* Description: The czar selected a winner for this round
* Args: Object playerJSON
+ RoomGameFinished
* Description: The game ended with a winner
* Args: Object playerJSON
+ RoomGoBackToLobby
* Description: Czar "requested" players to go back to lobby
+ RoomStartChoosing
* Description: Changes back to the choosing screen
-- Socket ( client ) --
+ RoomConnectionRequest
* Description: Requests to join a room
* Args: String roomId
+ RoomCreationRequest
* Description: Requests to create a room
* Args: String roomId
+ RequestPlayerChangeName
* Description: Request a name change
* Args: String name
+ LobbyAddCardpackRequest
* Description: Adds a new cardpack
* CONDITION: Player id == Room host id
* Args: {String room_id, String cardpack_id}
+ LobbyRemoveCardpackRequest
* Description: Removes a selected cardpack
* CONDITION: Player id == Room host id
* Args: {String room_id, String cardpack_id}
+ RoomStartRequest
* Description: Request to start the game
* CONDITION: Player id == Room host id
* Args: String room_id
+ PlayerIsReady
* Description: Player is ready
* CONDITION: Player has that card in the deck
* Args: number[] card_id
+ PlayerIsNotReady
* Description: Player is not ready
+ RoomStartVotingRequest
* Description: Request the room to change status to voting
* CONDITION: Player id == Room czar id
* Args: String room_id
+ RoomSelectWinnerRequest
* Description: Czar submits a player selection as winner of the round
* CONDITION: Player id == Room czar id
* Args: String player_id
+ RoomGoBackToLobbyRequest
* Description: When the game ended, the last Czar can send players to lobby
* CONDITION: Player id == Room czar id
+ RoomStartChoosingRequest
* Description: Changes back to the choosing screen
* CONDITION: Player id == Room czar id
+ RoomFlipCardRequest
* Description: Czar requests to flip all cards from a player
* CONDITION: Player id == Room czar id
+ RoomConnectionRequestPrompt
Error types:
+ UnknownRoom
+ RoomCapacityExceed
+ RoomAlreadyExists
+ CardpackAlreadyAdded
+ InvalidCardpack
+ NotEnoughPlayers
+ NotEnoughCards
+ PlayerDoesntOwnThatCard
+ PlayerNotInARoom
+ PlayersNotReady
+ InvalidEventArgs
+ NoPermissions
+ InvalidPassword
+ CantSelectCzarAsWinner