nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::Monster Struct Reference

#include <world.h>

Public Member Functions

bool boss () const
 A monster with phases is a boss.

Public Attributes

uint32_t kind = 0
 By its id in the monsters file.
float x = 0.0f
float z = 0.0f
float yaw = 0.0f
Motion motion = Motion::kIdle
int level = 1
int health = 0
int max_health = 0
uint32_t experience = 0
int damage = 0
std::chrono::nanoseconds swing_time {0}
std::chrono::nanoseconds hit_time {0}
float reach = 0.0f
 In metres, from its kind's fight.
float sight = 0.0f
float leash = 0.0f
float wander = 0.0f
std::vector< monsters::Skill > skills
std::vector< monsters::Phase > phases
std::size_t phase = 0
uint32_t called_by = 0
float home_x = 0.0f
float home_z = 0.0f
float target_x = 0.0f
float target_z = 0.0f
std::chrono::nanoseconds rest {0}
uint32_t prey = 0
std::map< uint32_t, int > threat
bool evading = false
std::chrono::nanoseconds swing {0}
monsters::Skill casting
std::chrono::nanoseconds cast {0}
float cast_x = 0.0f
float cast_z = 0.0f
std::map< uint32_t, std::chrono::nanoseconds > cooldowns
 How long until each skill it's used is ready again, by its id.
std::chrono::nanoseconds respawn_time {0}
std::chrono::nanoseconds respawn {0}
float pushed_from_x = 0.0f
float pushed_from_z = 0.0f
float push_x = 0.0f
float push_z = 0.0f
std::chrono::nanoseconds pushed = kPushTime
float height = 0.0f
float rise = 0.0f
std::chrono::nanoseconds in_air {0}
std::chrono::nanoseconds steady {0}

Detailed Description

Definition at line 152 of file world.h.

Member Function Documentation

◆ boss()

bool nanommo::Monster::boss ( ) const
inline

A monster with phases is a boss.

Definition at line 229 of file world.h.

Member Data Documentation

◆ called_by

uint32_t nanommo::Monster::called_by = 0

For an add, the boss that called it up, by its id. It doesn't come back to life, and it goes once its boss is back in its first phase, at home or alive again.

Definition at line 182 of file world.h.

◆ cast

std::chrono::nanoseconds nanommo::Monster::cast {0}

Definition at line 201 of file world.h.

◆ cast_x

float nanommo::Monster::cast_x = 0.0f

Definition at line 202 of file world.h.

◆ cast_z

float nanommo::Monster::cast_z = 0.0f

Definition at line 203 of file world.h.

◆ casting

monsters::Skill nanommo::Monster::casting

While its motion is a skill's: the skill, how far into it it is, and where it stood as it started. The shape stays where it was aimed, the way the monster faced, so that players can step out of it.

Definition at line 200 of file world.h.

◆ cooldowns

std::map<uint32_t, std::chrono::nanoseconds> nanommo::Monster::cooldowns

How long until each skill it's used is ready again, by its id.

Definition at line 205 of file world.h.

◆ damage

int nanommo::Monster::damage = 0

Definition at line 163 of file world.h.

◆ evading

bool nanommo::Monster::evading = false

Whether a boss is on its way home, once nobody it was fighting is left, to start again.

Definition at line 195 of file world.h.

◆ experience

uint32_t nanommo::Monster::experience = 0

Definition at line 162 of file world.h.

◆ health

int nanommo::Monster::health = 0

Definition at line 160 of file world.h.

◆ height

float nanommo::Monster::height = 0.0f

While a blow has it in the air: how high it is, in metres, and how fast it's going up, falling, as it slows, for less than nothing. It does nothing else until it lands.

Definition at line 221 of file world.h.

◆ hit_time

std::chrono::nanoseconds nanommo::Monster::hit_time {0}

Definition at line 165 of file world.h.

◆ home_x

float nanommo::Monster::home_x = 0.0f

Definition at line 183 of file world.h.

◆ home_z

float nanommo::Monster::home_z = 0.0f

Definition at line 184 of file world.h.

◆ in_air

std::chrono::nanoseconds nanommo::Monster::in_air {0}

How long it's been in the air since it was first thrown up, and, once it's down, how long until it can be thrown again.

Definition at line 225 of file world.h.

◆ kind

uint32_t nanommo::Monster::kind = 0

By its id in the monsters file.

Definition at line 154 of file world.h.

◆ leash

float nanommo::Monster::leash = 0.0f

Definition at line 169 of file world.h.

◆ level

int nanommo::Monster::level = 1

Definition at line 159 of file world.h.

◆ max_health

int nanommo::Monster::max_health = 0

Definition at line 161 of file world.h.

◆ motion

Motion nanommo::Monster::motion = Motion::kIdle

Definition at line 158 of file world.h.

◆ phase

std::size_t nanommo::Monster::phase = 0

Definition at line 178 of file world.h.

◆ phases

std::vector<monsters::Phase> nanommo::Monster::phases

A boss's phases, and the one it's in, by its place among them. It uses that phase's skills alone.

Definition at line 177 of file world.h.

◆ prey

uint32_t nanommo::Monster::prey = 0

Definition at line 188 of file world.h.

◆ push_x

float nanommo::Monster::push_x = 0.0f

Definition at line 215 of file world.h.

◆ push_z

float nanommo::Monster::push_z = 0.0f

Definition at line 216 of file world.h.

◆ pushed

std::chrono::nanoseconds nanommo::Monster::pushed = kPushTime

Definition at line 217 of file world.h.

◆ pushed_from_x

float nanommo::Monster::pushed_from_x = 0.0f

A blow's push, which plays out over a few ticks: where it started, how far it goes, in metres, and how long it's been going. While it does, the monster thinks of nothing else, though a swing it started goes on.

Definition at line 213 of file world.h.

◆ pushed_from_z

float nanommo::Monster::pushed_from_z = 0.0f

Definition at line 214 of file world.h.

◆ reach

float nanommo::Monster::reach = 0.0f

In metres, from its kind's fight.

Definition at line 167 of file world.h.

◆ respawn

std::chrono::nanoseconds nanommo::Monster::respawn {0}

Definition at line 209 of file world.h.

◆ respawn_time

std::chrono::nanoseconds nanommo::Monster::respawn_time {0}

How long it lies dead before it comes back to life, from its kind, and while it's dead, how long until it does.

Definition at line 208 of file world.h.

◆ rest

std::chrono::nanoseconds nanommo::Monster::rest {0}

Definition at line 187 of file world.h.

◆ rise

float nanommo::Monster::rise = 0.0f

Definition at line 222 of file world.h.

◆ sight

float nanommo::Monster::sight = 0.0f

Definition at line 168 of file world.h.

◆ skills

std::vector<monsters::Skill> nanommo::Monster::skills

Its kind's skills, which it uses in place of a swing, each as soon as it's ready and the player it's fighting is within its range, the first first.

Definition at line 174 of file world.h.

◆ steady

std::chrono::nanoseconds nanommo::Monster::steady {0}

Definition at line 226 of file world.h.

◆ swing

std::chrono::nanoseconds nanommo::Monster::swing {0}

Definition at line 196 of file world.h.

◆ swing_time

std::chrono::nanoseconds nanommo::Monster::swing_time {0}

Definition at line 164 of file world.h.

◆ target_x

float nanommo::Monster::target_x = 0.0f

Definition at line 185 of file world.h.

◆ target_z

float nanommo::Monster::target_z = 0.0f

Definition at line 186 of file world.h.

◆ threat

std::map<uint32_t, int> nanommo::Monster::threat

Its threat table: how much each player who's hurt it has, by their id. It goes for whoever's hurt it most, seen or not, while they're within its leash.

Definition at line 192 of file world.h.

◆ wander

float nanommo::Monster::wander = 0.0f

Definition at line 170 of file world.h.

◆ x

float nanommo::Monster::x = 0.0f

Definition at line 155 of file world.h.

◆ yaw

float nanommo::Monster::yaw = 0.0f

Definition at line 157 of file world.h.

◆ z

float nanommo::Monster::z = 0.0f

Definition at line 156 of file world.h.


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