]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/c_forest.cpp
I've begun to add daily news and split up gameserv.cpp a bit
[irc/gameservirc.git] / gameserv / c_forest.cpp
index cc937ebdf558181931669883e747400520f5f42d..e2f76dce055ecd36b65b6d9a3cc298de1689677e 100644 (file)
@@ -84,7 +84,36 @@ void do_forest(char *u)
                p->master = NULL; // Just to make sure
                display_monster(u);
            }
-           else if (eventnum < 12 && eventnum >= 5) // 7% for the fountain
+           else if (eventnum < 12 && eventnum >= 10) // 2% for finding potions
+           {
+               notice(s_GameServ, u, "Fortune smiles upon thee!");
+
+               eventnum = 1 + rand() % 4;
+               switch(eventnum)
+               {
+                   case 1:
+                       notice(s_GameServ, u,
+                       "You have found an HP Potion!");
+                       p->inventory.incHP();
+                       break;
+                   case 2:
+                       notice(s_GameServ, u,
+                       "You have found a Strength Potion!");
+                       p->inventory.incStrength();
+                       break;
+                   case 3:
+                       notice(s_GameServ, u,
+                       "You have found a Defense Potion!");
+                       p->inventory.incDefense();
+                       break;
+                   case 4:
+                       notice(s_GameServ, u,
+                       "You have found a Healing Potion!");
+                       p->inventory.incHealing();
+                       break;
+               }
+           }
+           else if (eventnum < 10 && eventnum >= 5) // 5% for the fountain
            {
                if (p->hp < p->maxhp)
                {