Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 1 | public function getEvadeChance(): int |
|
16 | { |
||
17 | 1 | if (!$this->hasSpacecraftSystem(SpacecraftSystemTypeEnum::IMPULSEDRIVE)) { |
|
18 | return $this->evade_chance; |
||
19 | } |
||
20 | |||
21 | 1 | return (int) (ceil($this->evade_chance |
|
22 | 1 | * $this->getSpacecraftSystem(SpacecraftSystemTypeEnum::IMPULSEDRIVE)->getStatus() / 100)); |
|
23 | } |
||
25 |