diff options
Diffstat (limited to 'taipan.c')
-rw-r--r-- | taipan.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -761,7 +761,7 @@ int sea_battle(int id, int num_ships) { i, input, status; - char choice; + char choice, flashctr; long amount, total; port_stat_dirty = 1; @@ -933,13 +933,24 @@ int sea_battle(int id, int num_ships) { gotoxy(0, 16); cputs("\r\n"); + do { + targeted = randi()%10; + } while(ships_on_screen[targeted] == 0); + + /* targeted = randi()%10; while(ships_on_screen[targeted] == 0) { targeted = randi()%10; } + */ /* flash_lorcha must be called an even number of times to leave the lorcha in an unflashed state after. */ + for(flashctr = 0; flashctr < 6; flashctr++) { + flash_lorcha(targeted); + jsleep(2); + } + /* flash_lorcha(targeted); jsleep(2); flash_lorcha(targeted); @@ -952,6 +963,7 @@ int sea_battle(int id, int num_ships) { jsleep(2); flash_lorcha(targeted); jsleep(2); + */ damage_lorcha(targeted); ships_on_screen[targeted] -= randi()%30 + 10; |