projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add test for "cage bird".
[open-adventure.git]
/
main.c
diff --git
a/main.c
b/main.c
index 1db050f91583e7f42bfcbb2ff9ce440c1aefc0a7..7bedea9afb1368fdab91f7c13d43752a559394c3 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-115,15
+115,15
@@
int main(int argc, char *argv[])
fprintf(stderr,
usage, argv[0]);
fprintf(stderr,
fprintf(stderr,
usage, argv[0]);
fprintf(stderr,
- "
where -l creates
a log file of your game named as specified'\n");
+ "
-l create
a log file of your game named as specified'\n");
fprintf(stderr,
" -o 'oldstyle' (no prompt, no command editing, displays 'Initialising...')\n");
#ifndef ADVENT_NOSAVE
fprintf(stderr,
fprintf(stderr,
" -o 'oldstyle' (no prompt, no command editing, displays 'Initialising...')\n");
#ifndef ADVENT_NOSAVE
fprintf(stderr,
- " -r
indicates restoring
from specified saved game file\n");
+ " -r
restore
from specified saved game file\n");
#endif
fprintf(stderr,
#endif
fprintf(stderr,
- " -s
indicates playing with command editing suppressed
\n");
+ " -s
suppress command editing
\n");
exit(-1);
break;
}
exit(-1);
break;
}
@@
-457,12
+457,15
@@
static bool dwarfmove(void)
if (attack == 0)
return true;
if (game.dflag == 2)game.dflag = 3;
if (attack == 0)
return true;
if (game.dflag == 2)game.dflag = 3;
- SETPRM(1, attack, 0);
- int k = 6;
- if (attack > 1)k = THROWN_KNIVES;
- RSPEAK(k);
- SETPRM(1, stick, 0);
- RSPEAK(k + 1 + 2 / (1 + stick)); /* FIXME: Arithmetic on message number */
+ if (attack > 1){
+ SETPRM(1, attack, 0);
+ RSPEAK(THROWN_KNIVES);
+ SETPRM(1, stick, 0);
+ RSPEAK(stick > 1 ? MULTIPLE_HITS : (stick == 1 ? ONE_HIT : NONE_HIT));
+ } else {
+ RSPEAK(KNIFE_THROWN);
+ RSPEAK(MISSES_YOU);
+ }
if (stick == 0)
return true;
game.oldlc2 = game.loc;
if (stick == 0)
return true;
game.oldlc2 = game.loc;