1 | <?php |
||
13 | class Pokemon |
||
14 | { |
||
15 | /** |
||
16 | * @var int |
||
17 | */ |
||
18 | protected $number; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $name; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | protected $cp; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | protected $hp; |
||
34 | |||
35 | /** |
||
36 | * @var int |
||
37 | */ |
||
38 | protected $baseAttack; |
||
39 | |||
40 | /** |
||
41 | * @var int |
||
42 | */ |
||
43 | protected $baseDefense; |
||
44 | |||
45 | /** |
||
46 | * @var int |
||
47 | */ |
||
48 | protected $baseStamina; |
||
49 | |||
50 | /** |
||
51 | * @var Collection |
||
52 | */ |
||
53 | protected $ivCombinaisons; |
||
54 | |||
55 | /** |
||
56 | * Pokemon constructor. |
||
57 | * @param int $number |
||
58 | * @param string $name |
||
59 | * @param int $baseAttack |
||
60 | * @param int $baseDefense |
||
61 | * @param int $baseStamina |
||
62 | */ |
||
63 | public function __construct( |
||
76 | |||
77 | /** |
||
78 | * Return the minimum of perfection of a Pokemon |
||
79 | * @return IvCombinaison|null |
||
80 | */ |
||
81 | public function getMinimumCombinaison(): ?IvCombinaison |
||
90 | |||
91 | /** |
||
92 | * Return the maximum of perfection of a Pokemon |
||
93 | * @return IvCombinaison|null |
||
94 | */ |
||
95 | public function getMaximumCombinaison(): ?IvCombinaison |
||
104 | |||
105 | /** |
||
106 | * Return the average perfection of a Pokemon |
||
107 | * @return float|null |
||
108 | */ |
||
109 | public function getAveragePerfection(): ?float |
||
116 | |||
117 | /** |
||
118 | * Return the min attack of a Pokemon |
||
119 | * @return int |
||
120 | */ |
||
121 | public function getMinAttack(): ?int |
||
128 | |||
129 | /** |
||
130 | * Return the max attack of a Pokemon |
||
131 | * @return int |
||
132 | */ |
||
133 | public function getMaxAttack(): ?int |
||
140 | |||
141 | /** |
||
142 | * Return the min defense of a Pokemon |
||
143 | * @return int |
||
144 | */ |
||
145 | public function getMinDefense(): ?int |
||
152 | |||
153 | /** |
||
154 | * Return the max defense of a Pokemon |
||
155 | * @return int |
||
156 | */ |
||
157 | public function getMaxDefense(): ?int |
||
164 | |||
165 | /** |
||
166 | * Return the min stamina of a Pokemon |
||
167 | * @return int |
||
168 | */ |
||
169 | public function getMinStamina(): ?int |
||
176 | |||
177 | /** |
||
178 | * Return the max stamina of a Pokemon |
||
179 | * @return int |
||
180 | */ |
||
181 | public function getMaxStamina(): ?int |
||
188 | |||
189 | /** |
||
190 | * Get ivCombinaisons |
||
191 | * |
||
192 | * @return Collection |
||
193 | */ |
||
194 | public function getIvCombinaisons(): Collection |
||
198 | |||
199 | /** |
||
200 | * Set ivCombinaisons |
||
201 | * |
||
202 | * @param Collection $ivCombinaisons |
||
203 | * |
||
204 | * @return Pokemon |
||
205 | */ |
||
206 | public function setIvCombinaisons(Collection $ivCombinaisons) |
||
212 | |||
213 | /** |
||
214 | * Get number |
||
215 | * |
||
216 | * @return int |
||
217 | */ |
||
218 | public function getNumber(): int |
||
222 | |||
223 | /** |
||
224 | * Get name |
||
225 | * |
||
226 | * @return string |
||
227 | */ |
||
228 | public function getName(): string |
||
232 | |||
233 | /** |
||
234 | * Get cp |
||
235 | * |
||
236 | * @return int|null |
||
237 | */ |
||
238 | public function getCp(): ?int |
||
242 | |||
243 | /** |
||
244 | * Set cp |
||
245 | * |
||
246 | * @param int $cp |
||
247 | * |
||
248 | * @return Pokemon |
||
249 | */ |
||
250 | public function setCp(int $cp) |
||
255 | |||
256 | /** |
||
257 | * Get hp |
||
258 | * |
||
259 | * @return int|null |
||
260 | */ |
||
261 | public function getHp(): ?int |
||
265 | |||
266 | /** |
||
267 | * Set hp |
||
268 | * |
||
269 | * @param int $hp |
||
270 | * |
||
271 | * @return Pokemon |
||
272 | */ |
||
273 | public function setHp(int $hp) |
||
278 | |||
279 | /** |
||
280 | * Get baseAttack |
||
281 | * |
||
282 | * @return int |
||
283 | */ |
||
284 | public function getBaseAttack(): int |
||
288 | |||
289 | /** |
||
290 | * Get baseDefense |
||
291 | * |
||
292 | * @return int |
||
293 | */ |
||
294 | public function getBaseDefense(): int |
||
298 | |||
299 | /** |
||
300 | * Get baseStamina |
||
301 | * |
||
302 | * @return int |
||
303 | */ |
||
304 | public function getBaseStamina(): int |
||
308 | } |
||
309 |