Daemon damage_d

Documentation for the daemons-damage_d daemon in /daemons/damage_d.c.

Module Information

Damage daemon

To store list of valid damage types, so weapons and armours check against the list (from M_DAMAGE_SOURCE and M_DAMAGE_SINK)

Currently, this daemon reads the config file /data/config/damage-types at start up, so modify this file to add/remove data from this daemon permanently.

This daemon handles special attacks from weapons as well. It needs more documentation.

Functions

void add_damage_type(string t)

Add a damage type to the known damage types.

void remove_short_name(string type)

Removed a short name.

mapping query_short_names()

Returns a mapping of all known short names.

string *query_special_damage_types()

Returns a string array of special damage types

void remove_damage_type(string t)

Removes a damage type.

void clear_damage_types()

Removed all damage types from the daemon.

string *query_damage_types()

Returns a string array copy of all known damage types.

int query_valid_damage_type(string str)

Returns 1 if the type is a valid damage type.

void add_special_attks(string t, string *specs)

Add special attacks of type t with a string array specs.

void load_config_from_file()

Loads the config from /data/config/damage-types. Saves the daemon after load.

File generated by Lima 1.1a4 reStructured Text daemon.