22 #ifndef ULTIMA4_GAME_SPELL_H 23 #define ULTIMA4_GAME_SPELL_H 25 #include "ultima/ultima4/game/context.h" 26 #include "ultima/ultima4/map/location.h" 27 #include "ultima/ultima4/map/map.h" 28 #include "ultima/ultima4/filesys/savegame.h" 29 #include "ultima/ultima4/sound/sound.h" 49 enum EnergyFieldType {
52 ENERGYFIELD_LIGHTNING,
63 bool addReagent(Reagent reagent);
64 bool removeReagent(Reagent reagent);
65 int getReagent(Reagent reagent)
const;
67 bool checkMultiple(
int mixes)
const;
68 void multiply(
int mixes);
71 unsigned short _reagents[REAG_MAX];
75 typedef int (
Spells::*SpellProc)(int);
95 LocationContext _context;
96 TransportContext _transportContext;
102 typedef void (*SpellEffectCallback)(
int spell,
int player, Sound sound);
107 static const Spell SPELL_LIST[N_SPELLS];
108 SpellEffectCallback spellEffectCallback;
110 int spellAwaken(
int player);
111 int spellBlink(
int dir);
112 int spellCure(
int player);
113 int spellDispel(
int dir);
114 int spellEField(
int param);
115 int spellFireball(
int dir);
116 int spellGate(
int phase);
117 int spellHeal(
int player);
118 int spellIceball(
int dir);
119 int spellJinx(
int unused);
120 int spellKill(
int dir);
121 int spellLight(
int unused);
122 int spellMMissle(
int dir);
123 int spellNegate(
int unused);
124 int spellOpen(
int unused);
125 int spellProtect(
int unused);
126 int spellRez(
int player);
127 int spellQuick(
int unused);
128 int spellSleep(
int unused);
129 int spellTremor(
int unused);
130 int spellUndead(
int unused);
131 int spellView(
int unsued);
132 int spellWinds(
int fromdir);
133 int spellXit(
int unused);
134 int spellYup(
int unused);
135 int spellZdown(
int unused);
142 void spellMagicAttack(
const Common::String &tilename, Direction dir,
int minDamage,
int maxDamage);
143 bool spellMagicAttackAt(
const Coords &coords,
MapTile attackTile,
int attackDamage);
145 LocationContext spellGetContext(uint spell)
const;
146 TransportContext spellGetTransportContext(uint spell)
const;
151 bool isDebuggerActive()
const;
163 void spellSetEffectCallback(SpellEffectCallback callback);
165 void spellEffect(
int spell,
int player, Sound sound) {
166 (spellEffectCallback)(spell, player, sound);
173 int spellMix(uint spell,
const Ingredients *ingredients);
179 bool spellCast(uint spell,
int character,
int param, SpellCastError *
error,
bool spellEffect);
181 Common::String spellGetErrorMessage(uint spell, SpellCastError error);
183 const char *spellGetName(uint spell)
const;
190 SpellCastError spellCheckPrerequisites(uint spell,
int character);
192 int spellGetRequiredMP(uint spell)
const;
193 const Spell *getSpell(
int i)
const;
invert the screen (moongates, most normal spells)
Definition: spell.h:89
None.
Definition: spell.h:79
Definition: detection.h:27
Definition: combat_controller.h:59
Definition: map_tile.h:34
Param
Definition: spell.h:78
number of a player required
Definition: spell.h:80
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
type of field and direction required (energy field)
Definition: spell.h:82
none
Definition: spell.h:88
SpecialEffects
Definition: spell.h:87
phase required (gate)
Definition: spell.h:83
direction required
Definition: spell.h:81