fixed
This commit is contained in:
parent
9e3822aee0
commit
21a47da9b5
@ -45,19 +45,19 @@ void ClapTrap::beRepaired(unsigned int amount)
|
|||||||
{
|
{
|
||||||
if (this->_life == 0 || this->_energy == 0)
|
if (this->_life == 0 || this->_energy == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->_life += amount;
|
this->_life += amount;
|
||||||
this->_energy--;
|
this->_energy--;
|
||||||
std::cerr << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl;
|
std::cout << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClapTrap::takeDamage(unsigned int amount)
|
void ClapTrap::takeDamage(unsigned int amount)
|
||||||
{
|
{
|
||||||
if (this->_life == 0 || this->_energy == 0)
|
if (this->_life == 0 || this->_energy == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->_life -= amount;
|
this->_life -= amount;
|
||||||
@ -68,9 +68,9 @@ void ClapTrap::attack(const std::string &target)
|
|||||||
{
|
{
|
||||||
if (this->_life == 0 || this->_energy == 0)
|
if (this->_life == 0 || this->_energy == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->_energy--;
|
this->_energy--;
|
||||||
std::cerr << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage" << std::endl;
|
std::cout << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage!" << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -45,19 +45,19 @@ void ClapTrap::beRepaired(unsigned int amount)
|
|||||||
{
|
{
|
||||||
if (this->_life == 0 || this->_energy == 0)
|
if (this->_life == 0 || this->_energy == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->_life += amount;
|
this->_life += amount;
|
||||||
this->_energy--;
|
this->_energy--;
|
||||||
std::cerr << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl;
|
std::cout << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClapTrap::takeDamage(unsigned int amount)
|
void ClapTrap::takeDamage(unsigned int amount)
|
||||||
{
|
{
|
||||||
if (this->_life == 0 || this->_energy == 0)
|
if (this->_life == 0 || this->_energy == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->_life -= amount;
|
this->_life -= amount;
|
||||||
@ -68,11 +68,11 @@ void ClapTrap::attack(const std::string &target)
|
|||||||
{
|
{
|
||||||
if (this->_life == 0 || this->_energy == 0)
|
if (this->_life == 0 || this->_energy == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->_energy--;
|
this->_energy--;
|
||||||
std::cerr << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage" << std::endl;
|
std::cout << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage!" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& ClapTrap::getName() const
|
const std::string& ClapTrap::getName() const
|
||||||
|
@ -45,19 +45,19 @@ void ClapTrap::beRepaired(unsigned int amount)
|
|||||||
{
|
{
|
||||||
if (this->_life == 0 || this->_energy == 0)
|
if (this->_life == 0 || this->_energy == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->_life += amount;
|
this->_life += amount;
|
||||||
this->_energy--;
|
this->_energy--;
|
||||||
std::cerr << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl;
|
std::cout << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClapTrap::takeDamage(unsigned int amount)
|
void ClapTrap::takeDamage(unsigned int amount)
|
||||||
{
|
{
|
||||||
if (this->_life == 0 || this->_energy == 0)
|
if (this->_life == 0 || this->_energy == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->_life -= amount;
|
this->_life -= amount;
|
||||||
@ -68,11 +68,11 @@ void ClapTrap::attack(const std::string &target)
|
|||||||
{
|
{
|
||||||
if (this->_life == 0 || this->_energy == 0)
|
if (this->_life == 0 || this->_energy == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->_energy--;
|
this->_energy--;
|
||||||
std::cerr << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage" << std::endl;
|
std::cout << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage!" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& ClapTrap::getName() const
|
const std::string& ClapTrap::getName() const
|
||||||
|
Loading…
Reference in New Issue
Block a user