X-Git-Url: https://git.yukkurigames.com/?p=rogue-pphs.git;a=blobdiff_plain;f=rip.c;h=5c5accde8157cd90c07f4031a5a469d00acfccbf;hp=77bf78d82dbbcbfd6e3f9ef8d9a5398c01e493ad;hb=167796e68e373813c676765504ada731ebd36913;hpb=718e2751fe628826872f2de8464a1845bce406ed diff --git a/rip.c b/rip.c index 77bf78d..5c5accd 100644 --- a/rip.c +++ b/rip.c @@ -4,7 +4,7 @@ * * @(#)rip.c 3.13 (Berkeley) 6/16/81 * - * Rogue: Exploring the Dungeons of Doom + * Rogue: Exploring the Cavern of Cuties * Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman * All rights reserved. * @@ -38,8 +38,6 @@ static char *rip[] = { 0 }; -char *killname(); - /* * death: * Do something really fun when he dies @@ -102,7 +100,9 @@ char monst; static char *reason[] = { "killed", "quit", - "A total winner", + "A total loner", + "left for a cuddle", + "got the amulet and left" }; char scoreline[100]; char score_file[PATH_MAX]; @@ -116,7 +116,7 @@ char monst; strcpy(score_file, md_getroguedir()); if (*score_file) - strcat(score_file,"\\"); + strcat(score_file,"/"); strcat(score_file, "rogue36.scr"); @@ -182,7 +182,7 @@ char monst; scp->sc_score = amount; strcpy(scp->sc_name, whoami); scp->sc_flags = flags; - if (flags == 2) + if (flags >= 2) scp->sc_level = max_level; else scp->sc_level = level; @@ -198,7 +198,7 @@ char monst; printf("Top Ten Adventurers:\nRank\tScore\tName\n"); for (scp = top_ten; scp <= &top_ten[9]; scp++) { if (scp->sc_score) { - printf("%ld\t%d\t%s: %s on level %d", scp - top_ten + 1, + printf("%d\t%d\t%s: %s on level %d", (int)(scp - top_ten + 1), scp->sc_score, scp->sc_name, reason[scp->sc_flags], scp->sc_level); if (scp->sc_flags == 0) { @@ -209,6 +209,15 @@ char monst; putchar('n'); printf(" %s", killer); } + else if (scp->sc_flags >= 3) + { + printf(" with a"); + killer = killname(scp->sc_monster); + if (*killer == 'a' || *killer == 'e' || *killer == 'i' || + *killer == 'o' || *killer == 'u') + putchar('n'); + printf(" %s", killer); + } if (prflags == 1) { printf(" (%s)", scp->sc_login); @@ -253,7 +262,47 @@ char monst; fclose(outf); } -total_winner() +total_loner(monster) +char monster; +{ + clear(); + addstr(" \n"); + addstr(" You escaped from the caverns, but alone. \n"); + addstr(" \n"); + addstr("\nYou have joined the elite ranks of those who have escaped the\n"); + addstr("Cavern of Cuties alive, but failed to meet anyone while there.\n"); + addstr("You journey home and sell all your loot at a great profit and\n"); + addstr("continue your life alone.\n"); + total_something(2, 0); +} + +total_winner(monster) +char monster; +{ + clear(); + addstr(" \n"); + addstr(" You got the amulet and a hot date. \n"); + addstr(" \n"); + addstr(" @ <3 "); + addch(monster); + total_something(4, monster); +} + +mostly_winner(monster) +char monster; +{ + clear(); + addstr(" \n"); + addstr(" You got a hot date. \n"); + addstr(" \n"); + addstr(" @ <3 "); + addch(monster); + total_something(3, monster); +} + +total_something(flags, monster) +int flags; +char monster; { register struct linked_list *item; register struct object *obj; @@ -261,25 +310,9 @@ total_winner() register char c; register int oldpurse; - clear(); - standout(); - addstr(" \n"); - addstr(" @ @ @ @ @ @@@ @ @ \n"); - addstr(" @ @ @@ @@ @ @ @ @ \n"); - addstr(" @ @ @@@ @ @ @ @ @ @@@ @@@@ @@@ @ @@@ @ \n"); - addstr(" @@@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ \n"); - addstr(" @ @ @ @ @ @ @ @@@@ @ @ @@@@@ @ @ @ \n"); - addstr(" @ @ @ @ @ @@ @ @ @ @ @ @ @ @ @ @ \n"); - addstr(" @@@ @@@ @@ @ @ @ @@@@ @@@@ @@@ @@@ @@ @ \n"); - addstr(" \n"); - addstr(" Congratulations, you have made it to the light of day! \n"); - standend(); - addstr("\nYou have joined the elite ranks of those who have escaped the\n"); - addstr("Dungeons of Doom alive. You journey home and sell all your loot at\n"); - addstr("a great profit and are admitted to the fighters guild.\n"); mvaddstr(LINES - 1, 0, "--Press space to continue--"); refresh(); - wait_for(' '); + wait_for(cw, ' '); clear(); mvaddstr(0, 0, " Worth Item"); oldpurse = purse; @@ -356,7 +389,13 @@ total_winner() } mvprintw(c - 'a' + 1, 0," %5d Gold Peices ", oldpurse); refresh(); - score(purse, 2, 0); + if (monster) + { + purse += 10 * monsters[monster - 'A'].m_stats.s_exp; + mvprintw(c - 'a' + 1, 0, "and one cute %s (priceless)", + monsters[monster - 'A'].m_name); + } + score(purse, flags, monster); getch(); endwin(); exit(0);