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