blob: 40da89a2ab018ebe1f6ed9200dfff72f84954857 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ScavTrap.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/13 14:15:03 by charles #+# #+# */
/* Updated: 2020/11/12 10:07:26 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "ScavTrap.hpp"
ScavTrap::ScavTrap(std::string const& name) : ClapTrap(name)
{
m_hitPoints = 100;
m_maxHitPoints = 100;
m_energyPoints = 50;
m_maxEnergyPoints = 50;
m_level = 1;
m_meleeAttackDamage = 20;
m_rangedAttackDamage = 15;
m_armorDamageReduction = 3;
std::cout << "SC4V-TP New " << m_name << ": your gaming references suck" << std::endl;
}
ScavTrap::ScavTrap(ScavTrap const& other) : ClapTrap(other)
{
std::cout << "SC4V-TP New from "<< other.m_name << std::endl;
}
ScavTrap& ScavTrap::operator=(ScavTrap const& other)
{
ClapTrap::operator=(other);
return *this;
}
ScavTrap::~ScavTrap()
{
std::cout << "SC4V-TP Delete " << m_name << ": your gaming references still suck" << std::endl;
}
void ScavTrap::challengeNewcomer(std::string const& target)
{
std::string challenges[5] = {
"lick your elbow",
"do 1 push up",
"dont talk for 1 hour",
"draw your name by peeing in the snow",
"punch me"
};
std::cout << "SC4V-TP " << m_name
<< " challenge " << target
<< " to " << challenges[rand() % 5]
<< std::endl;
}
ScavTrap::ScavTrap() {}
|