1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
|
#include "spelllist.h"
#define PrintMsg(msg) (log_text(self, msg),\
self->callbacks.proc_PrintMsg)((msg), self,\
(self->rock))
#define PrintMsg2(person, msg1, msgelse) (log_text(self, msgelse),\
self->callbacks.proc_PrintMsg2)((person), (msg1),\
(msgelse), self, (self->rock))
#define PrintMsg3(person1, person2, msg1, msg2, msgelse) (log_text(self, msgelse),\
self->callbacks.proc_PrintMsg3)((person1), (person2),\
(msg1), (msg2), (msgelse), self, (self->rock))
#define Queries(numqueries, querylist) (setup_targetlist(self),\
(self->callbacks.proc_Queries)((numqueries),\
(querylist), self, (self->rock)))
#define MAXSPELLCHOICES (16) /* max number of spells that could possibly be
invoked with one gesture */
struct target {
char *name;
int index;
long stuff;
};
struct realgame {
struct interface callbacks;
char *rock;
int numplayers;
int turn;
int turntype;
int turnactive[MAXPLAYERS];
char *gamelog;
int gamelog_pos;
int gamelog_size;
struct wizard *wiz[MAXPLAYERS];
struct creature *cre;
int numcres, cre_size;
struct query *querylist;
int querylist_size;
int numqueries;
int numtargets[3];
struct target *targetlist[3];
int targetlist_size[3];
struct castspell *castlist, *hastelist;
/* per-round data */
int fl_icestorm, fl_firestorm, fl_dispelmagic;
int blind_array;
};
struct wizgesture {
int did[2];
int invisible; /* was invisible for this move? */
int blind; /* bit-array -- who was blind this move? */
int turnnum, log_hp;
};
struct permstats {
int mind_spell, mind_detail;
int fl_haste;
int fl_prot_evil;
int fl_resist_heat;
int fl_resist_cold;
int fl_blindness;
int fl_invisibility;
};
struct wizard {
int alive;
int hitpoints, max_hitpoints;
int resistant_heat, resistant_cold, prot_from_evil, haste, timestop;
int invisibility, blindness;
int poison_time, disease_time;
int mind_spell, mind_caster;
struct permstats perm;
char *name;
int gender;
/* per-round */
int zaplist[NUMSPELLS];
int enchant_caster, raisedead_caster, enchant_ppend;
int fl_resist_heat, fl_resist_cold;
int fl_resist_icestorm; /* due to fireball hits */
int numgests;
int gests_size;
struct wizgesture *gests;
int surrendered;
int fl_cast_lightning;
int hand_paralyzed;
int perm_time, delay_time;
int delay_bank;
int foundlist[NUMSPELLS];
int llist[MAXSPELLCHOICES], rlist[MAXSPELLCHOICES];
};
struct creature {
int alive;
int hitpoints, max_hitpoints;
int resistant_heat, resistant_cold, prot_from_evil, haste, timestop;
int invisibility, blindness;
int poison_time, disease_time;
int mind_spell, mind_caster;
struct permstats perm;
char *name;
int gender;
/* per-round */
int zaplist[NUMSPELLS];
int enchant_caster, raisedead_caster, enchant_ppend;
int fl_resist_heat, fl_resist_cold;
int fl_resist_icestorm; /* due to fireball hits */
int type;
int nocorpse;
int owner;
int last_target, last_targettype;
int nowm_spell, nowm_caster;
};
union being {
struct {
int alive;
int hitpoints, max_hitpoints;
int resistant_heat, resistant_cold, prot_from_evil, haste, timestop;
int invisibility, blindness;
int poison_time, disease_time;
int mind_spell, mind_caster;
struct permstats perm;
char *name;
int gender;
/* per-round */
int zaplist[NUMSPELLS];
int enchant_caster, raisedead_caster, enchant_ppend;
int fl_resist_heat, fl_resist_cold;
int fl_resist_icestorm; /* due to fireball hits */
} both;
struct wizard wiz;
struct creature cre;
};
#define MASK_LEFT (1)
#define MASK_RIGHT (2)
#define MASK_TWOHAND (4)
struct castspell {
int caster;
int handage;
int spellnum;
int target;
int targettype; /* QuVal_Target_*, or 0 for nobody, or (-1) for no target required */
int permanent;
int rock;
struct castspell *next;
};
#define Creature_GOBLIN (1)
#define Creature_OGRE (2)
#define Creature_TROLL (3)
#define Creature_GIANT (4)
#define Creature_ICEL (5)
#define Creature_FIREL (6)
extern void setup_targetlist(); /* needed if Queries() is to be used */
|