22 #ifndef MM1_GAME_SPELLS_H 23 #define MM1_GAME_SPELLS_H 25 #include "mm/mm1/data/character.h" 26 #include "mm/mm1/game/game_logic.h" 27 #include "mm/mm1/messages.h" 33 #define CATEGORY_SPELLS_COUNT 47 34 #define SPELLS_COUNT (CATEGORY_SPELLS_COUNT * 2) 37 SR_SUCCESS_DONE, SR_SUCCESS_SILENT, SR_FAILED
40 extern byte FLY_MAP_ID1[20];
41 extern byte FLY_MAP_ID2[20];
42 extern byte FLY_MAP_X[20];
43 extern byte FLY_MAP_Y[20];
46 typedef SpellResult(*SpellFn)();
53 static bool isInCombat();
58 static void restoreHp(
Character &c, uint16 hp);
59 static void restoreHp(uint16 hp);
64 static void addLight(
int amount);
72 static SpellResult cleric11_awaken();
73 static SpellResult cleric12_bless();
74 static SpellResult cleric13_blind();
75 static SpellResult cleric14_firstAid();
76 static SpellResult cleric15_light();
77 static SpellResult cleric16_powerCure();
78 static SpellResult cleric17_protectionFromFear();
79 static SpellResult cleric18_turnUndead();
80 static SpellResult cleric21_cureWounds();
81 static SpellResult cleric22_heroism();
82 static SpellResult cleric23_pain();
83 static SpellResult cleric24_protectionFromCold();
84 static SpellResult cleric25_protectionFromIce();
85 static SpellResult cleric26_protectionFromPoison();
86 static SpellResult cleric27_silence();
87 static SpellResult cleric28_suggestion();
88 static SpellResult cleric31_createFood();
89 static SpellResult cleric32_cureBlindness();
90 static SpellResult cleric33_cureParalysis();
91 static SpellResult cleric34_lastingLight();
92 static SpellResult cleric35_produceFlame();
93 static SpellResult cleric36_produceFrost();
94 static SpellResult cleric37_removeQuest();
95 static SpellResult cleric38_walkOnWater();
96 static SpellResult cleric41_cureDisease();
97 static SpellResult cleric42_neutralizePoison();
98 static SpellResult cleric43_protectionFromAcid();
99 static SpellResult cleric44_protectionFromElectricity();
100 static SpellResult cleric45_restoreAlignment();
101 static SpellResult cleric46_summonLightning();
102 static SpellResult cleric47_superHeroism();
103 static SpellResult cleric48_surface();
104 static SpellResult cleric51_deadlySwarm();
105 static SpellResult cleric52_dispelMagic();
106 static SpellResult cleric53_paralyze();
107 static SpellResult cleric54_removeCondition();
108 static SpellResult cleric55_restoreEnergy();
109 static SpellResult cleric61_moonRay();
110 static SpellResult cleric62_raiseDead();
111 static SpellResult cleric63_rejuvinate();
112 static SpellResult cleric64_stoneToFlesh();
113 static SpellResult cleric65_townPortal();
114 static SpellResult cleric71_divineIntervention();
115 static SpellResult cleric72_holyWord();
116 static SpellResult cleric73_protectionFromElements();
117 static SpellResult cleric74_resurrection();
118 static SpellResult cleric75_sunRay();
120 static SpellResult wizard11_awaken() {
121 return cleric11_awaken();
123 static SpellResult wizard12_detectMagic();
124 static SpellResult wizard13_energyBlast();
125 static SpellResult wizard14_flameArrow();
126 static SpellResult wizard15_leatherSkin();
127 static SpellResult wizard16_light() {
128 return cleric15_light();
130 static SpellResult wizard17_location();
131 static SpellResult wizard18_sleep();
132 static SpellResult wizard21_electricArrow();
133 static SpellResult wizard22_hypnotize() {
134 return cleric28_suggestion();
136 static SpellResult wizard23_identifyMonster();
137 static SpellResult wizard24_jump();
138 static SpellResult wizard25_levitate();
139 static SpellResult wizard26_power();
140 static SpellResult wizard27_quickness();
141 static SpellResult wizard28_scare();
142 static SpellResult wizard31_fireball();
143 static SpellResult wizard32_fly();
144 static SpellResult wizard33_invisibility();
145 static SpellResult wizard34_lightningBolt();
146 static SpellResult wizard35_makeRoom();
147 static SpellResult wizard36_slow();
148 static SpellResult wizard37_weaken();
149 static SpellResult wizard38_web();
150 static SpellResult wizard41_acidArrow();
151 static SpellResult wizard42_coldBeam();
152 static SpellResult wizard43_feebleMind();
153 static SpellResult wizard44_freeze();
154 static SpellResult wizard45_guardDog();
155 static SpellResult wizard46_psychicProtection();
156 static SpellResult wizard47_shield();
157 static SpellResult wizard48_timeDistortion();
158 static SpellResult wizard51_acidRain();
159 static SpellResult wizard52_dispelMagic() {
160 return cleric52_dispelMagic();
162 static SpellResult wizard53_fingerOfDeath();
163 static SpellResult wizard54_shelter();
164 static SpellResult wizard55_teleport();
165 static SpellResult wizard61_dancingSword();
166 static SpellResult wizard62_disintegration();
167 static SpellResult wizard63_etherialize();
168 static SpellResult wizard64_protectionFromMagic();
169 static SpellResult wizard65_rechargeItem();
170 static SpellResult wizard71_astralSpell();
171 static SpellResult wizard72_duplication();
172 static SpellResult wizard73_meteorShower();
173 static SpellResult wizard74_powerShield();
174 static SpellResult wizard75_prismaticLight();
176 static SpellFn SPELLS[SPELLS_COUNT];
Definition: detection.h:27
Definition: game_logic.h:29
Definition: character.h:432
Definition: messages.h:129
static SpellResult cast(uint spell, Character *destChar)
Definition: spells_party.h:45