diff options
author | Paul Gilbert | 2018-01-16 22:42:14 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-01-16 22:42:14 -0500 |
commit | 2410da08f793b711252e4cffdc2df5334b644658 (patch) | |
tree | d07693721d263e348b517c06831778618f42d813 /engines/xeen/debugger.cpp | |
parent | 9518fd7210a371ded3a482acbcb34777fd6dd51c (diff) | |
download | scummvm-rg350-2410da08f793b711252e4cffdc2df5334b644658.tar.gz scummvm-rg350-2410da08f793b711252e4cffdc2df5334b644658.tar.bz2 scummvm-rg350-2410da08f793b711252e4cffdc2df5334b644658.zip |
XEEN: Add spells debugger command to give party all the spells
Diffstat (limited to 'engines/xeen/debugger.cpp')
-rw-r--r-- | engines/xeen/debugger.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/xeen/debugger.cpp b/engines/xeen/debugger.cpp index 68d2c0cbd4..24cb947ef4 100644 --- a/engines/xeen/debugger.cpp +++ b/engines/xeen/debugger.cpp @@ -47,6 +47,7 @@ static int strToInt(const char *s) { Debugger::Debugger(XeenEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("continue", WRAP_METHOD(Debugger, cmdExit)); registerCmd("spell", WRAP_METHOD(Debugger, cmdSpell)); + registerCmd("spells", WRAP_METHOD(Debugger, cmdSpells)); registerCmd("dump", WRAP_METHOD(Debugger, cmdDump)); registerCmd("gold", WRAP_METHOD(Debugger, cmdGold)); registerCmd("gems", WRAP_METHOD(Debugger, cmdGems)); @@ -87,6 +88,19 @@ bool Debugger::cmdSpell(int argc, const char **argv) { return true; } +bool Debugger::cmdSpells(int argc, const char **argv) { + Party &party = *_vm->_party; + + for (uint charIdx = 0; charIdx < party._activeParty.size(); ++charIdx) { + Character &c = party._activeParty[charIdx]; + Common::fill(c._spells, c._spells + MAX_SPELLS_PER_CLASS, true); + c._currentSp = 500; + } + + party._gems += 500; + return false; +} + bool Debugger::cmdDump(int argc, const char **argv) { File f; |