aboutsummaryrefslogtreecommitdiff
path: root/cpp03/ex01/ScavTrap.hpp
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-04-13 18:44:40 +0200
committerCharles <sircharlesaze@gmail.com>2020-04-13 18:44:40 +0200
commit119f7f96e77a2d86d692e82645dde4c2dc054052 (patch)
tree73c863970a5d0ac8a3c77f9bf96e5aaf2c4c66c8 /cpp03/ex01/ScavTrap.hpp
parent3d48ed0312f9c0ae691560d7cd688f46917e3fd4 (diff)
downloadpiscine_cpp-119f7f96e77a2d86d692e82645dde4c2dc054052.tar.gz
piscine_cpp-119f7f96e77a2d86d692e82645dde4c2dc054052.tar.bz2
piscine_cpp-119f7f96e77a2d86d692e82645dde4c2dc054052.zip
cpp03, except ex04
Diffstat (limited to 'cpp03/ex01/ScavTrap.hpp')
-rw-r--r--cpp03/ex01/ScavTrap.hpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/cpp03/ex01/ScavTrap.hpp b/cpp03/ex01/ScavTrap.hpp
index e69de29..f5bc3cc 100644
--- a/cpp03/ex01/ScavTrap.hpp
+++ b/cpp03/ex01/ScavTrap.hpp
@@ -0,0 +1,47 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ScavTrap.hpp :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/04/13 14:11:51 by charles #+# #+# */
+/* Updated: 2020/04/13 15:18:01 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef SCAVTRAP_HPP
+# define SCAVTRAP_HPP
+
+# include <cstdlib>
+# include <iostream>
+# include <string>
+
+class ScavTrap
+{
+public:
+ ScavTrap();
+ ScavTrap(std::string name);
+ ScavTrap(ScavTrap const& other);
+ void operator=(ScavTrap const& other);
+ ~ScavTrap();
+
+ void rangedAttack(std::string const& target) const;
+ void meleeAttack(std::string const& target) const;
+ void takeDamage(unsigned int amount);
+ void beRepaired(unsigned int amount);
+ void challengeNewcomer(std::string const& target);
+
+private:
+ unsigned int m_hitPoints;
+ unsigned int m_maxHitPoints;
+ unsigned int m_energyPoints;
+ unsigned int m_maxEnergyPoints;
+ unsigned int m_level;
+ std::string m_name;
+ unsigned int m_meleeAttackDamage;
+ unsigned int m_rangedAttackDamage;
+ unsigned int m_armorDamageReduction;
+};
+
+#endif