aboutsummaryrefslogtreecommitdiff
path: root/taipan.c
diff options
context:
space:
mode:
Diffstat (limited to 'taipan.c')
-rw-r--r--taipan.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/taipan.c b/taipan.c
index fc3bb7b..ebd023e 100644
--- a/taipan.c
+++ b/taipan.c
@@ -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;