2025-05-19 15:44:16 +02:00
|
|
|
#include "ScavTrap.hpp"
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
ScavTrap::ScavTrap() {
|
|
|
|
|
std::cout << "ScavTrap::ScavTrap()" << std::endl;
|
|
|
|
|
hit_points = 100;
|
|
|
|
|
energy_points = 50;
|
|
|
|
|
attack_damage = 20;
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-27 13:39:30 +02:00
|
|
|
ScavTrap::ScavTrap(const ScavTrap &other) {
|
|
|
|
|
name = other.name;
|
|
|
|
|
hit_points = other.hit_points;
|
|
|
|
|
energy_points = other.energy_points;
|
|
|
|
|
attack_damage = other.attack_damage;
|
|
|
|
|
std::cout << "ScavTrap::ScavTrap(const ScavTrap &other)" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-19 15:44:16 +02:00
|
|
|
ScavTrap::ScavTrap(std::string name) {
|
|
|
|
|
std::cout << "ScavTrap::ScavTrap(" << name << ")" << std::endl;
|
|
|
|
|
hit_points = 100;
|
|
|
|
|
energy_points = 50;
|
|
|
|
|
attack_damage = 20;
|
|
|
|
|
this->name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ScavTrap::~ScavTrap() { std::cout << "ScavTrap::~ScavTrap()" << std::endl; }
|
|
|
|
|
|
|
|
|
|
ScavTrap &ScavTrap::operator=(const ScavTrap &other) {
|
|
|
|
|
this->hit_points = other.hit_points;
|
|
|
|
|
this->energy_points = other.energy_points;
|
|
|
|
|
this->attack_damage = other.attack_damage;
|
|
|
|
|
this->name = other.name;
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ScavTrap::guardGate() {
|
|
|
|
|
std::cout << "ScavTrap " << name << " is now in gate-guarding mode."
|
|
|
|
|
<< std::endl;
|
|
|
|
|
}
|