All specials are now actions. Builds correct outputs, more needs deleting.
[open-adventure.git] / actions.c
index 0a67cf43c6866ee88fee11ee0443934ef8f74428..32dcd902ab4296389d3382320d6958af9fbaa479 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -1247,8 +1247,8 @@ static int wake(verb_t verb, obj_t obj)
 static int seed(verb_t verb, const char *arg)
 /* Set seed */
 {
-    long seed = atol(arg);
-    speak(actions[verb].message, arg);
+    int seed = atoi(arg);
+    speak(actions[verb].message, seed);
     set_seed(seed);
     --game.turns;
     return GO_TOP;
@@ -1258,9 +1258,7 @@ static int waste(verb_t verb, turn_t turns)
 /* Burn turns */
 {
     game.limit -= turns;
-    char newlim[1024];
-    sprintf(newlim, "%ld", (long)game.limit);
-    speak(actions[verb].message, newlim);
+    speak(actions[verb].message, (int)game.limit);
     return GO_TOP;
 }
 
@@ -1315,6 +1313,14 @@ int action(struct command_t *command)
  *  unless verb is "say", which snarfs arbitrary second word.
  */
 {
+    /* Previously, actions that result in a message, but don't do anything 
+     * further were called "specials". Now they're handled here as normal 
+     * actions. If noaction is true, then we spit out the message and return */
+    if (actions[command->verb].noaction) {
+        speak(actions[command->verb].message);
+        return GO_CLEAROBJ;
+    }
+    
     if (command->part == unknown) {
         /*  Analyse an object word.  See if the thing is here, whether
          *  we've got a verb yet, and so on.  Object must be here