Lines 100.00% 3 / 3
Methods 100.00% 2 / 2
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
 allows 100.00% 2 / 2 100.00% 1 / 1 1
10final readonly class ManaAbove implements SkillRule
11{
12    public function __construct(
13        private int $percent,
14    ) {}
15
16    #[Override]
17    public function allows(Vitals $vitals): bool
18    {
19        $mana = $vitals->mana;
20
21        return ($mana->current->value * 100) > ($mana->maximum->value * $this->percent);
22    }
23}