| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* Cure.cpp :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* 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 ---------------------------------
- */
- /* ************************************************************************** */
|