public function isSpellAvailable(Spell $spell) { if ($spell instanceof Effect && $spell->isActive()) { return false; } return $spell->getCost() <= $this->playerMana; }