| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* Ice.cpp :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2025/12/19 15:29:40 by bchanot #+# #+# */
- /* Updated: 2025/12/19 16:11:17 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "Ice.hpp"
- /*
- ** ------------------------------- CONSTRUCTOR --------------------------------
- */
- Ice::Ice() : AMateria("ice")
- {
- std::cout << "ice AMateria construct" << std::endl;
- }
- Ice::Ice( const Ice & src ) : AMateria(src._type)
- {
- std::cout << "ice AMateria construct" << std::endl;
- }
- /*
- ** -------------------------------- DESTRUCTOR --------------------------------
- */
- Ice::~Ice()
- {
- std::cout << "ice AMateria destructed" << std::endl;
- }
- /*
- ** --------------------------------- OVERLOAD ---------------------------------
- */
- std::ostream & operator<<( std::ostream & o, Ice const & i )
- {
- o << "Type = " << i.getType();
- return o;
- }
- /*
- ** --------------------------------- METHODS ----------------------------------
- */
- AMateria* Ice::clone() const {
- return (new Ice(*this));
- }
- void Ice::use(ICharacter& target) {
- std::cout << "* shoots an ice bolt at " << target << " *" << std::endl;
- }
- /*
- ** --------------------------------- ACCESSOR ---------------------------------
- */
- /* ************************************************************************** */
|