39 for (
int i = 0; i < num; i++) {
54 const char *gen_name =
"";
67 if (
HEAD(&at->clone) != &at->clone)
70 gen =
getManager()->archetypes()->first([&at] (
const auto gen) {
78 printf(
"%-16s|%6" FMT64 "|%4d|%3d|%s|%s|%s\n", at->clone.name, at->clone.stats.exp,
79 at->clone.stats.hp, at->clone.stats.ac, name, at->name, gen_name);
89 printf(
"monster,hp,dam,ac,wc,");
96 printf(
"exp,new exp\n");
102 printf(
"%s,%d,%d,%d,%d,",
107 printf(
"%d,", op->
resist[i]);
char * stringbuffer_finish(StringBuffer *sb)
Deallocate the string buffer instance and return the string.
struct archetype * arch
Pointer to archetype.
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
Describes an item, in all its details.
int64_t new_exp(const object *ob)
Alternative way to calculate experience based on the ability of a monster.
Global type definitions and header inclusions.
AssetsManager * getManager()
const char *const attacktype_desc[NROFATTACKS]
Short description of names of the attacktypes.
int16_t resist[NROFATTACKS]
Resistance adjustments for attacks.
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
sstring name
More definite name, like "generate_kobold".
object * arch_to_object(archetype *at)
Creates and returns a new object which is a copy of the given archetype.
#define QUERY_FLAG(xyz, p)
void object_free_drop_inventory(object *ob)
Frees everything allocated by an object, removes it from the list of used objects, and puts it on the list of free objects.
#define FLAG_CHANGING
Changes to other_arch when anim is done.
Archetypes * archetypes()
Get archetypes.
void print_monsters(void)
As dump_abilities(), but with an alternative way of output.
int16_t dam
How much damage this object does when hitting.
#define HEAD(op)
Returns the head part of an object.
living stats
Str, Con, Dex, etc.
static void bitstostring(long bits, int num)
Writes num ones and zeros to standard output based on the bits variable.
struct archetype * other_arch
Pointer used for various things - mostly used for what this objects turns into or what this object cr...
void dump_abilities(void)
Dump to standard out the abilities of all monsters.
int8_t ac
Armor Class, lower AC increases probability of not getting hit.
uint32_t attacktype
Bitmask of attacks this object does.
#define FLAG_MONSTER
Will attack players.
C function wrappers to interact with assets.
const char *const resist_plus[NROFATTACKS]
Attack types to show to the player.
int16_t maxhp
Max hit points.
int8_t wc
Weapon Class, lower WC increases probability of hitting.
object clone
An object from which to do object_copy()
void each(std::function< void(T *)> op)
Apply a function to each asset.