X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=sst.c;h=888b7ec4780b01333e7a04905a7dbef65e07d6c5;hb=cf91699c89b88f76dcf63c60624635184e8cb7eb;hp=77fbeb826ba2b4f273df612835c408f13be1827b;hpb=998ff9c48426dd89c25b56ab59a0c8e2b6986355;p=super-star-trek.git diff --git a/sst.c b/sst.c index 77fbeb8..888b7ec 100644 --- a/sst.c +++ b/sst.c @@ -190,6 +190,7 @@ static void makemoves(void) { } else prout("UNRECOGNIZED COMMAND."); } + commandhook(commands[i], TRUE); switch (i) { /* command switch */ case 0: // srscan srscan(1); @@ -216,7 +217,8 @@ static void makemoves(void) { } break; case 6: // dock - dock(); + dock(1); + if (ididit) attack(0); break; case 7: // damages dreprt(); @@ -314,6 +316,7 @@ static void makemoves(void) { helpme(); // get help break; } + commandhook(commands[i], FALSE); for (;;) { if (alldone) break; // Game has ended #ifdef DEBUG @@ -409,6 +412,7 @@ void cramen(int i) { case IHBLANK: s = "Black hole"; break; case IHT: s = "Tholian"; break; case IHWEB: s = "Tholian web"; break; + case IHQUEST: s = "Stranger"; break; default: s = "Unknown??"; break; } proutn(s); @@ -500,6 +504,7 @@ int scan(void) { } if (isdigit(*linep) || *linep=='+' || *linep=='-' || *linep=='.') { // treat as a number + i = 0; if (sscanf(linep, "%lf%n", &aaitem, &i) < 1) { linep = line; // Invalid numbers are ignored *linep = 0; @@ -532,8 +537,6 @@ int ja(void) { } } -double square(double i) { return i*i; } - void huh(void) { chew(); skip(1);