List<aClient> players;
Monster *monsters[LEVELS][MONSTERS]; // Monsters per level. Total = MONSTERS * LEVELS
+Monster boss; // The boss monster
Monster *masters[LEVELS]; // A master for each level
int prices[WNA - 1] = {200, 1000, 3000, 10000, 30000, 100000, 150000, 200000, 400000,
1000000, 4000000, 10000000, 40000000, 100000000, 400000000};
-int webonus[WNA] = {0, 10, 15, 25, 35, 45, 65, 85, 125, 185, 255, 355, 505, 805, 1205, 1805};
-int arbonus[WNA] = {0, 1, 3, 10, 15, 25, 35, 50, 75, 100, 150, 225, 300, 400, 600, 1000};
+int webonus[WNA] = {1, 10, 15, 25, 35, 45, 65, 85, 125, 185, 255, 355, 505, 805, 1205, 1805};
+int arbonus[WNA] = {1, 2, 4, 10, 15, 25, 35, 50, 75, 100, 150, 225, 300, 400, 600, 1000};
int hpbonus[11] = {10, 15, 20, 30, 50, 75, 125, 185, 250, 350, 550};
int strbonus[11] = {5, 7, 10, 12, 20, 35, 50, 75, 110, 150, 200};
{
refreshall();
day = curday;
- save_day();
+ save_day(); // here i come to save the day!
}
if (strnicmp(cmd, "\1PING", 6) == 0)
else
display_help(source, cmd);
}
+ #ifdef DEBUGMODE
} else if (stricmp(cmd, "RAW") == 0) {
aClient *user;
char *rest = strtok(NULL, "");
raw("%s", rest);
}
+ #endif
} else {
notice(s_GameServ, source, "Unknown command \002%s\002. Type /msg %S \002HELP\002 to get a list of commands.", cmd);
}
}
else if (!(p = findplayer(name)) || !p->stats)
notice(s_GameServ, u, "Player %s not found", name);
+ else if (p->stats->user == NULL && !isAdmin(user))
+ {
+ notice(s_GameServ, u, "That player has already identified.");
+ return;
+ }
else if (!check_password(name, password) && !isAdmin(user))
{
notice(s_GameServ, u, "Password incorrect");
}
- else
- {
- if (p->stats->user && !isAdmin(user))
- {
- notice(s_GameServ, u, "That player has already identified.");
- return;
- }
- if (!user->stats)
+ else {
+ if (!user->stats)
{
ListNode<aClient> *temp;
temp = players.Find(p);
notice(s_GameServ, u, "Fatal error. Contact a(n) %S admin. buf: %s", strtok(NULL, ""));
return;
}
- else if (!(battle = findbyrealnick(nick)))
+ else if (!is_playing(ni))
{
- notice(s_GameServ, u, "You can't attack %s while they aren't playing!", nick);
+ notice(s_GameServ, u, "You are not playing!");
return;
}
- else if (!is_playing(ni))
+ else if (!(battle = findplayer(nick)))
{
- notice(s_GameServ, u, "You are not playing!");
+ notice(s_GameServ, u, "You can't attack %s while they aren't playing!", nick);
return;
}
/*
notice(s_GameServ, u, "You are dead. Wait until tomorrow to fight others!");
return;
}
+ else if (!isAlive(battle->stats))
+ {
+ notice(s_GameServ, u, "They are dead. Cannot fight dead players!");
+ return;
+ }
else if (player_fight(battle))
{
notice(s_GameServ, u, "%s is fighting %s already!", battle->stats->name, battle->stats->battle->stats->name);
notice(s_GameServ, u, "%s is fighting %s already!", battle->stats->name, battle->stats->fight->name);
return;
}
+ else if (ni->stats->level - battle->stats->level > maxbfightdistance)
+ {
+ // You can't fight someone below you by more than X level(s)
+ // level 12 can fight level (12 - X) but not < (12 - X)
+ notice(s_GameServ, u, "You may not fight %s. You're too strong!",
+ battle->stats->level);
+ return;
+ }
+ else if (battle->stats->level - ni->stats->level > maxafightdistance)
+ {
+ // You can't fight someone above you by more than X level(S)
+ // level 1 can fight level (1 + X), but not > (1 + X)
+ notice(s_GameServ, u, "%s, do you really have a death wish? Try the forest you "\
+ "weakling!", ni->stats->name);
+ return;
+ }
else if (is_playing(ni) && is_playing(battle) && stricmp(ni->stats->name, battle->stats->name) != 0)
{
// Set your battle pointer to the other player
// Initiate Battle sequence!
notice(s_GameServ, u, "You challenge %s to an online duel!", battle->stats->name);
notice(s_GameServ, battle->getNick(), "%s has challenged you to an online duel!", ni->stats->name);
- notice(s_GameServ, battle->getNick(), "%s gets to go first because he initiated!", ni->stats->name);
+ notice(s_GameServ, battle->getNick(), "%s gets to go first "\
+ "because they initiated!", ni->stats->name);
notice(s_GameServ, battle->getNick(), "Please wait while %s decides what to do.", ni->stats->name);
display_players(u);
}
return;
}
+ else if (!is_playing(user))
+ {
+ notice(s_GameServ, u, "You must be playing to run!");
+ return;
+ }
+
p = user->stats;
if (p->battle)
tempname = strtok(NULL, " ");
if (tempname)
p->inventory.setHP(stringtoint(tempname));
-
+ temp->stats->user = NULL;
players.insertAtBack(temp);
delete temp;
}