]>
jfr.im git - irc/gameservirc.git/blob - gameserv/c_forest.cpp
7 void do_forest(char *u
);
10 void forest(char *source
, char *buf
)
12 char *cmd
= strtok(buf
, " ");
19 if (stricmp(cmd
, "SEARCH") == 0)
22 } else if (stricmp(cmd
, "ATTACK") == 0) {
24 } else if (stricmp(cmd
, "HEAL") == 0) {
31 void do_forest(char *u
)
36 int num
= rand() % 12;
42 notice(s_GameServ
, u
, "You must be playing the game to search the forest!");
46 if (source
->stats
->forest_fights
<= 0)
48 notice(s_GameServ
, u
, "You are out of forest fights for the day. Wait "\
52 else if (isnt_fighting(u
))
54 Player
*ni
= source
->stats
;
56 ni
->fight
= &monsters
[ni
->level
- 1][num
];
57 notice(s_GameServ
, u
, "You search the forest for something to kill...");
58 notice(s_GameServ
, u
, "You have found \ 2%s\ 2!", ni
->fight
->name
);
59 ni
->fight
->hp
= ni
->fight
->maxhp
;
63 else if (is_fighting(u
))
65 notice(s_GameServ
, u
, "You want to fight two monsters at once?");