X-Git-Url: https://git.yukkurigames.com/?p=rogue-pphs.git;a=blobdiff_plain;f=rip.c;h=e7c8edb4cdf52c7ec961f19c0cc4de5a1129ee8c;hp=352313d68a2d2849f42e61d6da82d0b9af49a23c;hb=e72b287ac5cdb287c541bdc052d13823afe4930d;hpb=92078a936afc1445641c9fbcaa77d656f0cd6403 diff --git a/rip.c b/rip.c index 352313d..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"); @@ -180,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; @@ -207,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); @@ -251,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; @@ -259,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; @@ -354,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); }