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

Function PlaceUniques

Source/monster.cpp:994–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

992
993#ifndef SPAWN
994void PlaceUniques()
995{
996 int u, mt;
997 BOOL done;
998
999 for (u = 0; UniqMonst[u].mtype != -1; u++) {
1000 if (UniqMonst[u].mlevel != currlevel)
1001 continue;
1002 done = FALSE;
1003 for (mt = 0; mt < nummtypes; mt++) {
1004 if (done)
1005 break;
1006 done = (Monsters[mt].mtype == UniqMonst[u].mtype);
1007 }
1008 mt--;
1009 if (u == UMT_GARBUD && quests[QTYPE_GARB]._qactive == 0)
1010 done = FALSE;
1011 if (u == UMT_ZHAR && quests[QTYPE_ZHAR]._qactive == 0)
1012 done = FALSE;
1013 if (u == UMT_SNOTSPIL && quests[QTYPE_BOL]._qactive == 0)
1014 done = FALSE;
1015 if (u == UMT_LACHDAN && quests[QTYPE_VEIL]._qactive == 0)
1016 done = FALSE;
1017 if (u == UMT_WARLORD && quests[QTYPE_WARLRD]._qactive == 0)
1018 done = FALSE;
1019 if (done)
1020 PlaceUniqueMonst(u, mt, 8);
1021 }
1022}
1023
1024void SetMapMonsters(BYTE *pMap, int startx, int starty)
1025{

Callers 1

InitMonstersFunction · 0.85

Calls 1

PlaceUniqueMonstFunction · 0.85

Tested by

no test coverage detected