aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-31 15:35:08 -0400
committerPaul Gilbert2018-03-31 15:35:08 -0400
commitfa28f4cfd9a63d6342875ca1825d716e91ebc1ac (patch)
tree08682b55c352d2f404cf50d7fdcb16a8aa1e81b9 /engines
parent4c64e1607b0a9b38c893944c7064cb98b3311ee8 (diff)
downloadscummvm-rg350-fa28f4cfd9a63d6342875ca1825d716e91ebc1ac.tar.gz
scummvm-rg350-fa28f4cfd9a63d6342875ca1825d716e91ebc1ac.tar.bz2
scummvm-rg350-fa28f4cfd9a63d6342875ca1825d716e91ebc1ac.zip
XEEN: Fix to trigger correct spells when using misc items
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/spells.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/engines/xeen/spells.cpp b/engines/xeen/spells.cpp
index 2ec2e7033a..f5307504b2 100644
--- a/engines/xeen/spells.cpp
+++ b/engines/xeen/spells.cpp
@@ -93,47 +93,49 @@ void Spells::spellFailed() {
}
void Spells::castItemSpell(int itemSpellId) {
+ assert(itemSpellId != 0);
+
switch (itemSpellId) {
- case 15:
+ case 16:
if (_vm->_mode == MODE_COMBAT) {
NotWhileEngaged::show(_vm, MS_Jump);
return;
}
break;
- case 20:
+ case 21:
if (_vm->_mode == MODE_COMBAT) {
NotWhileEngaged::show(_vm, MS_WizardEye);
return;
}
break;
- case 27:
+ case 28:
if (_vm->_mode == MODE_COMBAT) {
NotWhileEngaged::show(_vm, MS_LloydsBeacon);
return;
}
break;
- case 32:
+ case 33:
frostbite2();
break;
- case 41:
+ case 42:
if (_vm->_mode == MODE_COMBAT) {
NotWhileEngaged::show(_vm, MS_Teleport);
return;
}
break;
- case 47:
+ case 48:
if (_vm->_mode == MODE_COMBAT) {
NotWhileEngaged::show(_vm, MS_SuperShelter);
return;
}
break;
- case 54:
+ case 55:
if (_vm->_mode == MODE_COMBAT) {
NotWhileEngaged::show(_vm, MS_TownPortal);
return;
}
break;
- case 57:
+ case 58:
if (_vm->_mode == MODE_COMBAT) {
NotWhileEngaged::show(_vm, MS_Etheralize);
return;
@@ -143,8 +145,8 @@ void Spells::castItemSpell(int itemSpellId) {
break;
}
- static const MagicSpell spells[73] = {
- MS_Light, MS_Awaken, MS_MagicArrow, MS_FirstAid, MS_FlyingFist,
+ static const MagicSpell spells[74] = {
+ NO_SPELL, MS_Light, MS_Awaken, MS_MagicArrow, MS_FirstAid, MS_FlyingFist,
MS_EnergyBlast, MS_Sleep, MS_Revitalize, MS_CureWounds, MS_Sparks,
MS_Shrapmetal, MS_InsectSpray, MS_ToxicCloud, MS_ProtFromElements, MS_Pain,
MS_Jump, MS_BeastMaster, MS_Clairvoyance, MS_TurnUndead, MS_Levitate,