1 #ifndef GAMES_NECROWAR_TOWER_H
2 #define GAMES_NECROWAR_TOWER_H
14 #include <unordered_map>
16 #include <initializer_list>
18 #include "../../joueur/src/any.hpp"
20 #include "game_object.hpp"
22 #include "impl/necrowar_fwd.hpp"
93 Tower_(std::initializer_list<std::pair<std::string, Any&&>> init);
94 Tower_() : Tower_({}){}
95 virtual void resize(
const std::string& name, std::size_t size)
override;
96 virtual void change_vec_values(
const std::string& name, std::vector<std::pair<std::size_t, Any>>& values)
override;
97 virtual void remove_key(
const std::string& name, Any& key)
override;
98 virtual std::unique_ptr<Any> add_key_value(
const std::string& name, Any& key, Any& value)
override;
99 virtual bool is_map(
const std::string& name)
override;
100 virtual void rebind_by_name(Any* to_change,
const std::string& member, std::shared_ptr<Base_object> ref)
override;
111 #endif // GAMES_NECROWAR_TOWER_H
const Player & owner
The player that built / owns this tower.
Definition: tower.hpp:64
A Tile in the game that makes up the 2D map grid.
Definition: tile.hpp:37
Information about a tower's job/type.
Definition: tower_job.hpp:37
An object in the game. The most basic class that all game classes should inherit from automatically...
Definition: game_object.hpp:37
const int & cooldown
How many turns are left before it can fire again.
Definition: tower.hpp:49
A player in this game. Every AI controls one player.
Definition: player.hpp:37
const Tower_job & job
What type of tower this is (it's job).
Definition: tower.hpp:59
A tower in the game. Used to combat enemy waves.
Definition: tower.hpp:37
bool attack(const Tile &tile)
attacks an enemy unit on an tile within it's range.
const bool & attacked
Whether this tower has attacked this turn or not.
Definition: tower.hpp:44
const Tile & tile
The Tile this Tower is on.
Definition: tower.hpp:69
const int & health
How much remaining health this tower has.
Definition: tower.hpp:54