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 string |
||
27 | */ |
||
28 | protected $family; |
||
29 | |||
30 | /** |
||
31 | * @var string[] |
||
32 | */ |
||
33 | protected $types; |
||
34 | |||
35 | /** |
||
36 | * @var int |
||
37 | */ |
||
38 | protected $cp; |
||
39 | |||
40 | /** |
||
41 | * @var int |
||
42 | */ |
||
43 | protected $hp; |
||
44 | |||
45 | /** |
||
46 | * @var int |
||
47 | */ |
||
48 | protected $baseAttack; |
||
49 | |||
50 | /** |
||
51 | * @var int |
||
52 | */ |
||
53 | protected $baseDefense; |
||
54 | |||
55 | /** |
||
56 | * @var int |
||
57 | */ |
||
58 | protected $baseStamina; |
||
59 | |||
60 | /** |
||
61 | * @var Collection |
||
62 | */ |
||
63 | protected $ivCombinaisons; |
||
64 | |||
65 | /** |
||
66 | * Pokemon constructor. |
||
67 | * @param int $number |
||
68 | * @param string $name |
||
69 | * @param int $baseAttack |
||
70 | * @param int $baseDefense |
||
71 | * @param int $baseStamina |
||
72 | * @param string[] $types |
||
73 | * @param string $familyId |
||
74 | */ |
||
75 | public function __construct( |
||
92 | |||
93 | /** |
||
94 | * Return the minimum of perfection of a Pokemon |
||
95 | * @return IvCombinaison|null |
||
96 | */ |
||
97 | public function getMinimumCombinaison(): ?IvCombinaison |
||
106 | |||
107 | /** |
||
108 | * Return the maximum of perfection of a Pokemon |
||
109 | * @return IvCombinaison|null |
||
110 | */ |
||
111 | public function getMaximumCombinaison(): ?IvCombinaison |
||
120 | |||
121 | /** |
||
122 | * Return the average perfection of a Pokemon |
||
123 | * @return float|null |
||
124 | */ |
||
125 | public function getAveragePerfection(): ?float |
||
132 | |||
133 | /** |
||
134 | * Return the min attack of a Pokemon |
||
135 | * @return int |
||
136 | */ |
||
137 | public function getMinAttack(): ?int |
||
144 | |||
145 | /** |
||
146 | * Return the max attack of a Pokemon |
||
147 | * @return int |
||
148 | */ |
||
149 | public function getMaxAttack(): ?int |
||
156 | |||
157 | /** |
||
158 | * Return the min defense of a Pokemon |
||
159 | * @return int |
||
160 | */ |
||
161 | public function getMinDefense(): ?int |
||
168 | |||
169 | /** |
||
170 | * Return the max defense of a Pokemon |
||
171 | * @return int |
||
172 | */ |
||
173 | public function getMaxDefense(): ?int |
||
180 | |||
181 | /** |
||
182 | * Return the min stamina of a Pokemon |
||
183 | * @return int |
||
184 | */ |
||
185 | public function getMinStamina(): ?int |
||
192 | |||
193 | /** |
||
194 | * Return the max stamina of a Pokemon |
||
195 | * @return int |
||
196 | */ |
||
197 | public function getMaxStamina(): ?int |
||
204 | |||
205 | /** |
||
206 | * Return the min level of a Pokemon |
||
207 | * @return float |
||
208 | */ |
||
209 | public function getMinLevel(): ?float |
||
220 | |||
221 | /** |
||
222 | * Return the max level of a Pokemon |
||
223 | * @return float |
||
224 | */ |
||
225 | public function getMaxLevel(): ?float |
||
236 | |||
237 | /** |
||
238 | * Get ivCombinaisons |
||
239 | * |
||
240 | * @return Collection |
||
241 | */ |
||
242 | public function getIvCombinaisons(): Collection |
||
246 | |||
247 | /** |
||
248 | * Set ivCombinaisons |
||
249 | * |
||
250 | * @param Collection $ivCombinaisons |
||
251 | * |
||
252 | * @return Pokemon |
||
253 | */ |
||
254 | public function setIvCombinaisons(Collection $ivCombinaisons) |
||
260 | |||
261 | /** |
||
262 | * Get number |
||
263 | * |
||
264 | * @return int |
||
265 | */ |
||
266 | public function getNumber(): int |
||
270 | |||
271 | /** |
||
272 | * Get name |
||
273 | * |
||
274 | * @return string |
||
275 | */ |
||
276 | public function getName(): string |
||
280 | |||
281 | /** |
||
282 | * Get family |
||
283 | * |
||
284 | * @return string |
||
285 | */ |
||
286 | public function getFamily(): string |
||
290 | |||
291 | /** |
||
292 | * Get types |
||
293 | * |
||
294 | * @return \string[] |
||
295 | */ |
||
296 | public function getTypes(): array |
||
300 | |||
301 | /** |
||
302 | * Get cp |
||
303 | * |
||
304 | * @return int|null |
||
305 | */ |
||
306 | public function getCp(): ?int |
||
310 | |||
311 | /** |
||
312 | * Set cp |
||
313 | * |
||
314 | * @param int $cp |
||
315 | * |
||
316 | * @return Pokemon |
||
317 | */ |
||
318 | public function setCp(int $cp) |
||
323 | |||
324 | /** |
||
325 | * Get hp |
||
326 | * |
||
327 | * @return int|null |
||
328 | */ |
||
329 | public function getHp(): ?int |
||
333 | |||
334 | /** |
||
335 | * Set hp |
||
336 | * |
||
337 | * @param int $hp |
||
338 | * |
||
339 | * @return Pokemon |
||
340 | */ |
||
341 | public function setHp(int $hp) |
||
346 | |||
347 | /** |
||
348 | * Get baseAttack |
||
349 | * |
||
350 | * @return int |
||
351 | */ |
||
352 | public function getBaseAttack(): int |
||
356 | |||
357 | /** |
||
358 | * Get baseDefense |
||
359 | * |
||
360 | * @return int |
||
361 | */ |
||
362 | public function getBaseDefense(): int |
||
366 | |||
367 | /** |
||
368 | * Get baseStamina |
||
369 | * |
||
370 | * @return int |
||
371 | */ |
||
372 | public function getBaseStamina(): int |
||
376 | } |
||
377 |