]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/c_forest.cpp
Tweaked the monsters data files to not include number values because they're now...
[irc/gameservirc.git] / gameserv / c_forest.cpp
index e2f76dce055ecd36b65b6d9a3cc298de1689677e..053fdc08d5167eb6172ae448aaa997381cdd28ea 100644 (file)
@@ -36,9 +36,6 @@ void do_forest(char *u)
 {
     aClient *source;
 
-    int num = rand() % 12;
-
-
     if (!(source = find(u)))
     {
        notice(s_GameServ, u, "Fatal Error in do_forest. Contact a %S admin for help.");
@@ -75,7 +72,7 @@ void do_forest(char *u)
            // 88% of forest searching turns up a monster
            if (eventnum >= 12)
            {
-               p->fight = new Monster(monsters[p->level - 1][num]);
+               p->fight = new Monster(levels[p->level - 1].randomMonster());
                notice(s_GameServ, u, "You have found \ 2%s\ 2!", p->fight->name);
                if (p->fight->hp < p->fight->maxhp)
                    p->fight->hp = p->fight->maxhp;
@@ -134,6 +131,7 @@ void do_forest(char *u)
                if (p->gold == 0)
                {
                    notice(s_GameServ, u, "Too bad you're broke. Guess you won't be having any wishes answered today.");
+                   p->forest_fights++;
                    return;
                }
                long newstats;