|
|
1.1 ! root 1: # include "trek.h" ! 2: ! 3: /** ! 4: ** self destruct sequence ! 5: **/ ! 6: ! 7: destruct() ! 8: { ! 9: char checkpass[PWDLEN]; ! 10: register int i, j; ! 11: float zap; ! 12: ! 13: if (Damage[COMPUTER]) { ! 14: printf("Computer damaged; cannot execute destruct sequence.\n"); ! 15: return; ! 16: } ! 17: printf("COUNT DOWN ... \n"); ! 18: sleep(3); ! 19: for (i = 10; i > 5; i--) ! 20: { ! 21: for (j = 10; j > i; j--) ! 22: printf(" "); ! 23: printf("%d\n", i); ! 24: sleep(1); ! 25: } ! 26: getpasswd(checkpass); ! 27: sleep(2); ! 28: if (cf(checkpass, Game.passwd)) { ! 29: printf("Self destruct sequence aborted\n"); ! 30: return; ! 31: } ! 32: printf("Password verified; self destruct sequence continues:\n"); ! 33: for (i = 5; i >= 0; i--) ! 34: { ! 35: sleep(1); ! 36: for (j = 5; j > i; j--) ! 37: printf(" "); ! 38: printf("%d\n", i); ! 39: } ! 40: sleep(2); ! 41: printf("\032***** %s destroyed *****\n", Status.shipname); ! 42: Game.killed = 1; ! 43: Game.deaths += Status.crew; ! 44: zap = 20.0 * Status.energy; ! 45: for (i = 0; i < Nkling; ) ! 46: { ! 47: if (Kling[i].power * Kling[i].dist <= zap) ! 48: killk(Kling[i].x, Kling[i].y); ! 49: else ! 50: i =+ 1; ! 51: } ! 52: lose(L_DSTRCT); ! 53: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.