aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <franklin@fwei.tk>2014-06-24 10:21:04 -0400
committerFranklin Wei <franklin@fwei.tk>2014-06-24 10:21:04 -0400
commit45083e66657bed6167e7513d599581b0517bbf81 (patch)
tree92509f6dea884c2650b5785e6539c160503063fd
parent7281c95860a5c9e6d3f445b5a884c4d07d56dc77 (diff)
downloadwargames-server-45083e66657bed6167e7513d599581b0517bbf81.zip
wargames-server-45083e66657bed6167e7513d599581b0517bbf81.tar.gz
wargames-server-45083e66657bed6167e7513d599581b0517bbf81.tar.bz2
wargames-server-45083e66657bed6167e7513d599581b0517bbf81.tar.xz
EVEN MORE BUGFIXES, FEATURES! Maybe I should actually start writing good commit messages :)
-rw-r--r--MAP2
-rw-r--r--games.c13
-rw-r--r--joshua.c4
-rw-r--r--location.h5
-rw-r--r--map.h2
-rw-r--r--strings.h2
-rw-r--r--util.h2
7 files changed, 20 insertions, 10 deletions
diff --git a/MAP b/MAP
index 0053ed3..d0beda8 100644
--- a/MAP
+++ b/MAP
@@ -6,7 +6,7 @@
| / _/ _/\/.
|. | _/. __ __/
\. /. / ___/.//
- \__ / | / \/.
+ \__ / | / \/.
\________ __ _____.\. \_. ____--_ /\_ \
\__. / V. \ \ \__ _/. \_/ //
\ /. \/. \. _/. //
diff --git a/games.c b/games.c
index a4234ce..41973e6 100644
--- a/games.c
+++ b/games.c
@@ -65,8 +65,17 @@ void global_thermonuclear_war(void)
remove_punct(response);
if(strcmp(response, "yes")==0 || strcmp(response, "y")==0)
{
- targets[num_targets_found]=world[j];
- ++num_targets_found;
+ print_string("\n\nATTEMPTING TO FIRE AT OWN CITY.\nARE YOU SURE (YES OR NO): ");
+ response[0]=0;
+ getnstr(response, 16);
+ allLower(response);
+ remove_punct(response);
+ if(strcmp(response, "yes")==0 || strcmp(response, "y")==0)
+ {
+ print_string("\nTARGET CONFIRMED.\n\n");
+ targets[num_targets_found]=world[j];
+ ++num_targets_found;
+ }
}
}
}
diff --git a/joshua.c b/joshua.c
index 33fceb8..65b2818 100644
--- a/joshua.c
+++ b/joshua.c
@@ -48,7 +48,7 @@ void be_joshua()
int ret=getnstr(buf, 32);
allLower(buf);
usleep(SLEEP_TIME*100);
- if(strcmp(buf, "help logon")==0)
+ if(strcmp(buf, "help logon")==0 && !gamesPhase)
{
print_string("\nHELP NOT AVAILABLE\n\n\n");
}
@@ -57,7 +57,7 @@ void be_joshua()
print_string("\n'GAMES' REFERS TO MODELS, SIMULATIONS AND GAMES\nWHICH HAVE TACTICAL AND STRATEGIC APPLICATIONS.\n\n\n");
gamesPhase=true;
}
- else if(strcmp(buf, "list games")==0)
+ else if(strcmp(buf, "list games")==0 && gamesPhase)
{
print_string("\nFALKEN'S MAZE\nBLACK JACK\nGIN RUMMY\nHEARTS\nBRIDGE\nCHECKERS\nCHESS\nPOKER\nFIGHTER COMBAT\nGUERRILLA ENGAGEMENT\nDESERT WARFARE\nAIR-TO-GROUND ACTIONS\nTHEATERWIDE TACTICAL WARFARE\nTHEATERWIDE BIOTOXIC AND CHEMICAL WARFARE\n\nGLOBAL THERMONUCLEAR WAR\n\n\n");
}
diff --git a/location.h b/location.h
index 974da64..fc72b16 100644
--- a/location.h
+++ b/location.h
@@ -17,11 +17,12 @@ struct location_t world[]={
{"winston-salem", 30, 7, USA},
{"san francisco", 1, 6, USA},
{"chicago", 24, 4, USA},
- {"miami", 32, 11, USA},
+ {"miami", 33, 11, USA},
/* Soviet cities */
- /* NOTE: These are not neccessarily correct. I simply eyed them relative to Murmansk */
+ /* NOTE: These cities are not accurate! */
{"murmansk", 74, 1, USSR},
{"moscow", 70, 5, USSR},
{"minsk", 66, 4, USSR},
+ {"chelyabinsk", 64, 8, USSR}
};
diff --git a/map.h b/map.h
index 3fb4d63..dddaca6 100644
--- a/map.h
+++ b/map.h
@@ -8,7 +8,7 @@ char *map[] = {
/* 5 */ (char[]){"| / _/ _/\\/."},
/* 6 */ (char[]){"|. | _/. __ __/"},
/* 7 */ (char[]){" \\. /. / ___/.//"},
- /* 8 */ (char[]){" \\__ / | / \\/."},
+ /* 8 */ (char[]){" \\__ / | / \\/."},
/* 9 */ (char[]){" \\________ __ _____.\\. \\_. ____--_ /\\_ \\"},
/* 10 */ (char[]){" \\__. / V. \\ \\ \\__ _/. \\_/ //"},
/* 11 */ (char[]){" \\ /. \\/. \\. _/. //"},
diff --git a/strings.h b/strings.h
index 411a5c4..d7ae734 100644
--- a/strings.h
+++ b/strings.h
@@ -4,7 +4,7 @@ const char* stage1_triggers[5];
const char* stage2_triggers[6];
const char* stage3_triggers[4];
const char* stage4_triggers[7];
-const char* tictactoe_triggers[];
+const char* tictactoe_triggers[8];
const char punctuation_marks[9];
const char* exit_triggers[6];
const char* exit_responses[4];
diff --git a/util.h b/util.h
index 3070d39..63409fa 100644
--- a/util.h
+++ b/util.h
@@ -1,4 +1,4 @@
-#define SLEEP_TIME 10000
+#define SLEEP_TIME 0
void allLower(char*);
void print_string(const char*);
void remove_punct(char*);