From: kainazzzo Date: Fri, 7 May 2004 19:16:11 +0000 (+0000) Subject: Began to add the end boss X-Git-Url: https://jfr.im/git/irc/gameservirc.git/commitdiff_plain/fcca861d3ff05d1044dc81860225072b6fb11892?hp=a5a4c626a5db031e7fb875115e3ff061997747c9 Began to add the end boss git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@205 bc333340-6410-0410-a689-9d09f3c113fa --- diff --git a/gameserv/Changes b/gameserv/Changes index af61000..87e63ef 100644 --- a/gameserv/Changes +++ b/gameserv/Changes @@ -1,4 +1,5 @@ Version 1.2.3 +* Doubled the required experience for fighting masters - kain * Fixed a cosmetic bug (sorta) that caused your HP not to read 0 when you're dead (thanks Ricky-S) - kain * Fixed a divide by 0 bug that occurred when you attacked, but had no diff --git a/gameserv/TODO b/gameserv/TODO index 19f8561..38e76e4 100644 --- a/gameserv/TODO +++ b/gameserv/TODO @@ -8,7 +8,7 @@ X = Finsihed * Add a function to check how long until gameserv refreshes -* Gangs of people that can get together and fight other gangs in large +- Gangs of people that can get together and fight other gangs in large group battles - gang names - gangs.dat file with numbers assigned to gangs @@ -16,6 +16,8 @@ X = Finsihed aClient structure based on their gang number - group battles would go on order of gang numbers - hired mercenaries (npcs)- ricky-s + - level 3 and above can be gangs only - macblind + - once you beat the game, you can create a gang - kain * Make config file accept hostnames not just ips diff --git a/gameserv/gameserv.cpp b/gameserv/gameserv.cpp index a9b5a5c..5d9b56b 100644 --- a/gameserv/gameserv.cpp +++ b/gameserv/gameserv.cpp @@ -111,6 +111,7 @@ void do_register(char *u); void do_list(char *u); void do_logout(char *u); void do_master(char *u); +void do_dragon(char *u); void do_play(char *u); void do_quitg(char *u); void do_reset(char *u); @@ -207,6 +208,8 @@ void gameserv(char *source, char *buf) do_inventory(source); } else if (stricmp(cmd, "MASTER") == 0) { do_master(source); + } else if (stricmp(cmd, "DRAGON") == 0) { + do_dragon(source); } else if (stricmp(cmd, "STORE") == 0) { do_store(source); } else if (stricmp(cmd, "BANK") == 0) { @@ -2699,6 +2702,69 @@ void do_bank(char *u) } +void do_dragon(char *u) +{ + aClient *user; + + if (!(user = find(u))) + { + notice(s_GameServ, u, "Fatal error. Contact a(n) %S admin. buf: %s", strtok(NULL, "")); + return; + } + else if (isIgnore(user)) + { + #ifdef DEBUGMODE + log("Ignoring %s.", user->getNick()); + #endif + return; + } + else if (!is_playing(user)) + { + notice(s_GameServ, u, "You must be playing to fight the dragon!"); + return; + } + else if (is_fighting(user)) + { + notice(s_GameServ, u, "You are already in a fight. How will you fight the almighty dragon!?"); + return; + } + else if (!isAlive(user->stats)) + { + notice(s_GameServ, u, "You're dead. Wait until tomorrow to see your master!"); + return; + } + else if (user->stats->level < 12) + { + notice(s_GameServ, u, "You fool! Only those strong enough "\ + "to vanquish any foe should DARE fight the dragon!"); + notice(s_GameServ, u, "To put it in terms you can understand: "\ + "You are too weak. You must be Level 12!"); + } + + updateTS(user->stats); + + char *cmd = strtok(NULL, " "); + Player *p = user->stats; + p->fight = new Monster(boss); + notice(s_GameServ, u, "You approach the dragon's lair cautiously."); + notice(s_GameServ, u, "The stench of sulfer fills the air as a "\ + "deep, red fog rolls in. The air is filled with the "\ + "heated mist of deadly fire from beyond the cave "\ + "entrance."); + notice(s_GameServ, u, "You adjust your %s, tighten your grip on "\ + "your %s, and venture into the hot, dark cave. "\ + "You are surprised at the angle of descent as you climb "\ + "lower and lower, deeper into the dragon's den."); + notice(s_GameServ, u, "You come to the end of the cave to find "\ + "a tooth. It is a large tooth... bigger than your torso."\ + " Suddenly the darkness lifts from the gleam of an eye "\ + " staring into your soul! The eye is large... HUGE!"); + notice(s_GameServ, u, "Just then you notice the eye begin to "\ + "glare orange! The tooth is moving... but it is still too "\ + "dark for you to make out.... THE DRAGON! You see it!"); + display_monsters(u); +} + void do_master(char *u) { aClient *user; @@ -2749,41 +2815,42 @@ void do_master(char *u) switch(p->level) { case 1: - need = 100; + need = 200; break; case 2: - need = 400; + need = 800; break; case 3: - need = 1000; + need = 2000; break; case 4: - need = 4000; + need = 8000; break; case 5: - need = 10000; + need = 20000; break; case 6: - need = 40000; + need = 80000; break; case 7: - need = 100000; + need = 200000; break; case 8: - need = 400000; + need = 800000; break; case 9: - need = 1000000; + need = 2000000; break; case 10: - need = 4000000; + need = 8000000; break; case 11: - need = 10000000; + need = 20000000; break; case 12: need = p->exp + 1; notice(s_GameServ, u, "You are at level 12. You are the master. What's left? The DRAGON!"); + return; break; default: need = p->exp + 1; // Unknown level... don't let them fight a fake master! diff --git a/gameserv/helpfiles/dragon b/gameserv/helpfiles/dragon new file mode 100644 index 0000000..18e8832 --- /dev/null +++ b/gameserv/helpfiles/dragon @@ -0,0 +1,5 @@ +This command lets you fight the DRAGON, therefore completing your quest! +If you can beat the dragon, you will be awarded VERY generously! + +SYNTAX: DRAGON +Example: /msg %S DRAGON diff --git a/gameserv/helpfiles/help b/gameserv/helpfiles/help index bff6aa2..6fca412 100644 --- a/gameserv/helpfiles/help +++ b/gameserv/helpfiles/help @@ -5,6 +5,7 @@ Here are the basic commands available to everyone: ATTACK Attack with your weapon while in battle ADMIN Identify yourself as a gameserv administrator BANK Withdraw and deposit gold from your bank account + DRAGON Attempt to fight the almighty DRAGON! FIGHT Fight another player in the realm HEAL Heal yourself. Replenishes Hit points HELP Brings up this help menu