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