The Spider Queen. She alone can spawn Spiderlings for each Player, and if she dies the owner loses.
More...
#include <brood_mother.hpp>
|
bool | consume (const Spiderling &spiderling) |
| consumes a _spiderling of the same owner to regain some eggs to spawn more _spiderlings. More...
|
|
Spiderling | spawn (const std::string &spiderling_type) |
| spawns a new _spiderling on the same _nest as this _brood_mother, consuming an egg. More...
|
|
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...
|
|
|
const int & | eggs |
| How many eggs the BroodMother has to spawn Spiderlings this turn. More...
|
|
const int & | health |
| How much health this BroodMother has left. When it reaches 0, she dies and her owner loses. More...
|
|
const bool & | is_dead |
| If this Spider is dead and has been removed from the game. More...
|
|
const Nest & | nest |
| The Nest that this Spider is currently on. Null when moving on a Web. More...
|
|
const Player & | owner |
| The Player that owns this Spider, and can command it. 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...
|
|
The Spider Queen. She alone can spawn Spiderlings for each Player, and if she dies the owner loses.
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
bool cpp_client::spiders::Brood_mother::consume |
( |
const Spiderling & |
spiderling | ) |
|
consumes a _spiderling of the same owner to regain some eggs to spawn more _spiderlings.
- Parameters
-
spiderling | The Spiderling to consume. It must be on the same Nest as this BroodMother. |
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::spiders::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
-
message | A string to add to this GameObject's log. Intended for debugging. |
Spiderling cpp_client::spiders::Brood_mother::spawn |
( |
const std::string & |
spiderling_type | ) |
|
spawns a new _spiderling on the same _nest as this _brood_mother, consuming an egg.
- Parameters
-
const int& cpp_client::spiders::Brood_mother::eggs |
How many eggs the BroodMother has to spawn Spiderlings this turn.
const std::string& cpp_client::spiders::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::spiders::Brood_mother::health |
How much health this BroodMother has left. When it reaches 0, she dies and her owner loses.
const std::string& cpp_client::spiders::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 bool& cpp_client::spiders::Spider::is_dead |
|
inherited |
If this Spider is dead and has been removed from the game.
const std::vector<std::string>& cpp_client::spiders::Game_object::logs |
|
inherited |
Any strings logged will be stored here. Intended for debugging.
const Nest& cpp_client::spiders::Spider::nest |
|
inherited |
The Nest that this Spider is currently on. Null when moving on a Web.
const Player& cpp_client::spiders::Spider::owner |
|
inherited |
The documentation for this class was generated from the following file: