Conditions | 3 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
29 | public function getDamage(): int { |
||
30 | 1 | $damage = 0; |
|
31 | 1 | if(substr($this->skill->baseDamage, -1) === "%") { |
|
32 | 1 | $damage += (int) $this->skill->baseDamage; |
|
33 | } |
||
34 | 1 | if(substr($this->skill->damageGrowth, -1) === "%") { |
|
35 | 1 | $damage += (int) $this->skill->damageGrowth * ($this->level - 1); |
|
36 | } |
||
37 | 1 | return $damage; |
|
38 | } |
||
47 | ?> |