Lines
100.00%
2 / 2
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| affordable | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 11 | final readonly class ManaCost implements SkillCost | |
| 12 | { | |
| 13 | public function __construct( | |
| 14 | public Mana $mana, | |
| 15 | ) {} | |
| 16 | ||
| 17 | #[Override] | |
| 18 | public function affordable(Vitals $vitals): bool | |
| 19 | { | |
| 20 | return $vitals->mana->current->value >= $this->mana->value; | |
| 21 | } | |
| 22 | } |