aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/spells.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-02-18 21:17:55 -0500
committerPaul Gilbert2015-02-18 21:17:55 -0500
commitda368f5e008795168daa98dace83d6510100d8bc (patch)
tree85139ab59bb35331b576a7a626d0f9c6151048bb /engines/xeen/spells.cpp
parent0f78fb9373b8c4befd727e9e56faf5d30ac59cff (diff)
downloadscummvm-rg350-da368f5e008795168daa98dace83d6510100d8bc.tar.gz
scummvm-rg350-da368f5e008795168daa98dace83d6510100d8bc.tar.bz2
scummvm-rg350-da368f5e008795168daa98dace83d6510100d8bc.zip
XEEN: Add special case spell handling during combat
Diffstat (limited to 'engines/xeen/spells.cpp')
-rw-r--r--engines/xeen/spells.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/engines/xeen/spells.cpp b/engines/xeen/spells.cpp
index 3b753bc90b..d2a2af31c0 100644
--- a/engines/xeen/spells.cpp
+++ b/engines/xeen/spells.cpp
@@ -126,13 +126,21 @@ int Spells::castSpell(Character *c, int spellId) {
} else {
// Some spells have special handling
switch (spellId) {
- case 19:
- // Enchant item
+ case 19: // Enchant item
+ case 21: // Etherialize
+ case 40: // Jump
+ case 44: // Lloyd's Beacon
+ case 66: // Super Shelter
+ case 69: // Teleport
+ case 71: // Town Portal
+ case 75: // Wizard Eye
if (_vm->_mode != MODE_COMBAT) {
- enchantItem();
+ executeSpell(spellId);
} else {
// Return the spell costs and flag that another spell can be selected
addSpellCost(*c, spellId);
+ ErrorDialog::show(_vm, Common::String::format(CANT_CAST_WHILE_ENGAGED,
+ _spellNames[spellId]));
result = -1;
}
break;