-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassyria.action.php
190 lines (134 loc) · 4.4 KB
/
assyria.action.php
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
<?php
/**
* ------
* BGA framework: © Gregory Isabelli <[email protected]> & Emmanuel Colin <[email protected]>
* Assyria implementation: © Sebastien Prud'homme <[email protected]>
*
* 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.
* -----
*
* assyria.action.php
*
*/
class action_assyria extends APP_GameAction {
public function __default() {
if (self::isArg('notifwindow')) {
$this->view = 'common_notifwindow';
$this->viewArgs['table'] = self::getArg('table', AT_posint, TRUE);
} else {
$this->view = 'assyria_assyria';
}
}
public function chooseFoodCard() {
self::setAjaxMode();
$id = self::getArg('id', AT_posint, TRUE);
$this->game->chooseFoodCard($id);
self::ajaxResponse();
}
public function chooseFoodColumn() {
self::setAjaxMode();
$column = self::getArg('column', AT_posint, TRUE);
$this->game->chooseFoodColumn($column);
self::ajaxResponse();
}
public function placeHut() {
self::setAjaxMode();
$q = self::getArg('q', AT_int, TRUE);
$r = self::getArg('r', AT_int, TRUE);
$this->game->placeHut($q, $r);
self::ajaxResponse();
}
public function useFoodCard() {
self::setAjaxMode();
$id = self::getArg('id', AT_posint, TRUE);
$this->game->useFoodCard($id);
self::ajaxResponse();
}
public function chooseStartingSpace() {
self::setAjaxMode();
$q = self::getArg('q', AT_int, TRUE);
$r = self::getArg('r', AT_int, TRUE);
$this->game->chooseStartingSpace($q, $r);
self::ajaxResponse();
}
public function resupplyHut() {
self::setAjaxMode();
$q = self::getArg('q', AT_int, TRUE);
$r = self::getArg('r', AT_int, TRUE);
$this->game->resupplyHut($q, $r);
self::ajaxResponse();
}
public function placeWell() {
self::setAjaxMode();
$q = self::getArg('q', AT_int, TRUE);
$r = self::getArg('r', AT_int, TRUE);
$t = self::getArg('t', AT_int, TRUE);
$this->game->placeWell($q, $r, $t);
self::ajaxResponse();
}
public function passPlaceWell() {
self::setAjaxMode();
$this->game->passPlaceWell();
self::ajaxResponse();
}
public function buildZiggurat() {
self::setAjaxMode();
$q = self::getArg('q', AT_int, TRUE);
$r = self::getArg('r', AT_int, TRUE);
$this->game->buildZiggurat($q, $r);
self::ajaxResponse();
}
public function extendZigguratCenter() {
self::setAjaxMode();
$q = self::getArg('q', AT_int, TRUE);
$r = self::getArg('r', AT_int, TRUE);
$this->game->extendZigguratCenter($q, $r);
self::ajaxResponse();
}
public function extendZigguratRoof() {
self::setAjaxMode();
$q = self::getArg('q', AT_int, TRUE);
$r = self::getArg('r', AT_int, TRUE);
$this->game->extendZigguratRoof($q, $r);
self::ajaxResponse();
}
public function influenceHigherDignitary() {
self::setAjaxMode();
$this->game->influenceHigherDignitary();
self::ajaxResponse();
}
public function influenceMiddleDignitary() {
self::setAjaxMode();
$this->game->influenceMiddleDignitary();
self::ajaxResponse();
}
public function influenceLowerDignitary() {
self::setAjaxMode();
$this->game->influenceLowerDignitary();
self::ajaxResponse();
}
public function makeOffering() {
self::setAjaxMode();
$offering = self::getArg('offering', AT_posint, TRUE);
$this->game->makeOffering($offering);
self::ajaxResponse();
}
public function buyFoodCard() {
self::setAjaxMode();
$id = self::getArg('id', AT_posint, TRUE);
$this->game->buyFoodCard($id);
self::ajaxResponse();
}
public function buyPlowCard() {
self::setAjaxMode();
$id = self::getArg('id', AT_posint, TRUE);
$this->game->buyPlowCard($id);
self::ajaxResponse();
}
public function passPerformAction() {
self::setAjaxMode();
$this->game->passPerformAction();
self::ajaxResponse();
}
}