diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 14:50:36 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 15:28:27 +0200 |
commit | a01f15e08da3b2e0e326b2a94100e17962136741 (patch) | |
tree | fa07a987e816cc752f909b689e2118f6c963c3b3 /src/types.h | |
parent | 41b6617e992d3fedda4c0a93ddd0fa4ad834a2ae (diff) |
Lua: Refactor all the corruption code into C
Diffstat (limited to 'src/types.h')
-rw-r--r-- | src/types.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/types.h b/src/types.h index de90a019..cd08476a 100644 --- a/src/types.h +++ b/src/types.h @@ -1807,7 +1807,7 @@ struct player_type u32b xtra_esp; /* Corruptions */ - bool_ *corruptions; + bool_ corruptions[CORRUPTIONS_MAX]; bool_ corrupt_anti_teleport_stopped; /*** Pet commands ***/ @@ -2583,3 +2583,21 @@ struct module_type } skills; }; + +/** + * Corruptions + */ +typedef struct corruption_type corruption_type; +struct corruption_type +{ + int modules[3]; /* Modules where this corruption is available; terminated with -1 entry */ + byte color; + cptr group; + cptr name; + cptr get_text; + cptr lose_text; /* If NULL, the corruption is NOT removable by any means */ + cptr desc; + s16b depends[5]; /* terminated by a -1 entry */ + s16b opposes[5]; /* terminated by a -1 entry */ + void (*gain_callback)(); /* callback to invoke when gained */ +}; |