aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <franklin@fwei.tk>2014-06-22 21:06:06 -0400
committerFranklin Wei <franklin@fwei.tk>2014-06-22 21:06:06 -0400
commit2f67051c045ed026d949d8578235b4f5a7fa4af5 (patch)
tree94f8b0822609ff8cdee212652f3c0dbccefdc48c
parent6992c1f5cde1b74f8f6d50a54a5ac8b7fd09fbaf (diff)
downloadwargames-server-2f67051c045ed026d949d8578235b4f5a7fa4af5.zip
wargames-server-2f67051c045ed026d949d8578235b4f5a7fa4af5.tar.gz
wargames-server-2f67051c045ed026d949d8578235b4f5a7fa4af5.tar.bz2
wargames-server-2f67051c045ed026d949d8578235b4f5a7fa4af5.tar.xz
Small changes
-rw-r--r--chatbot.c17
-rw-r--r--joshua.c4
-rw-r--r--strings.h5
3 files changed, 20 insertions, 6 deletions
diff --git a/chatbot.c b/chatbot.c
index 049b667..3cb5c36 100644
--- a/chatbot.c
+++ b/chatbot.c
@@ -27,6 +27,7 @@ void do_chatbot(void)
{
char buf[513];
int ret=getnstr(buf, 512);
+ usleep(SLEEP_TIME*100);
if(ret==ERR)
{
print_string("\n\n");
@@ -37,7 +38,7 @@ void do_chatbot(void)
{
allLower(buf);
remove_punct(buf);
- usleep(SLEEP_TIME*25);
+ bool valid=false;
switch(stage)
{
case 0:
@@ -47,6 +48,7 @@ void do_chatbot(void)
{
print_string("\n\nEXCELLENT. IT'S BEEN A LONG TIME. CAN YOU EXPLAIN\nTHE REMOVAL OF YOUR USER ACCOUNT ON 6/23/73?\n\n");
++stage;
+ valid=true;
}
}
case 1:
@@ -56,6 +58,7 @@ void do_chatbot(void)
{
print_string("\n\nYES THEY DO. SHALL WE PLAY A GAME?\n\n");
++stage;
+ valid=true;
}
}
case 2:
@@ -65,6 +68,7 @@ void do_chatbot(void)
{
print_string("\n\nWOULDN'T YOU PREFER A GOOD GAME OF CHESS?\n\n");
++stage;
+ valid=true;
}
}
case 3:
@@ -73,11 +77,18 @@ void do_chatbot(void)
if(strcmp(buf, stage4_triggers[i])==0)
{
print_string("\n\nFINE.\n\n");
+ valid=true;
usleep(SLEEP_TIME*100);
global_thermonuclear_war();
}
}
+ } // switch
+ if(!valid)
+ {
+ print_string("\n\n");
+ print_string("Sorry?");
+ print_string("\n\n");
}
- }
- }
+ } // else
+ } // while
}
diff --git a/joshua.c b/joshua.c
index cb4c4e5..7c6222b 100644
--- a/joshua.c
+++ b/joshua.c
@@ -29,7 +29,7 @@ void be_joshua()
refresh();
int ret=getnstr(buf, 32);
allLower(buf);
- usleep(SLEEP_TIME*25);
+ usleep(SLEEP_TIME*100);
if(strcmp(buf, "help logon")==0)
{
print_string("\nHELP NOT AVAILABLE\n\n\n");
@@ -49,7 +49,7 @@ void be_joshua()
}
} while(strcmp(buf, "joshua"));
random_stuff();
- usleep(SLEEP_TIME*25);
+ usleep(SLEEP_TIME*100);
print_string("GREETINGS, PROFESSOR FALKEN.\n\n");
refresh();
getnstr(buf, 32); /* ignore this */
diff --git a/strings.h b/strings.h
index de4b5ee..e2fa7b2 100644
--- a/strings.h
+++ b/strings.h
@@ -8,7 +8,8 @@ const char* stage2_triggers[] = {
"sometimes people make mistakes",
"mistakes are make by people sometimes",
"people make mistakes sometimes",
- "people make mistakes"
+ "people make mistakes",
+ "people sometimes make mistak" /* this is no typo. in the movie, at one scene, it appears like this */
};
const char* stage3_triggers[] = {
"love to how about global thermonuclear war",
@@ -19,6 +20,8 @@ const char* stage3_triggers[] = {
const char* stage4_triggers[] = {
"no lets play global thermonuclear war",
"no lets play global thermonuclear war instead",
+ "later lets play global thermonuclear war",
+ "later lets play global thermonuclear war instead",
"lets play global thermonuclear war",
"global thermonuclear war is better"
};