|
Ludum Dare 29
HackSoc's entry for the Ludum Dare Jam 29
|
#include <mob.h>

Data Fields | |
| List | moblist |
| struct Level * | level |
| unsigned int | xpos |
| unsigned int | ypos |
| char | symbol |
| int | colour |
| bool | is_bold |
| List * | inventory |
| struct Item * | weapon |
| struct Item * | offhand |
| struct Item * | armour |
| void(* | turn_action )(struct Mob *) |
| void(* | death_action )(struct Mob *) |
| int | effect_duration |
| void(* | effect_action )(struct Mob *) |
| bool | hostile |
| char * | name |
| char * | race |
| char * | profession |
| int | score |
| unsigned int | attack |
| int | health |
| unsigned int | max_health |
| bool | darksight |
| unsigned int | luminosity |
| void * | data |
A mob is something which roams around the world, they are tied to a level, and all the mobs in one level form a doubly-linked list. There are a couple of callbacks associated with them to determine what happens in certain situations.
| struct Item* Mob::armour |
The armour of the mob.
| unsigned int Mob::attack |
The unarmed attack strength of the mob.
| int Mob::colour |
The colour to use to render the mob.
| bool Mob::darksight |
Whether the mob can see in the dark or not.
| void* Mob::data |
Mob type specific data, eg PlayerData
| void(* Mob::death_action)(struct Mob *) |
What to do on death.
| void(* Mob::effect_action)(struct Mob *) |
The effect to apply every turn.
| int Mob::effect_duration |
How long the current efefct will last.
| int Mob::health |
The current health, signed to prevent underflow.
| bool Mob::hostile |
A mob is hostile if the player can damage it.
| bool Mob::is_bold |
Whether to render the mob bold.
| struct Level* Mob::level |
The level the mob is in.
| unsigned int Mob::luminosity |
Number of light sources the mob is holding.
| unsigned int Mob::max_health |
The maximum health.
| List Mob::moblist |
The list of mobs to which this belongs
| char* Mob::name |
The name of the mob (may be NULL for NPC).
| struct Item* Mob::offhand |
The offhand weapon of the mob.
| char* Mob::profession |
The job of the mob (may be NULL for NPC).
| char* Mob::race |
The race of the mob (may be NULL for NPC).
| int Mob::score |
The score of the mob (ignored for NPCs).
| char Mob::symbol |
The symbol to use to render the mob.
| void(* Mob::turn_action)(struct Mob *) |
What to do every turn.
| struct Item* Mob::weapon |
The weapon of the mob.
| unsigned int Mob::xpos |
The X position.
| unsigned int Mob::ypos |
The Y position.
1.8.7