diff options
author | B. Watson <yalhcru@gmail.com> | 2016-01-07 01:38:31 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2016-01-07 01:38:31 -0500 |
commit | 2d2512ea768b42b539ba75764aa6a3a4ed1669cc (patch) | |
tree | 28e95cbb582d8085b93d2215ce053fa8c883b2fb | |
parent | eda9d0e11af1791940f5c60b02db382abfa9125c (diff) | |
download | taipan-2d2512ea768b42b539ba75764aa6a3a4ed1669cc.tar.gz |
tracking down damage bug
-rw-r--r-- | help.txt | 6 | ||||
-rw-r--r-- | taipan.c | 13 |
2 files changed, 16 insertions, 3 deletions
@@ -1,3 +1,3 @@ -\B:Change BG Color \E\s\c = more -\T:Change Text Color \E\s\c = more -\A\n\y other key: Start \E\s\c = more +\B:Change BG Color \E\s\c:more +\T:Change Text Color \E\s\c:more +\A\n\y other key: Start \E\s\c:more @@ -22,6 +22,9 @@ 1000 capacity, 20 guns, and 1 billion cash and bank. */ // #define TIMEWARP +/* define this to start the game in a 99% damaged ship */ +// #define ALMOST_DEAD + /**** atari-specific stuff */ /* values returned by cgetc() for backspace & enter keys */ @@ -520,10 +523,15 @@ int sea_battle(int id, int num_ships) { fight_stats(num_ships, orders); while(num_ships > 0) { + if(damage >= capacity) return 4; + status = 100L - ((damage * 100L / capacity)); + /* // I think this is a problem: if(status <= 0) { return 4; } + */ + flushinp(); gotoxy(0, 3); clrtoeol(); @@ -1179,6 +1187,8 @@ void cash_or_guns(void) } cputc(choice); + capacity = 60; + damage = 0; if (choice == '1') { cash = 400; @@ -1208,6 +1218,9 @@ void cash_or_guns(void) li = 1; bp = 7; #endif +#ifdef ALMOST_DEAD + damage = capacity - 1; +#endif } return; |