| 2350 | } |
| 2351 | |
| 2352 | int M_DoHeal(int i) |
| 2353 | { |
| 2354 | MonsterStruct *Monst; |
| 2355 | |
| 2356 | if ((DWORD)i >= MAXMONSTERS) |
| 2357 | app_fatal("M_DoHeal: Invalid monster %d", i); |
| 2358 | Monst = monster + i; |
| 2359 | if (monster[i]._mFlags & MFLAG_NOHEAL) { |
| 2360 | Monst->_mFlags &= ~MFLAG_ALLOW_SPECIAL; |
| 2361 | Monst->_mmode = MM_SATTACK; |
| 2362 | return FALSE; |
| 2363 | } |
| 2364 | |
| 2365 | if (Monst->_mAnimFrame == 1) { |
| 2366 | Monst->_mFlags &= ~MFLAG_LOCK_ANIMATION; |
| 2367 | Monst->_mFlags |= MFLAG_ALLOW_SPECIAL; |
| 2368 | if (Monst->_mVar1 + Monst->_mhitpoints < Monst->_mmaxhp) { |
| 2369 | Monst->_mhitpoints = Monst->_mVar1 + Monst->_mhitpoints; |
| 2370 | } else { |
| 2371 | Monst->_mhitpoints = Monst->_mmaxhp; |
| 2372 | Monst->_mFlags &= ~MFLAG_ALLOW_SPECIAL; |
| 2373 | Monst->_mmode = MM_SATTACK; |
| 2374 | } |
| 2375 | } |
| 2376 | return FALSE; |
| 2377 | } |
| 2378 | |
| 2379 | int M_DoTalk(int i) |
| 2380 | { |
no test coverage detected