X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=moving.c;h=0690ac82f31d1b16434786c4a7e42f3a5836d62d;hb=6ce608e874cf60dffe59fdbdedfb74e13f78382c;hp=8aa48f07a87d9769871672836120b7e0d1af4c05;hpb=a7bad7c3991a4e128c1413f785960d84e1ff87b5;p=super-star-trek.git diff --git a/moving.c b/moving.c index 8aa48f0..0690ac8 100644 --- a/moving.c +++ b/moving.c @@ -220,7 +220,8 @@ void dock(int l) { return; } condit = IHDOCKED; - prout("Docked."); + if (l) prout("Docked."); + ididit=1; if (energy < inenrg) energy = inenrg; shield = inshld; torps = intorps; @@ -888,6 +889,9 @@ void help(void) { /* There's more than one way to move in this game! */ double ddist, xdist, probf; int line = 0, l, ix, iy; +#ifdef SERGEEV + int pox, posy; +#endif /* SERGEEV */ chew(); /* Test for conditions which prevent calling for help */ @@ -935,6 +939,25 @@ void help(void) { proutn(""); crmshp(); prout(" dematerializes."); +#ifdef SERGEEV + sectx=0; + for (l = 1; l <= 5; l++) { + ix = basex+3.0*Rand()-1; + iy = basey+3.0*Rand()-1; + if (ix>=1 && ix<=10 && iy>=1 && iy<=10 && game.quad[ix][iy]==IHDOT) { + /* found one -- finish up */ + sectx=ix; + secty=iy; + game.quad[ix][iy]=IHMATER0; + break; + } + } + if (sectx==0){ + prout("You have been lost in space..."); + finish(FMATERIALIZE); + return; + } +#endif /* SERGEEV */ /* Give starbase three chances to rematerialize starship */ probf = pow((1.0 - pow(0.98,ddist)), 0.33333333); for (l = 1; l <= 3; l++) {