MCPcopy Create free account
hub / github.com/diasurgical/devilution / MAI_Lazurus

Function MAI_Lazurus

Source/monster.cpp:4331–4381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4329}
4330
4331void MAI_Lazurus(int i)
4332{
4333 int mx, my, md;
4334 MonsterStruct *Monst;
4335
4336 if ((DWORD)i >= MAXMONSTERS)
4337 app_fatal("MAI_Lazurus: Invalid monster %d", i);
4338
4339 Monst = &monster[i];
4340 if (monster[i]._mmode != MM_STAND) {
4341 return;
4342 }
4343
4344 mx = Monst->_mx;
4345 my = Monst->_my;
4346 md = M_GetDir(i);
4347 if (dFlags[mx][my] & BFLAG_VISIBLE) {
4348 if (gbMaxPlayers == 1) {
4349 if (Monst->mtalkmsg == QUEST_VILE13 && Monst->_mgoal == MGOAL_INQUIRING && plr[myplr].WorldX == QUEST_VILE13 && plr[myplr].WorldY == 46) {
4350 PlayInGameMovie("gendata\\fprst3.smk");
4351 Monst->_mmode = MM_TALK;
4352 quests[QTYPE_VB]._qvar1 = 5;
4353 }
4354
4355#ifndef SPAWN
4356 if (Monst->mtalkmsg == QUEST_VILE13 && !effect_is_playing(USFX_LAZ1) && Monst->_mgoal == MGOAL_TALKING) {
4357 ObjChangeMapResync(1, 18, 20, 24);
4358 RedoPlayerVision();
4359 Monst->_msquelch = UCHAR_MAX;
4360 Monst->mtalkmsg = 0;
4361 quests[QTYPE_VB]._qvar1 = 6;
4362 Monst->_mgoal = MGOAL_NORMAL;
4363 }
4364#endif
4365 }
4366
4367 if (gbMaxPlayers != 1 && Monst->mtalkmsg == QUEST_VILE13 && Monst->_mgoal == MGOAL_INQUIRING && quests[QTYPE_VB]._qvar1 <= 3) {
4368 Monst->_mmode = MM_TALK;
4369 }
4370 }
4371
4372 if (Monst->_mgoal == MGOAL_NORMAL || Monst->_mgoal == MGOAL_RETREAT || Monst->_mgoal == MGOAL_MOVE) {
4373 Monst->mtalkmsg = 0;
4374 MAI_Counselor(i);
4375 }
4376
4377 Monst->_mdir = md;
4378
4379 if (monster[i]._mmode == MM_STAND || monster[i]._mmode == MM_TALK)
4380 Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md];
4381}
4382
4383void MAI_Lazhelp(int i)
4384{

Callers

nothing calls this directly

Calls 7

app_fatalFunction · 0.85
M_GetDirFunction · 0.85
PlayInGameMovieFunction · 0.85
effect_is_playingFunction · 0.85
ObjChangeMapResyncFunction · 0.85
RedoPlayerVisionFunction · 0.85
MAI_CounselorFunction · 0.85

Tested by

no test coverage detected