-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstates.inc.php
More file actions
288 lines (270 loc) · 9.28 KB
/
states.inc.php
File metadata and controls
288 lines (270 loc) · 9.28 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<?php
/**
*------
* BGA framework: © Gregory Isabelli <gisabelli@boardgamearena.com> & Emmanuel Colin <ecolin@boardgamearena.com>
* coatl implementation : © Ábel Tibor Tóth <toth.abel.tibor2@gmail.com>
*
* This code has been produced on the BGA studio platform for use on http://boardgamearena.com.
* See http://en.boardgamearena.com/#!doc/Studio for more information.
* -----
*
* states.inc.php
*
* coatl game states description
*/
if (!defined('ST_END_GAME')) { // guard since this included multiple times
define('ST_GAME_SETUP', 1);
define("ST_EVERYONE_BUT_FIRST_PLAYER", 2);
define("ST_DISCARD_PROPHECY", 3);
define("ST_FIRST_PLAYER", 4);
define("ST_PLAYER_TURN", 5);
define("ST_TAKE_PIECE", 6);
define("ST_TAKE_PROPHECY", 7);
define("ST_ASSEMBLE", 8);
define("ST_STEAL", 11);
define("ST_DISCARD_PROPHECY_SACRIFICE_TOKEN", 9);
define("ST_TAKE_TEMPLE_SACRIFICE_TOKEN", 10);
define("ST_NEXT_PLAYER", 98);
define("ST_END_GAME", 99);
}
$machinestates = array(
/**
* The initial state.
*
* Part of the BGA framework.
* "Please do not modify."
*/
ST_GAME_SETUP => array(
"name" => "gameSetup",
"description" => "",
"type" => "manager",
"action" => "stGameSetup",
"transitions" => array(
"" => ST_EVERYONE_BUT_FIRST_PLAYER
)
),
ST_EVERYONE_BUT_FIRST_PLAYER => array(
"name" => "gameSetup",
"description" => "",
"type" => "manager",
"action" => "stEveryoneButFirstPlayerActive",
"transitions" => array(
"" => ST_DISCARD_PROPHECY
)
),
/**
* Discard Prophecy Cards state.
*
* Discard Prophecy cards at the beginning of the game.
* The first player doesn't discard any cards.
*/
ST_DISCARD_PROPHECY => array(
"name" => "discardProphecy",
"description" => clienttranslate('Waiting for other players to discard Prophecy cards from their hands'),
"descriptionmyturn" => '',
"type" => "multipleactiveplayer",
//"action" => "stEveryoneButFirstPlayerActive",
"args" => "argDiscardProphecy",
"possibleactions" => array(
"discardProphecy"
),
"transitions" => array(
"firstPlayer" => ST_FIRST_PLAYER,
'zombiePass' => ST_FIRST_PLAYER
)
),
/**
* First player state.
*
* Set the first player active after card discard preparation.
*/
ST_FIRST_PLAYER => array(
"name" => "firstPlayer",
"description" => '',
"type" => "game",
"action" => "stFirstPlayer",
"transitions" => array(
"playerTurn" => ST_PLAYER_TURN
)
),
ST_PLAYER_TURN => array(
"name" => "playerTurn",
"description" => '',
"description-PieceProphecyAssemble" => clienttranslate('${actplayer} must take Cóatl pieces, choose Prophecy cards or assemble their Cóatl'),
"description-PieceProphecy" => clienttranslate('${actplayer} must take Cóatl pieces or choose Prophecy cards'),
"description-PieceAssemble" => clienttranslate('${actplayer} must take Cóatl pieces or assemble their Cóatl'),
"description-Piece" => clienttranslate('${actplayer} must take Cóatl pieces'),
"description-ProphecyAssemble" => clienttranslate('${actplayer} must choose Prophecy cards or assemble their Cóatl'),
"description-Prophecy" => clienttranslate('${actplayer} must choose Prophecy cards'),
"description-Assemble" => clienttranslate('${actplayer} must assemble their Cóatl'),
"description-SacrificeToken" => clienttranslate('${actplayer} must use a Sacrifice token'),
"descriptionmyturn" => '',
"descriptionmyturn-PieceProphecyAssemble" => clienttranslate('${you} must take Cóatl pieces, choose Prophecy cards or assemble your Cóatl'),
"descriptionmyturn-PieceProphecy" => clienttranslate('${you} must take Cóatl pieces or choose Prophecy cards'),
"descriptionmyturn-PieceAssemble" => clienttranslate('${you} must take Cóatl pieces or assemble your Cóatl'),
"descriptionmyturn-Piece" => clienttranslate('${you} must take Cóatl pieces'),
"descriptionmyturn-ProphecyAssemble" => clienttranslate('${you} must choose Prophecy cards or assemble your Cóatl'),
"descriptionmyturn-Prophecy" => clienttranslate('${you} must choose Prophecy cards'),
"descriptionmyturn-Assemble" => clienttranslate('${you} must assemble your Cóatl'),
"descriptionmyturn-SacrificeToken" => clienttranslate('${you} must use a Sacrifice token'),
"type" => "activeplayer",
"args" => "argPlayerTurn",
"possibleactions" => array(
"undo",
"takePiece",
"takeProphecy",
"assemble",
"steal",
"usePieceToken",
"useProphecyToken",
"useTempleToken",
"useSacrifice",
"giveUp"
),
"transitions" => array(
"takePiece" => ST_TAKE_PIECE,
"takeProphecy" => ST_TAKE_PROPHECY,
"assemble" => ST_ASSEMBLE,
"steal" => ST_STEAL,
"useProphecyToken" => ST_DISCARD_PROPHECY_SACRIFICE_TOKEN,
"useTempleToken" => ST_TAKE_TEMPLE_SACRIFICE_TOKEN,
"nextPlayer" => ST_NEXT_PLAYER,
'zombiePass' => ST_NEXT_PLAYER,
"endGame" => ST_END_GAME
)
),
ST_TAKE_PIECE => array(
"name" => "takePiece",
"description" => clienttranslate('${actplayer} must confirm the piece take'),
"description-Replenish" => clienttranslate('${actplayer} must confirm the piece take and replenish the board'),
"descriptionmyturn" => clienttranslate('${you} must confirm the piece take'),
"descriptionmyturn-Replenish" => clienttranslate('${you} must confirm the piece take and replenish the board'),
"type" => "activeplayer",
"args" => "argTakePiece",
"possibleactions" => array(
"undo",
"confirmTakePiece"
),
"transitions" => array(
"playerTurn" => ST_PLAYER_TURN,
"nextPlayer" => ST_NEXT_PLAYER,
'zombiePass' => ST_NEXT_PLAYER
)
),
// Card choose
ST_TAKE_PROPHECY => array(
"name" => "takeProphecy",
"description" => clienttranslate('${actplayer} can choose more Prophecy cards'),
"descriptionmyturn" => clienttranslate('${you} can choose more Prophecy cards'),
"description-Confirm" => clienttranslate('${actplayer} must confirm the Prophecy card choice'),
"descriptionmyturn-Confirm" => clienttranslate('${you} must confirm the Prophecy card choice'),
"description-SacrificeToken" => clienttranslate('${actplayer} can choose Prophecy cards'),
"descriptionmyturn-SacrificeToken" => clienttranslate('${you} can choose Prophecy cards'),
"type" => "activeplayer",
"args" => "argTakeProphecy",
"possibleactions" => array(
"undo",
"restart",
"takeProphecy",
"confirmTakeProphecy"
),
"transitions" => array(
"playerTurn" => ST_PLAYER_TURN,
"takeProphecy" => ST_TAKE_PROPHECY,
"nextPlayer" => ST_NEXT_PLAYER,
'zombiePass' => ST_NEXT_PLAYER
)
),
ST_ASSEMBLE => array(
"name" => "assemble",
"description" => clienttranslate('${actplayer} can assemble Cóatls or confirm the assemble'),
"description-Confirm" => clienttranslate('${actplayer} must confirm the Cóatl assemble'),
"descriptionmyturn" => clienttranslate('${you} can assemble Cóatls or confirm the assemble'),
"descriptionmyturn-Confirm" => clienttranslate('${you} must confirm the Cóatl assemble'),
"type" => "activeplayer",
"args" => "argAssemble",
"possibleactions" => array(
"cancel",
"undo",
"restart",
"newCoatl",
"addPiece",
"addCard",
"confirmAssemble"
),
"transitions" => array(
"playerTurn" => ST_PLAYER_TURN,
"assemble" => ST_ASSEMBLE,
"nextPlayer" => ST_NEXT_PLAYER,
'zombiePass' => ST_NEXT_PLAYER
)
),
ST_STEAL => array(
"name" => "steal",
"description" => clienttranslate('${actplayer} can steal up to 2 body segments from an opponent'),
"descriptionmyturn" => clienttranslate('${you} can steal up to 2 body segments from an opponent'),
"type" => "activeplayer",
"args" => "argSteal",
"possibleactions" => array(
"cancel",
"confirmSteal"
),
"transitions" => array(
"playerTurn" => ST_PLAYER_TURN,
"nextPlayer" => ST_NEXT_PLAYER,
'zombiePass' => ST_NEXT_PLAYER
)
),
ST_DISCARD_PROPHECY_SACRIFICE_TOKEN => array(
"name" => "discardProphecySacrificeToken",
"description" => clienttranslate('${actplayer} can discard any Prophecy cards from their hand'),
"descriptionmyturn" => clienttranslate('${you} can discard any Prophecy cards from your hand'),
"type" => "activeplayer",
"args" => "argFinalTurn",
"possibleactions" => array(
"discardProphecySacrificeToken"
),
"transitions" => array(
"discardProphecySacrificeToken" => ST_TAKE_PROPHECY,
"nextPlayer" => ST_NEXT_PLAYER,
'zombiePass' => ST_NEXT_PLAYER
)
),
ST_TAKE_TEMPLE_SACRIFICE_TOKEN => array(
"name" => "takeTempleSacrificeToken",
"description" => clienttranslate('${actplayer} can take a Temple card from the supply to their hand'),
"descriptionmyturn" => clienttranslate('${you} can take a Temple card from the supply to your hand'),
"type" => "activeplayer",
"args" => "argFinalTurn",
"possibleactions" => array(
"cancel",
"takeTempleSacrificeToken"
),
"transitions" => array(
"playerTurn" => ST_PLAYER_TURN,
"nextPlayer" => ST_NEXT_PLAYER,
'zombiePass' => ST_NEXT_PLAYER
)
),
// Next player.
ST_NEXT_PLAYER => array(
"name" => "nextPlayer",
"description" => '',
"type" => "game",
"action" => "stNextPlayer",
"updateGameProgression" => true,
"transitions" => array(
"playerTurn" => ST_PLAYER_TURN,
"endGame" => ST_END_GAME
)
),
// Final state.
// Please do not modify (and do not overload action/args methods).
ST_END_GAME => array(
"name" => "gameEnd",
"description" => clienttranslate("End of game"),
"type" => "manager",
"action" => "stGameEnd",
"args" => "argGameEnd"
)
);