| 4277 | } |
| 4278 | |
| 4279 | void MAI_SnotSpil(int i) |
| 4280 | { |
| 4281 | int mx, my, md; |
| 4282 | MonsterStruct *Monst; |
| 4283 | |
| 4284 | if ((DWORD)i >= MAXMONSTERS) |
| 4285 | app_fatal("MAI_SnotSpil: Invalid monster %d", i); |
| 4286 | |
| 4287 | Monst = &monster[i]; |
| 4288 | if (monster[i]._mmode != MM_STAND) { |
| 4289 | return; |
| 4290 | } |
| 4291 | |
| 4292 | mx = Monst->_mx; |
| 4293 | my = Monst->_my; |
| 4294 | md = M_GetDir(i); |
| 4295 | |
| 4296 | if (Monst->mtalkmsg == QUEST_BANNER10 && !(dFlags[mx][my] & BFLAG_VISIBLE) && Monst->_mgoal == MGOAL_TALKING) { |
| 4297 | Monst->mtalkmsg = QUEST_BANNER11; |
| 4298 | Monst->_mgoal = MGOAL_INQUIRING; |
| 4299 | } |
| 4300 | |
| 4301 | if (Monst->mtalkmsg == QUEST_BANNER11 && quests[QTYPE_BOL]._qvar1 == 3) { |
| 4302 | Monst->mtalkmsg = 0; |
| 4303 | Monst->_mgoal = MGOAL_NORMAL; |
| 4304 | } |
| 4305 | |
| 4306 | if (dFlags[mx][my] & BFLAG_VISIBLE) { |
| 4307 | #ifndef SPAWN |
| 4308 | if (Monst->mtalkmsg == QUEST_BANNER12) { |
| 4309 | if (!effect_is_playing(USFX_SNOT3) && Monst->_mgoal == MGOAL_TALKING) { |
| 4310 | ObjChangeMap(setpc_x, setpc_y, setpc_x + setpc_w + 1, setpc_y + setpc_h + 1); |
| 4311 | quests[QTYPE_BOL]._qvar1 = 3; |
| 4312 | RedoPlayerVision(); |
| 4313 | Monst->_msquelch = UCHAR_MAX; |
| 4314 | Monst->mtalkmsg = 0; |
| 4315 | Monst->_mgoal = MGOAL_NORMAL; |
| 4316 | } |
| 4317 | } |
| 4318 | #endif |
| 4319 | if (quests[QTYPE_BOL]._qvar1 == 3) { |
| 4320 | if (Monst->_mgoal == MGOAL_NORMAL || Monst->_mgoal == MGOAL_SHOOT) |
| 4321 | MAI_Fallen(i); |
| 4322 | } |
| 4323 | } |
| 4324 | |
| 4325 | Monst->_mdir = md; |
| 4326 | |
| 4327 | if (monster[i]._mmode == MM_STAND) |
| 4328 | Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; |
| 4329 | } |
| 4330 | |
| 4331 | void MAI_Lazurus(int i) |
| 4332 | { |
nothing calls this directly
no test coverage detected