X-Git-Url: https://git.yukkurigames.com/?p=rogue-pphs.git;a=blobdiff_plain;f=rip.c;h=e7c8edb4cdf52c7ec961f19c0cc4de5a1129ee8c;hp=809ba6a0c3121a7cc97deb5c9fded7a8bf55788f;hb=e72b287ac5cdb287c541bdc052d13823afe4930d;hpb=a868f7779583a00316cb076fc4d62ccfb1488434 diff --git a/rip.c b/rip.c index 809ba6a..e7c8edb 100644 --- a/rip.c +++ b/rip.c @@ -38,8 +38,6 @@ static char *rip[] = { 0 }; -char *killname(); - /* * death: * Do something really fun when he dies @@ -71,6 +69,8 @@ register char monst; move(LINES-1, 0); draw(stdscr); score(purse, 0, monst); + getch(); + endwin(); exit(0); } @@ -100,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]; @@ -114,7 +116,7 @@ char monst; strcpy(score_file, md_getroguedir()); if (*score_file) - strcat(score_file,"\\"); + strcat(score_file,"/"); strcat(score_file, "rogue36.scr"); @@ -155,12 +157,14 @@ char monst; if ((rogue_ver == 36) && (scorefile_ver == 2)) for(i = 0; i < 10; i++) { + int monster; encread((char *) &top_ten[i].sc_name, 80, fd); encread((char *) &top_ten[i].sc_login, 8, fd); encread((char *) scoreline, 100, fd); sscanf(scoreline, " %d %d %d %d \n", &top_ten[i].sc_score, &top_ten[i].sc_flags, - &top_ten[i].sc_level, &top_ten[i].sc_monster); + &top_ten[i].sc_level, &monster); + top_ten[i].sc_monster = monster; } /* @@ -178,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; @@ -194,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("%d\t%d\t%s: %s on level %d", scp - top_ten + 1, + printf("%ld\t%d\t%s: %s on level %d", scp - top_ten + 1, scp->sc_score, scp->sc_name, reason[scp->sc_flags], scp->sc_level); if (scp->sc_flags == 0) { @@ -205,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); @@ -249,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; @@ -257,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; @@ -352,7 +389,9 @@ total_winner() } mvprintw(c - 'a' + 1, 0," %5d Gold Peices ", oldpurse); refresh(); - score(purse, 2, 0); + score(purse, flags, monster); + getch(); + endwin(); exit(0); }