/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Ice.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/07 12:13:03 by adjoly #+# #+# */ /* Updated: 2024/12/10 12:25:11 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ #include "Ice.hpp" #include "AMateria.hpp" #include "ICharacter.hpp" #include "Log.hpp" #include Ice::Ice(void) : AMateria("ice") { log("➕", "Ice", "", "default constructor called"); } Ice::Ice(const Ice &cpy) { log("➕", "Ice", "", "copy constructor called"); *this = cpy; } Ice::~Ice(void) { log("➖", "Ice", "", "destructor called"); } Ice &Ice::operator=(const Ice &cpy) { log("➕", "Ice", "", "copy assignement constructor called"); if (this != &cpy) { _type = cpy._type; } return (*this); } Ice *Ice::clone(void) const { return (new Ice); } void Ice::use(ICharacter &character) { std::cout << "* shoots an ice bolt at " << character.getName() << " *"; }