/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ScavTrap.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/12/18 14:28:06 by bchanot #+# #+# */ /* Updated: 2025/12/18 14:50:00 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "ScavTrap.hpp" /* ** ------------------------------- CONSTRUCTOR -------------------------------- */ ScavTrap::ScavTrap() : ClapTrap() { this->_hitPoints = 100; this->_energyPoints = 50; this->_attackDamage = 20; std::cout << "ScavTrap " << this->_name << " has been created" << std::endl; } ScavTrap::ScavTrap( std::string const & name ) : ClapTrap(name) { this->_hitPoints = 100; this->_energyPoints = 50; this->_attackDamage = 20; std::cout << "ScavTrap " << this->_name << " has been created" << std::endl; } ScavTrap::ScavTrap( ScavTrap const & src ) : ClapTrap(src) { this->_hitPoints = 100; this->_energyPoints = 50; this->_attackDamage = 20; std::cout << "Copy of ScavTrap " << this->_name << " has been created" << std::endl; } /* ** -------------------------------- DESTRUCTOR -------------------------------- */ ScavTrap::~ScavTrap() { std::cout << "ScavTrap " << this->_name << " has been destroyed !" << std::endl; } /* ** --------------------------------- OVERLOAD --------------------------------- */ ScavTrap & ScavTrap::operator=( ScavTrap const & rhs ) { (void)rhs; //if ( this != &rhs ) //{ //this->_value = rhs.getValue(); //} return *this; } std::ostream & operator<<( std::ostream & o, ScavTrap const & i ) { (void)i; //o << "Value = " << i.getValue(); return o; } /* ** --------------------------------- METHODS ---------------------------------- */ void ScavTrap::guardGate(void) const { std::cout << "ScavTrap " << this->_name << " Is holding the door !" << std::endl; } /* ** --------------------------------- ACCESSOR --------------------------------- */ /* ************************************************************************** */