X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=moving.c;h=b0e68cded51fbcd3ff6792e8a38ed02367864161;hb=93ede5b2bb8928b8aa17e750f48e6c5e59b81ab1;hp=ec7bc91b4ca0676f45d481991a654879b84679cd;hpb=cf91699c89b88f76dcf63c60624635184e8cb7eb;p=super-star-trek.git diff --git a/moving.c b/moving.c index ec7bc91..b0e68cd 100644 --- a/moving.c +++ b/moving.c @@ -201,6 +201,9 @@ label100: } newcnd(); iattak = 0; +#ifdef SERGEEV + drawmaps(0); +#endif /* SERGEEV */ return; } @@ -220,7 +223,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; @@ -811,6 +815,9 @@ void timwrp() { game.damage[DRADIO] += Time; } newqad(0); +#ifdef SERGEEV + events(); +#endif /* SERGEEV */ } void probe(void) { @@ -881,13 +888,17 @@ void probe(void) { probecy = quady; game.future[FDSPROB] = game.state.date + 0.01; // Time to move one sector prout("Ensign Chekov- \"The deep space probe is launched, Captain.\""); + ididit = 1; return; } void help(void) { /* There's more than one way to move in this game! */ double ddist, xdist, probf; - int line, l, ix, iy; + int line = 0, l, ix, iy; +#ifdef SERGEEV + int pox, posy; +#endif /* SERGEEV */ chew(); /* Test for conditions which prevent calling for help */ @@ -935,6 +946,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++) {