fix
This commit is contained in:
@ -43,7 +43,7 @@ ClapTrap& ClapTrap::operator=(const ClapTrap& src)
|
||||
|
||||
void ClapTrap::beRepaired(unsigned int amount)
|
||||
{
|
||||
if (this->_life == 0 || this->_energy == 0)
|
||||
if (this->_life <= 0 || this->_energy == 0)
|
||||
{
|
||||
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||
return;
|
||||
@ -55,7 +55,7 @@ void ClapTrap::beRepaired(unsigned int amount)
|
||||
|
||||
void ClapTrap::takeDamage(unsigned int amount)
|
||||
{
|
||||
if (this->_life == 0 || this->_energy == 0)
|
||||
if (this->_life <= 0)
|
||||
{
|
||||
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||
return;
|
||||
@ -66,7 +66,7 @@ void ClapTrap::takeDamage(unsigned int amount)
|
||||
|
||||
void ClapTrap::attack(const std::string &target)
|
||||
{
|
||||
if (this->_life == 0 || this->_energy == 0)
|
||||
if (this->_life <= 0 || this->_energy == 0)
|
||||
{
|
||||
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||
return;
|
||||
|
@ -50,7 +50,7 @@ void ScavTrap::guardGate()
|
||||
|
||||
void ScavTrap::attack(const std::string& target)
|
||||
{
|
||||
if (this->_life == 0 || this->_energy == 0)
|
||||
if (this->_life <= 0 || this->_energy == 0)
|
||||
{
|
||||
std::cerr << "error: ScavTrap " << this->_name << " dead" << std::endl;
|
||||
return;
|
||||
|
Reference in New Issue
Block a user