C++ Joueur Client
 All Classes Namespaces Functions Variables
cpp_client::necrowar::Tower_job Class Reference

Information about a tower's job/type. More...

#include <tower_job.hpp>

Inheritance diagram for cpp_client::necrowar::Tower_job:
cpp_client::necrowar::Game_object cpp_client::Base_object

Public Member Functions

void log (const std::string &message)
 adds a message to this _game_object's logs. _intended for your own debugging purposes, as strings stored here are saved in the gamelog. More...
 
template<typename T >
std::shared_ptr< typename
T::element_type > 
as ()
 Dynamically casts this object to another type. Returns nullptr if it cannot be converted to the type. More...
 
template<typename T >
bool is ()
 Determines if this object is of the specified object type More...
 

Public Attributes

const bool & all_units
 Whether this tower type hits all of the units on a tile (true) or one at a time (false). More...
 
const int & damage
 The amount of damage this type does per attack. More...
 
const int & gold_cost
 How much does this type cost in gold. More...
 
const int & health
 The amount of starting health this type has. More...
 
const int & mana_cost
 How much does this type cost in mana. More...
 
const int & range
 The number of tiles this type can attack from. More...
 
const std::string & title
 The type title. 'arrow', 'aoe', 'ballista', 'cleansing', or 'castle'. More...
 
const int & turns_between_attacks
 How many turns have to take place between this type's attacks. More...
 
const std::string & game_object_name
 String representing the top level Class that this game object is an instance of. Used for reflection to create new instances on clients, but exposed for convenience should AIs want this data. More...
 
const std::string & id
 A unique id for each instance of a GameObject or a sub class. Used for client and server communication. Should never change value after being set. More...
 
const std::vector< std::string > & logs
 Any strings logged will be stored here. Intended for debugging. More...
 

Detailed Description

Information about a tower's job/type.

Member Function Documentation

template<typename T >
std::shared_ptr<typename T::element_type> cpp_client::Base_object::as ( )
inlineinherited

Dynamically casts this object to another type. Returns nullptr if it cannot be converted to the type.

Returns
A pointer to the desired type, or nullptr if it could not be converted
template<typename T >
bool cpp_client::Base_object::is ( )
inlineinherited

Determines if this object is of the specified object type

Returns
true if the object is the object type, false otherwise
void cpp_client::necrowar::Game_object::log ( const std::string &  message)
inherited

adds a message to this _game_object's logs. _intended for your own debugging purposes, as strings stored here are saved in the gamelog.

Parameters
messageA string to add to this GameObject's log. Intended for debugging.

Member Data Documentation

const bool& cpp_client::necrowar::Tower_job::all_units

Whether this tower type hits all of the units on a tile (true) or one at a time (false).

const int& cpp_client::necrowar::Tower_job::damage

The amount of damage this type does per attack.

const std::string& cpp_client::necrowar::Game_object::game_object_name
inherited

String representing the top level Class that this game object is an instance of. Used for reflection to create new instances on clients, but exposed for convenience should AIs want this data.

const int& cpp_client::necrowar::Tower_job::gold_cost

How much does this type cost in gold.

const int& cpp_client::necrowar::Tower_job::health

The amount of starting health this type has.

const std::string& cpp_client::necrowar::Game_object::id
inherited

A unique id for each instance of a GameObject or a sub class. Used for client and server communication. Should never change value after being set.

const std::vector<std::string>& cpp_client::necrowar::Game_object::logs
inherited

Any strings logged will be stored here. Intended for debugging.

const int& cpp_client::necrowar::Tower_job::mana_cost

How much does this type cost in mana.

const int& cpp_client::necrowar::Tower_job::range

The number of tiles this type can attack from.

const std::string& cpp_client::necrowar::Tower_job::title

The type title. 'arrow', 'aoe', 'ballista', 'cleansing', or 'castle'.

const int& cpp_client::necrowar::Tower_job::turns_between_attacks

How many turns have to take place between this type's attacks.


The documentation for this class was generated from the following file: