billr@saab.CNA.TEK.COM (Bill Randle) (09/21/89)
Submitted-by: Adam Bryant <adb@cs.bu.edu> Posting-number: Volume 8, Issue 35 Archive-name: conquer4/Patch6d Patch-To: conquer4: Volume 6, Issue 83-96 #!/bin/sh # this is part 4 of a multipart archive # do not concatenate these parts, unpack them in order with /bin/sh # file patchV4.6 continued # CurArch=4 if test ! -r s2_seq_.tmp then echo "Please unpack part 1 first!" exit 1; fi ( read Scheck if test "$Scheck" != $CurArch then echo "Please unpack part $Scheck next!" exit 1; else exit 0; fi ) < s2_seq_.tmp || exit 1 sed 's/^X//' << 'SHAR_EOF' >> patchV4.6 X case CH_MOVEMENT: X! mvaddstr(ypos++,COLS/2+5," - --------"); X continue; X case CH_REPRO: X x = 2*Munits[i]*Mvalues[i]; X*************** X*** 927,933 **** X if(sct[i][j].altitude==WATER) temp++; X if(temp>=7) placed=0; X } X! teraform( x,y,1,25 ); X break; X case RANDOM: X while ((placed == 0)&&(n++<2000)){ X--- 929,935 ---- X if(sct[i][j].altitude==WATER) temp++; X if(temp>=7) placed=0; X } X! if(placed) teraform( x,y,1,25 ); X break; X case RANDOM: X while ((placed == 0)&&(n++<2000)){ X*************** X*** 960,966 **** X for(i=x-1;i<=x+1;i++) for(j=y-1;j<=y+1;j++) X if(sct[i][j].owner!=0) placed=0; X } X! teraform( x,y,1,40 ); X break; X case FAIR: X while ((placed == 0)&&(n++<2000)) { X--- 962,968 ---- X for(i=x-1;i<=x+1;i++) for(j=y-1;j<=y+1;j++) X if(sct[i][j].owner!=0) placed=0; X } X! if(placed) teraform( x,y,1,40 ); X break; X case FAIR: X while ((placed == 0)&&(n++<2000)) { X*************** X*** 1012,1018 **** X } X } X X! teraform( x,y,1,65 ); X break; X case GREAT: X placed = 0; X--- 1014,1020 ---- X } X } X X! if(placed) teraform( x,y,1,65 ); X break; X case GREAT: X placed = 0; X*************** X*** 1069,1075 **** X if(temp>=15) placed=0; X } X } X! teraform( x,y,1,100 ); X } X X /*done with one try*/ X--- 1071,1077 ---- X if(temp>=15) placed=0; X } X } X! if(placed) teraform( x,y,1,100 ); X } X X /*done with one try*/ X*************** X*** 1222,1228 **** X short ypos=4; X int i,j; X X! mvprintw(ypos,0,"The List of Possible Nation Classes:"); X ypos+=2; X mvprintw(ypos++,0," %-8s %4s %15s %8s %4s", "class", "who", X "", "magic", "cost"); X--- 1224,1230 ---- X short ypos=4; X int i,j; X X! mvaddstr(ypos,0,"The List of Possible Nation Classes:"); X ypos+=2; X mvprintw(ypos++,0," %-8s %4s %15s %8s %4s", "class", "who", X "", "magic", "cost"); X*************** X*** 1244,1250 **** X } X ypos++; X while(chk==FALSE){ X! mvprintw(ypos,0,"Enter the number of your choice: "); X clrtoeol(); X refresh(); X tmp = get_number(); X--- 1246,1252 ---- X } X ypos++; X while(chk==FALSE){ X! mvaddstr(ypos,0,"Enter the number of your choice: "); X clrtoeol(); X refresh(); X tmp = get_number(); X*** odisplay.c Wed Sep 20 21:40:54 1989 X--- display.c Wed Sep 20 21:41:33 1989 X*************** X*** 345,351 **** X mvaddch(y,2*x,ch); X if ( otherdismode > 0 ) { X highlight(x,y,otherhilmode); X! ch=get_display_for(x,y,otherdismode,otherhilmode); X mvaddch(y,2*x+1,ch); X } X } X--- 345,351 ---- X mvaddch(y,2*x,ch); X if ( otherdismode > 0 ) { X highlight(x,y,otherhilmode); X! ch=get_display_for(x,y,otherdismode); X mvaddch(y,2*x+1,ch); X } X } X*** omain.c Wed Sep 20 21:40:55 1989 X--- main.c Wed Sep 20 21:41:34 1989 X*************** X*** 19,25 **** X #include <signal.h> X #include <pwd.h> X X! extern int armornvy; X X char fison[FILELTH]; X char *getpass(); X--- 19,25 ---- X #include <signal.h> X #include <pwd.h> X X! extern int armornvy,roads_this_turn,terror_adj; X X char fison[FILELTH]; X char *getpass(); X*************** X*** 388,397 **** X /* check if user is super-user nation[0] */ X /* else setup cursor to capitol*/ X if((country==0)||(ismonst(ntn[country].active))) { X! xcurs=LINES/2; X! xoffset=0; X! ycurs=COLS/4; X! yoffset=0; X redraw=FULL; X /* create gods lock file but do not limit access */ X (void) aretheyon(); X--- 388,395 ---- X /* check if user is super-user nation[0] */ X /* else setup cursor to capitol*/ X if((country==0)||(ismonst(ntn[country].active))) { X! xcurs=MAPX/2-1; X! ycurs=MAPY/2-1; X redraw=FULL; X /* create gods lock file but do not limit access */ X (void) aretheyon(); X*************** X*** 398,404 **** X } else { X if(curntn->active==INACTIVE) { X standout(); X! mvprintw(LINES-2,0,"Sorry, for some reason, your country no longer exists."); X mvprintw(LINES-1,0,"If there is a problem, please send mail to %s", LOGIN); X if (strcmp(LOGIN, ntn[0].leader)!=0) { X printw(" or %s",ntn[0].leader); X--- 396,402 ---- X } else { X if(curntn->active==INACTIVE) { X standout(); X! mvaddstr(LINES-2,0,"Sorry, for some reason, your country no longer exists."); X mvprintw(LINES-1,0,"If there is a problem, please send mail to %s", LOGIN); X if (strcmp(LOGIN, ntn[0].leader)!=0) { X printw(" or %s",ntn[0].leader); X*************** X*** 411,418 **** X bye(TRUE); X } X if(aretheyon()==TRUE) { X! mvprintw(LINES-2,0,"Sorry, country is already logged in."); X! mvprintw(LINES-1,0,"Please try again later."); X beep(); X refresh(); X getch(); X--- 409,416 ---- X bye(TRUE); X } X if(aretheyon()==TRUE) { X! mvaddstr(LINES-2,0,"Sorry, country is already logged in."); X! mvaddstr(LINES-1,0,"Please try again later."); X beep(); X refresh(); X getch(); X*************** X*** 422,442 **** X #ifdef TRADE X checktrade(); X #endif TRADE X! if(curntn->capx>15) { X! xcurs=15; X! xoffset= ((int)curntn->capx-15); X! } else { X! xcurs= curntn->capx; X! xoffset= 0; X! } X! if(curntn->capy>10) { X! ycurs=10; X! yoffset= ((int)curntn->capy-10); X! } else { X! yoffset= 0; X! ycurs= curntn->capy; X! } X } X updmove(curntn->race,country); X X /* open output for future printing*/ X--- 420,431 ---- X #ifdef TRADE X checktrade(); X #endif TRADE X! xcurs = curntn->capx; X! ycurs = curntn->capy; X } X+ xoffset = 0; X+ yoffset = 0; X+ centermap(); X updmove(curntn->race,country); X X /* open output for future printing*/ X*************** X*** 468,474 **** X (void) strcpy(sysmail,getenv("MAIL")); X } X #endif SYSMAIL X! mvprintw(LINES-1, COLS-20, "PRESS ANY KEY"); X refresh(); X getch(); /* get response from copyscreen */ X X--- 457,463 ---- X (void) strcpy(sysmail,getenv("MAIL")); X } X #endif SYSMAIL X! mvaddstr(LINES-1, COLS-20, "PRESS ANY KEY"); X refresh(); X getch(); /* get response from copyscreen */ X X*************** X*** 556,568 **** X switch(ch) { X case EXT_CMD: /* extended command */ X ext_cmd( -1 ); X curntn->tgold -= MOVECOST; X return(TRUE); X break; X case '': /* redraw the screen */ X- whatcansee(); /* what can they see */ X centermap(); X- clear(); X redraw=FULL; X break; X #ifdef DEBUG X--- 545,557 ---- X switch(ch) { X case EXT_CMD: /* extended command */ X ext_cmd( -1 ); X+ makebottom(); X+ refresh(); X curntn->tgold -= MOVECOST; X return(TRUE); X break; X case '': /* redraw the screen */ X centermap(); X redraw=FULL; X break; X #ifdef DEBUG X*************** X*** 574,580 **** X break; X #endif /* DEBUG */ X case 'a': /*army report*/ X! redraw=PART; X armyrpt(0); X curntn->tgold -= MOVECOST; X break; X--- 563,569 ---- X break; X #endif /* DEBUG */ X case 'a': /*army report*/ X! redraw=FULL; X armyrpt(0); X curntn->tgold -= MOVECOST; X break; X*************** X*** 602,608 **** X break; X case 'd': /*change display*/ X newdisplay(); X- curntn->tgold -= MOVECOST; X break; X case 'D': /*draft*/ X draft(); X--- 591,596 ---- X*************** X*** 676,681 **** X--- 664,670 ---- X break; X case 'm': /*move selected item to new x,y */ X mymove(); X+ makebottom(); X curntn->tgold -= MOVECOST; X return(TRUE); X break; X*************** X*** 793,798 **** X--- 782,800 ---- X curntn->tgold -= MOVECOST; X wmessage(); X break; X+ case 'X': /*jump to capitol*/ X+ redraw = PART; X+ pager=0; X+ selector=0; X+ jump_to(TRUE); X+ break; X+ case 'x': /*jump to a location*/ X+ redraw=PART; X+ pager=0; X+ selector=0; X+ jump_to(FALSE); X+ makebottom(); X+ break; X case '7': X case 'y': /*move north-west*/ X pager=0; X*************** X*** 808,813 **** X--- 810,816 ---- X break; X case 'Z': /*move civilians up to 2 spaces*/ X moveciv(); X+ makebottom(); X curntn->tgold -= MOVECOST; X break; X case 'z': /*login as new user */ X*************** X*** 816,822 **** X ((pwent=getpwnam(ntn[0].leader))==NULL || owneruid != pwent->pw_uid )) break; X #endif X clear(); X! redraw=PART; X if(country != 0) { X fprintf(fexe,"L_NGOLD\t%d \t%d \t%ld \t0 \t0 \t%s\n", X XNAGOLD ,country,curntn->tgold,"null"); X--- 819,825 ---- X ((pwent=getpwnam(ntn[0].leader))==NULL || owneruid != pwent->pw_uid )) break; X #endif X clear(); X! redraw=FULL; X if(country != 0) { X fprintf(fexe,"L_NGOLD\t%d \t%d \t%ld \t0 \t0 \t%s\n", X XNAGOLD ,country,curntn->tgold,"null"); X*************** X*** 881,886 **** X--- 884,891 ---- X curntn = &ntn[country]; X X fprintf(stderr,"\n"); X+ roads_this_turn=0; X+ terror_adj=0; X readdata(); X execute(FALSE); X X*************** X*** 888,912 **** X updmove(curntn->race,country); X /*go to that nations capitol*/ X if((country==0)||(!isntn(ntn[country].active))) { X! xcurs=15; xoffset=15; X! ycurs=15; yoffset=15; X } else { X! if(curntn->capx>15) { X! xcurs=15; X! xoffset= ((int)curntn->capx-15); X! } else { X! xcurs= curntn->capx; X! xoffset= 0; X! } X! if(curntn->capy>10) { X! ycurs=10; X! yoffset= ((int)curntn->capy-10); X! } else { X! yoffset= 0; X! ycurs= curntn->capy; X! } X } X! whatcansee(); X redraw=PART; X break; X case '?': /*display help screen*/ X--- 893,906 ---- X updmove(curntn->race,country); X /*go to that nations capitol*/ X if((country==0)||(!isntn(ntn[country].active))) { X! xcurs=MAPX/2-1; X! ycurs=MAPY/2-1; X } else { X! xcurs=curntn->capx; X! ycurs=curntn->capy; X } X! xoffset = yoffset = 0; X! centermap(); X redraw=PART; X break; X case '?': /*display help screen*/ X*************** X*** 1300,1306 **** X fclose(timefp); X } X #endif /* TIMELOG */ X! mvprintw(LINES-1, COLS-20, "PLEASE WAIT"); X refresh(); X } X X--- 1294,1300 ---- X fclose(timefp); X } X #endif /* TIMELOG */ X! mvaddstr(LINES-1, COLS-20, "PLEASE WAIT"); X refresh(); X } X X*************** X*** 1398,1404 **** X /* other information */ X mvprintw(LINES-6,0,"The Diety: %s", LOGIN); X if (strcmp(LOGIN,ntn[0].leader)==0) { X! mvprintw(LINES-5,0,"The Demi-God: [none]"); X } else { X mvprintw(LINES-5,0,"The Demi-God: %s", ntn[0].leader); X } X--- 1392,1398 ---- X /* other information */ X mvprintw(LINES-6,0,"The Diety: %s", LOGIN); X if (strcmp(LOGIN,ntn[0].leader)==0) { X! mvaddstr(LINES-5,0,"The Demi-God: [none]"); X } else { X mvprintw(LINES-5,0,"The Demi-God: %s", ntn[0].leader); X } X*** onpc.c Wed Sep 20 21:40:59 1989 X--- npc.c Wed Sep 20 21:41:34 1989 X*************** X*** 840,862 **** X curntn->dstatus[x]=HOSTILE; X fprintf(fnews,"2.\tnation %s and %s announce ceasefire\n",curntn->name,ntn[x].name); X if( isnotpc(ntn[x].active) ) continue; X! mailopen(x); X! fprintf(fm,"nation %s and you negotiate a ceasefire\n",curntn->name); X! mailclose(); X } else if((oldstat[x]==WAR)&&(curntn->dstatus[x]==WAR)){ X fprintf(fnews,"2.\tnation %s stays at war with %s\n",curntn->name,ntn[x].name); X } else if((oldstat[x]<WAR)&&(curntn->dstatus[x]==WAR)){ X fprintf(fnews,"2.\tnation %s goes to war with %s\n",curntn->name,ntn[x].name); X if( isnotpc(ntn[x].active) ) continue; X! mailopen(x); X! fprintf(fm,"nation %s goes to war with you\n",curntn->name); X! mailclose(); X } else if((oldstat[x]!=JIHAD)&&(curntn->dstatus[x]==JIHAD)){ X fprintf(fnews,"2.\tnation %s announces a jihad with %s\n",curntn->name,ntn[x].name); X if( isnotpc(ntn[x].active) ) continue; X! mailopen(x); X! fprintf(fm,"nation %s announces a jihad with you\n",curntn->name); X! mailclose(); X } X } X } X--- 840,868 ---- X curntn->dstatus[x]=HOSTILE; X fprintf(fnews,"2.\tnation %s and %s announce ceasefire\n",curntn->name,ntn[x].name); X if( isnotpc(ntn[x].active) ) continue; X! if (mailopen(x)!=(-1)) { X! fprintf(fm,"Message from Conquer\n\n"); X! fprintf(fm,"Nation %s and you negotiate a ceasefire\n",curntn->name); X! mailclose(x); X! } X } else if((oldstat[x]==WAR)&&(curntn->dstatus[x]==WAR)){ X fprintf(fnews,"2.\tnation %s stays at war with %s\n",curntn->name,ntn[x].name); X } else if((oldstat[x]<WAR)&&(curntn->dstatus[x]==WAR)){ X fprintf(fnews,"2.\tnation %s goes to war with %s\n",curntn->name,ntn[x].name); X if( isnotpc(ntn[x].active) ) continue; X! if (mailopen(x)!=(-1)) { X! fprintf(fm,"Message from Conquer\n\n"); X! fprintf(fm,"Nation %s goes to war with you\n",curntn->name); X! mailclose(x); X! } X } else if((oldstat[x]!=JIHAD)&&(curntn->dstatus[x]==JIHAD)){ X fprintf(fnews,"2.\tnation %s announces a jihad with %s\n",curntn->name,ntn[x].name); X if( isnotpc(ntn[x].active) ) continue; X! if(mailopen(x)!=(-1)) { X! fprintf(fm,"Message from Conquer\n\n"); X! fprintf(fm,"nation %s announces a jihad with you\n",curntn->name); X! mailclose(x); X! } X } X } X } X*************** X*** 865,884 **** X /* Find the average world food value per sector X * and the average tradegood value per sector. X * This is used for unseen sectors and unseen X! * armies. */ X static void X find_avg_sector () X { X! int armynum; X! int i; X! int nation; X! int repeat; X! struct s_sector *sptr; /* used to speed up this function */ X! register int x,y; X! register long total_food = 0; X! int total_sectors; X! register long total_tg = 0; X! register long useable_land = 0; X X for(x=0;x<MAPX;x++) for(y=0;y<MAPY;y++) { X sptr = &sct[x][y]; X--- 871,886 ---- X /* Find the average world food value per sector X * and the average tradegood value per sector. X * This is used for unseen sectors and unseen X! * armies. X! */ X static void X find_avg_sector () X { X! int armynum, i, nation, repeat, total_sectors, total_food = 0; X! struct s_sector *sptr; /* used to speed up this function */ X! register int x,y; X! register long total_tg = 0; X! register long useable_land = 0; X X for(x=0;x<MAPX;x++) for(y=0;y<MAPY;y++) { X sptr = &sct[x][y]; X*************** X*** 892,905 **** X } X } X } X! Avg_food = total_food / useable_land; X! Avg_tradegood = total_tg / useable_land; X X for(nation=1;nation<NTOTAL;nation++) { X if(isntn(ntn[nation].active) X && !COUNT_ARMIES(nation,country)) { X /* Count the number of sectors which are occupied by each X! * nation's armies. */ X total_sectors = 0; X for(armynum=1;armynum<MAXARM;armynum++) X if(ntn[nation].arm[armynum].sold > 0) { X--- 894,914 ---- X } X } X } X! if (useable_land>0) { X! Avg_food = total_food / useable_land; X! Avg_tradegood = total_tg / useable_land; X! } else { X! /* for stupidities sake */ X! Avg_food = 0; X! Avg_tradegood = 0; X! } X X for(nation=1;nation<NTOTAL;nation++) { X if(isntn(ntn[nation].active) X && !COUNT_ARMIES(nation,country)) { X /* Count the number of sectors which are occupied by each X! * nation's armies. X! */ X total_sectors = 0; X for(armynum=1;armynum<MAXARM;armynum++) X if(ntn[nation].arm[armynum].sold > 0) { X*************** X*** 913,923 **** X if (!repeat) X total_sectors++; X } X! X! Avg_soldiers[nation] = ntn[nation].tmil / total_sectors; X } X } X } X void X nationrun() X { X--- 922,934 ---- X if (!repeat) X total_sectors++; X } X! if (total_sectors > 0) X! Avg_soldiers[nation] = ntn[nation].tmil / total_sectors; X! else Avg_soldiers[nation] = 0; X } X } X } X+ X void X nationrun() X { X*************** X*** 927,933 **** X float hunger; X long zz; X check(); X! prep(country,FALSE,FALSE); X X for(x=0;x<MAPX;x++) for(y=0;y<MAPY;y++) attr[x][y]=0; X X--- 938,944 ---- X float hunger; X long zz; X check(); X! prep(country,FALSE); X X for(x=0;x<MAPX;x++) for(y=0;y<MAPY;y++) attr[x][y]=0; X X*************** X*** 967,978 **** X if((curntn->dstatus[x] >= HOSTILE) X && (ispc(ntn[x].active))) X if (rand()%4 == 0) { /* send the message!! */ X! printf("Sent message to %s\n",ntn[x].name); X! mailopen(x); X! fprintf(fm,"Message to %s from %s (%s of year %d)\n\n" X! ,ntn[x].name,curntn->name,PSEASON(TURN),YEAR(TURN)); X! makemess(rand()%5 +1,fm); X! mailclose(); X } X } X #endif SPEW X--- 978,990 ---- X if((curntn->dstatus[x] >= HOSTILE) X && (ispc(ntn[x].active))) X if (rand()%4 == 0) { /* send the message!! */ X! if (mailopen(x)!=(-1)) { X! fprintf(fm,"Message to %s from %s (%s of year %d)\n\n" X! ,ntn[x].name,curntn->name,PSEASON(TURN),YEAR(TURN)); X! makemess(rand()%5 +1,fm); X! mailclose(x); X! printf("Sent message to %s\n",ntn[x].name); X! } X } X } X #endif SPEW X*************** X*** 1287,1293 **** X register short natn; X { X register int i,j; X! int repeat; X register int x,y; X X if (COUNT_ARMIES(natn,country)) { X--- 1299,1305 ---- X register short natn; X { X register int i,j; X! int repeat; X register int x,y; X X if (COUNT_ARMIES(natn,country)) { X*************** X*** 1336,1341 **** X--- 1348,1354 ---- X if(ISCITY(sct[x][y].designation)) X attr[x][y] += 50; X /* should spread 3000 points over country */ X+ if (ntn[country].tciv>0) X attr[x][y]+=3000*sct[x][y].people/ntn[country].tciv; X } X } X*** otrade.c Wed Sep 20 21:41:00 1989 X--- trade.c Wed Sep 20 21:41:35 1989 X*************** X*** 71,76 **** X--- 71,77 ---- X long lvar1[MAXITM], lvar2[MAXITM], holdlong, holdlong2, armyvalue(); X void tradeerr(), setaside(), takeback(); X X+ clear(); X while (done==FALSE) { X itemnum=0; X done=TRUE; X*************** X*** 90,96 **** X } X } X if (notopen==FALSE) fclose(tfile); X! clear(); X /* display header */ X standout(); X mvaddstr(0,27,"COMMODITIES EXCHANGE"); X--- 91,98 ---- X } X } X if (notopen==FALSE) fclose(tfile); X! move(0,0); X! clrtobot(); X /* display header */ X standout(); X mvaddstr(0,27,"COMMODITIES EXCHANGE"); X*************** X*** 97,103 **** X mvaddstr(1,20,"No Guarantees... All Trades Final"); X standend(); X count=3; X! mvprintw(count,0," Nation Item Price"); X /* give some minor items for purchase */ X mvprintw(++count,0,"%2d) %-20s",GETFOOD,"Merchants Guild"); X mvprintw(count,30,"%9ld %s",GODFOOD,commodities[TDFOOD]); X--- 99,105 ---- X mvaddstr(1,20,"No Guarantees... All Trades Final"); X standend(); X count=3; X! mvaddstr(count,0," Nation Item Price"); X /* give some minor items for purchase */ X mvprintw(++count,0,"%2d) %-20s",GETFOOD,"Merchants Guild"); X mvprintw(count,30,"%9ld %s",GODFOOD,commodities[TDFOOD]); X*************** X*** 147,153 **** X standout(); X mvaddstr(0,27,"COMMODITIES EXCHANGE"); X standend(); X! mvprintw(2,0," Nation Item Minimum Price"); X count=2; X } X } X--- 149,155 ---- X standout(); X mvaddstr(0,27,"COMMODITIES EXCHANGE"); X standend(); X! mvaddstr(2,0," Nation Item Minimum Price"); X count=2; X } X } X*************** X*** 364,370 **** X } X break; X case TDLAND: X! mvprintw(count++,0,"What Y position? "); X refresh(); X extint = get_number(); X if (extint < 0) { X--- 366,372 ---- X } X break; X case TDLAND: X! mvaddstr(count++,0,"What Y position? "); X refresh(); X extint = get_number(); X if (extint < 0) { X*** otxt0 Wed Sep 20 21:41:01 1989 X--- txt0 Wed Sep 20 21:41:36 1989 X*************** X*** 1,25 **** X! CONQUER COMMAND HELP SCREEN X X! SELECTIVE MOVEMENT CIVIL X! 'o': pick previous unit 'h': move west 'r': redesignate X! 'p': pick next unit 'y': move north-west 't': transport via ship X! 'G': go to next army 'k': move north 'C': construct X! 'F': go to next fleet 'u': move north-east 'D': draft armies X! 'm': move selected unit 'l': move east 'Z': move civilians X! 'n': move south-east X! FORMS 'j': move south COMMUNICATIVE X! 'c': administrative 'b': move south-west 'R': read mail messages X! 's': world score list 'J': scroll south 'N': read newspaper X! 'B': budget status 'K': scroll north 'T': trade with players X! 'I': campaign info 'L': scroll east 'W': write mail messages X! 'M': magic screen 'H': scroll west X! 'P': production status MILITARY X! 'S': diplomacy status MISC COMMANDS 'a': army report X! 'q': quit and save 'f': fleet report X VISUAL 'v': version credits 'g': group army report X 'd': change display '!': repeat unit cmd 'w': wizardry commands X 'cntrl-L': redraw '?': help screens 'ESC': extra commands X END X CONQUER EXTENDED COMMANDS X X All of the extended commands are accessed by typing the ESC key and X--- 1,46 ---- X! CONQUER COMMAND HELP SCREEN X X! SELECTIVE MOVEMENT CIVIL X! 'o': pick previous unit 'x': jump to sector 'r': redesignate X! 'p': pick next unit 'X': jump to capitol 't': transport via ship X! 'G': go to next army 'h','H': move west 'C': construct X! 'F': go to next fleet 'y': move north-west 'D': draft armies X! 'm': move selected unit 'k','K': move north 'Z': move civilians X! 'u': move north-east X! FORMS 'l','L': move east COMMUNICATIVE X! 'c': administrative 'n': move south-east 'R': read mail messages X! 's': world score list 'j','J': move south 'N': read newspaper X! 'B': budget status 'b': move south-west 'T': trade with players X! 'I': campaign info 'W': write mail messages X! 'M': magic screen MISC COMMANDS X! 'P': production status 'Q': quit and save MILITARY X! 'S': diplomacy status 'q': quit and save 'a': army report X! 'z': change login 'f': fleet report X VISUAL 'v': version credits 'g': group army report X 'd': change display '!': repeat unit cmd 'w': wizardry commands X 'cntrl-L': redraw '?': help screens 'ESC': extra commands X END X+ CONQUER CURSOR MOVEMENT X+ X+ NORTH X+ X+ (K) X+ y,7 k,8 u,9 X+ \ | / X+ \ | / X+ WEST (H) h,4 ---- 0 ---- l,6 (L) EAST X+ / | \ X+ / | \ X+ b,1 j,2 n,3 X+ (J) X+ X+ SOUTH X+ X+ Figures in parenthesis indicate scrolling X+ Note either numeric keypad OR vi keys can be used X+ X+ <cntrl>-L will redraw the screen X+ END X CONQUER EXTENDED COMMANDS X X All of the extended commands are accessed by typing the ESC key and X*************** X*** 99,125 **** X Perhaps god is looking for people to run his worlds. Send mail X to XLOGIN and you may find out. X END X- CONQUER CURSOR MOVEMENT X- X- NORTH X- X- (K) X- y,7 k,8 u,9 X- \ | / X- \ | / X- WEST (H) h,4 ---- 0 ---- l,6 (L) EAST X- / | \ X- / | \ X- b,1 j,2 n,3 X- (J) X- X- SOUTH X- X- Figures in parenthesis indicate scrolling X- Note either numeric keypad OR vi keys can be used X- X- <cntrl>-L will redraw the screen X- END X CONQUER COMMANDS -- lower case commands X X 'a': army report: Gives an army's details & permits changing army status, X--- 120,125 ---- X*************** X*** 194,200 **** X X To my knowledge Conquer runs well on UNIX (SYS V or BSD 4.3) systems. The X game treats turns like a hidden move wargame would... you enter all your X! moves into the program and conquer tells you what happens. Like wargames, X there is no turning back. Every move you make will be saved when you quit. X If you goof up real bad, you need to go to the administrator, and have him X log in (as god) and fix whatever you did. Of course, bribery will probably X--- 194,200 ---- X X To my knowledge Conquer runs well on UNIX (SYS V or BSD 4.3) systems. The X game treats turns like a hidden move wargame would... you enter all your X! moves into the program and conquer tells you what happens. Like wargames, X there is no turning back. Every move you make will be saved when you quit. X If you goof up real bad, you need to go to the administrator, and have him X log in (as god) and fix whatever you did. Of course, bribery will probably X*** otxt1 Wed Sep 20 21:41:01 1989 X--- txt1 Wed Sep 20 21:41:36 1989 X*************** X*** 125,132 **** X handle poor or low value sectors. Sum the numbers found below. The result X is the relative "attractiveness" of a sector. X X! General Modifiers: Goldmine: XGOLDATTR / jewels Farm: XFARMATTR / food value Other: XOTHRATTR X! Trade Good: XTGATTR Mine: XMINEATTR / metals Town: XTOWNATTR City: XCAPATTR X X Racial Modifiers X Race Mtn Hill Clear Forest Wood City Mine Gldmine X--- 125,132 ---- X handle poor or low value sectors. Sum the numbers found below. The result X is the relative "attractiveness" of a sector. X X! General Modifiers: Goldmine: XGOLDATTR * jewels Farm: XFARMATTR * food value Other: XOTHRATTR X! Trade Good: XTGATTR Mine: XMINEATTR * metals Town: XTOWNATTR City: XCAPATTR X X Racial Modifiers X Race Mtn Hill Clear Forest Wood City Mine Gldmine X*** otxt4 Wed Sep 20 21:41:01 1989 X--- txt4 Wed Sep 20 21:41:37 1989 X*************** X*** 27,34 **** X ZCAPITOL and can build ships here. Town tax=rate*XTAXTOWN talons/person and X City tax=rate*XTAXCITY talons/person. Both cost a lot to redesignate X AND take metal to create. They are captured only if you are the ONLY X! occupant of the sector when the world is updated. NPC nations are X! destroyed if they lose their capitol. Cities, Towns, and Capitols X add to many of a nations characteristics. X ZMINE Mine: Produce (tax/100)*XTAXMETAL*Metal*People Talons & Produces X Metal Ores. Each mine you own adds to your nations mine_ability. X--- 27,34 ---- X ZCAPITOL and can build ships here. Town tax=rate*XTAXTOWN talons/person and X City tax=rate*XTAXCITY talons/person. Both cost a lot to redesignate X AND take metal to create. They are captured only if you are the ONLY X! occupant of the sector when the world is updated. Nations become X! depleted if they lose their capitol. Cities, Towns, and Capitols X add to many of a nations characteristics. X ZMINE Mine: Produce (tax/100)*XTAXMETAL*Metal*People Talons & Produces X Metal Ores. Each mine you own adds to your nations mine_ability. X*************** X*** 36,43 **** X Each farm you own adds to your nations farm_ability. X ZGOLD Produces (tax/100)*XTAXGOLD*Gold*People Talons & Produces Jewels X ZDEVASTATED Devastated sector. People dont like to live where devastated. X! ZRUIN Ruins are devastated Cities. They may be rebuilt at 1/2 price. X! They can't be redesignated to anything other than a city. X END X DESIGNATION DESCRIPTIONS pg.2 X X--- 36,43 ---- X Each farm you own adds to your nations farm_ability. X ZGOLD Produces (tax/100)*XTAXGOLD*Gold*People Talons & Produces Jewels X ZDEVASTATED Devastated sector. People dont like to live where devastated. X! ZRUIN Ruins are devastated Cities. They may be rebuilt to cities at X! half cost or for XREBUILDCOST talons may be redesignated otherwise. X END X DESIGNATION DESCRIPTIONS pg.2 X X*** otxt5 Wed Sep 20 21:41:01 1989 X--- txt5 Wed Sep 20 21:41:37 1989 X*************** X*** 177,184 **** X same race as you. X X # STARTING VALUES X! reputation = prestige = 50 knowledge = mine ability = farm ability=10 X! eatrate = 1.00 tax rate=10% poverty = 95% X END X FORMULAE USED FOR NATION ATTRIBUTES pg. 2 X X--- 177,184 ---- X same race as you. X X # STARTING VALUES X! reputation = prestige = 50 knowledge = mine ability = farm ability = 10 X! eatrate = 1.00 tax rate=10% poverty = 95% X END X FORMULAE USED FOR NATION ATTRIBUTES pg. 2 X X*************** X*** 199,210 **** X END X FORMULAE USED FOR NATION ATTRIBUTES pg. 3 X X! poverty : is funny. You can give charity to the poor to lower the poverty X! rate but the equilibrium level with no charity will be about X! 100-wealth/4. Charity is a user paramter, which indicates the X! percent of your NET income to go to the poor. Giving twice your X! population in talons will reduce poverty by one. X! wealth : see elsewhere. X END X ADDITIONAL MODIFIERS TO NATIONAL ATTRIBUTES X X--- 199,222 ---- X END X FORMULAE USED FOR NATION ATTRIBUTES pg. 3 X X! charity = Is the percent of net gold given directly to the general X! population. This has a direct effect of reducing poverty X! by 1% for every two talons given to each person. X! poverty = Poverty is a relative value of the number of talons you have X! per each civilian. The inital value is determined as: X! talons/civilian poverty talons/civilian poverty X! < 0 95% 80-120 40%-30% X! 0-30 95%-65% 120-200 30%-20% X! 30-80 65%-40% > 200 20% X! Poverty is then modified directly by the amount of talons given X! directly to the people through charity. X! inflation = inflation is an indicator as to the actual value of the national X! talon. If inflation is zero percent, then it is 1:1. X! Inflation is calculated as: X! between 25%-125% of the tax rate [randomly determined] X! plus (poverty - 50)/2 and is then adjusted by the ratio of X! military to civilians. X! wealth = see elsewhere. X END X ADDITIONAL MODIFIERS TO NATIONAL ATTRIBUTES X X*** opsmap.c Wed Sep 20 21:41:00 1989 X--- psmap.c Wed Sep 20 21:41:39 1989 X*************** X*** 104,115 **** X isinstr(string, word) X char *string, *word; X { X! while ((c = index(string, *word)) != 0) X! if (!strncmp((char *) c, word, strlen(word))) { X! return (TRUE); X! } else X! string = (char *) c + 1; X! return (FALSE); X } X X int X--- 104,119 ---- X isinstr(string, word) X char *string, *word; X { X! int i,l1=strlen(string),l2=strlen(word); X! X! if (l1 < l2) return(FALSE); X! for(i = 0; i < l1; i++ ) { X! if (l1-i<l2) break; X! if (string[i] == word[0]) { X! if (strncmp(string+i,word,l2)==0) return(TRUE); X! } X! } X! return(FALSE); X } X X int X*** patchlevel.h.orig Thu Sep 21 05:54:43 1989 X--- patchlevel.h Thu Sep 21 06:08:15 1989 X*************** X*** 1 **** X! #define PATCHLEVEL 5 X--- 1 ---- X! #define PATCHLEVEL 6 SHAR_EOF chmod 0644 patchV4.6 || echo "restore of patchV4.6 fails" sed 's/^X//' << 'SHAR_EOF' > sunconqrast.h && X/********************************************************************* X* * X* Header file for sun version of conqrast * X* * X*********************************************************************/ X X#define driver_version "1" X#define conqrast_name "Sunconqrast" X X#include <pixrect/pixrect_hs.h> X Xtypedef struct pixrect * bitmap; Xtypedef char * screen_type; Xtypedef struct pixfont * font; X X#define initialise_bitmaps() /* EMPTY */ X#define finish_bitmaps() /* EMPTY */ X X#define is_screenname(mapname) (!strncmp(mapname,"/dev/",5)) X#define get_default_screen_name() "/dev/fb" X#define screen_named(name) (name) X#define get_screen_bitmap(screen) (pr_open(screen)) X#define create_bitmap(width,height) (mem_create(width,height,1)) X#define destroy_bitmap(bitmap) pr_close(bitmap) X#define font_named(name) pf_open(name) X#define bad_font(font) ((font)==NULL) X#define font_height(font) ((font->pf_defaultsize).y) X#define font_width(font) ((font->pf_defaultsize).x) X#define font_baseline(font) (0-(font->pf_char)['A'].pc_home.y+1) X X#define BLACK PIX_SET X#define WHITE PIX_CLR X#define DRAW_BLACK (PIX_DST|PIX_SRC) X#define DRAW_WHITE (PIX_DST&PIX_NOT(PIX_SRC)) X X#define set_bit(bitmap,x,y,val) pr_put(bitmap,x,y,val) X#define draw_line(bitmap,x1,y1,x2,y2,colour) pr_vector(bitmap,x1,y1,x2,y2,colour,0) SHAR_EOF chmod 0644 sunconqrast.h || echo "restore of sunconqrast.h fails" sed 's/^X//' << 'SHAR_EOF' > sunstuff.c && X#include <stdio.h> X#include "sunconqrast.h" X Xstruct /* maps from size of map to the font */ X /* to use */ X { /* if size > mag use font */ X int mag; X char *font,*bold; X } fonts[] = X { X 9, "/usr/lib/fonts/fixedwidthfonts/screen.r.7", NULL, X 11, "/usr/lib/fonts/fixedwidthfonts/cour.r.10", X "/usr/lib/fonts/fixedwidthfonts/cour.b.10", X 12, "/usr/lib/fonts/fixedwidthfonts/cour.r.12", X "/usr/lib/fonts/fixedwidthfonts/cour.b.12", X 14, "/usr/lib/fonts/fixedwidthfonts/cour.r.14", X "/usr/lib/fonts/fixedwidthfonts/cour.b.14", X 16, "/usr/lib/fonts/fixedwidthfonts/cour.r.16", X "/usr/lib/fonts/fixedwidthfonts/cour.b.16", X 18, "/usr/lib/fonts/fixedwidthfonts/cour.r.18", X "/usr/lib/fonts/fixedwidthfonts/cour.b.18", X 22, "/usr/lib/fonts/fixedwidthfonts/cour.r.24", X "/usr/lib/fonts/fixedwidthfonts/cour.b.24", X 999999, NULL X }; X Xstatic int encoding_type = RT_STANDARD ; X Xint Xargument_parse(argv) X Xchar *argv[]; X X{ Xif ( !strcmp(*argv,"-compact")) X { X encoding_type = RT_BYTE_ENCODED ; X return 1; X } Xelse X return 0; X} X X/*ARGSUSED*/ Xint Xwrite_bitmap(bm,file,width,height) X Xbitmap bm; Xchar *file; Xint width,height; X X{ X FILE *f; X X if ((f=fopen(file,"w"))==NULL) X ioerror("Can't open output file %s",file); X X return pr_dump( bm, f, RMT_NONE, encoding_type,0); X } X X X Xvoid Xdisplay_bitmap(bm,x,y,w,h) X Xbitmap bm; Xint x,y,w,h; X X{ X struct pixrect *screen=pr_open("/dev/fb"); X X pr_rop(screen,x,y,w,h,PIX_SRC,bm,0,0); X X } X Xbitmap_text(pr,x,y,colour,pf,str) X Xbitmap pr; Xint x,y; Xint colour; Xfont pf; Xchar *str; X X{ X struct pr_prpos pos; X X pos.pos.x=x; X pos.pos.y=y; X pos.pr=pr; X X pf_text(pos,colour,pf,str); X } X SHAR_EOF chmod 0644 sunstuff.c || echo "restore of sunstuff.c fails" sed 's/^X//' << 'SHAR_EOF' > util.c && X#include <stdio.h> X#include <sgtty.h> X X/********************************************************************* X* * X* various utility bits split off to try and get conqrast.c down to a * X* reasonable size * X* * X*********************************************************************/ X X X/********************************************************************* X* * X* routine to build the dither matrix used to shade * X* * X*********************************************************************/ X X#define MAXDITHER 4 /* don't touch this */ X Xshort dit[1<<MAXDITHER][1<<MAXDITHER]; X Xvoid Xbuild_dither_matrix(depth) X Xint depth; X X{ X register int d,i,j,p; X depth= 1<<depth; X X dit[0][0]=0; dit[1][0]=2; X X dit[0][1]=3; dit[1][1]=1; X X for(d=2;d<depth;d=d<<1) X for(i=0;i<d;i++) X for(j=0;j<d;j++) X { X p= (dit[i][j] *=4); X dit[d+i][j] = p+2; X dit[i][d+j] = p+3; X dit[d+i][d+j] = p+1; X } X X if (depth != 16 ) X for(i=0;i<depth;i++) X for (j=0;j<depth;j++) X dit[i][j] = (dit[i][j]*256)/d/d; X X } X X/********************************************************************* X* * X* disconnect from controlling tty * X* * X*********************************************************************/ X Xvoid Xdisconnect() X X{ X int tty; X X tty=open("/dev/tty",0); X X ioctl(tty,TIOCNOTTY,0); X X close(tty); X } X X/********************************************************************* X* * X* go into background * X* * X*********************************************************************/ X Xvoid Xbackground() X X{ X switch (fork()) X { X case 0: break; X X default: exit(0); X } X printf("(%d)\n",getpid()); X } X X/********************************************************************* X* * X* Print a useage message and exit. This needs to be expanded. * X* * X*********************************************************************/ X Xvoid Xhelp_message(me) X Xchar *me; X X{ X printf("%s: Usage --\n",me); X printf("\n%s\t\t-o <file-or-display>\n",me); X printf("\t\t-N <nation>\n"); X printf("\t\t-D <game-directory>\n"); X printf("\t\t-c<contour-character> <brightness>\n"); X printf("\t\t-f <which-font> <font>\n"); X printf("\t\t-d -n{a} -b{a} -m <magnification> -a -bg -l -t -v\n"); X exit(1); X } X SHAR_EOF chmod 0644 util.c || echo "restore of util.c fails" sed 's/^X//' << 'SHAR_EOF' > xconqrast.h && X X/* header for X */ X X#define driver_version "preliminary" X#define conqrast_name "Xconqrast" X X#include <X11/Xlib.h> X Xtypedef Drawable bitmap ; Xtypedef Display *screen_type; Xtypedef char *font; /* this needs doing */ X X#define is_screenname(name) (index(name,':')!=NULL) /* I think */ X#define get_default_screen_name() NULL /* I have no idea */ X Xscreen_type screen_named(); X Xbitmap get_screen_bitmap(); Xbitmap create_bitmap(); X X#define destroy_bitmap(bm) /* I don't know how to */ X#define font_named(name) (name) /* ditto */ X#define bad_font(font) ((font)==NULL) /* ??? */ X#define font_height(font) (0) /* ??? */ X#define font_width(font) (0) /* ??? */ X#define font_baseline(font) (0) /* ??? */ X X#define BLACK (1) X#define WHITE (0) /* guessing */ X#define DRAW_BLACK (1) /* ?? */ X#define DRAW_WHITE (2) X Xvoid set_bit(); X X#define draw_line(bitmap,x1,y1,x2,y2,colour) /* again no idea! */ X X SHAR_EOF chmod 0644 xconqrast.h || echo "restore of xconqrast.h fails" sed 's/^X//' << 'SHAR_EOF' > xstuff.c && X#include <stdio.h> X#include "xconqrast.h" X X/* utilities for X */ X XDisplay *display; XDrawable root; Xint screen; XGC gc; Xshort greyscale; X Xstruct /* maps from size of map to the font */ X /* to use */ X { /* if size > mag use font */ X int mag; X char *font,*bold; X } fonts[] = /* copied from the sun driver! need replacing */ X { X 9, "/usr/lib/fonts/fixedwidthfonts/screen.r.7", NULL, X 11, "/usr/lib/fonts/fixedwidthfonts/cour.r.10", X "/usr/lib/fonts/fixedwidthfonts/cour.b.10", X 12, "/usr/lib/fonts/fixedwidthfonts/cour.r.12", X "/usr/lib/fonts/fixedwidthfonts/cour.b.12", X 14, "/usr/lib/fonts/fixedwidthfonts/cour.r.14", X "/usr/lib/fonts/fixedwidthfonts/cour.b.14", X 16, "/usr/lib/fonts/fixedwidthfonts/cour.r.16", X "/usr/lib/fonts/fixedwidthfonts/cour.b.16", X 18, "/usr/lib/fonts/fixedwidthfonts/cour.r.18", X "/usr/lib/fonts/fixedwidthfonts/cour.b.18", X 22, "/usr/lib/fonts/fixedwidthfonts/cour.r.24", X "/usr/lib/fonts/fixedwidthfonts/cour.b.24", X 999999, NULL X }; X Xint Xargument_parse(argv) X Xchar *argv[]; X X{ Xreturn 0; X} X Xvoid Xinitialise_bitmaps() X X X X X{ X } X Xscreen_type Xscreen_named(name) X Xchar *name; X X{ Xint sc; X Xif ((display=XOpenDisplay(name)) == NULL) X error("No X server!"); X Xroot=XDefaultRootWindow(display); Xsc=XDefaultScreen(display); Xgc=XDefaultGC(display,sc); X Xreturn display; X} X Xbitmap Xget_screen_bitmap(screen) X Xscreen_type screen; X X{ Xint sc; Xreturn root; X} X Xbitmap Xcreate_bitmap(width,height) X Xint width,height; X X{ Xint depth=1; X Xif ( depth != 1 ) X greyscale=1; X Xreturn XCreatePixmap(display,root,width,height,depth); X} X Xvoid Xset_bit(bm,x,y,val) X Xbitmap bm; Xint x,y; Xint val; X X{ X Xif (!greyscale ) X { X XSetForeground(display,gc,(unsigned long)val); X XDrawPoint(display,bm,gc,x,y); X } Xelse X if (val) X XDrawPoint(display,bm,gc,x,y); X} X Xvoid Xdisplay_bitmap( bm,x,y,width,height) X Xbitmap bm; Xint x,y,width,height; X X{ XXCopyArea(display,bm,root,gc,0,0,width,height,x,y); X } X Xint Xwrite_bitmap(bm,file,width,height) X Xbitmap bm; Xchar *file; Xint width,height; X{ X Xreturn XWriteBitmapFile(display,file,bm,width,height,-1,-1); X } X X Xvoid Xfinish_bitmaps() X X{ XXCloseDisplay(display); X} X Xbitmap_text(bm,x,y,colour,pf,str) X Xbitmap bm; Xint x,y; Xint colour; Xfont pf; Xchar *str; X X{ X /* ??? */ X } X SHAR_EOF chmod 0644 xstuff.c || echo "restore of xstuff.c fails" rm -f s2_seq_.tmp echo "You have unpacked the last part" exit 0