MCPcopy Create free account
hub / github.com/NetHack/NetHack / check_mongen_order

Function check_mongen_order

src/makemon.c:1782–1802  ·  view source on GitHub ↗

check that monsters are in correct difficulty order for mkclass() */

Source from the content-addressed store, hash-verified

1780staticfn void check_mongen_order(void);
1781/* check that monsters are in correct difficulty order for mkclass() */
1782staticfn void
1783check_mongen_order(void)
1784{
1785 int i, diff = 0;
1786 char mlet = '\0';
1787 for (i = LOW_PM; i < SPECIAL_PM; i++) {
1788 if (i != mongen_order[i]) {
1789 debugpline2("changed:%s=>%s", mons[i].pmnames[NEUTRAL], mons[mongen_order[i]].pmnames[NEUTRAL]);
1790 }
1791
1792 if (mlet == mons[mongen_order[i]].mlet) {
1793 if (mons[mongen_order[i]].difficulty < diff)
1794 debugpline1("%s", mons[mongen_order[i]].pmnames[NEUTRAL]);
1795 diff = mons[mongen_order[i]].difficulty;
1796 }
1797 if (!mlet || mlet != mons[mongen_order[i]].mlet) {
1798 mlet = mons[mongen_order[i]].mlet;
1799 diff = 0;
1800 }
1801 }
1802}
1803#endif
1804
1805/* initialize monster order for mkclass */

Callers 1

init_mongen_orderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected