diff options
author | athrxx | 2011-08-01 22:50:51 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-12-26 16:18:13 +0100 |
commit | 48f83b7bb48a1625f6c195e396f8d40047f50915 (patch) | |
tree | 28c3ae68ed7df09ddc1c2cbf9d083b31f7415660 /engines/kyra/magic_eob.cpp | |
parent | 84900e8e50df8490fbdebc3acb25a338949f2de9 (diff) | |
download | scummvm-rg350-48f83b7bb48a1625f6c195e396f8d40047f50915.tar.gz scummvm-rg350-48f83b7bb48a1625f6c195e396f8d40047f50915.tar.bz2 scummvm-rg350-48f83b7bb48a1625f6c195e396f8d40047f50915.zip |
KYRA: (EOB) - implement npc sequences and fix some bugs
Diffstat (limited to 'engines/kyra/magic_eob.cpp')
-rw-r--r-- | engines/kyra/magic_eob.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/kyra/magic_eob.cpp b/engines/kyra/magic_eob.cpp index f828625dbb..70e4892342 100644 --- a/engines/kyra/magic_eob.cpp +++ b/engines/kyra/magic_eob.cpp @@ -555,11 +555,11 @@ bool EobCoreEngine::magicObjectDamageHit(EobFlyingObject *fo, int dcTimes, int d bool EobCoreEngine::magicObjectStatusHit(EobMonsterInPlay *m, int type, bool tryEvade, int mod) { EobMonsterProperty *p = &_monsterProps[m->type]; if (tryEvade) { - if (tryMonsterAttackEvasion(m) || (p->capsFlags & 0x10)) + if (tryMonsterAttackEvasion(m) || (p->immunityFlags & 0x10)) return true; } - if (checkUnkConstModifiers(m, 0, p->level, mod, 6)) + if (checkMonsterLevelConstModifiers(m, 0, p->level, mod, 6)) return false; int para = 0; @@ -569,7 +569,7 @@ bool EobCoreEngine::magicObjectStatusHit(EobMonsterInPlay *m, int type, bool try case 1: case 2: para = (type == 0) ? ((p->typeFlags & 1) ? 1 : 0) : ((type == 1) ? ((p->typeFlags & 2) ? 1 : 0) : 1); - if (para && !(p->statusFlags & 2)) { + if (para && !(p->immunityFlags & 2)) { m->mode = 10; m->spellStatusLeft = 15; } @@ -577,7 +577,7 @@ bool EobCoreEngine::magicObjectStatusHit(EobMonsterInPlay *m, int type, bool try break; case 3: - if (!(p->statusFlags & 8)) + if (!(p->immunityFlags & 8)) inflictMonsterDamage(m, 1000, true); break; @@ -591,12 +591,11 @@ bool EobCoreEngine::magicObjectStatusHit(EobMonsterInPlay *m, int type, bool try break; case 6: - if (!(p->statusFlags & 4) && m->mode != 7 && m->mode != 8 && m->mode != 10) { + if (!(_flags.gameID == GI_EOB1 && !(p->typeFlags & 3)) && !(p->immunityFlags & 4) && m->mode != 7 && m->mode != 8 && m->mode != 10) { m->mode = 0; m->spellStatusLeft = 20; - para = (getNextMonsterDirection(m->block, _currentBlock) ^ 4) >> 1; m->flags |= 8; - walkMonsterNextStep(m, -1, para); + walkMonsterNextStep(m, -1, (getNextMonsterDirection(m->block, _currentBlock) ^ 4) >> 1); } break; |