/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Cure.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/12/19 15:29:40 by bchanot #+# #+# */ /* Updated: 2025/12/19 16:20:46 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "Cure.hpp" /* ** ------------------------------- CONSTRUCTOR -------------------------------- */ Cure::Cure() : AMateria("ice") { std::cout << "ice AMateria construct" << std::endl; } Cure::Cure( const Cure & src ) : AMateria(src._type) { std::cout << "ice AMateria construct" << std::endl; } /* ** -------------------------------- DESTRUCTOR -------------------------------- */ Cure::~Cure() { std::cout << "ice AMateria destructed" << std::endl; } /* ** --------------------------------- OVERLOAD --------------------------------- */ std::ostream & operator<<( std::ostream & o, Cure const & i ) { o << "Type = " << i.getType(); return o; } /* ** --------------------------------- METHODS ---------------------------------- */ AMateria* Cure::clone() const { return (new Cure(*this)); } void Cure::use(ICharacter& target) { std::cout << "* heals " << target << "'s wounds *" << std::endl; } /* ** --------------------------------- ACCESSOR --------------------------------- */ /* ************************************************************************** */