ScummVM API documentation
spells_party.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef MM1_GAME_SPELLS_H
23#define MM1_GAME_SPELLS_H
24
25#include "mm/mm1/data/character.h"
26#include "mm/mm1/game/game_logic.h"
27#include "mm/mm1/messages.h"
28
29namespace MM {
30namespace MM1 {
31namespace Game {
32
33#define CATEGORY_SPELLS_COUNT 47
34#define SPELLS_COUNT (CATEGORY_SPELLS_COUNT * 2)
35
36enum SpellResult {
37 SR_SUCCESS_DONE, SR_SUCCESS_SILENT, SR_FAILED
38};
39
40extern byte FLY_MAP_ID1[20];
41extern byte FLY_MAP_ID2[20];
42extern byte FLY_MAP_X[20];
43extern byte FLY_MAP_Y[20];
44
45class SpellsParty : public GameLogic {
46 typedef SpellResult(*SpellFn)();
47private:
48 static Character *_destChar;
49private:
53 static bool isInCombat();
54
58 static void restoreHp(Character &c, uint16 hp);
59 static void restoreHp(uint16 hp);
60
64 static void addLight(int amount);
65
69 static void display(const InfoMessage &msg);
70
71private:
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();
119
120 static SpellResult wizard11_awaken() {
121 return cleric11_awaken();
122 }
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();
129 }
130 static SpellResult wizard17_location();
131 static SpellResult wizard18_sleep();
132 static SpellResult wizard21_electricArrow();
133 static SpellResult wizard22_hypnotize() {
134 return cleric28_suggestion();
135 }
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();
161 }
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();
175
176 static SpellFn SPELLS[SPELLS_COUNT];
177public:
181 static SpellResult cast(uint spell, Character *destChar);
182};
183
184} // namespace Game
185} // namespace MM1
186} // namespace MM
187
188#endif
Definition: game_logic.h:29
Definition: spells_party.h:45
static SpellResult cast(uint spell, Character *destChar)
Definition: detection.h:27
Definition: character.h:432
Definition: messages.h:134