1 year=1000:popu=1000:cbush=2500000:cacre=100000:g=1000000:cxp=0:cxp1=100:clvl=1:cxp2=0:walldp=10:amntpop=popu:wallprice=5000:alvl1=250:slvl1=200:calvl1=300:wlvl1=450:amntgold=g:amntbush=cbush:amntacre=cacre:acre=(int(rnd(1)*4)+2)*10
2 oceank7=5:portship=5:axp1=100:sxp1=100:caxp1=100:wxp1=100:hull1=5:hull2=10:fish1=500:oremax=50:bushelmax=500:fishmax=1500:lumbmax=150:crew=50:cannons=2:crit1=1:accuracy=25:fishinc=150:pirates=800
5 cls:gosub 1005:print " The Year is AD ";year;"              Population: ";popu;"   Land: ";cacre;"   Bushels:  ";cbush;"   Gold:  ";g:gosub 1005:if partyscout=0 then listened=1
10 print:print " You have ";cbush;" bushels of grain."
30 print:print " Your population is ";popu;"."
40 print " It would take ";popu*2;" bushels to feed them all this year."
50 print:print " How many bushels will you feed them?";:input a:IF a=0 then 75
60 if a>cbush then print:print " You don't have that many!":goto 10
70 cbush=cbush-a:cbush1=a:print:print " You supply the peasants with -[ ";a;" bushels ]- ":print " Bushels=  ";cbush:if a>(popu*2) then movin=a-(popu*2)
72 if a<(popu*2) then moveout=(popu*2)-a
73 GOTO 125
75 print:print " This will feed the peasants 0 Grain!  Many will die or move away!"
77 print:print " Are you sure you want to feed them 0 Grain (Y/N)";:input a$:if a$="Y" then 60
79 if a$="N" then 5
80 goto 77
125 gosub 1000:print:gosub 1005:goto 190
190 cls:gosub 1005:print " The Year is AD ";year;"              Population: ";popu;"   Land: ";cacre;"   Bushels:  ";cbush;"   Gold:  ";g:gosub 1005:a=int(rnd(1)*3)+1:if a=1 then 550
200 if a=2 then 560
210 print:print " The soil is mediocre this year.":x=2
220 print:print " You estimate it will take ";x;" bushels of grain to fertilize an acre."
225 print:print " You currently have ";cacre;" acres."
230 print:print " You currently have ";cbush;" bushels of grain stored."
235 print:print " You currently have ";popu;" peasants that can work the fields.":gosub 1000
240 PRINT:print " Each peasant can plant 2 acres. Thus, your peasants"
245 popu1=popu*2:print " can plant ";popu1;" acres.  This will take ";popu1*x;" bushels."
250 print " You have ";cacre;" acres to work with.  This will take ";cacre*x;" bushels."
255 print:print " How many acres would you like to plant?";:input a:if a=0 then 720
257 if a>cacre then print " You don't have that many acres.  Acres = ";cacre:goto 255
260 if a>popu1 then print " You don't have enough workers.  Your population is ";popu;", meaning you can plant at maximum ";popu1;" acres.":goto 255
262 a1=a*x:if a1>cbush then print " You don't have enough bushels.  You have ";cbush;" bushels, meaning you can plant at maximum ";int(cbush/x);" acres.":goto 255
264 print:print " You successfully plant -[ ";a;" Acres ]-":cbush=cbush-a1:planted=a:gosub 1000
270 cls:gosub 1005:print " The Year is AD ";year;"              Population: ";popu;"   Land: ";cacre;"   Bushels:  ";cbush;"   Gold:  ";g:gosub 1005:print " Cost to plant ";a;" acres was ";a1;".":print:a=int(rnd(1)*300)+1:if a>=1 AND a<=50 then 575
280 if a>50 and a<=125 then 580
290 a=int(rnd(1)*5)+7:gosub 1005:print " It was a pretty ok harvest!":gosub 1005
295 if a*planted>record then plantedx=a*planted: print:print " Per acre planted you harvested an average of -[ ";a;" bushels ]-":print " For a record breaking -[ ";planted*a;" bushels ]-  (+ ";((planted*a)-(a1));")          Previous Record was ";record:record=planted*a:record1=1:goto 300
297 plantedx=a*planted:print:print " Per acre planted you harvested an average of -[ ";a;" bushels ]-":print " For a total of -[ ";planted*a;" bushels ]-   (+ ";((planted*a)-(a1));")"
300 cbush=cbush+(a*planted):print:gosub 1005:print " In your storage facilities you now have a total of -[ ";cbush;" bushels ]-"
310 gosub 2000:price=a:gosub 1005:GOSUB 1000:PRINT:gosub 58950:gosub 2100:gosub 58200:gosub 59000:gosub 59200:if partyscout>0 and listened=0 then scxxx=1:gosub 6100
311 gosub 55000:GOTO 360
360 gosub 2050:gosub 5000:cls:GOSUB 1005:print " End of The Year Report  ":gosub 1005
370 popu1=popu*2:if popu1>cbush1 then 650
375 if popu1<cbush1 then 670
380 a=int(rnd(1)*4)+1:b=int(rnd(1)*2)+1:if b=1 then popu=popu-a:print "O A few peasants move away.":goto 390
385 popu=popu+a:print "O A few peasants move into the area!"
390 print " Population = ";popu
400 print " Acres =  ";cacre
410 print " Gold =  ";g
420 print " Bushels =  ";cbush
422 PRINT
424 gosub 7000:GOSUB 1005
425 print "   This is the end of the year AD ";year;"    ":gosub 1005:gosub 1000:record1=0:poppy=popu:year=year+1:pm=0:autoscout1=0:scoutin=scoutin+scoutrest:scoutrest=0:listened=0:amntpop=popu:amntgold=g:amntbush=cbush:amntacre=cacre:shipmerch5=0:goto 5

500 REM buying selling acres
510 print:print " How many acres of land would you like to buy?":print " (Max is ";int(g/acre);", 0 to exit)?";:input a:if a*acre>g then print " This will cost ";acre*a;", and you only have ";g;".":goto 510
520 if a<=0 then 130
525 g=g-(a*acre):g1=(a*acre):c1=a:cacre=cacre+a:print:print " Gold down ";g1;".  Acres up ";c1;".":print " You now have ";g;" gold and ";cacre;" acres.":GOSUB 1000:goto 130
530 print:print " How many acres of land would you like to sell?":print " (Max is ";cacre;", 0 to exit)?";:input a:if a>cacre then print " You only have ";cacre;" acres!":goto 530
540 if a<=0 then 130
545 g=g+(a*acre):g1=(a*acre):c1=a:cacre=cacre-a:print:print " Gold up ";g1;".  Acres down ";c1;".":print " You now have ";g;" gold and ";cacre;" acres.":GOSUB 1000:goto 130

550 REM Soil Fertility
555 Print:print " The soil seems extra fertile this year!!":x=1:goto 220
560 a=int(rnd(1)*5)+1:if a=1 then color$="white"
562 if a=2 then color$="black"
563 if a=3 then color$="dark brown"
564 if a=4 then color$="pastey yellow"
565 if a=5 then color$="dark red"
569 print:print " The soil is ";color$;" and hard to crack this year...":x=int(rnd(1)*2)+3:goto 220

570 REM Harvest
575 gosub 1005:print " It was an excellent harvest this year!!":gosub 1005:a=int(rnd(1)*7)+13:goto 295
580 gosub 1005:print " It was a very poor havest this year...":gosub 1005:a=int(rnd(1)*4)+3:goto 295

590 REM buying selling grain
595 print:print " How many bushels of grain would you like to buy?":print" (Max is ";int(g/price);", 0 to exit)?";:input a:if a*price>g then print " That would cost ";a*price;", and you only have ";g;".":goto 595
600 if a<=0 then 312
610 cbush=cbush+a:g=g-(a*price):g1=(a*price):c1=a:print:print " Gold down ";g1;".  Bushels up ";c1;".":print " You now have ";g;" gold and ";cbush;" bushels.":GOSUB 1000:goto 312
620 print:print " How many bushels of grain would you like to sell?":print " (Max is ";cbush;", 0 to exit)?";:input a:if a>cbush then print " You only have ";cbush;" bushels of grain.":goto 620
625 if a<=0 then 312
630 cbush=cbush-a:g1=(a*price):c1=a:g=g+(a*price):print:print " Gold up ";g1;".  Bushels down ";c1;".":print " You now have ";g;" gold and ";cbush;" bushels.":GOSUB 1000:goto 312


640 REM population increase/decrease
650 print "O You did not feed the peasants enough!  They are starving and pissed!":if popu<=10 then goto 750
651 c=int(rnd(1)*3)+1:c=c+int(rnd(1)*3)+1
652 if moveout>100 then c=c+int(rnd(1)*5)+1
653 if moveout>250 then c=c+int(rnd(1)*10)+1
654 if moveout>500 then c=c+int(rnd(1)*15)+1
655 if moveout>750 then c=c+int(rnd(1)*25)+2
656 if moveout>1000 then c=c+int(rnd(1)*35)+3
657 if moveout>5000 then c=c+int(rnd(1)*55)+4
658 if moveout>10000 then c=c+int(rnd(1)*65)+5
659 if moveout>15000 then c=c+int(rnd(1)*85)+10
660 if moveout>20000 then c=c+int(rnd(1)*105)+15
661 if moveout>25000 then c=c+int(rnd(1)*155)+20
662 if c>popu then c=popu-10
663 popu=popu-c:print "  ";c;" peasants moved out of the area or died of starvation....":moveout=0:goto 390
670 print "O The abundance of food you have provided brings merriment and joy to all in your kingdom!":c=int(rnd(1)*3)+1
672 if movin>0 then c=c+1
674 if movin>100 then c=c+int(rnd(1)*5)+1
676 if movin>200 then c=c+int(rnd(1)*10)+10
678 if movin>500 then c=c+int(rnd(1)*15)+15
680 if movin>900 then c=c+int(rnd(1)*20)+15
682 if movin>1350 then c=c+int(rnd(1)*25)+15
684 if movin>1850 then c=c+int(rnd(1)*25)+20
686 if movin>2400 then c=c+int(rnd(1)*25)+20
688 if movin>3000 then c=c+25
690 if movin>4000 then c=c+25
692 if movin>5000 then c=c+25
694 if movin>10000 then c=c+25
695 if movin>18000 then c=c+50
696 if movin>30000 then c=c+125
697 if movin>50000 then c=c+225
698 if movin>75000 then c=c+325
699 if movin>100000 then c=c+425
700 if movin>200000 then c=c+525
702 gosub 710
705 movin=0:popu=popu+c:print "  ";c;" peasants have moved to your kingdom!!":goto 390

710 if churches>0 then 713
712 return
713 d=0:ccc=0:a=int(popu/churches):b=int(rnd(1)*1000)+1:if a=1 then b=b-300
714 if (b+a)>400 then 730
715 d=d+1:if d>clvl then 718
716 cc=int(rnd(1)*20)+1:if cc<=5 then ccc=ccc+int(rnd(1)*4)+2
717 goto 715
718 if ccc>0 then print " Your churches have attracted ";ccc;" peasants!":c=c+ccc:return
719 return
730 d=d+1:if d>clvl then 718
732 cc=int(rnd(1)*100)+1:if cc<=5 then ccc=ccc+int(rnd(1)*2)+2
734 goto 730

720 REM Y/N to not planting any land
722 print:print " This will plant 0 acres this year and you will not harvest any grain!"
724 print:print " Are you sure you want to plant 0 acres this year {Y/N}";:input a$:if a$="Y" then PRINT:PRINT " You plant nothing this year.....":planted=a:gosub 1000:goto 270
726 if a$="N" then 240
728 goto 724

750 REM Riots
752 print:print " Your peasants are Rioting in the streets!  You need to feed them!":goto 390
753 REM CLEAR 753-999

1000 print:print "=O==O= Please Press Return";:input r$:return
1005 print ":::<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:::":return

2000 REM PRICE OF GRAIN
2002 if a>=18 then a=int(rnd(1)*3)+1:return
2004 if a>=15 then a=int(rnd(1)*3)+2:return
2006 if a>=12 then a=int(rnd(1)*3)+4:return
2008 if a>=10 then a=int(rnd(1)*3)+6:return
2010 if a>=8 then a=int(rnd(1)*3)+8:return
2012 if a>=6 then a=int(rnd(1)*3)+10:return
2014 if a>=4 then a=int(rnd(1)*2)+11:return
2016 if a>=2 then a=int(rnd(1)*2)+12:return
2018 a=15:return

2050 REM PRICE OF LAND
2052 a=int(rnd(1)*33)+1:if a>0 and a<=6 then acre=acre+10:goto 2068
2054 if a>6 and a<=11 then acre=acre-10:goto 2068
2056 if a>11 and a<=17 then acre=acre+20:goto 2068
2058 if a>17 and a<=21 then acre=acre-20:goto 2068
2060 if a>21 and a<=26 then acre=acre+30:goto 2068
2062 if a>26 and a<=29 then acre=acre-30:goto 2068
2064 if a>29 and a<=32 then acre=acre+40:goto 2068
2066 if a>32 then acre=acre-40
2068 if acre>150 then acre=150
2070 if acre=150 then onefifty=onefifty+1
2071 if onefifty=6 then onefifty=0:acre=(int(rnd(1)*7)+1)*10
2072 if acre<20 then acre=20
2073 if acre=20 then twenty=twenty+1
2074 if twenty=3 then twenty=0:acre=(int(rnd(1)*5)+3)*10
2075 return

2080 REM SEX/TYPE
2081 a=int(rnd(1)*8)+1:if a=1 then type$=" young man"
2082 if a=2 then type$=" young woman"
2083 if a=3 then type$="n old woman"
2084 if a=4 then type$="n old man"
2085 if a=5 then type$=" young girl"
2086 if a=6 then type$=" young boy"
2087 if a=7 then type$=" middle-aged woman"
2088 if a=8 then type$=" middle-aged man"
2089 return

2100 rem RATZ!
2102 goto 59100
2110 ReM PLAGUEZ!
2112 if popu>=250 then 2116
2114 goto 2124
2116 a=int(rnd(1)*50)+1:if a=1 then 2120
2118 goto 2124
2120 print:print " A Plague has broke out in your land!!":a=int(popu*.1):b=int(rnd(1)*a)+1:popu=popu-b
2121 print " ";b;" peasants have died!!  You now have ";popu;" peasants.....":print:gosub 1005:gosub 1000:goto 2124
2122 REM FIREZ!
2124 if acre<50 then 2137
2126 a=int(rnd(1)*50)+1:if a=1 then 2130
2128 goto 2137
2130 print:print " A Fire has spread across your lands!!":a=int(cacre*.1):b=int(rnd(1)*a)+1:destacre=destacre+b:cacre=cacre-b
2132 print " Some of your land was destroyed and will have to be rebuilt!  You lost ";b;" acres and now have ";cacre;" acres left....":print:repair=1:gosub 1005:gosub 1000:return
2135 REM MILITANT GROUPZ! -- this doesnt happen if fire spreads above
2137 a=int(rnd(1)*50)+1:if a=1 then 2142
2140 goto 59300
2142 print:print " Militant Groups are trying to set fire to your fields!!":a=int(cacre*.01):if a<1 then a=1
2144 b=int(rnd(1)*a)+1:if (cacre-b)<=0 then print:print " Luckily you kill them all before they successfully do so.":goto 59300
2145 destacre=destacre+b:cacre=cacre-b
2146 print " You soon quelch the uprising but some of your land was destroyed!  You lost ";b;" acres and now have ";cacre;" acres left....":print:repair=1:gosub 1005:gosub 1000:goto 59300
2150 REM Festivals
2152 a=int(rnd(1)*50)+1:if a=1 then 2156
2154 goto 2170
2156 a=int(rnd(1)*4)+1:if a=1 then a$="Spring":goto 2165
2158 if a=2 then a$="Summer":goto 2165
2160 if a=3 then a$="Fall":goto 2165
2162 a$="Winter"
2165 print:print " Peasants hold a ";a$;" Equinox Festival this year!":a=(int(rnd(1)*5)+1)+clvl:print " ";a;" peasants decide that moving into your kingdom will grant them a better quality of life.":print " Population up ";a;".  Population is now ";popu+a:gosub 1005:gosub 1000:popu=popu+a:cbush1=cbush1+(a*2):goto 2250
2170 a=int(rnd(1)*50)+1:if a=1 then 2174
2172 goto 2180
2174 print:print " A Carnival is held this year!":a=(int(rnd(1)*6)+1)*clvl:print " ";a;" peasants move into your kingdom 'cause they like carnivals.":print " Population up ";a;".  Population is now ";popu+a:gosub 1005:gosub 1000:popu=popu+a:cbush1=cbush1+(a*2):goto 2250
2180 a=int(rnd(1)*30)+1:if a=1 and ports>0 then 2184
2182 goto 2185
2184 print:print " A 'Day Of The Sea' celebration is held near one of your port cities!":a=(int(rnd(1)*4)+1)+clvl:print " ";a;" peasants move into your kingdom after having such a good time at the celebration.":print " Population up ";a;".  Population is now ";popu+a:gosub 1005:gosub 1000:popu=popu+a:cbush1=cbush1+(a*2):goto 2250
2185 a=int(rnd(1)*30)+1:if a=1 and movin>0 then 2189
2188 goto 2190
2189 print:print " A 'We Love The King' celebration is held in your honor!":a=(int(rnd(1)*5)+1)+clvl:print " ";a;" peasants move into your kingdom because they like you so much.":print " Population up ";a;".  Population is now ";popu+a:gosub 1005:gosub 1000:popu=popu+a:cbush1=cbush1+(a*2):goto 2250
2190 a=int(rnd(1)*30)+1:if a=1 and fish>15000 then 2194
2192 goto 2195
2194 print:print " A 'Fisher King' celebration is held near one of your port cities!":a=(int(rnd(1)*6)+1)+clvl:print " ";a;" peasants move into your kingdom after having such a good time at the celebration.":print " Population up ";a;".  Population is now ";popu+a:gosub 1005:gosub 1000:popu=popu+a:cbush1=cbush1+(a*2):goto 2250
2195 a=int(rnd(1)*30)+1:if a=1 and record1=1 then 2194
2196 goto 2200
2198 print:print " A 'We Broke The Grain Record' celebration is held by the peasants over the summer!":a=(int(rnd(1)*4)+1)+clvl:print " ";a;" peasants move into your kingdom after having such a good time at the celebration.":print " Population up ";a;".  Population is now ";popu+a:gosub 1005:gosub 1000:popu=popu+a:cbush1=cbush1+(a*2):goto 2250
2200 a=int(rnd(1)*30)+1:if a=1 and cbush>5000 then 2204
2202 goto 2250
2204 print:print " A 'Grain-tastic Days' celebration is held in your city!":a=(int(rnd(1)*5)+1)+clvl:print " ";a;" peasants move into your kingdom after seeing such an abundance of grain.":print " Population up ";a;".  Population is now ";popu+a:gosub 1005:gosub 1000:popu=popu+a:cbush1=cbush1+(a*2):goto 2250
2249 REM THIS FISH LINE NEEDS TO BE REDONE
2250 a=int(rnd(1)*60)+1
2252 goto 2255
2254 print:print " High temperatures this year have cause fish supplies to fester and rot.":a=(int(rnd(1)*7)+1)*10:a=a/100:a=int(fish*a):print " Overall, ";a;" fish has become unusable and had to be thrown away.":fish=fish-a:print " Left over fish is now ";fish;".":gosub 1005:gosub 1000:goto 2255
2255 a=int(rnd(1)*60)+1:if a=1 and cacre>200 then 2258
2256 goto 2260
2258 print:print " Torrential rains have washed away your fields, causing much damage.":a=(int(rnd(1)*7)+1)*10:a=a/100:a=int(cacre*a):print " Overall, ";a;" acres have been destroyed!!":cacre=cacre-a:destacre=destacre+a:print " Now your acres are ";cacre;", and your destroyed acres are ";destacre;".":gosub 1005:gosub 1000:goto 2260
2260 a=int(rnd(1)*1000)+1:if a=1 and popu>1 then 2264
2262 goto 2265
2264 gosub 2080:print:print " Lightning has struck and killed a";type$;"!":popu=popu-1:print " Condolences are sent to their family and a large funeral is held.":print " You now have ";popu;" peasants.":gosub 1005:gosub 1000:goto 2290
2265 a=int(rnd(1)*90)+1:if a=1 and popu>1 then 2268
2266 goto 2270
2268 gosub 2080:print:print " A";type$;" has been killed by a rabid dog!":popu=popu-1:print " Condolences are sent to their family and a large funeral is held.":print " You now have ";popu;" peasants.":gosub 1005:gosub 1000:goto 2290
2270 a=int(rnd(1)*90)+1:if a=1 and popu>1 then 2274
2272 goto 2275
2274 gosub 2080:print:print " A";type$;" has been killed by a savage llama!":popu=popu-1:print " After a huge fight, the llama was put down.":print " You now have ";popu;" peasants.":gosub 1005:gosub 1000:goto 2290
2275 a=int(rnd(1)*90)+1:if a=1 and popu>1 then 2274
2276 goto 2280
2278 gosub 2080:print:print " A";type$;" has been killed by a cougar attack!":popu=popu-1:print " The cougar ran off into the forest and was never seen again.":print " You now have ";popu;" peasants.":gosub 1005:gosub 1000:goto 2290
2280 a=int(rnd(1)*90)+1:if a=1 and popu>1 then 2284
2282 goto 2285
2284 gosub 2080:print:print " A";type$;" has been killed by a bear!":popu=popu-1:print " The bear almost got away but was sucessfully killed the minute before it escaped.":print " You now have ";popu;" peasants.":gosub 1005:gosub 1000:goto 2290
2285 a=int(rnd(1)*90)+1:if a=1 and popu>1 then 2288
2286 goto 2290
2288 gosub 2080:print:print " A";type$;" has been killed by pack of wolves!":popu=popu-1:print " The wolves escaped over the hills and into the darkness.":print " You now have ";popu;" peasants.":gosub 1005:gosub 1000:goto 2290
2290 a=int(rnd(1)*40)+1:if a=1 and scoutout>0 then 2294
2292 goto 2295
2294 print:print " A magical shrine has been found that will double your scouting experience this year!":shrine=2:gosub 1005:gosub 1000:goto 2295
2295 a=int(rnd(1)*50)+1:if a=1 and scoutout>4 and shrine=0 then 2298
2296 goto 2300
2298 print:print " A magical shrine has been found that will triple your scouting experience this year!":shrine=3:gosub 1005:gosub 1000:goto 2300
2300 a=int(rnd(1)*60)+1:if a=1 and scoutout>8 and shrine=0 then 2304
2302 goto 2305
2304 print:print " A magical shrine has been found that will quadruple your scouting experience this year!":shrine=4:gosub 1005:gosub 1000:goto 2305
2305 a=int(rnd(1)*80)+1:if a=1 and shrine=0 then 2308
2306 goto 2310
2308 print:print " A magical statue has been found that will double your Diplomatic XP this year!":shrine1=2:gosub 1005:gosub 1000:goto 2310
2310 a=int(rnd(1)*100)+1:if a=1 and shrine=0 and shrine1=0 then 2314
2312 goto 2315
2314 print:print " A magical statue has been found that will triple your Diplomatic XP this year!":shrine1=3:gosub 1005:gosub 1000:goto 2315
2315 a=int(rnd(1)*80)+1:if a=1 and shrine=0 and shrine1=0 then 2318
2316 goto 2320
2318 print:print " A magical seed has has been found that doubles your bushels this year!":cbush=cbush+plantedx:print " Bushels up another ";plantedx;", for a total of ";cbush;" bushels.":gosub 1005:gosub 1000:goto 2325
2320 a=int(rnd(1)*100)+1:if a=1 and shrine=0 and shrine1=0 then 2324
2322 goto 2325
2324 print:print " A magical seed has has been found that triples your bushels this year!":cbush=cbush+(plantedx*2):print " Bushels up another ";(plantedx*2);", for a total of ";cbush;" bushels.":gosub 1005:gosub 1000:goto 2325
2325 a=int(rnd(1)*50)+1:if a=1 and cacre<100 then 2328
2326 goto 2330
2328 gosub 2080:a=int(rnd(1)*10)+5:print:print " A";type$;" has left you ";a;" acres in their will.":print " The family says it was a dying wish and wants you to have the land.":cacre=cacre+a:print " You now have ";cacre;" acres.":gosub 1005:gosub 1000:goto 2345
2330 a=int(rnd(1)*70)+1:if a=1 and cacre>=100 and cacre<500 then 2334
2332 goto 2335
2334 gosub 2080:a=int(rnd(1)*20)+10:print:print " A";type$;" has left you ";a;" acres in their will.":print " The family says it was a dying wish and wants you to have the land.":cacre=cacre+a:print " You now have ";cacre;" acres.":gosub 1005:gosub 1000:goto 2345
2335 a=int(rnd(1)*80)+1:if a=1 and cacre>=500 and cacre<5000 then 2338
2337 goto 2340
2338 gosub 2080:a=int(rnd(1)*40)+30:print:print " A";type$;" has left you ";a;" acres in their will.":print " The family says it was a dying wish and wants you to have the land.":cacre=cacre+a:print " You now have ";cacre;" acres.":gosub 1005:gosub 1000:goto 2345
2340 a=int(rnd(1)*100)+1:if a=1 and cacre>=5000 and cacre<50000 then 2344
2342 goto 2345
2344 gosub 2080:a=int(rnd(1)*50)+50:print:print " A";type$;" has left you ";a;" acres in their will.":print " The family says it was a dying wish and wants you to have the land.":cacre=cacre+a:print " You now have ";cacre;" acres.":gosub 1005:gosub 1000:goto 2345
2345 a=int(rnd(1)*40)+1:if a=1 and popu>10 then 2348
2346 goto 2350
2348 print:print " A small bakery has opened up with delighful pastries that attract people to your city!":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2350 a=int(rnd(1)*45)+1:if a=1 and popu>50 then 2354
2352 goto 2355
2354 print:print " A small theater has brought in rave reviews and people are attracted to your city!":a=(int(rnd(1)*4)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2355 a=int(rnd(1)*45)+1:if a=1 and popu>100 then 2358
2356 goto 2360
2358 print:print " A small hobby shop has opened up and people come to your city looking for things to occupy their time!":a=(int(rnd(1)*5)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2360 a=int(rnd(1)*50)+1:if a=1 and popu>150 then 2364
2362 goto 2365
2364 print:print " A small pet shop has opened and people come from far and wide to your city to buy a pet!":a=(int(rnd(1)*6)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2365 a=int(rnd(1)*55)+1:if a=1 and popu>200 then 2368
2366 goto 2370
2368 print:print " A small bookstore that carries many strange tomes opens and attracts people to your city!":a=(int(rnd(1)*7)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2370 a=int(rnd(1)*60)+1:if a=1 and popu>250 then 2374
2372 goto 2375
2374 print:print " A large bakery has opened up with delighful pastries that attract people to your city!":a=(int(rnd(1)*8)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2375 a=int(rnd(1)*65)+1:if a=1 and popu>500 then 2378
2376 goto 2380
2378 print:print " An exotic pet store opens and people come from all around to your city to buy a strange animal!":a=(int(rnd(1)*9)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2380 a=int(rnd(1)*70)+1:if a=1 and popu>1000 then 2384
2382 goto 2385
2384 print:print " A large market has opened and attracts people from nations far and wide to your city!":a=(int(rnd(1)*10)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2385 a=int(rnd(1)*75)+1:if a=1 and popu>2500 then 2388
2386 goto 2390
2388 print:print " A large bookstore has opened and it's range of books are impressive, attracting many to your city!":a=(int(rnd(1)*11)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2390 a=int(rnd(1)*80)+1:if a=1 and popu>5000 then 2394
2392 goto 2395
2394 print:print " A large circus has opened and it's family friendly atmosphere attract many to your city!":a=(int(rnd(1)*12)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2395 a=int(rnd(1)*85)+1:if a=1 and popu>7500 then 2398
2396 goto 2400
2398 print:print " A giant market sprawling many city blocks has opened, allowing many goods and services!":print " Many are attracted to your city after hearing about it!":a=(int(rnd(1)*13)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2400 a=int(rnd(1)*90)+1:if a=1 and popu>10000 then 2404
2402 goto 2405
2404 print:print " A large lending and exchange shop has opened and has attracted many entrepeneurs to your city!":a=(int(rnd(1)*14)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2405 a=int(rnd(1)*95)+1:if a=1 and popu>15000 then 2408
2406 goto 2410
2408 print:print " An emormous library has opened, and many come to your city to learn about stuff!":a=(int(rnd(1)*15)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2410 a=int(rnd(1)*90)+1:if a=1 and popu>25000 then 2414
2412 goto 2415
2414 print:print " An enormous guard station has opened and has attracted many for the safety it provides!":a=(int(rnd(1)*18)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2415 a=int(rnd(1)*95)+1:if a=1 and popu>50000 then 2418
2416 goto 2420
2418 print:print " An enormous government center provides safety and helps govern your kingdom!":print " Many are attracted to your city because they hear it is doing wonders for your people.":a=(int(rnd(1)*25)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2420
2420 a=int(rnd(1)*90)+1:if a=1 then 2435
2422 goto 2440
2424 a=int(rnd(1)*4)+1:if a=1 then a$="vandals"
2426 if a=2 then a$="theives"
2428 if a=3 then a$="murderers"
2430 if a=4 then a$="rapists"
2432 return
2435 gosub 2424:print:print " A group of ";a$;" have been caught.  They have been causing problems for a while.":print " Executing them makes your peasants happy, and attracts new people to your kingdom.":a=(int(rnd(1)*5)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2445
2440 a=int(rnd(1)*150)+1:if a=1 then 2444
2442 goto 2445
2444 gosub 2424:print:print " A large group of ";a$;" have been caught.  They have been causing problems for a while.":print " Executing them makes your peasants happy, and attracts new people to your kingdom.":a=(int(rnd(1)*15)+1)+clvl:popu=popu+a:print " Population up ";a;"!  You now have ";popu;" peasants.":cbush1=cbush1+(a*2):gosub 1005:gosub 1000:goto 2445
2445 a1=0:a2=0:a3=0:a4=0:a5=0:a6=0:a7=0:a8=0:a9=0:a10=0:aa=1:a=int(rnd(1)*180)+1:if a=1 then aa=100:GOTO 2454
2446 if a>1 and a<4 then aa=40:GOTO 2454
2448 if a>=4 and a<7 then aa=20:GOTO 2454
2450 if a>=7 and a<11 then aa=5:GOTO 2454
2452 goto 2550
2454 b1=(int(rnd(1)*5)+1)*aa:aa=int(rnd(1)*3)+1+int(clvl/2):n=0:gosub 2505:gosub 2510:gosub 2525:gosub 2535: print:print " You have found a ";a$;" ";b$;".  Inside are the following treasures:"
2456 n=n+1:if n>aa then 2480
2458 a=int(rnd(1)*100)+1:if a<50 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" gold.":a1=a1+a:goto 2456
2460 if a>=50 and a<76 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" bushels of grain.":a2=a2+a:goto 2456
2462 if a>=76 and a<79 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" OpalOre.":a3=a3+a:goto 2456
2464 if a>=79 and a<82 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" EmeraldOre.":a4=a4+a:goto 2456
2466 if a>=82 and a<85 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" SilverOre.":a5=a5+a:goto 2456
2468 if a>=85 and a<88 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" CopperOre.":a6=a6+a:goto 2456
2470 if a>=88 and a<91 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" PlatinumOre.":a7=a7+a:goto 2456
2472 if a>=91 and a<94 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" RubyOre.":a8=a8+a:goto 2456
2474 if a>=94 and a<97 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" DiamondOre.":a9=a9+a:goto 2456
2476 if a>=97 then a=int(rnd(1)*b1)+1:print " Inside a ";c$;" ";d$;", you find ";a;" JadeOre.":a10=a10+a:goto 2456
2478 goto 2456
2480 gosub 1000:print:print " For a Total of:"
2482 if a1>0 then print " ";a1;" Gold":g=g+a1
2484 if a2>0 then print " ";a2;" Bushels":cbush=cbush+a2
2486 if a3>0 then print " ";a3;" OpalOre":ore1=ore1+a3
2488 if a4>0 then print " ";a4;" EmeralOre":ore2=ore2+a4
2490 if a5>0 then print " ";a5;" SilverOre":ore3=ore3+a5
2492 if a6>0 then print " ";a6;" CopperOre":ore4=ore4+a6
2494 if a7>0 then print " ";a7;" PlatinumOre":ore5=ore5+a7
2496 if a8>0 then print " ";a8;" RubyOre":ore6=ore6+a8
2498 if a9>0 then print " ";a9;" DiamondOre":ore7=ore7+a9
2499 if a10>0 then print " ";a10;" JadeOre":ore8=ore8+a10
2500 ore=ore+a3+a4+a5+a6+a7+a8+a9+a10:print:print " You now have ";g;" gold, ";cbush;" bushels of grain and ";ore;" ore.":gosub 1005:gosub 1000:goto  2540
2505 a=int(rnd(1)*2)+1:if a=1 then c$="large":return
2507 c$="small":return
2510 a=int(rnd(1)*6)+1:if a=1 then d$="chest":return
2512 if a=2 then d$="urn":return
2514 if a=3 then d$="coffer":return
2516 if a=4 then d$="box":return
2518 if a=5 then d$="crate":return
2520 d$="barrel":return
2525  a=int(rnd(1)*5)+1:if a=1 then a$="tiny":return
2526 if a=2 then a$="small":return
2528 if a=3 then a$="big":return
2530 if a=4 then a$="large":return
2532 a$="huge":return
2535 a=int(rnd(1)*7)+1:if a=1 then b$="Pirate cove":return
2536 if a=2 then b$="smuggler's cave":return
2538 if a=3 then b$="theive's den":return
2540 if a=4 then b$="underground tunnel":return
2542 if a=5 then b$="cave":return
2544 if a=6 then b$="shack":return
2546 b$="house":return
2550 a=int(rnd(1)*60)+1:if a=1 then 2552
2551 goto 2560
2552 a=int(rnd(1)*2)+1:if a=1 then a$="summer":b$="heat stroke":goto 2556
2554 a$="winter":b$="freezing and/or sickness"
2556 a=int(rnd(1)*int(popu/100))+1:if a=0 then 2560
2558 print:print " It was a particularily harsh ";a$;", and many peasants have died of ";b$;".":popu=popu-a:print " ";a;" peasants have perished.  You now have ";popu;" peasants.":gosub 1005:gosub 1000:GOTO 2560
2560 a=int(rnd(1)*60)+1:if a=1 then 2564
2562 GOTO 2565
2564 print:print " A herd of wild horses have been spotted.":a=(int(rnd(1)*2)+1)*clvl:horsies=horsies+a:print " You catch ";a;" of the horses and are able to train them.  You now have ";horsies;" horses.":gosub 1005:gosub 1000:goto 2565
2565 a=int(rnd(1)*60)+1:if a=1 and clvl>3 then 2568
2566 goto 2570
2568 print:print " A group of wise old wizards pass through your land and decide to help you.":a=(int(rnd(1)*100)+1)*100:a=int(a/10):compo=comp+a:print " They make you ";a;" spell components for your wizards to use, and then leave on their merry way.":print " You now have ";compo;" spell components.":gosub 1005:gosub 1000:goto 2580
2570 a=int(rnd(1)*80)+1:if a=1 and clvl>6 then 2574
2572 goto 2575
2574 print:print " A group of wise old wizards pass through your land and decide to help you.":a=(int(rnd(1)*500)+1)*100:a=int(a/10):compo=comp+a:print " They make you ";a;" spell components for your wizards to use, and then leave on their merry way.":print " You now have ";compo;" spell components.":gosub 1005:gosub 1000:goto 2580
2575 a=int(rnd(1)*100)+1:if a=1 and clvl>9 then 2578
2576 goto 2580
2578 print:print " A group of wise old wizards pass through your land and decide to help you.":a=(int(rnd(1)*1000)+1)*100:a=int(a/10):compo=comp+a:print " They make you ";a;" spell components for your wizards to use, and then leave on their merry way.":print " You now have ";compo;" spell components.":gosub 1005:gosub 1000:goto 2580
2580 a=int(rnd(1)*100)+1:if a=1 then 2584
2582 goto 2585
2584 print:print " A new religious belief has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's beliefs.":gosub 1005:gosub 1000:goto 2610
2585 a=int(rnd(1)*100)+1:if a=1 then 2588
2586 goto 2590
2588 print:print " A new code of ethics has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's beliefs.":gosub 1005:gosub 1000:goto 2610
2590 a=int(rnd(1)*100)+1:if a=1 then 2594
2592 goto 2595
2594 print:print " A new idealistic nature has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's beliefs.":gosub 1005:gosub 1000:goto 2610
2595 a=int(rnd(1)*100)+1:if a=1 then 2598
2596 goto 2600
2598 print:print " A new technology has been created in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's further.":gosub 1005:gosub 1000:goto 2610
2600 a=int(rnd(1)*100)+1:if a=1 then 2604
2602 goto 2605
2604 print:print " A new science has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's concepts.":gosub 1005:gosub 1000:goto 2610
2605 a=int(rnd(1)*100)+1:if a=1 then 2608
2606 goto 2610
2608 print:print " A new philosophy has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's beliefs.":gosub 1005:gosub 1000:goto 2610
2610 a=int(rnd(1)*100)+1:if a=1 then 2614
2612 goto 2615
2614 print:print " A new education system has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's beliefs.":gosub 1005:gosub 1000:goto 2620
2615 a=int(rnd(1)*100)+1:if a=1 then 2618
2616 goto 2620
2618 print:print " A new cult has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's beliefs.":gosub 1005:gosub 1000:goto 2620
2620 a=int(rnd(1)*100)+1:if a=1 then 2624
2622 goto 2625
2624 print:print " A new club for men has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to hang out and talk about guy stuff.":gosub 1005:gosub 1000:goto 2630
2625 a=int(rnd(1)*100)+1:if a=1 then 2628
2626 goto 2630
2628 print:print " A new club for women has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to hang out and talk about girl stuff.":gosub 1005:gosub 1000:goto 2630
2630 a=int(rnd(1)*100)+1:if a=1 then 2634
2632 goto 2635
2634 print:print " A new art technique has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's style.":gosub 1005:gosub 1000:goto 2645
2635 a=int(rnd(1)*100)+1:if a=1 then 2638
2636 goto 2640
2638 print:print " A new game has started in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to play it.":gosub 1005:gosub 1000:goto 2645
2640 a=int(rnd(1)*100)+1:if a=1 then 2644
2642 goto 2645
2644 print:print " A new medicine has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's nature.":gosub 1005:gosub 1000:goto 2645
2645 a=int(rnd(1)*100)+1:if a=1 then 2648
2646 goto 2650
2648 print:print " A new species of bird has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2650 a=int(rnd(1)*100)+1:if a=1 then 2654
2652 goto 2655
2654 print:print " A new species of dog has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2655 a=int(rnd(1)*100)+1:if a=1 then 2658
2656 goto 2660
2658 print:print " A new species of slug has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2660 a=int(rnd(1)*100)+1:if a=1 then 2664
2662 goto 2665
2664 print:print " A new species of plant has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2665 a=int(rnd(1)*100)+1:if a=1 then 2668
2666 goto 2670
2668 print:print " A new species of monkey has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2670 a=int(rnd(1)*100)+1:if a=1 then 2674
2672 goto 2675
2674 print:print " A new species of cat has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2675 a=int(rnd(1)*100)+1:if a=1 then 2678
2676 goto 2680
2678 print:print " A new species of tree has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2680 a=int(rnd(1)*100)+1:if a=1 then 2684
2682 goto 2685
2684 print:print " A new species of flower has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2685 a=int(rnd(1)*100)+1:if a=1 then 2688
2686 goto 2690
2688 print:print " A new species of ant has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2690 a=int(rnd(1)*100)+1:if a=1 then 2694
2692 goto 2695
2694 print:print " A new species of elephant has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2695 a=int(rnd(1)*100)+1:if a=1 then 2698
2696 goto 2700
2698 print:print " A new species of hippopatamus has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2700 a=int(rnd(1)*100)+1:if a=1 then 2704
2702 goto 2705
2704 print:print " A new species of elk has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2705 a=int(rnd(1)*100)+1:if a=1 then 2708
2706 goto 2710
2708 print:print " A new species of bat has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2710 a=int(rnd(1)*100)+1:if a=1 then 2714
2712 goto 2715
2714 print:print " A new species of fly has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2715 a=int(rnd(1)*100)+1:if a=1 then 2718
2716 goto 2720
2718 print:print " A new species of llama has been discovered in your kingdom.":a=(int(rnd(1)*3)+1)+clvl:popu=popu+a:cbush1=cbush1+(a*2):print " It has attracted ";a;" people to your kingdom who wish to study it's qualities.":gosub 1005:gosub 1000:goto 2720
2720 return

3000 REM SPECIALISTS
3002 CLS:GOSUB 1005:PRINT "                  Specialists ":gosub 1005:print " Gold = ";g:print
3004 print " Specialists Hired = ";hired
3006 if rmj=1 then print " Rat Man Jack Hired - catches rats with traps.  Remember to keep a large amount of traps,":print " because if you run out, the rats will eat your grain!"
3044 if rmj=1 then print:print " Rats Killed Last Year = ";ratskilled
3046 if rmj=1 then print " Current Traps = ";traps
3048 if rmj=1 then print:print " {B}uy more Traps              1 gold for 1000 traps"
3050 if sss=1 then print:gosub 1005:print " Sweet Smile Samson - sets up a gambling ring.  Looks kinda dark and shady, like a":print " slicked up snake, not one to be trusted.  But then he flashes you that smile and you can't help but like the guy...."
3052 if sss=1 then print:print " Current Tax on Gambling Rate = ";taxrate;"%":print " Peasants that played last year = ";gambling1;"%.  (roughly ";int(popu*gambling2);" peasants)":print " Gold brought in = ";gambling3;" gold":print " Total Tax Money Gained = ";gambling5
3054 if sss=1 and setup=0 then print " {SE}t up a Gambling Empire!           10000 gold"
3056 if sss=1 and setup=1 then print " {S}et Tax Rate"
3100 print:print " {E}xit this menu":gosub 1005:print " {TAB} type TAB to go to the Specialist Knowledge Menu"
3102 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5000
3104 if a$="B" and rmj=1 then 3150
3105 if a$="SE" and sss=1 and setup=0 then 3155
3106 if a$="S" and sss=1 and setup=1 then 3166
3108 if a$="TAB" then 8500
3149 goto 3002
3150 print:print " How many gold will you spend on traps {1=1000 traps, 0 to exit}";:input a:if a=0 then 3002
3152 if a>g then print:print " You only have ";g;" gold, and can buy ";g;" traps max.":goto 3150
3154 g=g-a:traps=traps+(a*1000):print:print " You buy ";a*1000;" traps!  You now have ";traps;" traps!":gosub 1000:goto 3002
3155 print:print " Before we can set that up I will need a small contribution to get the ad campaign,":print " actual lottery stock, and gambling halls going =).  This is a one time cost =)."
3156 print:print " Will you please donate 10000 gold =) {Y/N}";:input a$:if a$="Y" then 3162
3158 if a$="N" then print:print " Well I'm sorry but I cannot get the ball rolling without a little push =).":gosub 1000:goto 3002
3160 goto 3156
3162 if g<=10000 then print:print " You only have ";g;" gold =).":gosub 1000:goto 3002
3164 g=g-10000:setup=1:print:print " Don't forget to set the taxrate =).  Remember though, that the higher the taxrate, the less likely people are":print " going to play =).  Try to find a happy medium or else this won't be very profitable for us =).":taxrate=1:gosub 1000:goto 3002
3166 print:print " Current Taxrate = ";taxrate;" =)."
3168 print:print " You may set the taxrate at 1-15% =) {1-15, 0 to exit}";:input a:if a=0 then 3002
3170 if a<0 or a>15 then 3168
3172 taxrate=a:goto 3166
2750 REM OPEN 3200-3999



4000 REM REPAIRS
4002 CLS:GOSUB 1005:PRINT "                  Repair Menu ":gosub 1005:print " Gold = ";g:print
4004 if destacre>0 then print " {D}estroyed acres = ";destacre;"  Cost per acre to fix               20 gold"
4050 print:print " {E}xit this menu"
4055 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5000
4060 if a$="D" and destacre>0 then 4102
4099 goto 4002
4100 REM Destroyed Acre Repair
4102 print:print " It costs 20 gold per acre to repair it to working condition again."
4104 print " Your current Gold:          ";g
4106 print:print " How many acres would you like to repair {1-";destacre;", 0 to exit}";:input a:if a<=0 then 4002
4108 if a*20>g then print:print " You only have ";g;" gold, and can repair ";int(g/20);" acres max.":goto 4106
4110 if a>destacre then print:print " Only ";destacre;" acres are destroyed at the moment.":goto 4106
4112 destacre=destacre-a:g=g-(a*20):cacre=cacre+a:print:print " You repair ";a;" acres.  You now have ";destacre;" destroyed acres and ";cacre;" normal acres!"
4114 if destacre=0 then print " All acres are now repaired.":gosub 4120
4116 gosub 1000:goto 4002

4120 REM ALL THINGS THAT NEED TO BE REPAIRED
4122 if destacre=0 then repair=0:return
4124 return

4500 if oceanacres>0 then print " Port Cities = ";ports;"       Ocean Acres = ";oceanacres
4502 if miningacres>0 then print " Mining Faciliities = ";mines;"      MiningAcres = ";miningacres;"     Miners = ";miners
4504 if mills>0 then print " Lumber Mills = ";mills;"         Lumberjacks = ";lumberjacks
4506 if posts>0 then print " Trading Posts = ";posts;"     Taxrate ";ptax;"%"
4508 gosub 1005:return

5000 rem THE KINGS MENU
5001 cls:gosub 1005:print "   King's Menu:":PRINT " Diplomatic Level = ";clvl;"    XP = ";cxp;"    For Next Level ";cxp1:print " Population = ";popu:GOSUB 1005:print " Bushels = ";cbush;"        Acres = ";cacre;"       Gold = ";g;"       Lumber = ";lumber
5002  print " Ores = {OpalOre} ";ore1;"  {EmeraldOre} ";ore2;"  {SilverOre} ";ore3;"  {CopperOre} ";ore4;"  {PlatinumOre} ";ore5:print "            {RubyOre} ";ore6;"  {DiamondOre} ";ore7;"  {JadeOre} ";ore8;"  {PearlOre} ";ore9 :print " Total Ore = ";ore:print " Fish = {Tuna} ";fishtype1;"  {Clams} ";fishtype2;"  {Lobsters} ";fishtype3;"  {Prawn} ";fishtype4;"  {Squid} ";fishtype5;"  {Oysters} ";fishtype6:print " Total Fish = ";fish:gosub 1005
5003 gosub 4500
5004 print " Scouts Out = ";scoutout;"     Scouts Resting = ";scoutrest:print " Price of Grain = ";price;"             Price of Land = ";acre:gosub 1005
5005 gosub 5048:gosub 58150:if infantry=1 then print " {M}ilitia Menu                            ::  Amass an Army"
5006                                                                print " {COM} The Commodities Menu  ::  Buy Sell Commodities (land, grain, etc)"
5007 print " {K}nowledge Menu                    ::  Learn skills to improve your kingdom"
5008 print " {C}astle Improvements Menu        ::  Build stuff for your castle"
5009 print " {L}evel Menu                                   ::  Level your Diplomatic Level"
5010 print                                " {D}iplomatic Knowledge                   ::  All info on your kingdom is stored here"
5011 if repair=1 then print          " {R}epair Menu                                 ::  If something is broken, you can fix it here"
5012 if oceanacres>0 then print " {O}cean Menu                                 ::  Regulate your navy here"
5013 if scout=1 then print                                                                " {S}couting Menu                              ::  Regulate your scouting options here"
5014 if hired>0 then print                                                                 " {SP}ecialists                                   ::  Listen to what your Specialists have to say and buy the items they need."
5015 if archerz>0 or soldierz>0 or calvaryz>0 or wizardz>0 then print " {Q}uick Report of Units                     ::  Quicklist of all your Armed Forces   "
5016 print:PRINT " {E}xit this screen":GOSUB 1005
5017 print:print " Which would you like to do (Letters Only)";:input a$:if a$="M" and infantry=1 then 9000
5018 if a$="R" and repair=1 then 4000
5019 if a$="COM" then 6500
5020 if a$="C" then 10000
5021 if a$="D" then 20000
5022 if a$="S" and scout=1 then 6000
5024 if a$="K" then 5050
5026 if a$="L" then 7150
5028 if a$="E" then return
5029 if a$="Q" then gosub 51600
5030 if a$="O" and oceanacres>0 then 56000
5032 if a$="SP" and hired>0 then 3000
5047 goto 5001
5048 if autoscout=1 and autoscout1=0 and scoutin>0 and cacre<>cdacre then scoutout=scoutout+scoutin:print "*All Scouts Deployed*  Parties now Scouting:  ";scoutout:print:scoutin=0:autoscout1=1:return
5049 return




6000 REM SCOUTS AND SCOUTING
6010 CLS:GOSUB 1005:PRINT "                  Scouts and Scouting Menu "
6012 print " 10 peasants are trained extensively in battle, metallurgy, and other tradeskills to"
6015 print " become your kingdom's finest explorers.  Scouts can explore 4 of your unexplored acres a year.":gosub 1005:PRINT " Gold = ";g:print " Population = ";popu:print " Land Searched by Scouts = ";cdacre;"     Total Land = ";cacre
6013 if oceanacre>0 then print " OceanAcres Found = ";oceanacre
6020 if partyscout=0 then print " You do not have any scout parties at the moment."
6021 if scoutout>0 then print " Scouts now exploring are ";scoutout;"."
6022 if scoutin>0 then print " You have ";scoutin;" scout parties in."
6023 if scoutrest>0 then print " ";scoutrest;" scout parties are resting and training."
6024 if partyscout>0 then print " Total Scouting Parties: ";partyscout
6025 print:print " {M}ake a Scouting Party"
6030 if listened=0 then print " {L}isten to Yearly Report"
6035 if scoutin>0 and scoutrest=0 then print " {D}eploy Scouts"
6036 if autoscout=0 then print " {AUTO}matically deploy scouts after they are rested"
6038 if autoscout=1 then print " {AUTO}  again to toggle auto deploy scout off"
6040 print " {E}xit this screen"
6042 print:print " Which will you choose (Letters Only)";:input a$:if a$="E" then 5000
6044 if a$="M" then 6060
6045 if a$="L" and listened=0 then 6100
6050 if a$="D" and scoutin>0 then 6085
6052 if a$="AUTO" and autoscout=0 then autoscout=1:print:print " AUTO deployment ON":gosub 1000:goto 6010
6053 if a$="AUTO" and autoscout=1 then autoscout=0:print:print " AUTO deployment OFF":gosub 1000:goto 6010
6055 goto 6010
6060 if popu<11 then print:print " You don't have enough population to make a scouting party at the moment."
6062 IF popu=10 then print " (You need at least 1 person left in your kingdom at all times...)"
6063 IF popu>=11 then 6065
6064 gosub 1000:goto 6010
6065 if g<250 then print:print " It takes 250 gold to create a scouting party, and you only have ";g;".":gosub 1000:goto 6010
6070 print:print " How many Scouting Parties would you like to make {250 Gold, 10 Population each, 0 to exit}";:input a:if a=0 then 6000
6072 if a*250>g then print " That would cost ";a*250;" gold, and you only have ";g;".":goto 6070
6074 if a*10>popu-1 then print " You do not have enough population to make this many.":goto 6070
6075 popu=popu-(10*a):g=g-(250*a):partyscout=partyscout+a:print:print " Gold down ";a*250;"     Population down ";a*10:print " Population is now ";popu;", Gold is now ";g;".":print " Scouting parties are now ";partyscout;"."
6080 scoutin=scoutin+a:gosub 1000:goto 6010
6085 print:print " You deploy all available scouts.":scoutout=scoutout+(scoutin-scoutrest):scoutin=scoutin-(scoutin-scoutrest):scout=1:print:print " Scouts now exploring are ";scoutout;".":GOSUB 1000:goto 6010

6100 REM Scout Reports
6102 aascout=scoutout:ascout=0 :PRINT:gosub 1005:print " SCOUTING REPORT ":gosub 1005
6105 health=10:ascout=ascout+1:if ascout>aascout then 6125
6110 print " Scout ";ascout;"'s Report:"
6115 gosub 6150
6120 gosub 1000:goto 6105
6125 print:print " All Scouts have finished their report.":listened=1:if scxxx=1 then scxxx=0:return
6130 goto 6020

6135 if firstoa1>30 then cdacre=cdacre+1:firstoa=1:goto 55108
6140 goto 6165

6150 REM random scout events
6152 bscout=0
6155 if cdacre=cacre then gosub 1005:print " You have searched all your acres, you will need more land for the scouts to continue.":print " Acres:  ";cacre;"    Acres Searched: ";cdacre:gosub 1005:aa=0:scoutin=scoutin+scoutout:scoutout=0:return
6157 bscout=bscout+1:if bscout>4 then gosub 6240 :return
6160 print " Quarter ";bscout;":":if firstoa=0 then firstoa1=firstoa1+1:goto 6135
6165 bbb=int(rnd(1)*42)+1:cdacre=cdacre+1:if bbb<33 then print " We found nothing of interest.":goto 6155
6166 if bbb=33 then 55140
6167 if bbb=34 then 55120
6169 if bbb=35 then 55100
6170 if bbb=36 then 6225
6175 if bbb=37 then 6230
6180 if bbb=38 then 6235
6185 if bbb>=39 and bbb<42 then 6192
6190 goto 55050
6192 gosub 6265: print " We were attacked by ";a$;"!":bb=int(rnd(1)*8)+1:if bb=8 then print " We took massive casualties!!":goto 6205
6194 if bb=7 then print " We took huge casualties":goto 6215
6196 if bb>2 and bb<7 then print " Luckily we finished them off without losing anyone {xp up +1}":scouting=scouting+1:goto 6155
6198 print " We took only minor casualties":health=health-(int(rnd(1)*2)+2):if health<=0 then print " But unfortunately this killed of the remainder of the party....":scoutout=scoutout-1:partyscout=partyscout-1:return
6200 print " Afterwards, we had ";health;" scouts left {xp up +1}":scouting=scouting+1:goto 6155
6205 health=health-(int(rnd(1)*25)+2):if health<=0 then print " This killed of the remainder of the party....":scoutout=scoutout-1:partyscout=partyscout-1:return
6210 print " Afterwards, we had ";health;" scouts left {xp up +2}":scouting=scouting+2:goto 6155
6215 health=health-(int(rnd(1)*3)+2):if health<=0 then print " This killed of the remainder of the party....":scoutout=scoutout-1:partyscout=partyscout-1:return
6220 print " Afterwards, we had ";health;" scouts left {xp up +1}":scouting=scouting+1:goto 6155
6225 print " We found a valuable gold deposit!!":bb=((int(rnd(1)*10)+2)*clvl)-clvl+10:g=g+bb:print " We mined ";bb;" gold, finishing off the mine, and giving you ";g;" gold!  {xp up +";1+int(bb/100);"}":scouting=scouting+1+int(bb/100):goto 6155
6230 print " We found a storage of grain!!":bb=((int(rnd(1)*5)+2)*clvl)-clvl+8:cbush=cbush+bb:print " We pillaged all we could and got ";bb;" bushels, giving you ";cbush;" bushels total!  {xp up +";1+int(bb/100);"}":scouting=scouting+1+int(bb/100):goto 6155
6235 print " We found some nomadic wanderers who agreed to join our kingdom!":bb=((int(rnd(1)*3)+1)*clvl)-clvl+2:popu=popu+bb:cbush1=cbush1+(bb*2):print " Population up ";bb;".  Population is now ";popu;"!  {xp up +";1+int(bb/100);"}":scouting=scouting+1+int(bb/100):goto 6155
6240 if health<10 then print:GOSUB 1005:print " We are ";10-health;" scouts short.":GOSUB 1005:goto 6244
6242 return
6244 print:print " Disbanded Scout Parties' remaining members rejoin the general population.":print " If you don't want to disband this group, you will have to take ";10-health;" of your population and train them in the art of scouting.":print " This will take 1 year.":print " Your Population is ";popu;"."
6246 print:print " Do you want to {R}eplace them or {D}isband the scouting party";:input a$:if a$="D" then print:print " You disband the scouting party.  ";10-health;" remaining members rejoin your society.  You may always start another Scouting Party at a later time.":popu=popu+(10-health):print " Your population is now ";popu;".":partyscout=partyscout-1:scoutout=scoutout-1:return
6248 if a$="R" then 6255
6250 goto 6244
6255 if popu<(10-health) then print:print " You don't have enough population to reform your scouting party and it must be disbanded!":popu=popu+(10-health):print " You disband the scouting party.  ";10-health;" remaining members rejoin your society.  You may always start another Scouting Party at a later time.":print " Your population is now ";popu;".":partyscout=partyscout-1:scoutout=scoutout-1:return
6260 popu=popu-(10-health): print:print " ";(10-health);" of your population have joined the scouting party and are now in the midst of being trained.":print " Population = ";popu:scoutout=scoutout-1:scoutrest=scoutrest+1:return
6265 a=int(rnd(1)*7)+1:if a<3 then a$="Brigands":return
6266 if a<5 then a$="Militants":return
6268 if a<7 then a$="Barbarians":return
6270 if a=7 then a$="Evil Wizards":return
6272 if a=8 then a$="Cutthroats":return
6274 if a=9 then a$="Amazons":return
6276 a$="Bandits":return
6500 REM LAND/GRAIN/FISH MENU
6505 CLS:gosub 1005:print "                  Land and Grain Menu ":gosub 1005
6508 print:print " Price of Grain is ";price;" gold."
6510 print " Price of Land is ";acre;" gold."
6511 print " Population is ";popu;"."
6512 if fish>0 then 6520
6513 print:print " Would you like the {L}and Menu, {G}rain Menu or {E}xit this screen {L/G/E}";:input a$:if a$="E" then 5000
6514 if a$="L" then gosub 130:GOTO 6505
6516 if a$="G" then gosub 312:GOTO 6505
6517 if a$="F" and fish>0 then gosub 6525:goto 6505
6518 goto 6505
6520 print:print " Would you like the {L}and Menu, {G}rain Menu, {F}ish Menu, or {E}xit this screen {L/G/F/E}";:input a$:if a$="E" then 5000
6522 goto 6514
6525 CLS:GOSUB 1005:print " Trade your various fish types for bushels of grain.":gosub 1005:print:print        " Your current Grain:       ";cbush
6527 print " Current Fish owned:     ";fish
6529 if fishtype1>0 then print " ";fishtype1;" {T}una                   can be traded for    ";int(fishtype1/400);" Bushels of Grain"
6530 if fishtype2>0 then print " ";fishtype2;" {C}lams                  can be traded for    ";int(fishtype2/100);" Bushels of Grain"
6532 if fishtype3>0 then print " ";fishtype3;" {L}obsters               can be traded for    ";int(fishtype3/50);" Bushels of Grain"
6534 if fishtype4>0 then print " ";fishtype4;" {P}rawn                   can be traded for    ";int(fishtype4/80);" Bushels of Grain"
6536 if fishtype5>0 then print " ";fishtype5;" {S}quid                    can be traded for    ";int(fishtype5/30);" Bushels of Grain"
6538 if fishtype6>0 then print " ";fishtype6;" {O}ysters                 can be traded for    ";int(fishtype6/100);" Bushels of Grain"
6540 print:print " {TRADE} all                  Trades All Your Fish For Bushels"
6542 print:PRINT " {N}ext Menu"
6544 PRINT " or (E)xit this screen"
6546 print:print " Which would you like to do";:input a$:if a$="E" then return
6548 if a$="T" then 6570
6550 if a$="C" then 6574
6552 if a$="L" then 6578
6554 if a$="P" then 6582
6556 if a$="S" then 6586
6558 if a$="O" then 6590
6560 if a$="TRADE" then 6594
6562 if a$="N" then 130
6564 goto 6525
6570 if fishtype1<400 then print:print " You don't have enough of this type of fish!":gosub 1000:goto 6525
6572 x=int(fishtype1/400):fish=fish-(400*x):fishtype1=fishtype1-(400*x):cbush=cbush+x:print:print " Tuna down ";x*400;".  Bushels up ";x;".":print " You now have ";fishtype1;" Tuna and ";cbush;" bushels.":gosub 1000:goto 6525
6574 if fishtype2<100 then print:print " You don't have enough of this type of fish!":gosub 1000:goto 6525
6576 x=int(fishtype2/100):fish=fish-(100*x):fishtype2=fishtype2-(100*x):cbush=cbush+x:print:print " Clams down ";x*100;".  Bushels up ";x;".":print " You now have ";fishtype2;" Clams and ";cbush;" bushels.":gosub 1000:goto 6525
6578 if fishtype3<50 then print:print " You don't have enough of this type of fish!":gosub 1000:goto 6525
6580 x=int(fishtype3/50):fish=fish-(50*x):fishtype3=fishtype3-(50*x):cbush=cbush+x:print:print " Lobsters down ";x*50;".  Bushels up ";x;".":print " You now have ";fishtype3;" Lobsters and ";cbush;" bushels.":gosub 1000:goto 6525
6582 if fishtype4<80 then print:print " You don't have enough of this type of fish!":gosub 1000:goto 6525
6584 x=int(fishtype4/80):fish=fish-(80*x):fishtype4=fishtype4-(80*x):cbush=cbush+x:print:print " Prawn down ";x*80;".  Bushels up ";x;".":print " You now have ";fishtype4;" Prawns and ";cbush;" bushels.":gosub 1000:goto 6525
6586 if fishtype5<30 then print:print " You don't have enough of this type of fish!":gosub 1000:goto 6525
6588 x=int(fishtype5/30):fish=fish-(30*x):fishtype5=fishtype5-(30*x):cbush=cbush+x:print:print " Squid down ";x*30;".  Bushels up ";x;".":print " You now have ";fishtype5;" Squid and ";cbush;" bushels.":gosub 1000:goto 6525
6590 if fishtype6<100 then print:print " You don't have enough of this type of fish!":gosub 1000:goto 6525
6592 x=int(fishtype6/100):fish=fish-(100*x):fishtype6=fishtype6-(100*x):cbush=cbush+x:print:print " Oysters down ";x*100;".  Bushels up ";x;".":print " You now have ";fishtype6;" Oysters and ";cbush;" bushels.":gosub 1000:goto 6525
6594 x=0:xx=0:xxx=0:if fishtype1<400 then 6598
6596 x=int(fishtype1/400):fishtype1=fishtype1-(400*x):cbush=cbush+x:fish=fish-(400*x):xx=xx+(400*x):xxx=xxx+x
6598 if fishtype2<100 then 6602
6600 x=int(fishtype2/100):fishtype2=fishtype2-(100*x):cbush=cbush+x:fish=fish-(100*x):xx=xx+(100*x):xxx=xxx+x
6602 if fishtype3<50 then 6606
6604 x=int(fishtype3/50):fishtype3=fishtype3-(50*x):cbush=cbush+x:fish=fish-(50*x):xx=xx+(50*x):xxx=xxx+x
6606 if fishtype4<80 then 6610
6608 x=int(fishtype4/80):fishtype4=fishtype4-(80*x):cbush=cbush+x:fish=fish-(80*x):xx=xx+(80*x):xxx=xxx+x
6610 if fishtype5<30 then 6614
6612 x=int(fishtype5/30):fishtype5=fishtype5-(30*x):cbush=cbush+x:fish=fish-(30*x):xx=xx+(30*x):xxx=xxx+x
6614 if fishtype6<100 then 6618
6616 x=int(fishtype6/100):fishtype6=fishtype6-(100*x):cbush=cbush+x:fish=fish-(100*x):xx=xx+(100*x):xxx=xxx+x
6618 print:print " Fish down ";xx;" Fish.  Bushels Up ";xxx;" Bushels.":gosub 1000:goto 6525

130 CLS:GOSUB 1005:print " The price per acre is now at ";acre;" gold.":gosub 1005
140 print:print " Current Acres owned:  ";cacre
145 print " Your current Gold:       ";g
150 PRINT:print " Would you like to:"
151 PRINT" {B}uy some land"
152 PRINT " {S}ell some land"
154 PRINT " {N}ext Menu"
156 PRINT " or (E)xit this screen"
157 print " Which would you like to do {B/S/E}";:input a$:if a$="E" then return
160 if a$="B" then 510
170 if a$="S" then 530
172 if a$="N" then 312
180 goto 150

312 CLS:GOSUB 1005:print " The price of grain at the end of the year is ";price;".":GOSUB 1005:PRINT
315 print " Current Bushels owned:  ";cbush
317 print " Your current Gold:          ";g
320 print:print " Would you like to:":print " {B}uy some grain"
325 print " {S}ell some grain"
326 PRINT " {N}ext Menu"
330 print " or {E}xit this screen"
335 print " Which would you like to do {B/S/E}";:input a$:if a$="B" then 595
340 if a$="S" then 620
342 if a$="N" and fish>0 then 6525
344 if a$="N" then 130
345 if a$="E" then return
350 goto 320



7000 rem XP REPORT
7002 amntpop1=popu-amntpop:if amntpop1<=0 then amntpop1=0:goto 7006
7004 amntpop1=int(amntpop1/10):IF amntpop1=0 then amntpop1=1
7006 amntgold1=g-amntgold:if amntgold1<=0 then amntgold1=0:goto 7010
7008 amntgold1=int(amntgold1/1000):IF amntgold1=0 then amntgold1=1
7010 amntbush1=cbush-amntbush:if amntbush1<=0 then amntbush1=0:goto 7014
7012 amntbush1=int(amntbush1/100):IF amntbush1=0 then amntbush1=1
7014 amntacre1=cacre-amntacre:if amntacre1<=0 then amntacre1=0:goto 7100
7016 amntacre1=int(amntacre1/10):IF amntacre1=0 then amntacre1=1
7018 if shrine>0 then scouting=scouting*shrine
7100 gosub 1005:print "                  XP Report ":gosub 1005
7105 print:print                             "  Population                         value up XP ";amntpop1
7106 print:print                             "  Gold                                  value up XP ";amntgold1
7107 print:print                             "  Bushels                             value up XP ";amntbush1
7108                       print:print       "  Acres                                 value up XP ";amntacre1:print:gosub 1005
7110 if nskill>0 then print:print       "  New Skills                          value up XP ";nskill*20
7112 if nspec>0 then print:print      "  New Specialists                  value up XP ";nspec*50
7114 if scouting>0 then print:print   "  Scouting                             value up XP ";scouting
7116 if piratexp>0 then print:print    "  Pirate Deaths                      value up XP ";piratexp*25
7130 a=amntpop1+amntgold1+amntbush1+amntacre1+(nskill*20)+scouting+(nspec*50)+(piratexp*25):shrine=0:piratexp=0:scouting=0:nskill=0:nspec=0:PRINT:gosub 1005
7131 if shrine1>0 then print:print " The magical statue that was found has multiplied your XP by ";shrine1;"!":a=a*shrine1:shrine1=0
7132 cxp=cxp+a:IF cxp=0 then return
7134 print " You have increased your XP by ";a;"!!":print " Total XP is now ";cxp;"!!"
7136 if cxp>=cxp1 then print " *You may Level at the end of next year!*"
7138 GOSUB 1005:gosub 1000:PRINT:return

7150 rem LEVEL UP MENU
7152 CLS:gosub 1005:print "                  XP and Leveling Menu ":gosub 1005
7154 print:print " You currently have ";cxp;" XP."
7155 print:print " You need ";cxp1;" XP to level."
7160 if cxp1<=cxp then 7170
7162 gosub 1000:goto 5000
7170 print:gosub 1005:print "   You have gained a level!":clvl=clvl+1:print:print "   Congratulations!":gosub 1005:cxp2=cxp2+1:cxp1=cxp1+(100*cxp2):GOSUB 7200
7172 print:print " You now need ";cxp1;" XP to gain the next level.":gosub 1000:goto 5000
7200 a=int(rnd(1)*(3*clvl))+(clvl*3):cbush1=cbush1+(a*2):print:print " Your excellent understanding of Diplomacy has attracted ";a;" new people to your kingdom!":popu=popu+a:print " Population = ";popu
7202 if clv=5 then print " You may increase your Accuracy Skill for your fleets in the Oceanography Skills Section."
7204 if clvl=10 then print " You may increase your Accuracy Skill for your fleets in the Oceanography Skills Section."
7206 if clvl=15 then print " You may increase your Accuracy Skill for your fleets in the Oceanography Skills Section."
7208 if clvl=10 then print " You may increase your Accuracy Skill for your fleets in the Oceanography Skills Section."
7210 if clvl=25 then print " You may increase your Accuracy Skill for your fleets in the Oceanography Skills Section."
7299 return
7300 REM CLEAR 7300-7999


5050 REM Knowledge
5052 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Tactics ":gosub 1005:print " Gold = ";g;"        Grain = ";cbush:print
5055 if scout=0 then print                " {S}couting Tactics              200 Grain and 2500 Gold"
5094 print:gosub 1005:print  " {T}raining Knowledge for your Armed Forces":print " Train Units To Fight For You"
5096 PRINT:gosub 1005:print " {I}mprovement Knowledge for your Castle":print " Learn How To Create New Buildings For Your Lands"
5097 PRINT: GOSUB 1005:print " {SP}ecialists":print " Hire Special People That Can Do Great Things"
5098 if oceanacres>0 then print:gosub 1005:print " {O}ceanography":print " Knowledge That Lets You Build Ports And Ships On OceanAcres"
5099 PRINt:GOSUB 1005:print " {E}xit this screen":GOSUB 1005:print " {TAB} type TAB to tab to the Diplomatic Knowledge Menu"
5100 print:print " Which would you like to learn (Letters Only)";:input a$:if a$="S" then 5200
5110 if a$="I"  then 5300
5112 if a$="T" then 5600
5114 if a$="O" and oceanacres>0 then 8250
5116 if a$="SP" then 8500
5197 if a$="E" then 5000
5198 if a$="TAB" then 20400
5199 goto 5050
5200 if cbush<200 then print:print " This skill requires 200 Grain, and you only have ";cbush;".":GOSUB 1000:goto 5050
5205 if g<2500 then print:print " This skill requires 2500 Gold, and you only have ";g;".":GOSUB 1000:goto 5050
5206 if scout=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5050
5210 g=g-2500:cbush=cbush-200:a$="XXXX":scout=1:nskill=nskill+1:print:print " You successfully purchased the ::Scouting Tactics:: skill.  New options are available on the The Kings Menu.":gosub 1000:gosub 1005:GOTO 5050

5300 REM Improvement knowledge for your castle
5302 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Castle Improvements ":gosub 1005:print " Gold = ";g:print
5304 if ciwalls=0 then print   " {W}alls Improvement                         5000 gold"
5306 if cifortify=0 then print  " {F}ortify Walls Improvement             15000 gold"
5308 if citowers=0 then print " {T}owers Improvement                     10000 gold"
5310 if cichurch=0 then print " {C}hurch Improvement                       5000 gold"
5312 if cistables=0 then print " {S}tables Improvement                      5000 gold"
5314 if citrain1=0   then print  " {A}rcher Training Improvement           5000 gold"
5316 if citrain2=0   then print  " {SO}ldier Training Improvement          5000 gold"
5318 if citrain3=0   then print  " {CA}lvary Training Improvement          5000 gold"
5320 if citrain4=0   then print  " {WI}zard Training Improvement            5000 gold"
5322 if cilumber=0 then print  " {L}umber Mill Knowledge                     5000 gold"
5324 if cimining=0 then print  " {M}ining Facility Knowledge                10000 gold"
5325 if citrading=0 then print  " {TR}rading Post Knowledge                15000 gold"
5376 print:gosub 1005:print " {E}xit this screen":GOSUB 1005:PRINT " {TAB} Tab to the Castle Improvement Menu"
5377 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5050
5378 if a$="L" then  5490
5379 if a$="M" then  5500
5380 if a$="TR" then  5510
5381 if a$="A" then  5450
5382 if a$="SO" then 5460
5383 if a$="CA" then 5470
5384 if a$="WI" then 5480
5385 if a$="TAB" then 10000
5392 if a$="W" then 5400
5394 if a$="F" then 5410
5395 if a$="T" then 5420
5396 if a$="C" then 5430
5498 if a$="S" then 5440
5399 goto 5302
5400 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5404 if ciwalls=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5406 g=g-5000:a$="XXXX":ciwalls=1:nskill=nskill+1:print:print " You successfully purchased the ::Walls Improvement:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5410 if g<15000 then print:print " This skill requires 15000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5414 if cifortify=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5416 g=g-15000:a$="XXXX":cifortify=1:nskill=nskill+1:print:print " You successfully purchased the ::Fortify Walls Improvement:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5420 if g<10000 then print:print " This skill requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5422 if citowers=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5424 g=g-10000:a$="XXXX":citowers=1:nskill=nskill+1:print:print " You successfully purchased the ::Towers Improvement:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5430 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5432 if cichurch=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5434 g=g-5000:a$="XXXX":cichurch=1:nskill=nskill+1:print:print " You successfully purchased the ::Church Improvement:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5440 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5442 if cistables=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5444 g=g-5000:a$="XXXX":cistables=1:nskill=nskill+1:print:print " You successfully purchased the ::Stable Improvement:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5450 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5452 if citrain1=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5454 g=g-5000:a$="XXXX":citrain1=1:nskill=nskill+1:print:print " You successfully purchased the ::Archer Training Improvement:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5460 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5462 if citrain2=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5464 g=g-5000:a$="XXXX":citrain2=1:nskill=nskill+1:print:print " You successfully purchasedthe ::Soldier Training Improvement:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5470 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5472 if citrain3=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5474 g=g-5000:a$="XXXX":citrain3=1:nskill=nskill+1:print:print " You successfully purchased the ::Calvary Training Improvement:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5480 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5482 if citrain4=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5484 g=g-5000:a$="XXXX":citrain4=1:nskill=nskill+1:print:print " You successfully purchases the ::Wizard Training Improvement:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5490 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5492 if cilumber=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5494 g=g-5000:a$="XXXX":cilumber=1:nskill=nskill+1:print:print " You successfully purchases the ::Lumber Mill Knowledge:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5500 if g<10000 then print:print " This skill requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5502 if cimining=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5504 g=g-10000:a$="XXXX":cimining=1:nskill=nskill+1:print:print " You successfully purchases the ::Mining Facility Knowledge:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300
5510 if g<15000 then print:print " This skill requires 15000 Gold, and you only have ";g;".":GOSUB 1000:goto 5300
5512 if citrading=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5300
5514 g=g-15000:a$="XXXX":citrading=1:nskill=nskill+1:print:print " You successfully purchases the ::Trading Post Knowledge:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5300

5600 REM Training knowledge for your armed forces
5602 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":gosub 1005:print " Gold = ";g:print " Grain = ";cbush:print
5604 if knowarcher=0 then print        " {A}rcher Tactics                 400 Grain and 5000 Gold"
5606 if knowsoldier=0 then print        " {SO}ldier Tactics                750 Grain and 10000 Gold"
5608 if knowcalv=0 then print           " {C}alvary Tactics                1000 Grain and 15000 Gold"
5610 if knowwiz=0   then print           " {W}izardry Tactics              4000 Grain and 50000 Gold"
5612 print:gosub 1005:print " {N}ew Units":PRINT " Train New Units To Fight For You"
5614 print:gosub 1005:print " {WE}aponry":print " Train Your Units To Use Various Tools Of Their Trade"
5689 print:gosub 1005:print " {E}xit this screen":gosub 1005:print " {TAB} type TAB to tab to the Militia Menu"
5690 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5050
5691 if a$="WE" then 5700
5692 if a$="N" then 5800
5693 if a$="A" then 5215
5694 if a$="SO"  then 5225
5695 if a$="C" then 5235
5696 if a$="W" then 5245
5697 if a$="TAB" then 9000
5699 goto 5600
5215 if cbush<400 then print:print " This skill requires 400 Grain, and you only have ";cbush;".":GOSUB 1000:goto 5600
5217 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 5600
5219 if knowarcher=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5600
5220 g=g-5000:cbush=cbush-400:a$="XXXX":infantry=1:knowarcher=1:nskill=nskill+1:print:print " You successfully purchased the ::Archer Tactics:: skill.  New options are available on the The Kings Menu.":gosub 1000:gosub 1005:GOTO 5600
5225 if cbush<750 then print:print " This skill requires 750 Grain, and you only have ";cbush;".":GOSUB 1000:goto 5600
5227 if g<10000 then print:print " This skill requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 5600
5229 if knowsoldier=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5600
5230 g=g-10000:cbush=cbush-750:a$="XXXX":knowsoldier=1:infantry=1:nskill=nskill+1:print:print " You successfully purchased the ::Soldier Tactics:: skill.  New options are available on the The Kings Menu.":gosub 1000:gosub 1005:GOTO 5600
5235 if cbush<1000 then print:print " This skill requires 1000 Grain, and you only have ";cbush;".":GOSUB 1000:goto 5600
5237 if g<15000 then print:print " This skill requires 15000 Gold, and you only have ";g;".":GOSUB 1000:goto 5600
5239 if knowcalv=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5600
5240 g=g-15000:cbush=cbush-1000:a$="XXXX":knowcalv=1:infantry=1:nskill=nskill+1:print:print " You successfully purchased the ::Calvary Tactics:: skill.  New options are available on the The Kings Menu.":gosub 1000:gosub 1005:GOTO 5600
5245 if cbush<4000 then print:print " This skill requires 4000 Grain, and you only have ";cbush;".":GOSUB 1000:goto 5600
5247 if g<50000 then print:print " This skill requires 50000 Gold, and you only have ";g;".":GOSUB 1000:goto 5600
5249 if knowwiz=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5600
5250 g=g-50000:cbush=cbush-4000:a$="XXXX":knowwiz=1:infantry=1:nskill=nskill+1:print:print " You successfully purchased the ::Wizardry Tactics:: skill.  New options are available on the The Kings Menu.":gosub 1000:gosub 1005:GOTO 5600
5700 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  Weaponry Training ":gosub 1005:print " Gold = ";g:print
5702 if knowarcher=1 then print " {A}rchers"
5704 if knowsoldier=1 then print " {S}oldiers"
5706 if knowcalv=1 then print " {C}alvary"
5708 if knowwiz=1 then print " {W}izards"
5729 print:gosub 1005:print " {E}xit this screen"
5730 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5600
5732 if a$="A" then 8000
5734 if a$="S" then 8075
5736 if a$="C" then 8115
5738 if a$="W" then 8170
5739 goto 5700
5800 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  New Units Training ":gosub 1005:print " Gold = ";g:print
5802 if knowarcher=1 then print " {A}rchers"
5804 if knowsoldier=1 then print " {S}oldiers"
5806 if knowcalv=1 then print " {C}alvary"
5808 if knowwiz=1 then print " {W}izards"
5829 print:gosub 1005:print " {E}xit this screen"
5830 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5600
5832 if a$="A" then 5840
5834 if a$="S" then 5880
5836 if a$="C" then 5930
5838 if a$="W" then 5970
5839 goto 5800
5840 if knowarcher=0 then print:print " You have to learn the Archery Tactic before you can do anything here.":gosub 1000:goto 5800
5842 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  New Units Training ":print "                  Archers":print " Shooting from afar, these nimble warriors have the ability to obliterate armies":print " while receiving no more than a scratch on themselves.":gosub 1005:print " Gold = ";g:print
5844 if archsh=0 then print     " {S}hortbow Archers                      10000 gold"
5846 if archlong=0 then print   " {L}ongbow Archers                      40000 gold"
5848 if archcross=0 then print " {C}rossbowmen                           80000 gold"
5850 print:gosub 1005:print " {E}xit this screen"
5852 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5800
5854 if a$="S" then 5865
5856 if a$="L" then 5870
5860 if a$="C" then 5875
5862 goto 5842
5865 if g<10000 then print:print " This skill requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 5842
5867 if archsh=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5842
5869 g=g-10000:a$="XXXX":archsh=1:nskill=nskill+1:print:print " You successfully purchased the ::Shortbow Archer Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5842
5870 if g<40000 then print:print " This skill requires 40000 Gold, and you only have ";g;".":GOSUB 1000:goto 5842
5872 if archlong=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5842
5874 g=g-40000:a$="XXXX":archlong=1:nskill=nskill+1:print:print " You successfully purchased the ::Longbow Archer Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5842
5875 if g<80000 then print:print " This skill requires 80000 Gold, and you only have ";g;".":GOSUB 1000:goto 5842
5877 if archcross=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5842
5879 g=g-80000:a$="XXXX":archcross=1:nskill=nskill+1:print:print " You successfully purchased the ::Crossbow Archer Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5842
5880 if knowsoldier=0 then print:print " You have to learn the Soldier Tactic before you can do anything here.":gosub 1000:goto 5800
5882 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  New Units Training ":print "                  Soldiers":print " The groundwork to any war, these are the ones who do most of the fighting, and, consequently,":print " most of the dying as well.":gosub 1005:print " Gold = ";g:print
5884 if solsword=0 then print     " {S}wordsmen                     20000 gold"
5886 if solaxe=0 then print        " {A}xemen                          50000 gold"
5888 if solspear=0 then print     " {SP}earmen                       80000 gold"
5889 if solgin=0 then       print   " {G}insu                            160000 gold"
5890 print:gosub 1005:print " {E}xit this screen"
5892 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5800
5894 if a$="S" then 5905
5896 if a$="A" then 5910
5898 if a$="SP" then 5915
5900 if a$="G" then  5920
5902 goto 5882
5905 if g<20000 then print:print " This skill requires 20000 Gold, and you only have ";g;".":GOSUB 1000:goto 5882
5906 if solsword=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5882
5909 g=g-20000:a$="XXXX":solsword=1:nskill=nskill+1:print:print " You successfully purchased the ::Swordsmen Soldier Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5882
5910 if g<50000 then print:print " This skill requires 50000 Gold, and you only have ";g;".":GOSUB 1000:goto 5882
5912 if solaxe=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5882
5914 g=g-50000:a$="XXXX":solaxe=1:nskill=nskill+1:print:print " You successfully purchased the ::Axemen Soldier Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5882
5915 if g<80000 then print:print " This skill requires 80000 Gold, and you only have ";g;".":GOSUB 1000:goto 5882
5917 if solspear=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5882
5919 g=g-80000:a$="XXXX":solspear=1:nskill=nskill+1:print:print " You successfully purchased the ::Spearment Soldier Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5882
5920 if g<160000 then print:print " This skill requires 160000 Gold, and you only have ";g;".":GOSUB 1000:goto 5882
5922 if solgin=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5882
5924 g=g-160000:a$="XXXX":solgin=1:nskill=nskill+1:print:print " You successfully purchased the ::Ginsu Soldier Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5882
5930 if knowcalv=0 then print:print " You have to learn the Calvary Tactic before you can do anything here.":gosub 1000:goto 5800
5932 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  New Units Training ":print "                  Calvary":print " These horse units are as powerful as they are graceful.  They charge into battle on their noble steeds":print " and wreak havoc on all those in the way!":gosub 1005:print " Gold = ";g:print
5934 if calvlight=0 then print          " {L}ight Calvary                      50000 gold"
5936 if calvheavy=0 then print        " {H}eavy Calvary                  150000 gold"
5938 if calvknight=0 then print        " {K}night                              350000 gold"
5940 print:gosub 1005:print " {E}xit this screen"
5942 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5800
5944 if a$="L" then 5955
5946 if a$="H" then 5960
5948 if a$="K" then 5965
5950 goto 5932
5955 if g<50000 then print:print " This skill requires 50000 Gold, and you only have ";g;".":GOSUB 1000:goto 5932
5956 if calvlight=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5932
5959 g=g-50000:a$="XXXX":calvlight=1:nskill=nskill+1:print:print " You successfully purchased the ::Light Calvary Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5932
5960 if g<150000 then print:print " This skill requires 150000 Gold, and you only have ";g;".":GOSUB 1000:goto 5932
5962 if calvheavy=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5932
5964 g=g-150000:a$="XXXX":calvheavy=1:nskill=nskill+1:print:print " You successfully purchased the ::Heavy Calvary Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5932
5965 if g<350000 then print:print " This skill requires 350000 Gold, and you only have ";g;".":GOSUB 1000:goto 5932
5967 if calvknight=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5932
5969 g=g-350000:a$="XXXX":calvknight=1:nskill=nskill+1:print:print " You successfully purchased the ::Knight Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5932
5970 if knowwiz=0 then print:print "You have to learn the Wizard Tactic before you can do anything here.":gosub 1000:goto 5800
5972 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  New Units Training ":print "                  Wizards":print " Wizards are very powerful wielders of magic.  They can damage groups of attackers at once,":print " have a variety of protective magic, and use dark arts to summon undead allies.":gosub 1005:print " Gold = ";g:print
5974 if wizapp=0 then print           " {A}pprentice Wizard                     50000 gold"
5976 if wizmaster=0 then print        " {M}aster Wizard                         150000 gold"
5978 print:gosub 1005:print " {E}xit this screen"
5979 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5800
5980 if a$="A" then 5985
5982 if a$="M" then 5990
5984 goto 5932
5985 if g<50000 then print:print " This skill requires 50000 Gold, and you only have ";g;".":GOSUB 1000:goto 5972
5986 if wizapp=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5972
5989 g=g-50000:a$="XXXX":wizapp=1:nskill=nskill+1:print:print " You successfully purchased the ::Apprentice Wizard:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5972
5990 if g<150000 then print:print " This skill requires 150000 Gold, and you only have ";g;".":GOSUB 1000:goto 5972
5992 if wizmaster=1 then print:print " You already know this skill.....":GOSUB 1000:goto 5972
5994 if wlvl<10 then print:print " You must level your Apprentice Wizards to Wizard Level 10 before you can create Master Wizards.":gosub 1000:goto 5972
5996 g=g-150000:a$="XXXX":wizmaster=1:nskill=nskill+1:print:print " You successfully purchased the ::Master Wizard Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 5972

8000 REM MORE TRAINING
8005 REM ARCHERS
8010 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  Weaponry Training ":print "                  Archers":print " Skills for Archer Specialists":gosub 1005:print " Gold = ";g:print
8012 if wta1=0 then print " {B}owing - String and Create Bows                        2500 gold"
8014 if wta2=0 then print " {A}rrow Creation - Make Arrows                             5000 gold"
8016 if wta3=0 then print " {CR}ossbowing - String and Create Crossbows      10000 gold"
8018 if wta4=0 then print " {S}hortbows - Learn Shortbow Strategy                 10000 gold"
8020 if wta5=0 then print " {L}ongbows - Learn Longbow Strategy                   20000 gold"
8022 if wta6=0 then print " {C}rossbows - Learn Crossbow Strategy                30000 gold"
8025 print:gosub 1005:print " {E}xit this screen"
8027 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5700
8028 if a$="B" then 8045
8030 if a$="A" then 8050
8032 if a$="CR" then 8055
8034 if a$="S" then 8060
8036 if a$="L" then 8065
8038 if a$="C" then 8070
8040 goto 8010
8045 if g<2500 then print:print " This skill requires 2500 Gold, and you only have ";g;".":GOSUB 1000:goto 8010
8046 if wta1=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8010
8049 g=g-2500:a$="XXXX":wta1=1:nskill=nskill+1:print:print " You successfully purchased the ::Bowing Archer Training:: skill.":gosub 1000:GOTO 8010
8050 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 8010
8052 if wta2=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8010
8054 g=g-5000:a$="XXXX":wta2=1:nskill=nskill+1:print:print " You successfully purchased the ::Arrow Creation Archer Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 8010
8055 if g<10000 then print:print " This skill requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 8010
8056 if wta3=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8010
8059 g=g-10000:a$="XXXX":wta3=1:nskill=nskill+1:print:print " You successfully purchased the ::Crossbowing Archer Training:: skill.":gosub 1000:GOTO 8010
8060 if g<10000 then print:print " This skill requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 8010
8062 if wta4=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8010
8064 g=g-10000:a$="XXXX":wta4=1:nskill=nskill+1:print:print " You successfully purchased the ::Shortbow Archer Training:: skill.":gosub 1000:GOTO 8010
8065 if g<20000 then print:print " This skill requires 20000 Gold, and you only have ";g;".":GOSUB 1000:goto 8010
8066 if wta5=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8010
8069 g=g-20000:a$="XXXX":wta5=1:nskill=nskill+1:print:print " You successfully purchased the ::Longbow Archer Training:: skill.":gosub 1000:GOTO 8010
8070 if g<30000 then print:print " This skill requires 30000 Gold, and you only have ";g;".":GOSUB 1000:goto 8010
8072 if wta6=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8010
8074 g=g-30000:a$="XXXX":wta6=1:nskill=nskill+1:print:print " You successfully purchased the ::Crossbows Archer Training:: skill.":gosub 1000:GOTO 8010
8075 REM SOLDIERS
8076 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  Weaponry Training ":print "                  Soldiers":print " Skills for Soldier Specialists":gosub 1005:print " Gold = ";g:print
8077 if wts1=0 then print " {S}wordplay - Create and Effectively Use Swords In Combat {Swordsmen Unit}                      10000 gold"
8078 if wts2=0 then print " {A}xeplay - Create and Effectively Use Axes In Combat {Axment Unit}                                  20000 gold"
8080 if wts3=0 then print " {SP}earplay - Create and Effectively Use Spears In Combat {Spearmen Unit}                         30000 gold"
8082 if wts4=0 then print " {K}atanaplay - Create and Effectively Use Katanas In Combat {Ginsu Unit}                            40000 gold"
8085 print:gosub 1005:print " {E}xit this screen"
8087 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5700
8088 if a$="S" then 8095
8090 if a$="A" then 8100
8092 if a$="SP" then 8105
8093 if a$="K" then 8110
8094 goto 8076
8095 if g<10000 then print:print " This skill requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 8076
8096 if wts1=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8076
8099 g=g-10000:a$="XXXX":wts1=1:nskill=nskill+1:print:print " You successfully purchased the ::Swordplay Soldier Training:: skill.":gosub 1000:GOTO 8076
8100 if g<20000 then print:print " This skill requires 20000 Gold, and you only have ";g;".":GOSUB 1000:goto 8076
8102 if wts2=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8076
8104 g=g-20000:a$="XXXX":wts2=1:nskill=nskill+1:print:print " You successfully purchased the ::Axeplay Soldier Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 8076
8105 if g<30000 then print:print " This skill requires 30000 Gold, and you only have ";g;".":GOSUB 1000:goto 8076
8106 if wts3=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8076
8109 g=g-30000:a$="XXXX":wts3=1:nskill=nskill+1:print:print " You successfully purchased the ::Spearplay Soldier Training:: skill.":gosub 1000:GOTO 8076
8110 if g<40000 then print:print " This skill requires 40000 Gold, and you only have ";g;".":GOSUB 1000:goto 8076
8112 if wts4=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8076
8114 g=g-40000:a$="XXXX":wts4=1:nskill=nskill+1:print:print " You successfully purchased the ::Katanplay Soldier Training:: skill.":gosub 1000:GOTO 8076
8115 REM CALVARY
8116 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  Weaponry Training ":print "                  Calvary":print " Skills for Calvary Specialists":gosub 1005:print " Gold = ";g:print
8117 if wtc1=0 then print " {HO}rseback Riding - The Basics of Horseback Riding and Training Horses                                    10000 gold"
8118 if wtc2=0 then print " {A}rmoring Your Horse - Learn How to Effectively Protect your Steed                                             20000 gold"
8120 if wtc3=0 then print " {L}ight Calvary - Learn the Basics of Being a LC Unit {Light Calvary Training}                                  50000 gold"
8122 if wtc4=0 then print " {H}eavy Calvary - Learn the Basics of Being a HC Unit {Heavy Calvary Training}                             100000 gold"
8124 if wtc5=0 then print " {K}nighthood - Learn the Basics of Being a Powerful Knight {Knight Training}                                   250000 gold"
8125 print:gosub 1005:print " {E}xit this screen"
8127 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5700
8128 if a$="HO" then 8145
8130 if a$="A" then 8150
8132 if a$="L" then 8155
8134 if a$="H" then 8160
8136 if a$="K" then 8165
8138 goto 8116
8145 if g<10000 then print:print " This skill requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 8116
8146 if wtc1=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8116
8149 g=g-10000:a$="XXXX":wtc1=1:nskill=nskill+1:print:print " You successfully purchased the ::Horseback Riding Calvary Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 8116
8150 if g<20000 then print:print " This skill requires 20000 Gold, and you only have ";g;".":GOSUB 1000:goto 8116
8152 if wtc2=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8116
8154 g=g-20000:a$="XXXX":wtc2=1:nskill=nskill+1:print:print " You successfully purchased the ::Horse Armor Calvary Training:: skill.":gosub 1000:GOTO 8116
8155 if g<50000 then print:print " This skill requires 50000 Gold, and you only have ";g;".":GOSUB 1000:goto 8116
8156 if wtc3=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8116
8159 g=g-50000:a$="XXXX":wtc3=1:nskill=nskill+1:print:print " You successfully purchased the ::Light Calvary Training:: skill.":gosub 1000:GOTO 8116
8160 if g<100000 then print:print " This skill requires 100000 Gold, and you only have ";g;".":GOSUB 1000:goto 8116
8162 if wtc4=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8116
8164 g=g-100000:a$="XXXX":wtc4=1:nskill=nskill+1:print:print " You successfully purchased the ::Heavy Calvary Training:: skill.":gosub 1000:GOTO 8116
8165 if g<150000 then print:print " This skill requires 150000 Gold, and you only have ";g;".":GOSUB 1000:goto 8116
8167 if wtc5=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8116
8168 g=g-150000:a$="XXXX":wtc5=1:nskill=nskill+1:print:print " You successfully purchased the ::Knight Calvary Training:: skill.":gosub 1000:GOTO 8116
8170 REM WIZARDS
8172 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Armed Forces Training ":print "                  Weaponry Training ":print "                  Wizards":print " Skills for Wizard Specialists":gosub 1005:print " Gold = ";g:print
8174 if wtw1=0 then print " {S}pell Craft - Learn the Basics of Spellcrafting                                                                 10000 gold"
8176 if wtw2=0 then print " {A}rcane Arts - Learn the Basics of Arcane Arts and How It Relates To Spellcrafting            20000 gold"
8178 if wtw3=0 then print " {W}izardry Components - Learn How to Make All Components Needed to Cast Spells          50000 gold"
8180 if wtw4=0 then print " {AP}prentice Wizard Training {Create Apprentice Wizards}                                                100000 gold"
8182 if wtw5=0 then print " {M}aster Wizard Training {Create Master Wizards}                                                            250000 gold"
8184 print:gosub 1005:print " {E}xit this screen"
8186 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5700
8188 if a$="S" then 8205
8190 if a$="A" then 8210
8192 if a$="W" then 8215
8194 if a$="AP" then 8220
8196 if a$="M" then 8225
8198 goto 8170
8205 if g<10000 then print:print " This skill requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 8172
8206 if wtw1=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8172
8209 g=g-10000:a$="XXXX":wtw1=1:nskill=nskill+1:print:print " You successfully purchased the ::Spell Craft Wizard Training:: skill.":gosub 1000:GOTO 8172
8210 if g<20000 then print:print " This skill requires 20000 Gold, and you only have ";g;".":GOSUB 1000:goto 8172
8212 if wtw2=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8172
8214 g=g-20000:a$="XXXX":wtw2=1:nskill=nskill+1:print:print " You successfully purchased the ::Arcane Arts Wizard Training:: skill.":gosub 1000:GOTO 8172
8215 if g<50000 then print:print " This skill requires 50000 Gold, and you only have ";g;".":GOSUB 1000:goto 8172
8216 if wtw3=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8172
8219 g=g-50000:a$="XXXX":wtw3=1:nskill=nskill+1:print:print " You successfully purchased the ::Wizardry Components Wizard Training:: skill.  New options are available on the The Kings Menu.":gosub 1000:GOTO 8172
8220 if g<100000 then print:print " This skill requires 100000 Gold, and you only have ";g;".":GOSUB 1000:goto 8172
8222 if wtw4=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8172
8224 g=g-100000:a$="XXXX":wtw4=1:nskill=nskill+1:print:print " You successfully purchased the ::Apprentice Wizard Training:: skill.":gosub 1000:GOTO 8172
8225 if g<150000 then print:print " This skill requires 150000 Gold, and you only have ";g;".":GOSUB 1000:goto 8172
8227 if wtw5=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8172
8228 g=g-150000:a$="XXXX":wtw5=1:nskill=nskill+1:print:print " You successfully purchased the ::Master Wizard Training:: skill.":gosub 1000:GOTO 8172

8250 REM OCEANOGRAPHY
8252 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Oceanography ":gosub 1005:print " Current Accuracy = ";accuracy;"%":print " Current Crit Chance = ";crit1;"%":print
8254 if oceank4=0 then print   " {P}ort Cities                      Build port cities on OceanAcres that your scouts find              5000 gold"
8256 if oceank1=0 then print   " {F}ishing Ships                  These will fish for you and incease your food supplies             5000 gold"
8258 if oceank2=0 then print   " {M}erchant Ships                Haul ore, bushels of grain and fish to far away lands               5000 gold"
8260 if oceank3=0 then print   " {W}arships                           Destroy those pesky pirates and take their cargo                  5000 gold"
8262 if crewskill1=0 then print " {D}ouble Slash {Crew}             Slash at 2 of your enemies crew at one time                       2500 gold"
8264 if crewskill2=0 then print " {T}riple Slash {Crew}            Slash at 2 and do a spinback maneuver for 3 hits!                  5500 gold"
8266 if crewskill3=0 then print " {DR}agon Slash {Crew}       Quickly spinning with blades drawn hits 4 people at once          7500 gold"
8268 if crewskill4=0 then print " {MO}lotov Cocktail {Crew}        This firey concoction covers 1-10 people in fire                  10500 gold"
8270 if crewskill5=0 then print " {PO}wder Keg {Crew}              This barrel is full of explosive powder and kills 5-15            15500 gold"
8272 if accuracy<75 then print " {A}ccuracy {Ship+Crew}   The higher this number the more you will hit in combat {+10%}   varies {level locked}"
8274 if oceank6=0 then print   " {K}iller Blow lvl 1 {Ship+Crew}         Critical Chance Up to 2% {Currently 1%}                      5000 gold"
8275 if oceank6=2 then print   " {K}iller Blow lvl 2 {Ship+Crew}         Critical Chance Up to 3% {Currently 2%}                      7500 gold"
8276 if oceank6=3 then print   " {K}iller Blow lvl 3 {Ship+Crew}         Critical Chance Up to 4% {Currently 3%}                    10000 gold"
8277 if oceank7<100 then print   " {I}ncrease # Ships/Port City             Increase to 10, 15, 25, 50, 100                                   varies"
8278 GOSUB 1005:print " Gold = ";g
8280 print:gosub 1005:print " {E}xit this screen":gosub 1005:print " {TAB} type TAB to go to the Ocean Menu"
8282 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5050
8283 if a$="P" then 8305
8284 if a$="F" then 8310
8285 if a$="M" then 8315
8286 if a$="W" then 8320
8287 if a$="T" then 8330
8288 if a$="DR" then 8335
8289 if a$="MO" then 8340
8290 if a$="PO" then 8345
8292 if a$="A" and accuracy<75 then 8350
8293 if a$="K" then 8380
8294 if a$="D" then  8325
8296 if a$="TAB" then 56000
8298 if a$="I" and oceank7>0 and oceank7<100 then 8395
8299 goto 8252
8305 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 8252
8306 if oceank4=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8252
8309 g=g-5000:a$="XXXX":oceank4=1:nskill=nskill+1:print:print " You successfully purchased the ::Port City Knowledge:: skill.":gosub 1000:GOTO 8252
8310 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 8252
8312 if oceank1=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8252
8314 g=g-5000:a$="XXXX":oceank1=1:nskill=nskill+1:print:print " You successfully purchased the ::Fishing Ship Knowledge:: skill.":gosub 1000:GOTO 8252
8315 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 8252
8316 if oceank2=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8252
8319 g=g-5000:a$="XXXX":oceank2=1:nskill=nskill+1:print:print " You successfully purchased the ::Merchant Ship Knowledge:: skill.":gosub 1000:GOTO 8252
8320 if g<5000 then print:print " This skill requires 5000 Gold, and you only have ";g;".":GOSUB 1000:goto 8252
8322 if oceank3=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8252
8324 g=g-5000:a$="XXXX":oceank3=1:nskill=nskill+1:print:print " You successfully purchased the ::Warship Knowledge:: skill.":gosub 1000:GOTO 8252
8325 if g<2500 then print:print " This skill requires 2500 Gold, and you only have ";g;".":GOSUB 1000:goto 8252
8327 if crewskill1=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8252
8329 g=g-2500:a$="XXXX":crewskill1=1:nskill=nskill+1:print:print " You successfully purchased the ::Double Slash:: skill.":gosub 1000:GOTO 8252
8330 if g<5500 then print:print " This skill requires 5500 Gold, and you only have ";g;".":GOSUB 1000:goto 8252
8332 if crewskill2=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8252
8334 g=g-5500:a$="XXXX":crewskill2=1:nskill=nskill+1:print:print " You successfully purchased the ::Triple Slash:: skill.":gosub 1000:GOTO 8252
8335 if g<7500 then print:print " This skill requires 7500 Gold, and you only have ";g;".":GOSUB 1000:goto 8252
8336 if crewskill3=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8252
8337 g=g-7500:a$="XXXX":crewskill3=1:nskill=nskill+1:print:print " You successfully purchased the ::Dragon Slash:: skill.":gosub 1000:GOTO 8252
8340 if g<10500 then print:print " This skill requires 10500 Gold, and you only have ";g;".":GOSUB 1000:goto 8252
8342 if crewskill4=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8252
8344 g=g-10500:a$="XXXX":crewskill4=1:nskill=nskill+1:print:print " You successfully purchased the ::Molotov Cocktail:: skill.":gosub 1000:GOTO 8252
8345 if g<15500 then print:print " This skill requires 15500 Gold, and you only have ";g;".":GOSUB 1000:goto 8252
8347 if crewskill5=1 then print:print " You already know this skill.....":GOSUB 1000:goto 8252
8349 g=g-15500:a$="XXXX":crewskill5=1:nskill=nskill+1:print:print " You successfully purchased the ::Powder Keg:: skill.":gosub 1000:GOTO 8252
8350 REM ACCURACY
8352 if accuracy=25 then a2=35:lvlr=5:gx=10000
8354 if accuracy=35 then a2=45:lvlr=10:gx=15000
8356 if accuracy=45 then a2=55:lvlr=15:gx=20000
8358 if accuracy=55 then a2=65:lvlr=20:gx=25000
8360 if accuracy=65 then a2=75:lvlr=25:gx=30000
8362 print:print " Current Accuracy = ";accuracy;"%.":if clvl<lvlr then print:print " You are required to be level ";lvlr;" to gain the next level of Accuracy.  You are currently ";clvl;".":gosub 1000:goto 8252
8364 print:print " Cost is ";gx;" to increase to ";a2;"%."
8366 print:print " Do you wish to increase your Accuracy {Y/N}";:input a$:if a$="Y" then 8372
8368 if a$="N" then 8252
8370 goto 8366
8372 if g<gx then print:print " That costs ";gx;" and you only have ";g;".":gosub 1000:goto 8252
8374 g=g-gx:accuracy=a2:print:print " Accuracy is now ";accuracy;"%.":gosub 1000:goto 8252
8379 REM CRIT
8380 if oceank6=0 then k=2:gx=5000:crita=99
8381 if oceank6=2 then k=3:gx=7500:crita=98
8382 if oceank6=3 then k=4:gx=10000:crita=97
8383 if oceank6=4 then print:print " Crit Chance is ";crit1;"%.  You cannot increase anymore.":gosub 1000:goto 8252
8384 print:print " To increase your Crit Chance to ";k;"%, it would cost ";gx;" gold."
8385 print:print " Do you wish to increase your Crit Chance {Y/N}";:input a$:if a$="Y" then 8390
8386 if a$="N" then 8252
8388 goto 8384
8390 if g<gx then print:print " That costs ";gx;" and you only have ";g;".":gosub 1000:goto 8252
8392 g=g-gx:crit=crita:crit1=k:oceank6=k:print:print " Crit Chance is now ";k;"%.":gosub 1000:goto 8252
8395 if oceank7<10 then x=30000:xx=10:goto 8405
8396 if oceank7<15 then x=60000:xx=15:goto 8405
8398 if oceank7<25 then x=150000:xx=25:goto 8405
8400 if oceank7<50 then x=500000:xx=50:goto 8405
8402 x=1000000:xx=100
8405 print:print " Current ships available per Port City is ";portship;".":print " Cost to increase to ";xx;" is ";x;" gold."
8406 if g<x then print:print " It will cost ";x;" to increase ships per Port City to ";xx;".  You only have ";g;".":gosub 1000:goto 8252
8408 print:print " Would you like to buy this increase {Y/N}";:input a$:if a$="Y" then 8415
8410 if a$="N" then print:print " You do not buy the increase in ships.":gosub 1000:goto 8252
8412 goto 8405
8415 g=g-x:portship=xx:print:print " Port ships allowed per Port City is now ";portship;".  Gold is ";g;".":oceank7=xx:gosub 1000:goto 8252

















8500 REM SPECIALISTS HIRING MENU
8502 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Specialists ":gosub 1005:print " Gold = ";g:print
8504 if rmj=0 then print  " {R}at Man Jack              Catches Rats                 10000 gold"
8506 if sss=0 then print " {S}weet Smile Samson    Initializes Gambling        90000 gold"
8549 print:gosub 1005:print " {E}xit this screen":gosub 1005:print " {TAB} type TAB to go to the Specialist Menu"
8550 print:print " Which person would you like to hire {Letters Only}";:input a$:if a$="E" then 5050
8552 if a$="R" then 8590
8554 if a$="S" then 8595
8556 if a$="TAB" then 3000
8589 goto 8502
8590  if g<10000 then print:print " This requires 10000 Gold, and you only have ";g;".":GOSUB 1000:goto 8502
8592 if rmj=1 then print:print " You already hired this person.....":GOSUB 1000:goto 8502
8594 g=g-10000:a$="XXXX":hired=hired+1:rmj=1:nspec=nspec+1:print:print " You successfully hired ::Rat Man Jack::  New Options Available on the King's Menu.":gosub 1000:GOTO 8502
8595  if g<90000 then print:print " This requires 90000 Gold, and you only have ";g;".":GOSUB 1000:goto 8502
8596 if sss=1 then print:print " You already hired this person.....":GOSUB 1000:goto 8502
8598 g=g-90000:a$="XXXX":hired=hired+1:sss=1:nspec=nspec+1:print:print " You successfully hired ::Sweet Smile Samson::  New Options Available on the King's Menu.":gosub 1000:GOTO 8502
8850


8999 REM ((((((((((( MILITIA MENU ))))))))
9000 cls:gosub 1005:print "                  Militia Menu ":print " Amass an army then set out to KILL!KILL!KILL!":gosub 1005:print
9010 print " {U}nit Purchase"
9012 if ttent>0 then print " {T}raining"
9014 print " {O}utfitting Units"
9048 print:print " {E}xit this menu":gosub 1005:print " {TAB} type TAB to go to the Armed Forces Training Menu"
9049 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5000
9051 if a$="U" then 30000
9055 if a$="O" then 9065
9056 if a$="T" and ttent>0 then 9200
9058 if a$="TAB" then 5600
9060 goto 9000
9065 REM OUTFITTING UNITS
9070 cls:gosub 1005:print "                  Militia Menu ":print "                  Outfitting Units ":print " These supplies are crutial to non-soldier units.":gosub 1005:print " Gold = ";g:print
9071 print " Arrows = ";arrowz;"        Horses = ";horsies;"           Spell Components = ";compo:PRINT " Gold = ";g:print
9072 if wta2=1 then print " {F}orge Arrows - Your Archers Need These                           1 gold for 500 arrows"
9074 if wtc1=1 then print " {T}rain Horses - Your Calvary Need These                                100 gold each"
9076 if wtw3=1 then print " {C}reate Spell Components - Your Wizards Need These              10 gold each"
9098 print:print " {E}xit this menu"
9099 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 9000
9100 if a$="F" then 9108
9102 if a$="T" then 9118
9104 if a$="C" then 9128
9106 goto 9070
9108 if wta2=0 then print:print " You are not able to create arrows until you learn the Arrow Creation Skill.":gosub 1000:goto 9070
9110 if g=0 then print:print " You need at least 1 gold to make arrows, you have nothing.....":gosub 1000:goto 9070
9112 print:print " How many sets of 500 arrows would you like to make {0 to exit, Max is ";g;"}";:input a:if a=0 then 9070
9114 if a>g then print:print " That would cost ";a;" and you only have ";g;".":goto 9112
9116 g=g-a:arrowz=arrowz+a*500:print:print " You forge ";a*500;" arrows.  You now have ";arrowz;" arrows and ";g;" gold.":gosub 1000:goto 9070
9118 if wtc1=0 then print:print " You are not able to train horses until you learn the Horseback Riding Skill.":gosub 1000:goto 9070
9120 if g<100 then print:print " You need at least 100 gold to train a horse, you have ";g;".":gosub 1000:goto 9070
9122 print:print " How many Horses would you like to train {0 to exit, Max is ";(int(g/100));"}";:input a:if a=0 then 9070
9124 aa=a*100:if aa>g then print:print " That would cost ";aa;" and you only have ";g;".":goto 9122
9126 g=g-aa:horsies=horsies+a:print:print " You train ";a;" horses.  You now have ";horsies;" horses and ";g;" gold.":gosub 1000:goto 9070
9128 if wtw3=0 then print:print " You are not able to create spell components until you learn the Wizardry Components Skill.":gosub 1000:goto 9070
9130 if g<10 then print:print " You need at least 10 gold to create a component, you have ";g;".":gosub 1000:goto 9070
9132 print:print " How many Components would you like to create {0 to exit, Max is ";(int(g/10));"}";:input a:if a=0 then 9070
9134 aa=a*10:if aa>g then print:print " That would cost ";aa;" and you only have ";g;".":goto 9132
9136 g=g-aa:compo=compo+a:print:print " You create ";a;" components.  You now have ";compo;" components and ";g;" gold.":gosub 1000:goto 9070
9200 REM TRAINING
9202 cls:gosub 1005:print "                  Knowledge Menu ":print "                  Militia ":print "                  Training Units ":print " Train your units to become stronger and more powerful!":gosub 1005:print " Gold = ";g:print
9204 print " You may train the following:"
9206 if atrain=1 then print " {A}rchers             Current Level:    ";alvl;"                   XP =  ";axp;"/";axp1
9208 if strain=1 then print " {S}oldiers              Current Level:   ";slvl;"                   XP = ";sxp;"/";sxp1
9210 if ctrain=1 then print " {C}alvary               Current Level:   ";calvl;"                 XP = ";caxp;"/";caxp1
9212 if wtrain=1 then print " {W}izards              Current Level:   ";wlvl;"                  XP = ";wxp;"/";wxp1
9214 print:print " {E}xit this menu"
9216 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 9000
9218 if a$="A" and atrain=1 then 9252
9220 if a$="S" and strain=1 then 9256
9222 if a$="C" and ctrain=1 then 9260
9224 if a$="W" and wtrain=1 then 9264
9226 goto 9202
9250 REM TRAINING
9252 if axp>=axp1 then print " You train your archers!!  They are now level ";alvl+1:alvl=alvl+1:axp1=axp1+(100*alvl):goto 9202
9254 print:print " You don't have enough XP to train this class!":gosub 1000:goto 9202
9256 if sxp>=sxp1 then print " You train your soldiers!!  They are now level ";slvl+1:slvl=slvl+1:sxp1=sxp1+(100*slvl):goto 9202
9258 print:print " You don't have enough XP to train this class!":gosub 1000:goto 9202
9260 if caxp>=caxp1 then print " You train your calvary!!  They are now level ";calvl+1:calvl=calvl+1:acxp1=acxp1+(100*calvl):goto 9202
9262 print:print " You don't have enough XP to train this class!":gosub 1000:goto 9202
9264 if wxp>=wxp1 then print " You train your wizards!!  They are now level ";wlvl+1:wlvl=wlvl+1:wxp1=wxp1+(100*wlvl):goto 9202
9266 print:print " You don't have enough XP to train this class!":gosub 1000:goto 9202












10000 REM CASTLE ImpROVEments MENu
10002  CLS:GOSUB 1005:PRINT "                  Castle Improvements Menu ":gosub 1005:print " Gold = ";g:PRINT
10003 if walls>0 then print " Total Wall Coverage = ";walls;" acres     Total Unprotected Acres = ";(cacre+destacre)-walls;"     Wall DP = ";walldp
10004 if towers>0 then print " Total Towers = ";towers;" covering ";towers*2;" acres            Available Tower slots = ";int(walls/2)-towers
10006 if churches>0 then print " Churches = ";churches
10008 if stables>0 then print " Stables = ";stables
10009 if mines>0 then print " Mines = ";mines;"        Miners = ";miners
10010 if mills>0 then print " Lumber Mills = ";mills;"       Lumberjacks = ";lumberjacks
10012 if posts>0 then print " Trading Posts = ";posts;"         Current Taxrate = ";ptax;"%"
10014 if ttent>0 then print " Training Tents = ";ttent
10020 if ciwalls=1 then print " {C}astle Walls"
10022 if citowers=1 then print " {T}owers"
10024 GOSUB 1005:print                                             " {B}uildings                                                               * Set up normal buildings for your kingdom *"
10026 print                                             " {S}pecial Buildings                                                    * Set up special buildings for your kingdom *"
10028 if posts>0 then print                      " {TAX}rate for Trading Posts                                       * Set the taxrate on your Trading Posts {1-30%} *"
10029 if posts>0 and posts1=0 then print " {D}etails OFF                                                         * Turn details on Trading Posts Off *"
10030 if posts>0 and posts1=1 then print " {D}etails ON                                                           * Turn details on Trading Posts On *"
10050                                            print " {K}ingdom Employees                                                 * Lumberjacks, Miners, etc *"
10099 print:GOSUB 1005:print                 " {E}xit this menu":print " {TAB} Tab to the Diplomatic Knowledge Menu"
10100 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5000
10102 if a$="C" and ciwalls=1 then 10152
10104 if a$="T" and citowers=1 then 10200
10106 if a$="B" then 10500
10108 if a$="S" then 14000
10110 if a$="TAX" and posts>0 then 10240
10112 if a$="K" then 18000
10114 if a$="D" then 10250
10116 if a$="TAB" then 21100
10149 goto 10002
10150 REM Castle Walls Building
10152  cls:gosub 1005:print "                  Castle Improvements Menu ":print "                  Castle Walls ":gosub 1005:print " Gold = ";g
10154 print:print " Total Wall Coverage = ";walls;" acres     Total Unprotected Acres = ";(cacre+destacre)-walls;"           Wall DP = ";walldp
10156 print:print " {B}uy Castle Walls                                          100 gold per acre"
10158 print        " {U}pgrade Castle Wall Strength                         ";wallprice;" gold"
10159                                            print " {TAB} Tab to the Diplomatic Knowledge Menu"
10160 print:print " {E}xit this menu"
10162 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 10002
10164 if a$="B" then 10170
10166 if a$="U" then 10185
10167 if a$="TAB" then 21100
10168 goto 10152
10170 b=cacre+destacre-walls:if b<=0 then print:print " You must buy more acres to put up any more walls.":gosub 1000:goto 10152
10172 print:print " You may put up ";b;" more acres of walls.  This will cost ";100*b;".":print " How much would you like to put up {1-";b;", 0 to exit}";:input a:if a=0 then 10152
10174 if a>b then print:print " You may only put up ";b;" more......":goto 10172
10176 if g<100*a then print:print " Unfortunately that will cost ";100*a;" gold, but you only have ";g:goto 10172
10178 print:print " You purchase ";a;" acres of wall coverage for ";a*100;" gold.":walls=walls+a:g=g-a*100
10180 gosub 1000:goto 10152
10185 print:print " The cost to reinforce walls with 10 Damage Points is ";wallprice;" gold.":if g<wallprice then print:print " Unfortunately you only have ";g:gosub 1000:goto 10152
10190 print:print " Would you like to upgrade {Y/N}";:input a$:if a$="Y" then 10196
10192 if a$="N" then 10152
10194 goto 10190
10196 g=g-wallprice:wallprice=wallprice+500:walldp=walldp+10:print:print " You successfully reinforce all your walls!  Wall DP is now ";walldp;"!":gosub 1000:goto 10152
10200 REM TOWERS
10202 cls:gosub 1005:print "                  Castle Improvements Menu ":print "                  Castle Towers ":print " Archers fire heavy volleys from these well protected structures, increasing archer damage by 5.":print " Must have walls to place the tower on.":gosub 1005:print " Gold = ";g
10204 print:print " Total Towers = ";towers;" covering ";towers*2;" acres            Available Tower slots = ";int(walls/2)-towers
10206 print:print " {B}uy towers                                    250 gold each"
10208                                            print " {TAB} Tab to the Diplomatic Knowledge Menu"
10219 print:print " {E}xit this menu"
10220 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 10002
10221 if a$="TAB" then 21100
10222 if a$="B" then 10226
10224 goto 10202
10226 b=int(walls/2)-towers:if b<=0 then print:print " You must buy more land and place more walls to build more towers.":gosub 1000:goto 10002
10228 if g<250 then print:print " You only have ";g;" gold and it costs 250 gold.":gosub 1000:goto 10002
10230 print:print " You may build ";b;" towers.  How many would you like to build (1-";b;", 0 to exit)";:input a:if a=0 then 10202
10232 if a>b then print:print " You can only build ";b;" towers.":goto 10230
10234 if g<a*250 then print:print " That will cost ";a*250;" gold and you only have ";g:goto 10230
10236 g=g-(a*250):towers=towers+a:print:print " You purchase ";a;" towers for ";a*250;" gold.  You now have ";towers;" towers covering ";towers*2;" acres.":gosub 1000:goto 10202
10240 print:print " Current Taxrate is ";ptax;"% on Trading Posts.  What would you like to set it at {1-30%}";:input a:if a>30 or a<1 then 10002
10242 ptax=a:print:print " Taxrate is now ";ptax;"%.":gosub 1005:gosub 1000:goto 10002
10250 if posts1=0 then print:print " Details on individual Trading Posts during the Trading Report will no longer be shown.":posts1=1:GOSUB 1005:GOSUB 1000:goto 10000
10252 if posts1=1 then print:print " Details on individual Trading Posts during the Trading Report will be shown again.":posts1=0:GOSUB 1005:GOSUB 1000:goto 10000



10500 REM BUILDINGS MENU
10502 cls:gosub 1005:print "                  Castle Improvements Menu ":print "                  Buildings Menu ":print " Buildings that refine your city and give you yearly bonuses.":gosub 1005:print " Gold = ";g:PRINT " Lumber = ";lumber:print " Population = ";popu:print
10506 if cichurch=1 then print                   " {C}hurches          These attract people of all nationalities and religions to your city                     100 gold and 200 lumber each"
10508 if cistables=1 then print                  " {S}tables            Keep horses the dignified way - buy a stable today!  Holds 100 horses             100 gold and 100 lumber each"
10510 if mines<miningacres and cimining=1 then      print " {M}ining Facility                Mining Structures to mine ore on your MiningAcres                          1000 gold and 1000 lumber each"
10512 if cilumber=1 then                                         print " {L}umber Mill                     Harvest lumber, requires 50 population                                          40000 gold and 50 population each"
10514 if citrading=1 then                                         print " {T}rading Post                   Trade Goods and Services, only 1 per 10 acres                                750 gold and 100 lumber each"
10516 if citrain1=1 and atrain=0 then print " {A}rcher Training Tent       Train Archers and level them to make them more powerful                7500 gold"
10518 if citrain2=1 and strain=0 then print " {SO}ldier Training Tent       Train Soldiers and level them up to make them more powerful          7500 gold"
10520 if citrain3=1 and ctrain=0 then print " {CA}lvary Training Tent     Train Calvary and level them up to make them more powerful            7500 gold"
10522 if citrain4=1 and wtrain=0 then print " {W}izard Training Tent      Train Wizards and level them up to make them more powerful          10000 gold"
10549 print:GOSUB 1005:print " {E}xit this menu":print " {TAB} Tab to the Diplomatic Knowledge Menu"
10550 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 10002
10551 if a$="C" and cichurch=1 then 10590
10552 if a$="S" and cistables=1 then 10600
10553 if a$="A" and citrain1=1 and atrain=0 then 10610
10554 if a$="SO" and citrain2=1 and strain=0 then 10615
10555 if a$="CA" and citrain3=1 and ctrain=0 then 10620
10556 if a$="W" and citrain4=1 and wtrain=0 then 10625
10558 if a$="M" and cimining=1 and mines<miningacres then 10630
10560 if a$="L" and cilumber=1 then 10640
10562 if a$="T" and citrading=1 then 10655
10564  if a$="TAB" then 21100
10589 goto 10502
10590 print:print " You have ";churches;" churches.":print " How many Churches would you like to build {0 to exit, Max is ";int(g/100);"}";:input a:if a=0 then 10502
10593 if a*200>lumber then print:print " That would take ";a*200;" lumber and you only have ";lumber;".":goto 10590
10594 if a*100>g then print:print " That would cost ";a*100;" and you only have ";g;".":goto 10590
10596 g=g-(a*100):lumber=lumber-(a*200):churches=churches+a:print:print " You build ";a;" churches.  You now have ";churches;" churches,":print " ";g;" gold and ";lumber;".":gosub 1000:goto 10502
10600 print:print " You have ";stables;" stables.":print " How many Stables would you like to build {0 to exit, Max is ";int(g/100);"}";:input a:if a=0 then 10502
10603 if a*100>lumber then print:print " That would take ";a*100;" lumber and you only have ";lumber;".":goto 10600
10604 if a*100>g then print:print " That would cost ";a*100;" and you only have ";g;".":goto 10600
10606 g=g-(a*100):lumber=lumber-(a*100):stables=stables+a:print:print " You build ";a;" stables.  You now have ";stables;" stables,":print " ";g;" gold and ";lumber;".":gosub 1000:goto 10502
10610 if g<7500 then print:print " You need at least 7500 gold to build the Archer Training Tent.  You have ";g;".":gosub 1000:goto 10502
10612 atrain=1:ttent=ttent+1:g=g-7500:print:print " You purchase the Archer Training Tent!":gosub 1000:goto 10502
10615 if g<7500 then print:print " You need at least 7500 gold to build the Soldier Training Tent.  You have ";g;".":gosub 1000:goto 10502
10617 strain=1:ttent=ttent+1:g=g-7500:print:print " You purchase the Soldier Training Tent!":gosub 1000:goto 10502
10620 if g<7500 then print:print " You need at least 7500 gold to build the Calvary Training Tent.  You have ";g;".":gosub 1000:goto 10502
10622 ctrain=1:ttent=ttent+1:g=g-7500:print:print " You purchase the Calvary Training Tent!":gosub 1000:goto 10502
10625 if g<10000 then print:print " You need at least 10000 gold to build the Wizard Training Tent.  You have ";g;".":gosub 1000:goto 10502
10627 wtrain=1:ttent=ttent+1:g=g-10000:print:print " You purchase the Wizard Training Tent!":gosub 1000:goto 10502
10630 print:print " You have ";mines;" Mining Facilities and ";miningacres;" MiningAcres.":print " How many Mining Facilities would you like to build {0 to exit}";:input a:if a=0 then 10502
10633 if a*1000>lumber then print:print " That would take ";a*1000;" lumber and you only have ";lumber;".":goto 10630
10634 if a*1000>g then print:print " That would cost ";a*1000;" and you only have ";g;".":goto 10562
10636 g=g-(a*1000):lumber=lumber-(a*1000):mines=mines+a:print:print " You build ";a;" Mining Facilities.  You now have ";mines;" Mining Facilities,":print " ";g;" gold and ";lumber;" lumber.":gosub 1000:goto 10502
10640 if g<40000 then print " You only have ";g;" gold and that costs 40000.":goto 10502
10642 if popu<51 then print " You only have ";popu;" population and that requires 50.":goto 10502
10644 print:print " You have ";mills;" Lumber Mills, ";popu;" population, and ";g;" gold.":print " How many Lumber Mills would you like to build {0 to exit}";:input a:if a=0 then 10502
10646 if a*50>popu then print:print " That would take ";a*50;" population and you only have ";popu;".":goto 10644
10648 if a*40000>g then print:print " That would cost ";a*40000;" and you only have ";g;".":goto 10644
10650 g=g-(a*40000):popu=popu-(a*50):lumberjacks=lumberjacks+(a*25):mills=mills+a:print:print " You build ";a;" Lumber Mills.  You now have ";mills;" Lumber Mills,":print " ";g;" gold and ";popu;" population.":gosub 1000:goto 10502
10655 a=int(cacre/10):if posts>=a then print:print " You may build only 1 Trading Post every 10 acres.":print " You have ";posts;" Trading Posts and room enough for ";a;".  Buy more land.":gosub 1000:goto 10502
10657 a=int(cacre/10):print:print " You have ";cacre;" acres of land, room enough for ";a;" Trading Posts, and ";g;" gold.":print " How many Trading Posts would you like to build {0 to exit}";:input a:if a=0 then 10502
10660 if a*100>lumber then print:print " That would take ";a*100;" lumber and you only have ";lumber;".":goto 10657
10662 if a*750>g then print:print " That would cost ";a*750;" and you only have ";g;".":goto 10657
10664 if posts+a>int(cacre/10) then print:print " You only have room for ";int(cacre/10)-posts;" more Trading Posts.":goto 10657
10666 g=g-(a*750):lumber=lumber-(a*100):posts=posts+a:print:print " You build ";a;" Trading Posts.  You now have ";posts;" Trading Posts,":print " ";g;" gold and ";lumber;" lumber.":ptax=6:gosub 1000:goto 10502


14000 REM SPECIAL BUILDINGS MENU
14002 cls:gosub 1005:print "                  Castle Improvements Menu ":print "                  Special Buildings Menu ":print " Special buildings that refine your city and give you yearly bonuses.":gosub 1005:print " Gold = ";g:PRINT
14004 print " Ten Armed Statue Of Zeist                     adds 10 to population every year                           5000 RubyOre"
14006 print " Zlain The Grainmaster Statue                adds 1 to your grain yield every year                       5000 JadeOre"
14008 print " Holdan The Mercenary King                   stops mercenaries from attacking                           5000 PlatinumOre"
14010                                            print " {TAB} Tab to the Diplomatic Knowledge Menu"
14050 print:print " {E}xit this menu"
14052 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 10002
14054  if a$="TAB" then 21100
14056 goto 14000

18000 REM HIRING EMPLOYEES
18002 cls:gosub 1005:print "                  Castle Improvements Menu ":print "                  Hire Kingdom Employees ":print " People who can take on various jobs in your kingdom.":gosub 1005:print " Gold = ";g:PRINT " Population = ";popu:print
18004 if miners>0 then print         " Miners = ";miners;"       Max Miners = ";mines*5
18006 if lumberjacks>0 then print " Lumberjacks = ";lumberjacks;"       Max Lumberjacks = ";mills*25
18008 print " {M} Hire Miners                                    People who mine a MiningAcre, need active Mining Facilities          200 gold and 1 Peasant"
18010 print " {L} Hire Lumberjacks                            People who harvest Lumber, need active Lumber Mills                    350 gold and 1 Peasant"
18012                                            print " {TAB} Tab to the Diplomatic Knowledge Menu"
18050 print:print " {E}xit this menu"
18052 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 10002
18054 if a$="M" then 18100
18056 if a$="L" then 18120
18058  if a$="TAB" then 21100
18099 goto 18002
18100 if mines=0 then print:print " You have no Mining Facilities.  You must set up one to hire Miners.":gosub 1000:goto 18000
18102 if popu<2 then print:print " You must have at least 1 person in your kingdom at all times.":gosub 1000:goto 18000
18103 if miners=(mines*5) then print:print " You have the maximum number of Miners now.  Set up more Mining Facilities!":gosub 1000:goto 18000
18104 print:print " Mines = ";mines;"       Population = ";popu;"      Current Miners = ";miners
18106 print " How many Miners would you like to hire {0 to exit}";:input a:if a=0 then 18000
18108 if a>popu-1 then print:print " You don't have that many people living in your kingdom.":goto 18106
18110 if a*200>g then  print:print " That would cost ";a*200;" and you only have ";g;".":goto 18104
18112 if (miners+a)>(mines*5) then print:print " You currently have ";mines;" Mining Facilities, and only 5 Miners may work per Mining Facility.":a=mines*5:print " You can hire up to ";a-miners;" more Miners.":goto 18104
18114 g=g-(a*200):popu=popu-a:miners=miners+a:print:print " You hire ";a;" Miners.  You now have ";miners;" Miners,":print " ";g;" gold and ";popu;" peasants.":gosub 1000:goto 18000
18120 if mills=0 then print:print " You have no Lumber Mills.  You must set up one to hire Lumberjacks.":gosub 1000:goto 18000
18122 if popu<2 then print:print " You must have at least 1 person in your kingdom at all times.":gosub 1000:goto 18000
18123 if lumberjacks=(mills*25) then print:print " You have the maximum number of Lumberjacks now.  Set up more Lumber Mills!":gosub 1000:goto 18000
18124 print:print " Lumber Mills = ";mills;"       Population = ";popu;"      Current Lumberjacks = ";lumberjacks
18126 print " How many Lumberjacks would you like to hire {0 to exit}";:input a:if a=0 then 18000
18128 if a>popu-1 then print:print " You don't have that many people living in your kingdom.":goto 18124
18130 if a*350>g then  print:print " That would cost ";a*350;" and you only have ";g;".":goto 18124
18132 if (lumberjacks+a)>(mills*25) then print:print " You currently have ";mines;" Lumber Millss, and only 25 Lumberjacks may work per Lumber Mill.":a=lumberjacks*25:print " You can hire up to ";a-lumberjacks;" more Lumberjacks.":goto 18124
18134 g=g-(a*350):popu=popu-a:lumberjacks=lumberjacks+a:print:print " You hire ";a;" Lumberjacks.  You now have ";lumberjacks;" Lumberjacks,":print " ";g;" gold and ";popu;" peasants.":gosub 1000:goto 18000










20000 REM STATUS
20002 cls:gosub 1005:print "                  Diplomatic Knowledge ":gosub 1005
20004 print:print " Diplomatic Level = ";clvl
20006 print:print " XP = ";cxp
20008 print " For Next Level = ";cxp1
20009 if cxp1-cxp>0 then print " Difference = ";cxp1-cxp
20010 if cxp1<=cxp then print:gosub 1005:print " Don't forget to level!":gosub 1005:print
20012 gosub 1000:gosub 1005:print " Gold = ";g
20014 gosub 1005:gosub 21200:GOSUB 1005:print " Lumber = ";lumber:GOSUB 1005:gosub 21300:gosub 1000
20016 gosub 1005:print " Land = ";cacre
20018 if destacre>0 then PRINT " Destroyed Land = ";destacre
20019 if miningacres>0 then print " MiningAcres = ";miningacres
20020 if oceanacres>0 then print " OceanAcres = ";oceanacres
20021 gosub 1005:print " Population = ";popu:popux1=int(popu*.45):popux2=int(popu*.35):popux3=int(popu*.12):popux4=popu-popux1-popux2-popux3
20022 print " Men:               ";popux1:print " Women:           ";popux2: print " Elderly:            ";popux3: print " Children:           ";popux4
20023 print:gosub 1005:print " Price of Grain = ";price
20024 print " Price of Land = ";acre
20025 gosub 1005:print "O {M}ilitary  OO  {K}nowledge  OO  {S}couting  OO  {I}mprovements  OO  {O}ceanography  OO  {SP}ecialists  OO  {E}xit O":print:input a$: if a$="E" then 5000
20027  if a$="M" then 20200
20029  if a$="S" then  21000
20030  if a$="I" then  21100
20032  if a$="O" and ocreanacres>0 then 56000
20034  if a$="SP" and hired>0 then 3000
20036  if a$="K" then 20400
20199 goto 20000
20200 cls:gosub 1005:print "                  Diplomatic Knowledge ":gosub 1005:print "                  Military":gosub 1005
20202 print " Archers": print " Shortbow = ";archersb:PRINT " Longbow = ";archerlb:PRINT " Crossbow = ";archercb
20204 print " Soldiers":print " Swordmen = ";soldiersw:PRINT " Axemen = ";soldierax:PRINT " Spearmen = ";soldiersp:PRINT " Ginsu = ";soldiergin
20206 print " Calvary":print " Light = ";calvaryl:PRINT " Heavy = ";calvaryh:PRINT " Knights = ";calvaryk
20208 print " Wizards":print " Apprentice = ";wizarda:PRINT " Master = ";wizardm
20210 print:print " Levels:           Archers              Current Level:    ";alvl;"      XP =  ";axp;"/";axp1
20212 print        "                          Soldiers              Current Level:   ";slvl;"      XP = ";sxp;"/";sxp1
20214 print        "                          {C}alvary             Current Level:   ";calvl;"     XP = ";caxp;"/";caxp1
20216 print        "                          {W}izards            Current Level:   ";wlvl;"      XP = ";wxp;"/";wxp1
20218 gosub 1005:print "O {M}ilitary  OO  {K}nowledge  OO  {S}couting  OO  {I}mprovements  OO  {O}ceanography  OO  {SP}ecialists  OO  {E}xit O":if infantry=1 then print "O {TAB} to the Purchase Troops Menu"
20219 print:input a$: if a$="E" then 5000
20220  if a$="M" then 20200
20222  if a$="S" then 21000
20224  if a$="I" then 21100
20226  if a$="O" and ocreanacres>0 then 56000
20228  if a$="SP" and hired>0 then 3000
20230  if a$="K" then 20400
20232 if a$="TAB" and infantry=1 then 30000
20399 goto 20200
20400 cls:gosub 1005:print "                  Diplomatic Knowledge ":gosub 1005:print "                  Knowledge":gosub 1005:PRINT
20401 if scout=1 then print                " Scouting Tactics"
20402 if knowarcher=1 then print        " Archer Tactics"
20404 if knowsoldier=1 then print        " Soldier Tactics"
20406 if knowcalv=1 then print           " Calvary Tactics"
20408 if knowwiz=1   then print           " Wizardry Tactics"
20410 if archsh=1 then print     " Shortbow Archers"
20412 if archlong=1 then print   " Longbow Archers"
20414 if archcross=1 then print " Crossbowmen"
20416 if solsword=1 then print     " Swordsmen"
20418 if solaxe=1 then print        " Axemen"
20420 if solspear=1 then print     " Spearmen"
20422 if solgin=1 then       print   " Ginsu"
20424 if calvlight=1 then print          " Light Calvary"
20426 if calvheavy=1 then print        " Heavy Calvary"
20428 if calvknight=1 then print        " Knight"
20430 if wizapp=1 then print           " Apprentice Wizard"
20432 if wizmaster=1 then print        " Master Wizard"
20434 gosub 1000:print:if wta1=1 then print " Bowing"
20436 if wta2=1 then print " Arrow Creation"
20438 if wta3=1 then print " Crossbowing"
20440 if wta4=1 then print " Shortbows"
20442 if wta5=1 then print " Longbows"
20444 if wta6=1 then print " Crossbows"
20446 if wts1=1 then print " Swordplay"
20448 if wts2=1 then print " Axeplay"
20450 if wts3=1 then print " Spearplay"
20452 if wts4=1 then print " Katanaplay"
20454 if wtc1=1 then print " Horseback Riding"
20456 if wtc2=1 then print " Armoring Your Horse"
20458 if wtc3=1 then print " Light Calvary"
20460 if wtc4=1 then print " Heavy Calvary"
20462 if wtc5=1 then print " Knighthood"
20464 if wtw1=1 then print " Spell Craft"
20466 if wtw2=1 then print " Arcane Arts"
20468 if wtw3=1 then print " Wizardry Components"
20470 if wtw4=1 then print " Apprentice Wizard Training"
20472 if wtw5=1 then print " Master Wizard Training"
20474 gosub 1000: PRINT:if ciwalls=1 then print   " Walls Improvement"
20476 if cifortify=1 then print  " Fortify Walls Improvement"
20478 if citowers=1 then print " Towers Improvement"
20480 if cichurch=1 then print " Church Improvement"
20482 if cistables=1 then print " Stables Improvement"
20484 if citrain1=1   then print  " Archer Training Improvement"
20486 if citrain2=1   then print  " Soldier Training Improvement"
20488 if citrain3=1   then print  " Calvary Training Improvement"
20490 if citrain4=1   then print  " Wizard Training Improvement"
20492 if cimining=1 then print " Mining Facility"
20494 if cilumber=1 then print " Lumber Mill"
20496 if citrading=1 then print " Trading Post"
20550 GOSUB 1000:PRINT
20552 PRINT " Current Accuracy For Ships And Crew = ";accuracy;"%":print " Current Crit Chance For Ships And Crew = ";crit1;"%"
20554 if oceank4=0 then print   " Port Cities"
20556 if oceank1=0 then print   " Fishing Ships"
20558 if oceank2=0 then print   " Merchant Ships"
20560 if oceank3=0 then print   " Warships"
20562 if crewskill1=0 then print " Double Slash {Crew}"
20564 if crewskill2=0 then print " Triple Slash {Crew}"
20566 if crewskill3=0 then print " Dragon Slash {Crew}"
20568 if crewskill4=0 then print " Molotov Cocktail {Crew}"
20570 if crewskill5=0 then print " Powder Keg {Crew}"
20574 if oceank6>0 then print   " Killer Blow lvl 1 {Ship+Crew}"
20575 if oceank6>1 then print   " Killer Blow lvl 2 {Ship+Crew}"
20576 if oceank6>2 then print   " Killer Blow lvl 3 {Ship+Crew}"
20578 if oceank6>3 then print   " Killer Blow lvl 4 {Ship+Crew}"
20580 if portship>0 then print   " Ships Per City = ";portship
20892 gosub 1005:print "O {M}ilitary  OO  {K}nowledge  OO  {S}couting  OO  {I}mprovements  OO  {O}ceanography  OO  {SP}ecialists  OO  {E}xit O":print "O {TAB} to the Knowledge Menu":print:input a$: if a$="E" then 5000
20894  if a$="M" then 20200
20895  if a$="S" then 21000
20896  if a$="I" then 21100
20898  if a$="O" and ocreanacres>0 then 56000
20900  if a$="SP" and hired>0 then 3000
20902  if a$="K" then 20400
20904 if a$="TAB" then 5050
20906 goto 20400

21000 cls:gosub 1005:print "                  Diplomatic Knowledge ":gosub 1005:print "                  Scouting":gosub 1005
21001 PRINT:if partyscout=0 then print " You do not have any scout parties at the moment."
21002 if scoutout>0 then print " Scouts now exploring are ";scoutout;"."
21004 if scoutin>0 then print " You have ";scoutin;" scout parties in."
21006 if scoutrest>0 then print " ";scoutrest;" scout parties are resting and training."
21008 if partyscout>0 then print " Total Scouting Parties: ";partyscout
21010 print " Land Searched by Scouts = ";cdacre;"     Total Land = ";cacre
21012 if oceanacres>0 then print " OceanAcres Found = ";oceanacres
21013 if scouting>0 then print " Scout XP earned this year = ";scouting
21014 print:gosub 1005:print "O {M}ilitary  OO  {K}nowledge  OO  {S}couting  OO  {I}mprovements  OO  {O}ceanography  OO  {SP}ecialists  OO  {E}xit O":if scout=1 then print "O {TAB} to the Scouting Menu"
21015 print:input a$: if a$="E" then 5000
21016  if a$="M" then 20200
21017  if a$="S" then 21000
21019  if a$="I" then 21100
21020  if a$="O" and ocreanacres>0 then 56000
21022  if a$="SP" and hired>0 then 3000
21024  if a$="K" then 20400
21026 if a$="TAB" and scout=1 then 6000
21028 goto 21000

21100 cls:gosub 1005:print "                  Diplomatic Knowledge ":gosub 1005:print "                  Improvements":gosub 1005
21102 if walls>0 then print " Total Wall Coverage = ";walls;" acres     Total Unprotected Acres = ";(cacre+destacre)-walls;"     Wall DP = ";walldp
21104 if towers>0 then print " Total Towers = ";towers;" covering ";towers*2;" acres            Available Tower slots = ";int(walls/2)-towers
21106 if churches>0 then print " Churches = ";churches
21108 if stables>0 then print " Stables = ";stables
21109 if miningacres>0 then print " MiningAcres = ";miningacres
21110 if mines>0 then print " Mines = ";mines;"        Miners = ";miners
21112 if mills>0 then print " Lumber Mills = ";mills;"       Lumberjacks = ";lumberjacks
21114 if posts>0 then print " Trading Posts = ";posts;"         Current Taxrate = ";ptax
21116 print:if atrain=1 then print " Archer Training Tent (1)"
21118 if strain=1 then print " Soldier Training Tent (1)"
21120 if ctrain=1 then print " Calvary Training Tent (1)"
21122 if wtrain=1 then print " Wizard Training Tent (1)"
21124 gosub 1005:print "O {M}ilitary  OO  {K}nowledge  OO  {S}couting  OO  {I}mprovements  OO  {O}ceanography  OO  {SP}ecialists  OO  {E}xit O":print "O {TAB} to the Castle Improvements Menu":print:input a$: if a$="E" then 5000
21126  if a$="M" then 20200
21128  if a$="S" then 21000
21130  if a$="I" then 21100
21132  if a$="O" and ocreanacres>0 then 56000
21134  if a$="SP" and hired>0 then 3000
21136  if a$="K" then 20400
21138 if a$="TAB" then 10000
21140 goto 21100

21200 rem ore gosub
21202 print " OpalOre =                     ";ore1
21203 print " EmeraldOre =                ";ore2
21204 print " SilverOre =                    ";ore3
21206 print " CopperOre =                  ";ore4
21208 print " PlatinumOre =                ";ore5
21210 print " RubyOre =                     ";ore6
21212 print " DiamondOre =                ";ore7
21214 print " JadeOre =                      ";ore8
21215 print " PearlOre =                     ";ore9
21216 print " Total Ore =   ";ore:return

21300 REM FISH GOSUB
21302 print " ";fishtype1;" Tuna     ";fishtype2;" Clams     ";fishtype3;" Lobsters"
21304 print " ";fishtype4;" Prawn     ";fishtype5;" Squid     ";fishtype6;" Oysters":print " Total Fish = ";fish:return

30000 REM TROOP BUYING
30002 cls:gosub 1005:print "                  Militia Menu ":print "                  Purchasing Units ":print " Purchase units to fight your battles for you.":gosub 1005:print " Gold = ";g:print " Population = ";popu:print
30004 if knowarcher=1 then print " {A}rchers"
30006 if knowsoldier=1 then print " {S}oldiers"
30007 if knowcalv=1 then print " {C}alvary"
30008 if knowwiz=1 then print " {W}izards"
30010 print:print " {E}xit this screen"
30012 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 9000
30014 if a$="A" and knowarcher=1 then 30050
30016 if a$="S" and knowsoldier=1 then 30100
30018 if a$="C" and knowcalv=1 then 30150
30020 if a$="W" and knowwiz=1 then 30200
30022 goto 30002
30050 cls:gosub 1005:print "                  Militia Menu ":print "                  Purchasing Units ":print "                  Archers ":print " Purchase Archer units to fight your battles for you.":gosub 1005:print " Gold = ";g:print " Population = ";popu
30051 print " Currently Owned:   Shortbow = ";archersb;"    Longbow = ";archerlb;"    Crossbow = ";archercb:print
30052 if archsh=1 then print     " {S}hortbow Archers                       Cost:  1 +";alvl;" {1 per lvl}                       Damage:  1 only"
30054 if archlong=1 then print   " {L}ongbow Archers                       Cost:  2 +";2*alvl;" {2 per lvl}                    Damage:  2 only"
30056 if archcross=1 then print " {C}rossbowmen                           Cost:  3 +";3*alvl;" {3 per lvl}                    Damage:  4 only"
30058 print:print " {E}xit this screen"
30060 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 30000
30062 if a$="S" then 31000
30064 if a$="L" then 31020
30066 if a$="C" then 31040
30068 goto 30050
30100 cls:gosub 1005:print "                  Militia Menu ":print "                  Purchasing Units ":print "                  Soldiers ":print " Purchase Soldiers units to fight your battles for you.":gosub 1005:print " Gold = ";g:print " Population = ";popu:print
30101 print " Currently Owned:   Swordmen = ";soldiersw;"    Axemen = ";soldierax;"    Spearmen = ";soldiersp;"    Ginsu = ";soldiergin:print
30102 if solsword=1 then print     " {S}wordsmen                       Cost:  1 +";slvl;" {1 per lvl}                           Damage:  1 +";slvl;" {1 per lvl}"
30104 if solaxe=1 then print        " {A}xemen                            Cost:  2 +";2*slvl;" {2 per lvl}                        Damage:  2 +";2*slvl;" {2 per lvl}"
30106 if solspear=1 then print     " {SP}earmen                         Cost:  3 +";3*slvl;" {3 per lvl}                        Damage:  3 +";2*slvl;" {2 per lvl}"
30108  if solgin=1 then       print  " {G}insu                               Cost:  4 +";4*slvl;" {4 per lvl}                        Damage:   5 +";2*slvl;" {2 per lvl}"
30110 print:print " {E}xit this screen"
30112 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 30000
30114 if a$="S" then 31060
30116 if a$="A" then 31080
30118 if a$="SP" then 31100
30120 if a$="G" then 31120
30122 goto 30100
30150 cls:gosub 1005:print "                  Militia Menu ":print "                  Purchasing Units ":print "                  Calvary ":print " Purchase Calvary units to fight your battles for you.":gosub 1005:print " Gold = ";g:print " Population = ";popu:print
30151 print " Currently Owned:   Light = ";calvaryl;"    Heavy = ";calvaryh;"    Knights = ";calvaryk:print
30152 if calvlight=1 then print            " {L}ight Calvary                          Cost:    3 +";3*calvl;" {3 per lvl}                        Damage:  3 +";3*calvl;" {3 per lvl}"
30154 if calvheavy=1 then print         " {H}eavy Calvary                        Cost:    5 +";5*calvl;" {5 per lvl}                        Damage:  5 +";4*calvl;" {4 per lvl}"
30156  if calvknight=1 then print        " {K}night                                    Cost:  10 +";10*calvl;" {10 per lvl}                     Damage:  6 +";5*calvl;" {5 per lvl}"
30158 print:print " {E}xit this screen"
30160 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 30000
30162 if a$="L" then 31130
30164 if a$="H" then 31150
30166 if a$="K" then 31170
30168 goto 30150
30200 cls:gosub 1005:print "                  Militia Menu ":print "                  Purchasing Units ":print "                  Wizards ":print " Purchase Wizard units to fight your battles for you.":gosub 1005:print " Gold = ";g:print " Population = ";popu:print
30201 print " Currently Owned:   Apprentice = ";wizarda;"    Master = ";wizardm:print
30202 if wizapp=1 then print           " {A}pprentice Wizard                            Cost:  20 +";20*wlvl;" {20 per lvl}                        Damage:  10 +";2*wlvl;" {2 per lvl}"
30204 if wizmaster=1 then print      " {M}aster Wizard                                  Cost:  50 +";10*wlvl;" {10 per lvl}                        Damage:  20 +";4*wlvl;" {4 per lvl}"
30208 print:print " {E}xit this screen"
30210 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 30000
30212 if a$="A" then 31190
30214 if a$="M" then 31210
30218 goto 30200

31000 REM ARCHERS
31002  if archsh=0 then print: print     " Shortbow Archers is knowledge not yet learned.":gosub 1000:goto 30050
31004 if wta1=0 then print " Bowing is a skill not yet learned.":gosub 1000:goto 30050
31006 if wta4=0 then print " Shortbows is a skill not yet learned.":gosub 1000:goto 30050
31008 print:print " Current Shortbow Archer level = ";alvl
31010 print " Price per Shortbow Archer =  {1 gold}  +1 gold per level {";alvl;"}    and 1 Population"
31012 print:print " How many Shortbow Archers would you like to buy {0 to exit}";:input a:if a=0 then 30050
31013 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31012
31014 b=a*(1+alvl):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31012
31016 g=g-b:archersb=archersb+a:archerz=archerz+a:popu=popu-a:print:print " You now have ";archersb;" Shortbow Archers and ";g;" gold.  Total archers = ";archerz:gosub 1000:goto 30050
31020  if archlong=0 then print: print     " Longbow Archers is knowledge not yet learned.":gosub 1000:goto 30050
31024 if wta1=0 then print " Bowing is a skill not yet learned.":gosub 1000:goto 30050
31026 if wta5=0 then print " Longbows is a skill not yet learned.":gosub 1000:goto 30050
31028 print:print " Current Longbow Archer level = ";alvl
31030 print " Price per Longbow Archer =  {2 gold}  +2 gold per level {";2*alvl;"}    and 1 Population"
31032 print:print " How many Longbow Archers would you like to buy {0 to exit}";:input a:if a=0 then 30050
31033 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31032
31034 b=a*(2+(2*alvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31032
31036 g=g-b:archerlb=archerlb+a:archerz=archerz+a:popu=popu-a:print:print " You now have ";archerlb;" Longbow Archers and ";g;" gold.  Total archers = ";archerz:gosub 1000:goto 30050
31040  if archcross=0 then print: print     " Crossbow Archers is knowledge not yet learned.":gosub 1000:goto 30050
31044 if wta1=0 then print " Bowing is a skill not yet learned.":gosub 1000:goto 30050
31046 if wta6=0 then print " Crossbows is a skill not yet learned.":gosub 1000:goto 30050
31048 print:print " Current Crossbow Archer level = ";alvl
31050 print " Price per Crossbow Archer =  {3 gold}  +3 gold per level {";3*alvl;"}    and 1 Population"
31052 print:print " How many Crossbow Archers would you like to buy {0 to exit}";:input a:if a=0 then 30050
31053 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31052
31054 b=a*(3+(3*alvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31052
31056 g=g-b:archercb=archercb+a:archerz=archerz+a:popu=popu-a:print:print " You now have ";archercb;" Crossbow Archers and ";g;" gold.  Total archers = ";archerz:gosub 1000:goto 30050

31059 REM SOLDIERS
31060  if solsword=0 then print: print     " Swordsmen is knowledge not yet learned.":gosub 1000:goto 30100
31066  if wts1=0 then print " Swordplay is a skill not yet learned.":gosub 1000:goto  30100
31068 print:print " Current Swordsmen level = ";slvl
31070 print " Price per Swordsmen =  {1 gold}  +1 gold per level {";slvl;"}    and 1 Population"
31072 print:print " How many Swordsmen would you like to buy {0 to exit}";:input a:if a=0 then  30100
31073 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31072
31074 b=a*(1+alvl):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31072
31076 g=g-b:soldiersw=soldiersw+a:soldierz=soldierz+a:popu=popu-a:print:print " You now have ";soldiersw;" Swordsmen and ";g;" gold.  Total soldiers = ";soldierz:gosub 1000:goto  30100
31080  if solaxe=0 then print: print     " Axemen is knowledge not yet learned.":gosub 1000:goto 30100
31086 if wts2=0 then print " Axeplay is a skill not yet learned.":gosub 1000:goto  30100
31088 print:print " Current Axemen level = ";slvl
31090 print " Price per Axemen =  {2 gold}  +2 gold per level {";2*slvl;"}    and 1 Population"
31092 print:print " How many Axemen would you like to buy {0 to exit}";:input a:if a=0 then  30100
31093 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31092
31094 b=a*(1+(2*alvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31092
31096 g=g-b:soldierax=soldierax+a:soldierz=soldierz+a:popu=popu-a:print:print " You now have ";soldierax;" Axemen and ";g;" gold.  Total soldiers = ";soldierz:gosub 1000:goto  30100
31100  if solspear=0 then print: print     " Spearmen is knowledge not yet learned.":gosub 1000:goto 30100
31106 if wts3=0 then print " Spearplay is a skill not yet learned.":gosub 1000:goto  30100
31108 print:print " Current Spearmen level = ";slvl
31110 print " Price per Spearmen =  {3 gold}  +3 gold per level {";3*slvl;"}    and 1 Population"
31112 print:print " How many Spearmen would you like to buy {0 to exit}";:input a:if a=0 then  30100
31113 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31112
31114 b=a*(3+(3*alvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31112
31116 g=g-b:soldiersp=soldiersp+a:soldierz=soldierz+a:popu=popu-a:print:print " You now have ";soldiersp;" Spearmen and ";g;" gold.  Total soldiers = ";soldierz:gosub 1000:goto  30100
31120  if solgin=0 then print: print     " Ginsu is knowledge not yet learned.":gosub 1000:goto 30100
31121 if wts4=0 then print " Katanaplay is a skill not yet learned.":gosub 1000:goto  30100
31122 print:print " Current Ginsu level = ";slvl
31123 print " Price per Ginsu =  {4 gold}  +4 gold per level {";4*slvl;"}    and 1 Population"
31124 print:print " How many Ginsu would you like to buy {0 to exit}";:input a:if a=0 then  30100
31125 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31124
31126 b=a*(4+(4*alvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31124
31127 g=g-b:soldiergin=soldiergin+a:soldierz=soldierz+a:popu=popu-a:print:print " You now have ";soldiergin;" Ginsu and ";g;" gold.  Total soldiers = ";soldierz:gosub 1000:goto  30100

31129 REM CALVARY
31130  if calvlight=0 then print: print     " Light Calvary is knowledge not yet learned.":gosub 1000:goto 30150
31131  if wtc3=0 then print " Light Calvary Trainng is a skill not yet learned.":gosub 1000:goto 30150
31132 if wtc1=0 then print " Horseback Riding is a skill not yet learned.":gosub 1000:goto 30150
31134 if wtc2=0 then print " Armoring Your Horse is a skill not yet learned.":gosub 1000:goto 30150
31138 print:print " Current Light Calvary level = ";calvl
31140 print " Price per Light Calvary =  {3 gold}  +3 gold per level {";3*calvl;"}    and 1 Population"
31142 print:print " How many Light Calvary would you like to buy {0 to exit}";:input a:if a=0 then  30150
31143 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31142
31144 b=a*(3+(3*calvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31142
31146 g=g-b:calvaryl=calvaryl+a:calvaryz=calvaryz+a:popu=popu-a:print:print " You now have ";calvaryl;" Light Calvary and ";g;" gold.  Total calvary = ";calvaryz:gosub 1000:goto  30150
31150  if calvheavy=0 then print: print     " Heavy Calvary is knowledge not yet learned.":gosub 1000:goto 30150
31151 if wtc4=0 then print " Heavy Calvary Trainng is a skill not yet learned.":gosub 1000:goto 30150
31152 if wtc1=0 then print " Horseback Riding is a skill not yet learned.":gosub 1000:goto 30150
31154 if wtc2=0 then print " Armoring Your Horse is a skill not yet learned.":gosub 1000:goto 30150
31158 print:print " Current Heavy Calvary level = ";calvl
31160 print " Price per Heavy Calvary =  {5 gold}  +5 gold per level {";5*calvl;"}    and 1 Population"
31162 print:print " How many Heavy Calvary would you like to buy {0 to exit}";:input a:if a=0 then  30150
31163 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31162
31164 b=a*(5+(5*calvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31162
31166 g=g-b:calvaryh=calvaryh+a:calvaryz=calvaryz+a:popu=popu-a:print:print " You now have ";calvaryh;" Heavy Calvary and ";g;" gold.  Total calvary = ";calvaryz:gosub 1000:goto  30150
31170  if calvknight=0 then print: print     " Knighthood is knowledge not yet learned.":gosub 1000:goto 30150
31171 if wtc5=0 then print " Knighthood Trainng is a skill not yet learned.":gosub 1000:goto 30150
31172 if wtc1=0 then print " Horseback Riding is a skill not yet learned.":gosub 1000:goto 30150
31174 if wtc2=0 then print " Armoring Your Horse is a skill not yet learned.":gosub 1000:goto 30150
31178 print:print " Current Knight level = ";calvl
31180 print " Price per Knight =  {10 gold}  +10 gold per level {";10*calvl;"}    and 1 Population"
31182 print:print " How many Knights would you like to buy {0 to exit}";:input a:if a=0 then  30150
31183 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31182
31184 b=a*(10+(10*calvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31182
31186 g=g-b:calvaryk=calvaryk+a:calvaryz=calvaryz+a:popu=popu-a:print:print " You now have ";calvaryk;" Knights and ";g;" gold.  Total calvary = ";calvaryz:gosub 1000:goto  30150

31189 REM WIZARDS
31190  if wizapp=0 then print: print     " Apprentice Wizard is knowledge not yet learned.":gosub 1000:goto  30200
31191 if wtw4=0 then print " Apprentice Wizard Training is a skill not yet learned.":gosub 1000:goto  30200
31192  if wtw1=0 then print " Spell Craft is a skill not yet learned.":gosub 1000:goto  30200
31194 if wtw2=0 then print " Arcane Arts is a skill not yet learned.":gosub 1000:goto  30200
31196 if wtw3=0 then print " Wizardry Components is a skill not yet learned.":gosub 1000:goto  30200
31198 print:print " Current Apprentice Wizard level = ";wlvl
31200 print " Price per Apprentice Wizard =  {20 gold}  +20 gold per level {";20*wlvl;"}    and 1 Population"
31202 print:print " How many Apprentice Wizards would you like to buy {0 to exit}";:input a:if a=0 then  30200
31203 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31202
31204 b=a*(20+(20*wlvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31202
31206 g=g-b:wizarda=wizarda+a:wizardz=wizardz+a:popu=popu-a:print:print " You now have ";wizarda;" Apprentice Wizards and ";g;" gold.  Total wizards = ";wizardz:gosub 1000:goto  30200
31210  if wizmaster=0 then print: print     " Master Wizard is knowledge not yet learned.":gosub 1000:goto  30200
31211  if wtw5=0 then print " Master Wizard Training is a skill not yet learned.":gosub 1000:goto  30200
31212  if wtw1=0 then print " Spell Craft is a skill not yet learned.":gosub 1000:goto  30200
31214 if wtw2=0 then print " Arcane Arts is a skill not yet learned.":gosub 1000:goto  30200
31216 if wtw3=0 then print " Wizardry Components is a skill not yet learned.":gosub 1000:goto  30200
31217 if wlvl<10 then print " Master Wizards can only start after Wizard Level has reached 10.  Your current Wizard Level = ";wlvl:gosub 1000:goto 30200
31218 print:print " Current Master Wizard level = ";wlvl
31220 print " Price per Master Wizard =  {50 gold}  +10 gold per level {";10*wlvl;"}    and 1 Population"
31222 print:print " How many Master Wizards would you like to buy {0 to exit}";:input a:if a=0 then  30200
31223 if a>popu-1 then print:print " You do not have enough population for this.  Population = ";popu;".":goto 31222
31224 b=a*(50+(10*wlvl)):if b>g then print:print " This costs ";b;" and you only have ";g;".":goto 31202
31226 g=g-b:wizardm=wizardm+a:wizardz=wizardz+a:popu=popu-a:print:print " You now have ";wizardm;" Master Wizards and ";g;" gold.  Total wizards = ";wizardz:gosub 1000:goto  30200


50000 REM BATTLE
50002 REM BATTLE SET UP
50004 REM ELVL and TROOP #s
50006 a=int(rnd(1)*10)+1:if a=1 then elvl=clvl
50008 if a=2 then elvl=clvl+1
50010 if a=3 then elvl=clvl-1
50012 if a=4 then elvl=clvl+2
50014 if a=5 then elvl=clvl-2
50016 if a=6 then elvl=clvl+3
50018 if a=7 then elvl=clvl-3
50020 if a=8 then elvl=clvl+4
50022 if a=9 then elvl=clvl-4
50024 if a=10 then gosub 50998
50060 if elvl<=0 then elvl=1
50062 if elvl=1 then esb=0 :elb=0 :ecb=0 :esw=5 :eax=0 :esp=0 :egin=0 :elc=0 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50064 if elvl>1 and elvl<=3 then esb=0 :elb=0 :ecb=0 :esw=10 :eax=0 :esp=0 :egin=0 :elc=0 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50066 if elvl>3 and elvl<=6 then esb=3 :elb=0 :ecb=0 :esw=25 :eax=0 :esp=0 :egin=0 :elc=0 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50068 if elvl>6 and elvl<=9 then esb=8 :elb=0 :ecb=0 :esw=25 :eax=0 :esp=0 :egin=0 :elc=0 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50070 if elvl>9 and elvl<=12 then esb=15 :elb=0 :ecb=0 :esw=30 :eax=4 :esp=0 :egin=0 :elc=0 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50072 if elvl>12 and elvl<=15  then esb=15 :elb=0 :ecb=0 :esw=35 :eax=8 :esp=0 :egin=0 :elc=0 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50074 if elvl>15 and elvl<=18  then esb=20 :elb=4 :ecb=0 :esw=35 :eax=10 :esp=0 :egin=0 :elc=0 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50076 if elvl>18 and elvl<=21  then esb=25 :elb=10 :ecb=0 :esw=45 :eax=15 :esp=10 :egin=0 :elc=0 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50078 if elvl>21 and elvl<=24  then esb=30 :elb=15 :ecb=0 :esw=45 :eax=20 :esp=15 :egin=0 :elc=4 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50080 if elvl>24 and elvl<=27  then esb=30 :elb=20 :ecb=5 :esw=55 :eax=25 :esp=20 :egin=0 :elc=10 :ehc=0 :ekn=0 :ewa=0 :ewm=0
50082 if elvl>27 and elvl<=30  then esb=40 :elb=30 :ecb=15 :esw=65 :eax=35 :esp=30 :egin=0 :elc=20 :ehc=10 :ekn=0 :ewa=2 :ewm=0
50084 if elvl>30 and elvl<=33  then esb=50 :elb=40 :ecb=25 :esw=75 :eax=45 :esp=40 :egin=5 :elc=30 :ehc=20 :ekn=0 :ewa=5 :ewm=0
50086 if elvl>33 and elvl<=36  then esb=50 :elb=40 :ecb=25 :esw=100 :eax=50 :esp=40 :egin=15 :elc=30 :ehc=30 :ekn=0 :ewa=10 :ewm=0
50088 if elvl>36 and elvl<=39  then esb=60 :elb=50 :ecb=35 :esw=120 :eax=60 :esp=50 :egin=25 :elc=40 :ehc=30 :ekn=10 :ewa=15 :ewm=0
50090 if elvl>39 and elvl<=42  then esb=60 :elb=60 :ecb=45 :esw=140 :eax=70 :esp=50 :egin=35 :elc=40 :ehc=35 :ekn=15 :ewa=20 :ewm=0
50092 if elvl>42 and elvl<=45  then esb=70 :elb=70 :ecb=55 :esw=160 :eax=75 :esp=55 :egin=35 :elc=40 :ehc=35 :ekn=15 :ewa=25 :ewm=0
50094 if elvl>45 and elvl<=48  then esb=75 :elb=75 :ecb=60 :esw=180 :eax=80 :esp=60 :egin=35 :elc=45 :ehc=45 :ekn=25 :ewa=30 :ewm=0
50096 if elvl>48 and elvl<=51  then esb=85 :elb=85 :ecb=60 :esw=200 :eax=80 :esp=60 :egin=40 :elc=50 :ehc=50 :ekn=30 :ewa=35 :ewm=2
50098 if elvl>51 and elvl<=54  then esb=95 :elb=95 :ecb=65 :esw=220 :eax=85 :esp=65 :egin=45 :elc=55 :ehc=55 :ekn=35 :ewa=40 :ewm=5
50100 if elvl>54 and elvl<=57  then esb=95 :elb=95 :ecb=70 :esw=240 :eax=95 :esp=75 :egin=55 :elc=65 :ehc=65 :ekn=45 :ewa=45 :ewm=10
50102 if elvl>57 and elvl<=60  then esb=105 :elb=105 :ecb=75 :esw=260 :eax=100 :esp=80 :egin=60 :elc=70 :ehc=70 :ekn=55 :ewa=55 :ewm=20
50104 if elvl>60 and elvl<=63  then esb=115 :elb=115 :ecb=85 :esw=280 :eax=110 :esp=90 :egin=70 :elc=80 :ehc=80 :ekn=65 :ewa=65 :ewm=30
50106 if elvl>63 and elvl<=66  then esb=125 :elb=125 :ecb=95 :esw=300 :eax=120 :esp=100 :egin=80 :elc=90 :ehc=90 :ekn=75 :ewa=75 :ewm=40
50108 if elvl>66 and elvl<=69  then esb=135 :elb=135 :ecb=105 :esw=320 :eax=140 :esp=120 :egin=85 :elc=100 :ehc=95 :ekn=85 :ewa=85 :ewm=50
50110 if elvl>69 and elvl<=72  then esb=145 :elb=145 :ecb=115 :esw=340 :eax=160 :esp=140 :egin=95 :elc=110 :ehc=105 :ekn=95 :ewa=95 :ewm=60
50112 if elvl>72 and elvl<=75  then esb=155 :elb=155 :ecb=125 :esw=360 :eax=180 :esp=160 :egin=105 :elc=120 :ehc=115 :ekn=105 :ewa=105 :ewm=70
50114 if elvl>75 and elvl<=78  then esb=175 :elb=175 :ecb=145 :esw=400 :eax=200 :esp=190 :egin=125 :elc=140 :ehc=135 :ekn=125 :ewa=125 :ewm=75
50116 if elvl>78 and elvl<=81  then esb=195 :elb=195 :ecb=165 :esw=450 :eax=240 :esp=230 :egin=145 :elc=160 :ehc=155 :ekn=145 :ewa=145 :ewm=80
50118 if elvl>81 and elvl<=84  then esb=250 :elb=250 :ecb=250 :esw=600 :eax=300 :esp=300 :egin=200 :elc=200 :ehc=200 :ekn=190 :ewa=190 :ewm=90
50120 if elvl>84 then esb=400 :elb=400 :ecb=400 :esw=1000 :eax=400 :esp=400 :egin=300 :elc=300 :ehc=300 :ekn=290 :ewa=290 :ewm=125
50997 goto 51000
50998 a=int(rnd(1)*100)+1:if a=1 then elvl=clvl+15:print:print "   Elite Force":return
50999 elvl=clvl+5:return
51000 REM Rolling # of enemies
51002 if esb=0 then 51012
51004 a=int(rnd(1)*20)+1:if a=1 then  51012
51006 a=int(rnd(1)*esb)+5+elvl:if a>esb then a=esb
51008 esb=a
51012 if elb=0 then 51022
51014 a=int(rnd(1)*20)+1:if a=1 then 51022
51016 a=int(rnd(1)*elb)+elvl:if a>elb then a=elb
51018 elb=a
51022 if ecb=0 then 51032
51024 a=int(rnd(1)*20)+1:if a=1 then 51032
51026 a=int(rnd(1)*ecb)+elvl:if a>ecb then a=ecb
51028 ecb=a
51032 if esw=0 then 51042
51034 a=int(rnd(1)*20)+1:if a=1 then 51042
51036 a=int(rnd(1)*esw)+5+elvl:if a>esw then a=esw
51038 esw=a
51042 if eax=0 then 51052
51044 a=int(rnd(1)*20)+1:if a=1 then 51052
51046 a=int(rnd(1)*eax)+elvl:if a>eax then a=eax
51048 eax=a
51052 if esp=0 then 51062
51054 a=int(rnd(1)*20)+1:if a=1 then 51062
51056 a=int(rnd(1)*esp)+elvl:if a>esp then a=esp
51058 esp=a
51062 if egin=0 then 51072
51064 a=int(rnd(1)*20)+1:if a=1 then 51072
51066 a=int(rnd(1)*egin)+elvl:if a>egin then a=egin
51068 egin=a
51072 if elc=0 then 51082
51074 a=int(rnd(1)*20)+1:if a=1 then 51082
51076 a=int(rnd(1)*elc)+elvl:if a>elc then a=elc
51078 elc=a
51082 if ehc=0 then 51092
51084 a=int(rnd(1)*20)+1:if a=1 then 51092
51086 a=int(rnd(1)*ehc)+elvl:if a>ehc then a=ehc
51088 ehc=a
51092 if ekn=0 then 51102
51094 a=int(rnd(1)*20)+1:if a=1 then 51102
51096 a=int(rnd(1)*ekn)+elvl:if a>ekn then a=ekn
51098 ekn=a
51102 if ewa=0 then 51112
51104 a=int(rnd(1)*20)+1:if a=1 then 51112
51106 a=int(rnd(1)*ewa)+elvl:if a>ewa then a=ewa
51108 ewa=a
51112 if ewm=0 then 51122
51114 a=int(rnd(1)*20)+1:if a=1 then 51122
51116 a=int(rnd(1)*ewm)+elvl:if a>ewm then a=ewm
51118 ewm=a

51122 rem start of battle
51125 cinit=0:einit=0:earchers=esb+elb+ecb:esoldiers=esw+eax+esp+egin:ecalvary=elc+ehc+ekn:ewizards=ewm+ewa:gender=0:lord=0:title=0:gender=0:x=0:round=1:esb1=esb:elb1=elb:ecb1=ecb:esw1=esw:eax1=eax:esp1=esp:egin1=egin:elc1=elc:ehc1=ehc:ekn1=ekn:ewa1=ewa:ewm1=ewm
51130 a=int(rnd(1)*10)+1:if a=1 then lord$="Barbarian":barb=1
51132 if a=2 then lord$="Duke":lord=1
51134 if a=3 then lord$="Lord":lord=1
51136 if a=4 then lord$="Magistrate":lord=1
51138 if a=5 then lord$="Czar":lord=1
51140 if a=6 then lord=0
51142 if a=7 then lord$="Baron":lord=1
51144 if a=8 then lord$="Khan":lord=1
51145 if a=9 then lord$="Queen":lord=1:gender=2
51146 if a=10 then lord$="Countess":lord=1:gender=2
51148 if a=11 then lord$="King":lord=1
51150 if a=12 then lord$="Dame":lord=1 :gender=2
51152 if a=13 then lord$="Dutchess":lord=1:gender=2
51154 if a=14 then lord$="Sulatana":lord=1:gender=2
51156 if a=15 then lord$="Princess":lord=1:gender=2
51158 if gender=2 then 51400
51160 a=int(rnd(1)*10)+1:if a=1 then erlr1$="Li"
51162 if a=2 then erlr1$="Ar"
51164 if a=3 then erlr1$="Co"
51166 if a=4 then erlr1$="Be"
51168 if a=5 then erlr1$="Pa"
51170 if a=6 then erlr1$="Vo"
51172 if a=7 then erlr1$="Shi"
51174 if a=8 then erlr1$="Ur"
51176 if a=9 then erlr1$="Re"
51178 if a=10 then erlr1$="Py"
51200 a=int(rnd(1)*10)+1:if a=1 then erlr2$="tta"
51202 if a=2 then erlr2$="chan"
51204 if a=3 then erlr2$="thed"
51206 if a=4 then erlr2$="ragga"
51208 if a=5 then erlr2$="yoto"
51210 if a=6 then erlr2$="wex"
51212 if a=7 then erlr2$="dekka"
51214 if a=8 then erlr2$="jara"
51216 if a=9 then erlr2$="cusa"
51218 if a=10 then erlr2$="llaga"
51250 a=int(rnd(1)*10)+1:if a=1 or barb=1 then 51350
51251 a=int(rnd(1)*10)+1:if a=1 then erlr3$="Asha"
51252 if a=2 then erlr3$="Puro"
51254 if a=3 then erlr3$="Fala"
51256 if a=4 then erlr3$="Maxa"
51258 if a=5 then erlr3$="Orogo"
51260 if a=6 then erlr3$="Nino"
51262 if a=7 then erlr3$="Loasa"
51264 if a=8 then erlr3$="Xula"
51266 if a=9 then erlr3$="Balaga"
51268 if a=10 then erlr3$="Wena"
51300 a=int(rnd(1)*10)+1:if a=1 then erlr4$="jolota":goto 51500
51302 if a=2 then erlr4$="na":goto 51500
51304 if a=3 then erlr4$="ti":goto 51500
51306 if a=4 then erlr4$="ga":goto 51500
51308 if a=5 then erlr4$="kilan":goto 51500
51310 if a=6 then erlr4$="reta":goto 51500
51312 if a=7 then erlr4$="pi":goto 51500
51314 if a=8 then erlr4$="vu":goto 51500
51316 if a=9 then erlr4$="noc":goto 51500
51318 if a=10 then erlr4$="lane":goto 51500
51350 a=int(rnd(1)*10)+1:if a=1 then erlr4$="The Conquerer":title=1:goto 51500
51352 if a=2 then erlr4$="The Annihilator":title=1:goto 51500
51354 if a=3 then erlr4$="The Destroyer":title=1:goto 51500
51356 if a=4 then erlr4$="The Mutilator":title=1:goto 51500
51358 if a=5 then erlr4$="The Black":title=1:goto 51500
51360 if a=6 then erlr4$="The Red":title=1:goto 51500
51362 if a=7 then erlr4$="The White":title=1:goto 51500
51364 if a=8 then erlr4$="The Enveloper":title=1:goto 51500
51366 if a=9 then erlr4$="The Diminisher":title=1:goto 51500
51368 if a=10 then erlr4$="The Warlord":title=1:goto 51500
51400 a=int(rnd(1)*10)+1:if a=1 then erlr1$="Dana"
51402 if a=2 then erlr1$="Cara"
51404 if a=3 then erlr1$="Shara"
51406 if a=4 then erlr1$="Tula"
51408 if a=5 then erlr1$="Daisa"
51410 if a=6 then erlr1$="Viola"
51412 if a=7 then erlr1$="Piena"
51414 if a=8 then erlr1$="Chana"
51416 if a=9 then erlr1$="Riona"
51418 if a=10 then erlr1$="Beatra"
51450 a=int(rnd(1)*10)+1:if a=1 then erlr2$="tis"
51452 if a=2 then erlr2$="yila"
51454 if a=3 then erlr2$="lisa"
51456 if a=4 then erlr2$="liona"
51458 if a=5 then erlr2$="hesta"
51460 if a=6 then erlr2$="shelo"
51462 if a=7 then erlr2$="baiga"
51464 if a=8 then erlr2$="yula"
51466 if a=9 then erlr2$="sana"
51468 if a=10 then erlr2$="ravene"
51499 goto 51250
51500 if lord=0 and title=0 then print:print " The name of your enemy is ";erlr1$;"";erlr2$;" ";erlr3$;"";erlr4$;".":goto 51510
51502 if lord=0 and title=1 then print:print " The name of your enemy is ";erlr1$;"";erlr2$;" ";erlr4$;".":goto  51510
51504 if lord=1 and title=0 then print:print " The name of your enemy is ";lord$;" ";erlr1$;"";erlr2$;" ";erlr3$;"";erlr4$;".":goto 51510
51506 print:print " The name of your enemy is ";lord$;" ";erlr1$;"";erlr2$;" ";erlr4$;"."
51510 a=0:IF eachers>archerz then a=a+1
51511 if esoldiers>soldierz then a=a+1
51512 if ecalvary>calvaryz then a=a+1
51513 if ewizards>wizardz then a=a+1
51514 gosub 51675:print:print " They look to be ";a$;".":gosub 1000
51515 gosub 51525:gosub 51600:goto 51650
51524 REM NUMBERS REPORT - enemy
51525 print:gosub 1005:print " They have the following army numbers:":gosub 1005
51530 if esb1>0 then print "  Shortbow Archers       ";esb1
51532 if elb1>0 then print  "  Longbow Archers        ";elb1
51534 if ecb1>0 then print "  Crossbow Archers      ";ecb1
51536 if earchers>0 then print "   Total Archers:     {{ ";earchers;" }}":goto 51540
51538 if earchers=0 then print " They have no Archers."
51540 if esw1>0 then print  "  Swordsmen               ";esw1
51542 if eax1>0 then print  "  Axemen                     ";eax1
51544 if esp1>0 then print  "  Spearmen                   ";esp1
51546 if egin1>0 then print "  Ginsu                         ";egin1
51548 if esoldiers>0 then print "   Total Soldiers:     {{ ";esoldiers;" }}":goto 51552
51550 if esoldiers=0 then print " They have no Soldiers."
51552 if elc1>0 then print  "  Light Calvary                ";elc1
51554 if ehc1>0 then print  "  Heavy Calvary             ";ehc1
51556 if ekn1>0 then print  "  Knights                       ";ekn1
51558 if ecalvary>0 then print "   Total Calvary:     {{ ";ecalvary;" }}":goto 51562
51560 if ecalvary=0 then print " They have no Calvary."
51562 if ewa1>0 then print  "  Apprentice Wizards      ";ewa1
51564 if ewm1>0 then print "  Master Wizards            ";ewm1
51566 if ewizards>0 then print "   Total Wizards:     {{ ";ewizards;" }}":goto 51570
51568 if ewizards=0 then print " They have no Wizards."
51570 print " Total Numbers = ";earchers+esoldiers+ecalvary+ewizards:gosub 1005:gosub 1000:return
51600 REM NUMBERS REPORT - Character
51602 gosub 1005:print " You have the following army numbers:":gosub 1005
51604 if archersb>0 then print "  Shortbow Archers      ";archersb
51606 if archerlb>0 then print  "  Longbow Archers       ";archerlb
51608 if archercb>0 then print "  Crossbow Archers     ";archercb
51610 if archerz>0 then print "   Total Archers:     {{ ";archerz;" }}":goto 51614
51612 if earchers=0 then print " You have no Archers."
51614 if soldiersw>0 then print  "  Swordsmen               ";soldiersw
51615 if soldierax>0 then print   "  Axemen                    ";soldierax
51618 if soldiersp>0 then print   "  Spearmen                 ";soldiersp
51619 if soldiergin>0 then print  "  Ginsu                        ";soldiergin
51620 if soldierz>0 then print "   Total Soldiers:     {{ ";soldierz;" }}":goto 51622
51621 if soldierz=0 then print " You have no Soldiers."
51622 if calvaryl>0 then print    "  Light Calvary               ";calvaryl
51624 if calvaryh>0 then print   "  Heavy Calvary             ";calvaryh
51626 if calvaryk>0 then print   "  Knights                       ";calvaryk
51628 if calvaryz>0 then print "   Total Calvary:     {{ ";calvaryz;" }}":goto 51632
51630 if calvaryz=0 then print " You have no Calvary."
51632 if wizarda>0 then print  "  Apprentice Wizards      ";wizarda
51634 if wizardm>0 then print "  Master Wizards            ";wizardm
51636 if wizardz>0 then print "   Total Wizards:     {{ ";wizardz;" }}":print:goto 51640
51638 if wizardz=0 then print " You have no Wizards."
51640 print " Total Numbers = ";archerz+soldierz+calvaryz+wizardz:gosub 1005:gosub 1000:return

51650 gosub 1005:print "Round ";round:gosub 1005
51652 goto 51700

51675 rem IS ENEMY A MEANIEHEAD?
51676 if a=0 then a$="very weak":return
51678 if a=1 then a$="an unremarkable foe":return
51680 if a=2 then a$="kind of dangerous":return
51682 if a=3 then a$="extremely dangerous":return
51684 a$="terrifyingly powerful":return

51699 REM INITIATIVE TO START
51700 a=int(rnd(1)*100)+1+clvl:if a>50 then print:print "  You have won initiative.  Your forces may attack first!":cinit=1:gosub 1000:goto 51750
51702 print:print "  The enemy has won initiative.  Their forces may attack first!":einit=1:gosub 1000:goto 53000

51705 REM ARROW CREATION IN BATTLE
51706 if g<150 then print:print " You only have ";g;" gold....":gosub 1000:goto 51752
51708 print:print " How many sets of 100 arrows would you like to create {1-";int(g/150);", 0 to exit}";:input a:if a=0 then 51752
51710 if a*150>g then print:print " That would cost ";a*150;" and you only have ";g;".":goto 51708
51712 arrowz=arrowz+(a*100):g=g-(a*150):print:print " Arrows up ";a*100;".  Gold down ";a*150;".  You now have ";arrowz;" arrows and ";g;" gold.":gosub 1000:goto 51752


51750 REM CHARACTER ATTACK WINDOW
51752 cls:gosub 1005:print " Round ";round:print " Character Attack Menu":gosub 1005:if arrowz<0 then arrowz=0
51754 print:print " Numbers:  ARCHERS   Shortbow = ";archersb;"       Longbow = ";archerlb;"      Crossbow = ";archercb
51756 print        "                    SOLDIERS   Swordmen = ";soldiersw;"    Axemen = ";soldierax;"     Spearmen = ";soldiersp;"       Ginsu = ";soldiergin
51758 print        "                    CALVARY    Light = ";calvaryl;"               Heavy = ";calvaryh;"        Knights = ";calvaryk
51760 print        "                    WIZARDS    Apprentice = ";wizarda;"       Master = ";wizardm:gosub 1005:print " Arrows = ";arrows:print " Gold = ";g:gosub 1005:print
51764 print " {A}ttack with available Units"
51766 print " {B}ribe the advesary"
51768 if arrowz<=0 then print " {F}orge Arrows             Cost 150 Gold         Arrows Gained: 100"
51800 print:print " Which do you want to do {Enter Letter}";:input a$
51804 if a$="A" then 51850
51806 if a$="B" then print " This feature disabled":gosub 1000:goto 51752
51808 if a$="F" and arrowz<=0 then 51705
51849 goto 51752
51850 REM ATTACK
51852 if archersb>0 and arrowz>0 then nm$="Shortbow Archers":d=1:d1=d:aa=archersb:hitseta=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Archer XP up ";tkills:axp=axp+tkills:tkills=0
51854 if archerlb>0 and arrowz>0 then nm$="Longbow Archers":d=2:d1=d:aa=archerlb:hitseta=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Archer XP up ";tkills:axp=axp+tkills:tkills=0
51856 if archercb>0 and arrowz>0 then nm$="Crossbow Archers":d=4:d1=d:aa=archercb:hitseta=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Archer XP up ";tkills:axp=axp+tkills:tkills=0
51858 if soldiersw>0 then nm$="Swordsmen":d=1+(1*slvl):d1=d:aa=soldiersw:hitsets=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Soldier XP up ";tkills:sxp=sxp+tkills:tkills=0
51860 if soldierax>0 then nm$="Axemen":d=2+(2*slvl):d1=d:aa=soldierax:hitsets=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Soldier XP up ";tkills:sxp=sxp+tkills:tkills=0
51862 if soldiersp>0 then nm$="Spearmen":d=3+(2*slvl):d1=d:aa=soldiersp:hitsets=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Soldier XP up ";tkills:sxp=sxp+tkills:tkills=0
51864 if soldiergin>0 then nm$="Ginsu":d=5+(2*slvl):d1=d:aa=soldiergin:hitsets=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Soldier XP up ";tkills:sxp=sxp+tkills:tkills=0
51866 if calvaryl>0 then nm$="Light Calvary":d=3+(3*calvl):d1=d:aa=calvaryl:hitsetc=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Calvary XP up ";tkills:caxp=caxp+tkills:tkills=0
51868 if calvaryh>0 then nm$="Heavy Calvary":d=5+(4*calvl):d1=d:aa=calvaryh:hitsetc=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Calvary XP up ";tkills:caxp=caxp+tkills:tkills=0
51870 if calvaryk>0 then nm$="Knights":d=6+(5*calvl):d1=d:aa=calvaryk:hitsetc=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Calvary XP up ";tkills:caxp=caxp+tkills:tkills=0
51872 if wizarda>0 then nm$="Apprentice Wizards":d=10+(2*wlvl):d1=d:aa=wizarda:hitsetw=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Wizard XP up ";tkills:wxp=wxp+tkills:tkills=0
51874 if wizardm>0 then nm$="Master Wizards":d=20+(4*wlvl):d1=d:aa=wizardm:hitsetw=1:gosub 51900:gosub 1005:gosub 1000:if tkills>0 then print " Wizard XP up ";tkills:wxp=wxp+tkills:tkills=0
51876 if esb1=0 and elb1=0 and ecb1=0 and esw1=0 and eax1=0 and esp1=0 and egin1=0 and elc1=0 and ehc1=0 and ekn1=0 and ewa1=0 and ewm1=0 then print:print " You have vanquished all your foes!":gosub 1000:goto 54000
51878 goto 52250


51900 nxp=0:if esb1=0 and elb1=0 and ecb1=0 and esw1=0 and eax1=0 and esp1=0 and egin1=0 and elc1=0 and ehc1=0 and ekn1=0 and ewa1=0 and ewm1=0 then print " ";nm$;" are standing by.":return
51901 print:print " Your ";nm$;" attack!":x=0
51902 if hitseta=1 and arrowz=0 then hitseta=0:print:print " You have run out of arrows!":gosub 1000:goto 51920
51903 if x>aa then 51910
51904 if hitseta=1 then arrowz=arrowz-1
51905 a=int(rnd(1)*20)+1:if a>=8 then hit=hit+1
51906 x=x+1:goto 51902
51910 if hitseta=1 then hitseta=0:goto 51920
51912 if hitsets=1 then hitsets=0:goto 51922
51914 if hitsetc=1 then hitsetc=0:goto 51930
51916 hitsetw=0:goto 51940

51919 REM HITSETS - these are used to determine which warriors attack which
51920 hs1=40:hs2=30:hs3=20:hs4=10:goto 51950
51922 hs1=0:hs2=90:hs3=10:hs4=0
51924 if esoldiers=0 then hs1=10:hs2=0:hs3=90:hs4=0
51926 if ecalvary=0 then hs1=10:hs2=90:hs3=0:hs4=0
51928 if esoldiers=0 and ecalvary=0 then hs1=65:hs2=0:hs3=0:hs4=35
51929 goto 51950
51930 hs1=0:hs2=50:hs3=50:hs4=0
51934 if esoldiers=0 then hs1=50:hs2=0:hs3=50:hs4=0
51936 if ecalvary=0 then hs1=50:hs2=50:hs3=0:hs4=0
51938 if esoldiers=0 and ecalvary=0 then hs1=50:hs2=0:hs3=0:hs4=50
51939 goto 51950
51940 hs1=25:hs2=25:hs3=25:hs4=25

51950 REM Who do they attack?
51955 x=0
51960 x=x+1:if x>hit then 52050
51965 b=int(rnd(1)*100)+1:if b<=hs1 and earchers>0 then 51990
51970 if b>hs1 and b<=(hs1+hs2) and esoldiers>0 then 52000
51975 if b>(hs1+hs2) and b<=(hs1+hs2+hs3) and ecalvary>0 then 52010
51980 if b>(hs1+hs2+hs3) and b<=100 and ewizards>0 then 52020
51985 goto 51965
51990 a=int(rnd(1)*3)+1:if a=1 and esb1>0 then hsb=hsb+1:goto 51960
51992 if a=2 and elb1>0 then hlb=hlb+1:goto 51960
51994 if ecb1>0 then hcb=hcb+1:goto 51960
51996 goto 51990
52000 a=int(rnd(1)*4)+1:if a=1 and esw1>0 then hsw=hsw+1:goto 51960
52002 if a=2 and eax1>0 then hax=hax+1:goto 51960
52004 if a=3 and esp1>0 then hsp=hsp+1:goto 51960
52006 if egin1>0 then hgin=hgin+1:goto 51960
52008 goto 52000
52010 a=int(rnd(1)*3)+1:if a=1 and elc1>0 then hlc=hlc+1:goto 51960
52012 if a=2 and ehc1>0 then hhc=hhc+1:goto 51960
52014 if a=3 and ekn1>0 then hkn=hkn+1:goto 51960
52016 goto 52010
52020 a=int(rnd(1)*2)+1:if a=1 and ewa1>0 then hwa=hwa+1:goto 51960
52022 if a=2 and ewm1>0 then hwm=hwm+1:goto 51960
52024 goto 52020
52050 REM HIT TELLER
52052 if hsb>0 then print:print " Your ";nm$;" have hit enemy shortbow archers ";hsb;" times!":d=d1:goto 52100
52054 if hlb>0 then print:print " Your ";nm$;" have hit enemy longbow archers ";hlb;" times!":d=d1:goto 52110
52056 if hcb>0 then print:print " Your ";nm$;" have hit enemy crossbow archers ";hcb;" times!":d=d1:goto 52120
52058 if hsw>0 then print:print " Your ";nm$;" have hit enemy swordsmen ";hsw;" times!":d=d1:goto 52130
52060 if hax>0 then print:print " Your ";nm$;" have hit enemy axemen ";hax;" times!":d=d1:goto 52140
52062 if hsp>0 then print:print " Your ";nm$;" have hit enemy spearmen ";hsp;" times!":d=d1:goto 52150
52064 if hgin>0 then print:print " Your ";nm$;" have hit enemy ginsu ";hgin;" times!":d=d1:goto 52160
52066 if hlc>0 then print:print " Your ";nm$;" have hit enemy light calvary ";hlc;" times!":d=d1:goto 52170
52068 if hhc>0 then print:print " Your ";nm$;" have hit enemy heavy calvary ";hhc;" times!":d=d1:goto 52180
52070 if hkn>0 then print:print " Your ";nm$;" have hit enemy knights ";hkn;" times!":d=d1:goto 52190
52072 if hwa>0 then print:print " Your ";nm$;" have hit enemy apprentice wizards ";hwa;" times!":d=d1:goto 52200
52074 if hwm>0 then print:print " Your ";nm$;" have hit enemy master wizards ";hwm;" times!":d=d1:goto 52210

52076 print:print " Your ";nm$;" has hit a total of ";hit;" times and did a total of ";totaldmg;" damage."
52078 print:print " Enemies Killed by this group:":gosub 1005
52080 print " Archers - Shortbow {";ksb;"}            Longbow {";klb;"}           Crossbow {";kcb;"}"
52082 print " Soldiers - Swordsmen {";ksw;"}        Axemen {";kax;"}          Spearmen {";ksp;"}         Ginsu {";kgin;"}"
52084 print " Calvary - Light {";klc;"}                    Heavy {";khc;"}              Knights {";kkn;"}"
52086 print " Wizards - Apprentice {";kwa;"}          Master {";kwm;"}":tkills=ksb+klb+kcb+ksw+kax+ksp+kgin+klc+khc+kkn+kwa+kwm
52088 gosub 1005:print " Total Kills by this group: {";tkills;"}":totaldmg1=totaldmg1+totaldmg:totaldmg=0:hit=0
52090 ksb=0:klb=0:kcb=0:ksw=0:kax=0:ksp=0:kgin=0:klc=0:khc=0:kkn=0:kwa=0:kwm=0:nxp=0
52092 hsb=0:hlb=0:hcb=0:hsw=0:hax=0:hsp=0:hgin=0:hlc=0:hhc=0:hkn=0:hwa=0:hwm=0:return

52100 d=d*hsb:hp=1+int(elvl/15):a=int(d/hp):if a>esb1 then a=esb1
52101 if a>hsb then a=hsb
52102 print " ";a;" shortbow archers have died.":esb1=esb1-a:if esb1<=0 then esb1=0:print " All enemy shortbow archers have perished!"
52104 ksb=ksb+a:ksb1=ksb1+a:totaldmg=totaldmg+d:earchers=earchers-a:if esb1=0 and elb1=0 and ecb1=0 then earchers=0
52106 goto 52054
52110 d=d*hlb:hp=1+int(elvl/15):a=int(d/hp):if a>elb1 then a=elb1
52111 if a>hlb then a=hlb
52112 print " ";a;" longbow archers have died.":elb1=elb1-a:if elb1<=0 then elb1=0:print " All enemy longbow archers have perished!"
52114 klb=klb+a:klb1=klb1+a:totaldmg=totaldmg+d:earchers=earchers-a:if esb1=0 and elb1=0 and ecb1=0 then earchers=0
52116 goto 52056
52120 d=d*hcb:hp=1+int(elvl/15):a=int(d/hp):if a>ecb1 then a=ecb1
52121 if a>hcb then a=hcb
52122 print " ";a;" crossbow archers have died.":ecb1=ecb1-a:if ecb1<=0 then ecb1=0:print " All enemy crossbow archers have perished!"
52124 kcb=kcb+a:kcb1=kcb1+a:totaldmg=totaldmg+d:earchers=earchers-a:if esb1=0 and elb1=0 and ecb1=0 then earchers=0
52126 goto 52058
52130 d=d*hsw:hp=1+int(elvl/15):a=int(d/hp):if a>esw1 then a=esw1
52131 if a>hsw then a=hsw
52132 print " ";a;" swordsmen have died.":esw1=esw1-a:if esw1<=0 then esw1=0:print " All enemy swordsmen have perished!"
52134 ksw=ksw+a:ksw1=ksw1+a:totaldmg=totaldmg+d:esoldiers=esoldiers-a:if esw1=0 and eax1=0 and esp1=0 and egin1=0 then esoldiers=0
52136 goto 52060
52140 d=d*hax:hp=1+int(elvl/15):a=int(d/hp):if a>eax1 then a=eax1
52141 if a>hax then a=hax
52142 print " ";a;" axemen have died.":eax1=eax1-a:if eax1<=0 then eax1=0:print " All enemy axemen have perished!"
52144 kax=kax+a:kax1=kax1+a:totaldmg=totaldmg+d:esoldiers=esoldiers-a:if esw1=0 and eax1=0 and esp1=0 and egin1=0 then esoldiers=0
52146 goto 52062
52150 d=d*hsp:hp=1+int(elvl/15):a=int(d/hp):if a>esp1 then a=esp1
52151 if a>hsp then a=hsp
52152 print " ";a;" spearmen have died.":esp1=esp1-a:if esp1<=0 then esp1=0:print " All enemy spearmen have perished!"
52154 ksp=ksp+a:ksp1=ksp1+a:totaldmg=totaldmg+d:esoldiers=esoldiers-a:if esw1=0 and eax1=0 and esp1=0 and egin1=0 then esoldiers=0
52156 goto 52064
52160 d=d*hgin:hp=1+int(elvl/15):a=int(d/hp):if a>egin1 then a=egin1
52161 if a>hgin then a=hgin
52162 print " ";a;" ginsu have died.":egin1=egin1-a:if egin1<=0 then egin1=0:print " All enemy ginsu have perished!"
52164 kgin=kgin+a:kgin1=kgin1+a:totaldmg=totaldmg+d:esoldiers=esoldiers-a:if esw1=0 and eax1=0 and esp1=0 and egin1=0 then esoldiers=0
52166 goto 52066
52170 d=d*hlc:hp=1+int(elvl/15):a=int(d/hp):if a>elc1 then a=elc1
52171 if a>hlc then a=hlc
52172 print " ";a;" light calvary have died.":elc1=elc1-a:if elc1<=0 then elc1=0:print " All enemy light calvary have perished!"
52174 klc=klc+a:klc1=klc1+a:totaldmg=totaldmg+d:ecalvary=ecalvary-a:if elc1=0 and ehc1=0 and ekn1=0 then ecalvary=0
52176 goto 52068
52180 d=d*hhc:hp=1+int(elvl/15):a=int(d/hp):if a>ehc1 then a=ehc1
52181 if a>hhc then a=hhc
52182 print " ";a;" heavy calvary have died.":ehc1=ehc1-a:if ehc1<=0 then ehc1=0:print " All enemy heavy calvary have perished!"
52184 khc=khc+a:khc1=khc1+a:totaldmg=totaldmg+d:ecalvary=ecalvary-a:if elc1=0 and ehc1=0 and ekn1=0 then ecalvary=0
52186 goto 52070
52190 d=d*hkn:hp=1+int(elvl/15):a=int(d/hp):if a>ekn1 then a=ekn1
52191 if a>hkn then a=hkn
52192 print " ";a;" knights have died.":ekn1=ekn1-a:if ekn1<=0 then ekn1=0:print " All enemy knights have perished!"
52194 kkn=kkn+a:kkn1=kkn1+a:totaldmg=totaldmg+d:ecalvary=ecalvary-a:if elc1=0 and ehc1=0 and ekn1=0 then ecalvary=0
52196 goto 52072
52200 d=d*hwa:hp=1+int(elvl/15):a=int(d/hp):if a>ewa1 then a=ewa1
52201 if a>hwa then a=hwa
52202 print " ";a;" apprentice wizards have died.":ewa1=ewa1-a:if ewa1<=0 then ewa1=0:print " All enemy apprentice wizards have perished!"
52204 kwa=kwa+a:kwa1=kwa1+a:totaldmg=totaldmg+d:ewizards=ewizards-a:if ewa1=0 and ewm1=0 then ewizards=0
52206 goto 52074
52210 d=d*hwm:hp=1+int(elvl/15):a=int(d/hp):if a>ewm1 then a=ewm1
52211 if a>hwm then a=hwm
52212 print " ";a;" master wizards have died.":ewm1=ewm1-a:if ewm1<=0 then ewm1=0:print " All enemy master wizards have perished!"
52214 kwm=kwm+a:kwm1=kwm1+a:totaldmg=totaldmg+d:ewizards=ewizards-a:if ewa1=0 and ewm1=0 then ewizards=0
52216 goto 52076

52250 REM END OF ALL CHARACTER ATTACKS
52252 print:print " Your Enemies Killed:":gosub 1005
52254 print " Archers - Shortbow {";ksb1;"}            Longbow {";klb1;"}           Crossbow {";kcb1;"}"
52256 print " Soldiers - Swordsmen {";ksw1;"}        Axemen {";kax1;"}          Spearmen {";ksp1;"}         Ginsu {";kgin1;"}"
52258 print " Calvary - Light {";klc1;"}                    Heavy {";khc1;"}              Knights {";kkn1;"}"
52260 print " Wizards - Apprentice {";kwa1;"}          Master {";kwm1;"}":tkills=ksb1+klb1+kcb1+ksw1+kax1+ksp1+kgin1+klc1+khc1+kkn1+kwa1+kwm1
52262 gosub 1005:print " Total Kills: {";tkills;"}"
52264 print " Total Damage Dealt: {";totaldmg1;"}":gosub 1005:gosub 1000:totaldmg1=0:hits=0
52266 print:gosub 1005:print " This ends your turn of Round ";round:gosub 1005:gosub 1000:ksb1=0:klb1=0:kcb1=0:ksw1=0:kax1=0:ksp1=0:kgin1=0:klc1=0:khc1=0:kkn1=0:kap1=0:kma1=0:tkills=0
52268 hsb=0:hlb=0:hcb=0:hsw=0:hax=0:hsp=0:hgin=0:hlc=0:hhc=0:hkn=0:hwa=0:hwm=0:goto 52300

52300 REM INITIATIVE
52302 if cinit=1 and einit=1 then cinit=0:einit=0:round=round+1:goto 52308
52304 if cinit=1 and einit=0 then einit=1:goto 53000
52306 if cinit=0 and einit=1 then cinit=1:goto 51750
52308 a=int(rnd(1)*100)+1+clvl:if a>50 then print:print "  You have won initiative.  Your forces may attack first!":cinit=1:gosub 1000:goto 51750
52310 print:print "  The enemy has won initiative.  Their forces may attack first!":einit=1:gosub 1000:goto 53000




53000 REM ENEMY ATTACK
53002 cls:gosub 1005:print " Round ";round:GOSUB 1005:if esb1>0 then nm$="Shortbow Archers":d=1:d1=d:aa=esb1:hitseta=1:gosub 53100
53004 if elb1>0 then nm$="Longbow Archers":d=2:d1=d:aa=elb1:hitseta=1:gosub 53100
53006 if ecb1>0 then nm$="Crossbow Archers":d=4:d1=d:aa=ecb1:hitseta=1:gosub 53100
53008 if esw1>0 then nm$="Swordsmen":d=1+(1*int(elvl/5)):d1=d:aa=esw1:hitsets=1:gosub 53100
53010 if eax1>0 then nm$="Axemen":d=2+(2*int(elvl/5)):d1=d:aa=eax1:hitsets=1:gosub 53100
53012 if esp1>0 then nm$="Spearmen":d=3+(2*int(elvl/5)):d1=d:aa=esp1:hitsets=1:gosub 53100
53014 if egin1>0 then nm$="Ginsu":d=5+(2*int(elvl/5)):d1=d:aa=egin1:hitsets=1:gosub 53100
53016 if elc1>0 then nm$="Light Calvary":d=3+(3*int(elvl/5)):d1=d:aa=elc1:hitsetc=1:gosub 53100
53018 if ehc1>0 then nm$="Heavy Calvary":d=5+(4*int(elvl/5)):d1=d:aa=ehc1:hitsetc=1:gosub 53100
53020 if ekn1>0 then nm$="Knights":d=6+(5*int(elvl/5)):d1=d:aa=ekn1:hitsetc=1:gosub 53100
53022 if ewa1>0 then nm$="Apprentice Wizards":d=10+(2*int(elvl/5)):d1=d:aa=ewa1:hitsetw=1:gosub 53100
53024 if ewm1>0 then nm$="Master Wizards":d=20+(4*int(elvl/5)):d1=d:aa=ewm1:hitsetw=1:gosub 53100
53026 if archersb=0 and archerlb=0 and archercb=0 and soldiersw=0 and soldierax=0 and soldiersp=0 and soldiergin=0 and calvaryl=0 and calvaryh=0 and calvaryk=0 and wizarda=0 and wizardm=0 then print:print " All your soldiers have been defeated!!!":gosub 1000:goto 54100
53028 goto 53450


53100 if archersb=0 and archerlb=0 and archercb=0 and soldiersw=0 and soldierax=0 and soldiersp=0 and soldiergin=0 and calvaryl=0 and calvaryh=0 and calvaryk=0 and wizarda=0 and wizardm=0 then print " ";nm$;" are standing by.":return
53102 print:print " Enemy's ";nm$;" attacks!":x=0
53103 if x>aa then 53110
53104 a=int(rnd(1)*20)+1:if a>=8 then hit=hit+1
53106 x=x+1:goto 53103
53110 if hitseta=1 then hitseta=0:goto 53120
53112 if hitsets=1 then hitsets=0:goto 53122
53114 if hitsetc=1 then hitsetc=0:goto 53130
53116 hitsetw=0:goto 53140

53119 REM HITSETS - these are used to determine which warriors attack which
53120 hs1=40:hs2=30:hs3=20:hs4=10:goto 53150
53122 hs1=0:hs2=90:hs3=10:hs4=0
53124 if esoldiers=0 then hs1=10:hs2=0:hs3=90:hs4=0
53126 if ecalvary=0 then hs1=10:hs2=90:hs3=0:hs4=0
53128 if esoldiers=0 and ecalvary=0 then hs1=65:hs2=0:hs3=0:hs4=35
53129 goto 53150
53130 hs1=0:hs2=50:hs3=50:hs4=0
53134 if esoldiers=0 then hs1=50:hs2=0:hs3=50:hs4=0
53136 if ecalvary=0 then hs1=50:hs2=50:hs3=0:hs4=0
53138 if esoldiers=0 and ecalvary=0 then hs1=50:hs2=0:hs3=0:hs4=50
53139 goto 53150
53140 hs1=25:hs2=25:hs3=25:hs4=25

53150 REM Who do they attack?
53155 x=0
53160 x=x+1:if x>hit then 53250
53165 b=int(rnd(1)*100)+1:if b<=hs1 and archerz>0 then 53190
53170 if b>hs1 and b<=(hs1+hs2) and soldierz>0 then 53200
53175 if b>(hs1+hs2) and b<=(hs1+hs2+hs3) and calvaryz>0 then 53210
53180 if b>(hs1+hs2+hs3) and b<=100 and wizardz>0 then 53220
53185 goto 53165
53190 a=int(rnd(1)*3)+1:if a=1 and archersb>0 then hsb=hsb+1:goto 53160
53192 if a=2 and archerlb>0 then hlb=hlb+1:goto 53160
53194 if archercb>0 then hcb=hcb+1:goto 53160
53196 goto 53190
53200 a=int(rnd(1)*4)+1:if a=1 and soldiersw>0 then hsw=hsw+1:goto 53160
53202 if a=2 and soldierax>0 then hax=hax+1:goto 53160
53204 if a=3 and soldiersp>0 then hsp=hsp+1:goto 53160
53206 if soldiergin>0 then hgin=hgin+1:goto 53160
53208 goto 53200
53210 a=int(rnd(1)*3)+1:if a=1 and calvaryl>0 then hlc=hlc+1:goto 53160
53212 if a=2 and calvaryh>0 then hhc=hhc+1:goto 53160
53214 if a=3 and calvaryk>0 then hkn=hkn+1:goto 53160
53216 goto 53210
53220 a=int(rnd(1)*2)+1:if a=1 and wizarda>0 then hwa=hwa+1:goto 53160
53222 if a=2 and wizardm>0 then hwm=hwm+1:goto 53160
53224 goto 53220
53250 REM HIT TELLER
53252 if hsb>0 then print:print " Enemy's ";nm$;" have hit your shortbow archers ";hsb;" times!":d=d1:goto 53300
53254 if hlb>0 then print:print " Enemy's ";nm$;" have hit your longbow archers ";hlb;" times!":d=d1:goto 53310
53256 if hcb>0 then print:print " Enemy's ";nm$;" have hit your crossbow archers ";hcb;" times!":d=d1:goto 53320
53258 if hsw>0 then print:print " Enemy's ";nm$;" have hit your swordsmen ";hsw;" times!":d=d1:goto 53330
53260 if hax>0 then print:print " Enemy's ";nm$;" have hit your axemen ";hax;" times!":d=d1:goto 53340
53262 if hsp>0 then print:print " Enemy's ";nm$;" have hit your spearmen ";hsp;" times!":d=d1:goto 53350
53264 if hgin>0 then print:print " Enemy's ";nm$;" have hit your ginsu ";hgin;" times!":d=d1:goto 53360
53266 if hlc>0 then print:print " Enemy's ";nm$;" have hit your light calvary ";hlc;" times!":d=d1:goto 53370
53268 if hhc>0 then print:print " Enemy's ";nm$;" have hit your heavy calvary ";hhc;" times!":d=d1:goto 53380
53270 if hkn>0 then print:print " Enemy's ";nm$;" have hit your knights ";hkn;" times!":d=d1:goto 53390
53272 if hwa>0 then print:print " Enemy's ";nm$;" have hit your apprentice wizards ";hwa;" times!":d=d1:goto 53400
53274 if hwm>0 then print:print " Enemy's ";nm$;" have hit your master wizards ";hwm;" times!":d=d1:goto 53410

53276 print:print " Enemy ";nm$;" has hit a total of ";hit;" times and did a total of ";totaldmg;" damage."
53278 print:print " Your Warriors Killed by this group:":gosub 1005
53280 print " Archers - Shortbow {";ksb;"}            Longbow {";klb;"}           Crossbow {";kcb;"}"
53282 print " Soldiers - Swordsmen {";ksw;"}        Axemen {";kax;"}          Spearmen {";ksp;"}         Ginsu {";kgin;"}"
53284 print " Calvary - Light {";klc;"}                    Heavy {";khc;"}              Knights {";kkn;"}"
53286 print " Wizards - Apprentice {";kwa;"}          Master {";kwm;"}":tkills=ksb+klb+kcb+ksw+kax+ksp+kgin+klc+khc+kkn+kwa+kwm
53288 gosub 1005:print " Total Kills by this group: {";tkills;"}":gosub 1005:gosub 1000:totaldmg1=totaldmg1+totaldmg:totaldmg=0:hit=0
53290 ksb=0:klb=0:kcb=0:ksw=0:kax=0:ksp=0:kgin=0:klc=0:khc=0:kkn=0:kwa=0:kwm=0:tkills=0:hit=0
53292  hsb=0:hlb=0:hcb=0:hsw=0:hax=0:hsp=0:hgin=0:hlc=0:hhc=0:hkn=0:hwa=0:hwm=0:return

53300 d=d*hsb:hp=1+alvl:a=int(d/hp):if a>archersb then a=archersb
53301 if a>hsb then a=hsb
53302 print " ";a;" shortbow archers have died.":archersb=archersb-a:if archersb<=0 then archersb=0:print " All of your shortbow archers have perished!"
53304 ksb=ksb+a:ksb1=ksb1+a:totaldmg=totaldmg+d:archerz=archerz-a:if archersb=0 and archerlb=0 and archercb=0 then archerz=0
53306 goto 53254
53310 d=d*hlb:hp=1+alvl:a=int(d/hp):if a>archerlb then a=archerlb
53311 if a>hlb then a=hlb
53312 print " ";a;" longbow archers have died.":archerlb=archerlb-a:if archerlb<=0 then archerlb=0:print " All of your longbow archers have perished!"
53314 klb=klb+a:klb1=klb1+a:totaldmg=totaldmg+d:archerz=archerz-a:if archersb=0 and archerlb=0 and archercb=0 then archerz=0
53316 goto 53256
53320 d=d*hcb:hp=1+alvl:a=int(d/hp):if a>archercb then a=archercb
53321 if a>hcb then a=hcb
53322 print " ";a;" crossbow archers have died.":archercb=archercb-a:if archercb<=0 then archercb=0:print " All of your crossbow archers have perished!"
53324 kcb=kcb+a:kcb1=kcb1+a:totaldmg=totaldmg+d:archerz=archerz-a:if archersb=0 and archerlb=0 and archercb=0 then archerz=0
53326 goto 53258
53330 d=d*hsw:hp=1+slvl:a=int(d/hp):if a>soldiersw then a=soldiersw
53331 if a>hsw then a=hsw
53332 print " ";a;" swordsmen have died.":soldiersw=soldiersw-a:if soldiersw<=0 then soldiersw=0:print " All of your swordsmen have perished!"
53334 ksw=ksw+a:ksw1=ksw1+a:totaldmg=totaldmg+d:soldierz=soldierz-a:if soldiersw=0 and soldierax=0 and soldiersp=0 and soldiergin=0 then soldierz=0
53336 goto 53260
53340 d=d*hax:hp=1+slvl:a=int(d/hp):if a>soldierax then a=soldierax
53341 if a>hax then a=hax
53342 print " ";a;" axemen have died.":soldierax=soldierax-a:if eax1<=0 then soldierax=0:print " All of your axemen have perished!"
53344 kax=kax+a:kax1=kax1+a:totaldmg=totaldmg+d:soldierz=soldierz-a:if soldiersw=0 and soldierax=0 and soldiersp=0 and soldiergin=0 then soldierz=0
53346 goto 53262
53350 d=d*hsp:hp=1+slvl:a=int(d/hp):if a>soldiersp then a=soldiersp
53351 if a>hsp then a=hsp
53352 print " ";a;" spearmen have died.":soldiersp=soldiersp-a:if soldiersp<=0 then soldiersp=0:print " All of your spearmen have perished!"
53354 ksp=ksp+a:ksp1=ksp1+a:totaldmg=totaldmg+d:soldierz=soldierz-a:if soldiersw=0 and soldierax=0 and soldiersp=0 and soldiergin=0 then soldierz=0
53356 goto 53264
53360 d=d*hgin:hp=1+slvl:a=int(d/hp):if a>soldiergin then a=soldiergin
53361 if a>hgin then a=hgin
53362 print " ";a;" ginsu have died.":soldiergin=soldiergin-a:if soldiergin<=0 then soldiergin=0:print " All of your ginsu have perished!"
53364 kgin=kgin+a:kgin1=kgin1+a:totaldmg=totaldmg+d:soldierz=soldierz-a:if soldiersw=0 and soldierax=0 and soldiersp=0 and soldiergin=0 then soldierz=0
53366 goto 53266
53370 d=d*hlc:hp=1+calvl:a=int(d/hp):if a>calvaryl then a=calvaryl
53371 if a>hlc then a=hlc
53372 print " ";a;" light calvary have died.":calvaryl=calvaryl-a:if calvaryl<=0 then calvaryl=0:print " All of your light calvary have perished!"
53374 klc=klc+a:klc1=klc1+a:totaldmg=totaldmg+d:calvaryz=calvaryz-a:if calvaryl=0 and calvaryh=0 and calvaryk=0 then calvaryz=0
53376 goto 53268
53380 d=d*hhc:hp=1+calvl:a=int(d/hp):if a>calvaryh then a=calvaryh
53381 if a>hhc then a=hhc
53382 print " ";a;" heavy calvary have died.":calvaryh=calvaryh-a:if calvaryh<=0 then calvaryh=0:print " All of your heavy calvary have perished!"
53384 khc=khc+a:khc1=khc1+a:totaldmg=totaldmg+d:calvaryz=calvaryz-a:if calvaryl=0 and calvaryh=0 and calvaryk=0 then calvaryz=0
53386 goto 53270
53390 d=d*hkn:hp=1+calvl:a=int(d/hp):if a>calvaryk then a=calvaryk
53391 if a>hkn then a=hkn
53392 print " ";a;" knights have died.":calvaryk=calvaryk-a:if calvaryk<=0 then calvaryk=0:print " All of your knights have perished!"
53394 kkn=kkn+a:kkn1=kkn1+a:totaldmg=totaldmg+d:calvaryz=calvaryz-a:if calvaryl=0 and calvaryh=0 and calvaryk=0 then calvaryz=0
53396 goto 53272
53400 d=d*hwa:hp=1+wlvl:a=int(d/hp):if a>wizarda then a=wizarda
53401 if a>hwa then a=hwa
53402 print " ";a;" apprentice wizards have died.":wizarda=wizarda-a:if wizarda<=0 then wizarda=0:print " All of your apprentice wizards have perished!"
53404 kwa=kwa+a:kwa1=kwa1+a:totaldmg=totaldmg+d:wizardz=wizardz-a:if wizarda=0 and wizardm=0 then wizardz=0
53406 goto 53274
53410 d=d*hwm:hp=1+wlvl:a=int(d/hp):if a>wizardm then a=wizardm
53411 if a>hwm then a=hwm
53412 print " ";a;" master wizards have died.":wizardm=wizardm-a:if wizardm<=0 then wizardm=0:print " All of your master wizards have perished!"
53424 kwm=kwm+a:kwm1=kwm1+a:totaldmg=totaldmg+d:wizardz=wizardz-a:if wizarda=0 and wizardm=0 then wizardz=0
53416 goto 53276

53450 REM END OF ALL ENEMY ATTACKS
53452 print:print " Your Warriors Killed:":gosub 1005
53454 print " Archers - Shortbow {";ksb1;"}            Longbow {";klb1;"}           Crossbow {";kcb1;"}"
53456 print " Soldiers - Swordsmen {";ksw1;"}        Axemen {";kax1;"}          Spearmen {";ksp1;"}         Ginsu {";kgin1;"}"
53458 print " Calvary - Light {";klc1;"}                    Heavy {";khc1;"}              Knights {";kkn1;"}"
53460 print " Wizards - Apprentice {";kwa1;"}          Master {";kwm1;"}":tkills=ksb1+klb1+kcb1+ksw1+kax1+ksp1+kgin1+klc1+khc1+kkn1+kwa1+kwm1
53462 gosub 1005:print " Total Kills: {";tkills;"}"
53464 print " Total Damage Dealt: {";totaldmg1;"}":gosub 1005:gosub 1000:totaldmg1=0:hits=0
53466 print:gosub 1005
53468 if lord=0 and title=0 then print " This ends ";erlr1$;"";erlr2$;" ";erlr3$;"";erlr4$;"'s turn of Round ";round:goto 53476
53470 if lord=0 and title=1 then print " This ends ";erlr1$;"";erlr2$;" ";erlr4$;"'s turn of Round ";round:goto 53476
53472 if lord=1 and title=0 then print " This ends ";lord$;" ";erlr1$;"";erlr2$;" ";erlr3$;"";erlr4$;"'s turn of Round ";round:goto 53476
53474 print " This ends ";lord$;" ";erlr1$;"";erlr2$;" ";erlr4$;"'s turn of Round ";round
53476 gosub 1005:gosub 1000:ksb1=0:klb1=0:kcb1=0:ksw1=0:kax1=0:ksp1=0:kgin1=0:klc1=0:khc1=0:kkn1=0:kap1=0:kma1=0:tkills=0
53478 hsb=0:hlb=0:hcb=0:hsw=0:hax=0:hsp=0:hgin=0:hlc=0:hhc=0:hkn=0:hwa=0:hwm=0:goto 52300

54000 REM BATTLE END
54002 REM PLAYER VICTORY!
54004 cls:gosub 1005
54006 if lord=0 and title=0 then print " You have won the battle vs. ";erlr1$;"";erlr2$;" ";erlr3$;"";erlr4$;"!!":goto 54014
54008 if lord=0 and title=1 then print " You have won the battle vs. ";erlr1$;"";erlr2$;" ";erlr4$;"!!":goto 54014
54010 if lord=1 and title=0 then print " You have won the battle vs. ";lord$;" ";erlr1$;"";erlr2$;" ";erlr3$;"";erlr4$;"!!":goto 54014
54012 print " You have won the battle vs. ";lord$;" ";erlr1$;"";erlr2$;" ";erlr4$;"!!"
54014 gosub 1005:print:print " The battle lasted ";round;" rounds."
54016 a=esb+elb+ecb+esw+eax+esp+egin+elc+ehc+ekn+ewa+ewm
54018 print " You have killed ";a;" total enemy warriors!":cxp=cxp+a+elvl:print " You have gained ";a+elvl;" xp for this battle.  You now have ";cxp;" xp."
54020 print:print " Archer XP = ";axp;"/";axp1
54022 print " Soldier XP = ";sxp;"/";sxp1
54024 print " Calvary XP = ";caxp;"/";caxp1
54026 print " Wizard XP = ";wxp;"/";wxp1:gosub 1005
54028 a=(int(rnd(1)*60)+1)*elvl:b=(int(rnd(1)*100)+1)*elvl:if a<50 then a=50
54030 if b<100 then b=100
54032 print:print " You ransack their camps and receive ";a;" Gold and ";b;" bushels of Grain!":g=g+a:cbush=cbush+b:print " You now have ";g;" gold and ";cbush;" grain!"
54034 print:print " The battle is now over and you may continue on with your kingly duties.":gosub 1005:gosub 1000:return
54100 REM ENEMY VICTORY!
54104 cls:gosub 1005
54106 if lord=0 and title=0 then print " You have lost the battle vs. ";erlr1$;"";erlr2$;" ";erlr3$;"";erlr4$;"!!":goto 54114
54108 if lord=0 and title=1 then print " You have lost the battle vs. ";erlr1$;"";erlr2$;" ";erlr4$;"!!":goto 54114
54110 if lord=1 and title=0 then print " You have lost the battle vs. ";lord$;" ";erlr1$;"";erlr2$;" ";erlr3$;"";erlr4$;"!!":goto 54114
54112 print " You have lost the battle vs. ";lord$;" ";erlr1$;"";erlr2$;" ";erlr4$;"!!"
54114 gosub 1005:print:print " The battle lasted ";round;" rounds."
54116 a=esb+elb+ecb+esw+eax+esp+egin+elc+ehc+ekn+ewa+ewm
54118 print " You gain no XP for this battle because you lost....":print " However your warriors did become stronger over the course of the fight."
54120 print:print " Archer XP = ";axp;"/";axp1
54122 print " Soldier XP = ";sxp;"/";sxp1
54124 print " Calvary XP = ";caxp;"/";caxp1
54126 print " Wizard XP = ";wxp;"/";wxp1:gosub 1005:print:print " Remember you have no warriors now and must replace them as soon as possible!":archerz=0:soldierz=0:calvaryz=0:wizardz=0
54128 a=int(g*.8):b=int(cbush*.8)
54132 print:print " They ransack your palace and take ";a;" Gold and ";b;" bushels of Grain!":g=g-a:cbush=cbush-b:print " You now have ";g;" gold and ";cbush;" grain!"
54134 print:print " They spare your life and leave your kingdom laughing at how much you suck at war.":gosub 1005:gosub 1000:return


55000 if archerz=0 and soldierz=0 and calvaryz=0 and wizardz=0 then return
55002 if wartime=1 then wartime1=wartime1-1:GOTO 55010
55004 if wartime=1 then print:GOSUB 1005:GOSUB 1005:GOSUB 1005:print " The enemy is camping at your borders!!!":GOSUB 1005:GOSUB 1005:GOSUB 1005:gosub 1000:goto 55015
55006 a=int(rnd(1)*20)+1-xxxx:if a<=1 then wartime=1:wartime1=int(rnd(1)*3)+3:print:GOSUB 1005:GOSUB 1005:GOSUB 1005:print " An enemy has started gathering at your borders!!":GOSUB 1005:GOSUB 1005:GOSUB 1005:gosub 1000
55008 xxxx=xxxx+1:return
55010 if wartime1<=0 then print:print " The enemy at your borders has attacked you!!":xxxx=0:goto 50000
55012 goto 55004

55015 REM initiating attack on border campers
55018 print:print " Would you like to initiate attack on the border campers {Y/N}";:input a$:if a$="Y" then print:print " You gather your forces and attack!":wartime=0:wartime1=0:goto 50000
55020 if a$="N" then print:print " You wait a bit longer.....":gosub 1000:return
55022 goto 55018


55050 rem Scout Find a City
55051 if clvl<6 then 6165
55052 if archerz=0 and soldierz=0 and calvaryz=0 and wizardz=0 then 6165
55053 a=int(rnd(1)*5)+1:if a=1 then aa$="very small":goto 55062
55054 if a=2 then aa$="small":goto 55062
55056 if a=3 then aa$="medium sized":goto 55062
55058 if a=4 then aa$="large":goto 55062
55060 if a=5 then aa$="enormous"
55062 a=int(rnd(1)*5)+1:if a=1 then b$="campsite":goto 55072
55064 if a=2 then b$="village":goto 55072
55066 if a=3 then b$="city":goto  55072
55068 if a=4 then b$="town":goto  55072
55070 if a=5 then b$="municipality"
55072 print "We have found a settlement.....":print " It is a ";aa$;" ";b$;".  It looks ripe for the taking {xp +1}!":scouting=scouting+1
55074 print:print " Do you wish to attack this ";b$;" {Y/N}";:input a$:if a$="Y" then print:print " You gather your troops and attack the ";aa$;" ";b$;"!!":gosub 1000:goSUB 50000:GOTO 6155
55076 if a$="N" then 6155
55078 goto 55074
55100 Rem scout finds a ocean acre
55102 a=int(rnd(1)*100)+1:if a<=clvl*2 then 55106
55104 goto 6165
55106 if oceanacres>=clvl then 6165
55108 print " We have found that one of your acres borders the ocean {xp +3}!":print " You should set up a Port Town here!":scouting=scouting+3:oceanacres=oceanacres+1
55110 if oceanacres=1 then print " **New options have become available on the King's Menu!  New Knowledge can also be learned!**"
55112 goto 6155
55120 rem scout finds him some ore
55122 a=int(rnd(1)*8)+1:b=int(rnd(1)*33)+2:if a=1 then ore$="Opal":ore1=ore1+b
55124 if a=2 then ore$="Emerald":ore2=ore2+b
55126 if a=3 then ore$="Silver":ore3=ore3+b
55128 if a=4 then ore$="Copper":ore4=ore4+b
55130 if a=5 then ore$="Platinum":ore5=ore5+b
55132 if a=6 then ore$="Ruby":ore6=ore6+b
55134 if a=7 then ore$="Diamond":ore7=ore7+b
55136 if a=8 then ore$="Jade":ore8=ore8+b
55138 print " We have found a small ";ore$;"Ore cave {xp +1}!":scouting=scouting+1:print " We have mined it until it collapsed and received ";b;" ";ore$;"Ore!":ore=ore+b:goto 6155
55140 REM SCOUT FINDS A MININGACRE
55142 a=int(rnd(1)*50)+1:if a<=clvl*2 then 55146
55144 goto 55102
55146 if miningacres>=clvl then 55102
55148 print " We have found that one of your acres houses a large mine {xp +3}!":print " You should set up a Mining Facility here!":scouting=scouting+3:miningacres=miningacres+1
55150 a=int(rnd(1)*8)+1:b=int(rnd(1)*200)+500:if a=1 then ma1=ma1+b:mmines1=mmines1+1:goto 55165
55152 if a=2 then ma2=ma2+b:mmines2=mmines2+1:goto 55165
55154 if a=3 then ma3=ma3+b:mmines3=mmines3+1:goto  55165
55156 if a=4 then ma4=ma4+b:mmines4=mmines4+1:goto  55165
55158 if a=5 then ma5=ma5+b:mmines5=mmines5+1:goto  55165
55160 if a=6 then ma6=ma6+b:mmines6=mmines6+1:goto  55165
55162 if a=7 then ma7=ma7+b:mmines7=mmines7+1:goto  55165
55164 ma8=ma8+b:mmines8=mmines8+1
55165 if miningacres=1 then print " **New options have become available on the King's Menu!  New Knowledge can also be learned!**"
55167 goto 6155


56000 REM OCEAN MENU
56010 CLS:GOSUB 1005:PRINT "                  Ocean Menu ":gosub 1005
56012 print "  Current OceanAcres = ";oceanacres
56014 print "  Current Port Cities = ";ports;"             Port City Slots Available = ";oceanacres-ports:GOSUB 1005
56016 print " Current Fishing Ships = ";shipfish;"            Fish Brought In Each Year = ";fish1*shipfish:GOSUB 1005
56018 print " Current Merchant Ships = ";shipmerch1;"        Hull Armor = ";hull1;"          Currently away = ";shipmerch2;"           On their way back = ";shipmerch3
56019 print " Merchant Cargo Holds Max           ";oremax*shipmerch1;" Ore    ";fishmax*shipmerch1;" Fish    ";bushelmax*shipmerch1;" Bushels    ";lumbmax*shipmerch1;" Lumber"
56020 print " Total Shipping Missions Completed = ";tshmc:GOSUB 1005
56022 print " Current Warships = ";shipwar;"      Hull Armor = ";hull2
56024 print " Cannons = ";cannons;"                 Crews = ";crew:GOSUB 1005
56025 if pirates1>0 then print " Pirates Destroyed = ";pirates1
56026 print " Total Ships = ";ships;"         Max Ships Allowed = ";portship*ports:GOSUB 1005
56050 if oceanacres>0 and ports<oceanacres and oceank4=1 then print " {B}uild a Port City on an OceanAcre                                                                     15000 gold and 5000 lumber":GOSUB 1005
56051 if oceank1=1 and ports>0 then print                                       " Build {F}ishing Ships                                                                                           5000 gold and 1000 lumber"
56052 if oceank2=1 and ports>0 then print " Build {M}erchant Ships                                                                                      10000 gold and 2500 lumber"
56054 if oceank3=1 and ports>0 then print " Build {W}arships                                                                                               20000 gold and 3000 lumber"
56056 print " {U}pgrade Ships"
56066 GOSUB 1005:print " {TAB} Tab to Oceanography Knowledge"
56068 if shipmerch1>0 then print " {S}hip overseas Ore, Fish, and Bushels of Grain":gosub 1005
56099 PRINT " Gold = ";g:print " Lumber = ";lumber:print:print " {E}xit this menu"
56100 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 5000
56102 if a$="F" and oceank1=1 and ports>0 then 56150
56104 if a$="M" and oceank2=1 and ports>0 then 56160
56106 if a$="W" and oceank3=1 and ports>0 then 56170
56108 if a$="U" then 56900

56120 if a$="B" and oceanacres-ports>0 then 56240
56122 if a$="S" and shipmerch1>0 then 56256
56124 if a$="TAB" then 8250

56149 goto 56010
56150 if g<5000 then print:print " That costs 5000 and you only have ";g;" gold.":gosub 1000:goto 56010
56152 print:print " How many ships would you like to buy {1-";int(g/5000);", 0 to exit}";:input a:if a=0 then 56010
56153 if ships+a>ports*portship then print:print " You may have a max of ";ports*portship;" ships.  You currently have ";ships;".":gosub 1000:goto 56152
56154 if a*1000>lumber then print:print " That requires ";a*1000;" lumber and you only have ";lumber;".":gosub 1000:goto 56152
56155 if a*5000>g then print:print " That costs ";5000*a;" and you only have ";g;" gold.":goto 56152
56156 g=g-(a*5000):shipfish=shipfish+a:lumber=lumber-(1000*a):print:print " Fishing Ships up ";a;".  Total is now ";shipfish;".":ships=ships+a
56158 print " Gold down ";a*5000;".  Gold is now ";g;".":print " Lumber down ";a*1000;".  Lumber is now ";lumber;".":gosub 1000:goto 56010
56160 if g<10000 then print:print " That costs 10000 and you only have ";g;" gold.":gosub 1000:goto 56010
56162 print:print " How many ships would you like to buy {1-";int(g/10000);", 0 to exit}";:input a:if a=0 then 56010
56163 if ships+a>ports*portship then print:print " You may have a max of ";ports*portship;" ships.  You currently have ";ships;".":gosub 1000:goto 56162
56164 if a*2500>lumber then print:print " That requires ";a*2500;" lumber and you only have ";lumber;".":gosub 1000:goto 56162
56165 if a*10000>g then print:print " That costs ";10000*a;" and you only have ";g;" gold.":goto 56162
56166 g=g-(a*10000):shipmerch=shipmerch+1:lumber=lumber-(2500*a):shipmerch1=shipmerch1+a:print:print " Merchant Ships up ";a;".  Total is now ";shipmerch1;".":oremax=oremax+oreper:fishmax=fishmax+fishper:bushelmax=bushelmax+bushelper:ships=ships+a
56168 print " Gold down ";a*10000;".  Gold is now ";g;".":print " Lumber down ";a*2500;".  Lumber is now ";lumber;".":gosub 1000:goto 56010
56170 if g<20000 then print:print " That costs 20000 and you only have ";g;" gold.":gosub 1000:goto 56010
56172 print:print " How many ships would you like to buy {1-";int(g/20000);", 0 to exit}";:input a:if a=0 then 56010
56173 if ships+a>ports*portship then print:print " You may have a max of ";ports*portship;" ships.  You currently have ";ships;".":gosub 1000:goto 56172
56174 if a*3000>lumber then print:print " That requires ";a*3000;" lumber and you only have ";lumber;".":gosub 1000:goto 56172
56175 if a*20000>g then print:print " That costs ";20000*a;" and you only have ";g;" gold.":goto 56172
56176 g=g-(a*20000):shipwar=shipwar+a:lumber=lumber-(3000*a):print:print " Warships up ";a;".  Total is now ";shipwar;".":ships=ships+a
56178 print " Gold down ";a*20000;".  Gold is now ";g;".":print " Lumber down ";a*3000;".  Lumber is now ";lumber;".":gosub 1000:goto 56010

56240 if g<15000 then print:print " That costs 15000 and you only have ";g;" gold.":gosub 1000:goto 56010
56242 print:print " Available OceanAcres ";oceanacres-ports;"      You may build up to ";oceanacres-ports;" Port Cities.":print " You have enough gold to build ";int(g/25000);" Ports."
56244 print " How many Port Cities would you like to set up {0 to exit}";:input a:if a=0 then 56010
56245 if lumber<a*5000 then print:print " That requires ";a*5000;" lumber and you only have ";lumber;".":gosub 1000:goto 56242
56246 if a*15000>g then print:print " That costs ";15000*a;" and you only have ";g;" gold.":goto 56242
56248 if ports+a>oceanacres then print:print "You may only build ";oceanacres-ports;" more.":goto  56242
56250 g=g-(a*15000):lumber=lumber-(a*5000):ports=ports+a:print " Port Cities up ";a;".  You now have ";ports;" port cities."
56252 print " Gold down ";a*15000;".  Gold is now ";g;".":print " Lumber down ";a*5000;".  Lumber is now ";lumber;".":gosub 1000:goto 56010

56254 REM SHIPPING!
56256 cls:print:gosub 1005:print " Ships Available = ";shipmerch1;"   Ships Currently Shipping = ";shipmerch2:gosub 1005:print " Each ship can carry:"
56258 print " ";oremax;" Ore          ";fishmax;" Fish          ";bushelmax;" Bushels          ";lumbmax;" Lumber"
56259 print " All Ship Totals:":PRINT " ";oremax*shipmerch1;" Ore     ";fishmax*shipmerch1;" Fish     ";bushelmax*shipmerch1;" Bushels     ";lumbmax*shipmerch1;" Lumber"
56260 print " You have:"
56262 print " ";ore;" Ore                 ";fish;" Fish                ";cbush;" Bushels              ";lumber;" Lumber":gosub 1005:print
56264 print:print " {S}hip stuff"
56299 print:print " {E}xit this menu"
56300 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 56000
56302 if a$="S" then 56330
56329 goto 56256
56330 if shipmerch1=0 then print:print " You don't have any Merchant ships available.  ";shipmerch2;" are currently shipping overseas.":gosub 1000:goto 56256
56331 oreshipx=0:a=0:b=0:c=0:print:print " How much Ore {1-";oremax*shipmerch1;"}";:input a
56332 if a>ore then print:print " You only have ";ore;" Ore.":goto 56330
56334 if a>oremax*shipmerch1 then print:print " You can only carry a max of ";oremax*shipmerch1;" at the moment.":goto 56330
56336 print:print " You are now shipping ";a;" Ore.":oreship=oreship+a
56340 print:print " How much Fish {1-";fishmax*shipmerch1;"}";:input b
56342 if b>fish then print:print " You only have ";fish;" Fish.":goto 56340
56344 if b>fishmax*shipmerch1 then print:print " You can only carry a max of ";fishmax*shipmerch1;" at the moment.":goto 56340
56346 print:print " You are now shipping ";b;" Fish.":fishship=fishship+b:fish=fish-b
56350 print:print " How many Bushels {1-";bushelmax*shipmerch1;"}";:input c
56352 if c>cbush then print:print " You only have ";cbush;" Bushels of Grain.":goto 56350
56354 if c>bushelmax*shipmerch1 then print:print " You can only carry a max of ";bushmax*shipmerch1;" at the moment.":goto 56350
56356 print:print " You are now shipping ";c;" Bushels of Grain.":bushship=bushship+c:cbush=cbush-c:goto 56525
56357 if a=0 and b=0 and c=0 and d=0 then print:print " You ship nothing.....":gosub 1000:goto 56256
56358 if a>oremax then xxx1=int(a/oremax):goto 56360
56359 xxx1=1
56360 if b>fishmax then xxx2=int(b/fishmax):goto 56362
56361 xxx2=1
56362 if c>bushelmax then xxx3=int(c/bushelmax):goto 56540
56363 xxx3=1:goto 56540
56364 n=1:if xxx1>=xxx2 and xxx1>=xxx3 and xxx1>xxx4 then n=xxx1
56366 if xxx2>=xxx1 and xxx2>=xxx3 and xxx2>xxx4 then n=xxx2
56368 if xxx3>=xxx1 and xxx3>=xxx2 and xxx3>xxx4 then n=xxx3:goto 56550
56369 a1=a:if a>0 then orex1=ore1:orex2=ore2:orex3=ore3:orex4=ore4:orex5=ore5:orex6=ore6:orex7=ore7:orex8=ore8:gosub 56380
56370 a1=b:if b>0 then fishx1=fish1:fishx2=fish2:fishx3=fish3:fishx4=fish4:fishx5=fish5:fishx6=fish6:gosub 56600
56371 print:print " It will take ";n;" ships to ship ";a;" Ore, ";b;" Fish, ";c;" Bushels of Grain, and ";d;" Lumber."
56372 print:print " Do you want to ship them now {Y/N, N to cancel}";:input a$:if a$="Y" then 56378
56374 if a$="N" then oreship=oreship-a:ore=ore+a:fishship=fishship-b:fish=fish+b:bushship=bushship-c:cbush=cbush+c:lumbship=lumbship-d:lumber=lumber+d
56375 if a$="N" then ore1=orex1:ore2=orex2:ore3=orex3:ore4=orex4:ore5=orex5:ore6=orex6:ore7=orex7:ore8=orex8:fishtype1=fishx1:fishtype2=fishx2:fishtype3=fishx3:fishtype4=fishx4:fishtype5=fishx5:fishtype6=fishx6:goto 56254
56376 goto 56350
56378 print:print " ";n;" ships have been sent to faraway lands.":shipmerch2=shipmerch2+n:shipmerch1=shipmerch1-n:gosub 1000:goto 56254
56380 rem ore taker
56381 goto 56510
56382 print:print " You have ";ore1;" OpalOre {1}"
56383         print "                ";ore2;" EmeraldOre {2}"
56384         print "                ";ore3;" SilverOre {3}"
56385         print "                ";ore4;" CopperOre {4}"
56386         print "                ";ore5;" PlatinumOre {5}"
56387         print "                ";ore6;" RubyOre {6}"
56388         print "                ";ore7;" DiamondOre {7}"
56390         print "                ";ore8;" JadeOre {8}"
56391         print "                ";ore9;" PearlOre {9}"
56392 print:print " Of the ";a1;" Ore, which would you like to ship?":PRINT " {choose the number beside name for that specific ore, or type 100 to choose all}";:input aa:if aa=1 then 56410
56394 if aa=2 then 56420
56395 if aa=3 then 56430
56396 if aa=4 then 56440
56397 if aa=9 then 56490
56400 if aa=5 then 56450
56402 if aa=6 then 56460
56404 if aa=7 then 56470
56406 if aa=8 then 56480
56407 if aa=100 then 56515
56408 goto 56382
56410 if ore1=0 then print:print " You don't have this ore....":goto 56382
56412 print:print " How much {0 to exit)";:input a2:if a2=0 then 56382
56414 if a2>ore1 then print:print " You don't have that much....":goto 56412
56416 if a2>oreship then print:print " This is more than you said you wanted to ship....":goto 56412
56418 a1=a1-a2:ore1=ore1-a2:oreship1=oreship1+a2:if a1=0 then 56500
56419 goto 56381
56420 if ore2=0 then print:print " You don't have this ore....":goto 56382
56422 print:print " How much {0 to exit)";:input a2:if a2=0 then 56382
56424 if a2>ore2 then print:print " You don't have that much....":goto 56422
56426 if a2>oreship then print:print " This is more than you said you wanted to ship....":goto 56422
56428 a1=a1-a2:ore2=ore2-a2:oreship2=oreship2+a2:if a1=0 then 56500
56429 goto 56381
56430 if ore3=0 then print:print " You don't have this ore....":goto 56382
56432 print:print " How much {0 to exit)";:input a2:if a2=0 then 56382
56434 if a2>ore3 then print:print " You don't have that much....":goto 56432
56436 if a2>oreship then print:print " This is more than you said you wanted to ship....":goto 56432
56438 a1=a1-a2:ore3=ore3-a2:oreship3=oreship3+a2:if a1=0 then 56500
56439 goto 56381
56440 if ore4=0 then print:print " You don't have this ore....":goto 56382
56442 print:print " How much {0 to exit)";:input a2:if a2=0 then 56382
56444 if a2>ore4 then print:print " You don't have that much....":goto 56442
56446 if a2>oreship then print:print " This is more than you said you wanted to ship....":goto 56442
56448 a1=a1-a2:ore4=ore4-a2:oreship4=oreship4+a2:if a1=0 then 56500
56449 goto 56381
56450 if ore5=0 then print:print " You don't have this ore....":goto 56382
56452 print:print " How much {0 to exit)";:input a2:if a2=0 then 56382
56454 if a2>ore5 then print:print " You don't have that much....":goto 56452
56456 if a2>oreship then print:print " This is more than you said you wanted to ship....":goto 56452
56458 a1=a1-a2:ore5=ore5-a2:oreship5=oreship5+a2:if a1=0 then 56500
56459 goto 56381
56460 if ore6=0 then print:print " You don't have this ore....":goto 56382
56462 print:print " How much {0 to exit)";:input a2:if a2=0 then 56382
56464 if a2>ore6 then print:print " You don't have that much....":goto 56462
56466 if a2>oreship then print:print " This is more than you said you wanted to ship....":goto 56462
56468 a1=a1-a2:ore6=ore6-a2:oreship6=oreship6+a2:if a1=0 then 56500
56469 goto 56381
56470 if ore7=0 then print:print " You don't have this ore....":goto 56382
56472 print:print " How much {0 to exit)";:input a2:if a2=0 then 56382
56474 if a2>ore7 then print:print " You don't have that much....":goto 56472
56476 if a2>oreship then print:print " This is more than you said you wanted to ship....":goto 56472
56478 a1=a1-a2:ore7=ore7-a2:oreship7=oreship7+a2:if a1=0 then 56500
56479 goto 56381
56480 if ore8=0 then print:print " You don't have this ore....":goto 56382
56482 print:print " How much {0 to exit)";:input a2:if a2=0 then 56382
56484 if a2>ore8 then print:print " You don't have that much....":goto 56482
56486 if a2>oreship then print:print " This is more than you said you wanted to ship....":goto 56482
56488 a1=a1-a2:ore8=ore8-a2:oreship8=oreship8+a2:if a1=0 then 56500
56489 goto 56381
56490 if ore9=0 then print:print " You don't have this ore....":goto 56382
56492 print:print " How much {0 to exit)";:input a2:if a2=0 then 56382
56494 if a2>ore9 then print:print " You don't have that much....":goto 56492
56496 if a2>oreship then print:print " This is more than you said you wanted to ship....":goto 56492
56498 a1=a1-a2:ore9=ore9-a2:oreship9=oreship9+a2:if a1=0 then 56500
56499 goto 56381
56500 print:print " You have made your ore selections.":ore=ore-a:gosub 1000:return
56510 if ore1=0 and ore2=0 and ore3=0 and ore4=0 and ore5=0 and ore6=0 and ore7=0 and ore8=0 then print:print " You have no more ore to ship!":oreshipx=oreship1+oreship2+oreship3+oreship4+oreship5+oreship6+oreship7+oreship8:a=oreshipx:ore=ore-a:goto 56358
56512 goto 56382
56515 if a<ore then print:print " You can only do this when the amount of ore you want to ship is equal to the amount of ore you have.":goto 56382
56517 ore=ore-a:oreship1=ore1:oreship2=ore2:oreship3=ore3:oreship4=ore4:oreship5=ore5:oreship6=ore6:oreship7=ore7:oreship8=ore8:ore1=0:ore2=0:ore3=0:ore4=0:ore5=0:ore6=0:ore7=0:ore8=0:goto 56500
56525 print:print " How much Lumber {1-";lumbmax*shipmerch1;"}";:input d
56527 if d>lumber then print:print " You only have ";lumber;" Lumber.":goto 56350
56529 if d>lumbmax*shipmerch1 then print:print " You can only carry a max of ";lumbmax*shipmerch1;" at the moment.":goto 56350
56530 print:print " You are now shipping ";d;" Lumber.":lumbship=lumbship+d:lumber=lumber-d:goto 56357

56540 if d>lumbmax then xxx4=int(d/lumbmax):goto 56364
56542 xxx4=1:goto 56364

56550  if xxx4>=xxx1 and xxx4>=xxx2 and xxx4>xxx3 then n=xxx4:goto 56369
56555 goto  56369

56600 if fishtype1=0 and fishtype2=0 and fishtype3=0 and fishtype4=0 and fishtype5=0 and fishtype6=0 then print:print " You have no more Fish to ship!":fishshipx=fishship1+fishship2+fishship3+fishship4+fishship5+fishship6:a=fishshipx:ore=ore-a:goto 56358
56602  print:print " You have ";fishtype1;" Tuna {1}"
56604         print "                ";fishtype2;" Clams {2}"
56606         print "                ";fishtype3;" Lobsters {3}"
56608         print "                ";fishtype4;" Prawn {4}"
56610         print "                ";fishtype5;" Squid {5}"
56612         print "                ";fishtype6;" Oysters {6}"
56614 print:print " Of the ";a1;" Fish, which would you like to ship?":PRINT " {choose the number beside name for that specific ore, or type 100 to choose all}";:input aa:if aa=1 then 56630
56616 if aa=2 then 56640
56618 if aa=3 then 56650
56620 if aa=4 then 56660
56622 if aa=5 then 56670
56624 if aa=6 then 56680
56626 if aa=100 then 56715
56628 goto 56600
56630 if fishtype1=0 then print:print " You don't have this Fish....":goto 56600
56632 print:print " How much {0 to exit)";:input a2:if a2=0 then 56600
56634 if a2>fishtype1 then print:print " You don't have that much....":goto 56632
56636 if a2>fishship then print:print " This is more than you said you wanted to ship....":goto 56632
56638 a1=a1-a2:fishtype1=fishtype1-a2:fishship1=fishship1+a2:if a1=0 then  56700
56639 goto 56600
56640 if fishtype2=0 then print:print " You don't have this Fish....":goto 56600
56642 print:print " How much {0 to exit)";:input a2:if a2=0 then 56600
56644 if a2>fishtype2 then print:print " You don't have that much....":goto 56642
56646 if a2>fishship then print:print " This is more than you said you wanted to ship....":goto 56642
56648 a1=a1-a2:fishtype2=fishtype2-a2:fishship2=fishship2+a2:if a1=0 then 56700
56649 goto 56600
56650 if fishtype3=0 then print:print " You don't have this Fish....":goto 56600
56652 print:print " How much {0 to exit)";:input a2:if a2=0 then 56600
56654 if a2>fishtype3 then print:print " You don't have that much....":goto 56652
56656 if a2>fishship then print:print " This is more than you said you wanted to ship....":goto 56652
56658 a1=a1-a2:fishtype3=fishtype3-a2:fishship3=fishship3+a2:if a1=0 then 56700
56659 goto 56600
56660 if fishtype4=0 then print:print " You don't have this Fish....":goto 56600
56662 print:print " How much {0 to exit)";:input a2:if a2=0 then 56600
56664 if a2>fishtype4 then print:print " You don't have that much....":goto 56662
56666 if a2>fishship then print:print " This is more than you said you wanted to ship....":goto 56662
56668 a1=a1-a2:fishtype4=fishtype4-a2:fishship4=fishship4+a2:if a1=0 then 56700
56669 goto 56600
56670 if fishtype5=0 then print:print " You don't have this Fish....":goto 56600
56672 print:print " How much {0 to exit)";:input a2:if a2=0 then 56600
56674 if a2>fishtype5 then print:print " You don't have that much....":goto 56672
56676 if a2>fishship then print:print " This is more than you said you wanted to ship....":goto 56672
56678 a1=a1-a2:fishtype5=fishtype5-a2:fishship5=fishship5+a2:if a1=0 then 56700
56679 goto 56600
56680 if fishtype6=0 then print:print " You don't have this Fish....":goto 56600
56682 print:print " How much {0 to exit)";:input a2:if a2=0 then 56600
56684 if a2>fishtype6 then print:print " You don't have that much....":goto 56682
56686 if a2>fishship then print:print " This is more than you said you wanted to ship....":goto 56682
56688 a1=a1-a2:fishtype6=fishtype6-a2:fishship6=fishship6+a2:if a1=0 then 56700
56689 goto 56600
56700 print:print " You have made your Fish selections.":gosub 1000:return
56715  if b<fish then print:print " You can only do this when the amount of Fish you want to ship is equal to the amount of Fish you have.":goto 56600
56717 fishship1=fishtype1:fishship2=fishtype2:fishship3=fishtype3:fishship4=fishtype4:fishship5=fishtype5:fishship6=fishtype6:fishtype1=0:fishtype2=0:fishtype3=0:fishtype4=0:fishtype5=0:fishtype6=0:goto 56700

56900 REM UPGRADES FOR OCEANOGRAPHY MENU MENU
56902 cls:gosub 1005:print "                  Ocean Menu ":print "                  Upgrades For Ships Menu ":print " Purchase upgrades for your ships.":gosub 1005:print " Gold = ";g:print
56904 print " Merchant Hull = ";hull1
56906 print " Warship Hull = ";hull2
56908 print " Cannons = ";cannons
56910 print " Crew = ";crew
56912 print " Fishing Capacity = ";fish1
56914 print " Merchant Capacity =    ";oremax;" Ore    ";bushelmax;" Bushels    ";fishmax;" Fish    ";lumbmax;" Lumber"
56916 GOSUB 1005:print       " Upgrade {FI}shing Capacity                  +150 Fish Per Upgrade                                                              7500 gold"
56918                            print " Upgrade {ME)rchant Capacity       +50 Ore // +750 Bushels // +500 Fish // +250 Lumber                        12500 gold"
56920                            print " Upgrade {HM} Merchant Hull +5                                                                                                          10000 gold"
56922                            print " Upgrade {HW} Warship Hull +10                                                                                                          10000 gold"
56924                            print " Upgrade {C}annons +2  {This affects both merchant and warships}                                                        15000 gold"
56926                            print " Upgrade {CR}ew +50   {This affects both merchant and warships}                                                          10000 gold":GOSUB 1005:print " {TAB} Tab to Oceanography Knowledge"
56928 PRINT " Gold = ";g:print:print " {E}xit this menu"
56930 print:print " Which would you like to do {Letters Only}";:input a$:if a$="E" then 56000
56932 if a$="FI" then 56180
56934 if a$="ME" then 56190
56936 if a$="C" then 56200
56938 if a$="HM" then 56210
56940 if a$="HW" then 56220
56942 if a$="CR" then 56230
56944 if a$="TAB" then 8250
56946 goto 56900
56180 if g<7500 then print:print " That costs 7500 and you only have ";g;" gold.":gosub 1000:goto 56900
56181 if shipfish=0 then print:print " You need to get Fishing Ships first.":gosub 1000:goto 56900
56182 print:print " This will increase your Fishing Capacity by +150 per ship per upgrade.":print " How many upgrades would you like to buy {1-";int(g/7500);", 0 to exit}";:input a:if a=0 then 56900
56184 if a*7500>g then print:print " That costs ";7500*a;" and you only have ";g;" gold.":goto 56182
56186 g=g-(a*7500):fish1=fish1+(fishinc*a):print:print " Fishing Capacity up ";a*fishinc;".  Total is now ";fish1;"."
56188 print " Gold down ";a*7500;".  Gold is now ";g;".":gosub 1000:goto 56900
56190 if g<12500 then print:print " That costs 12500 and you only have ";g;" gold.":gosub 1000:goto 56900
56191 if shipmerch=0 then print:print " You need to get Merchant Ships first.":gosub 1000:goto 56900
56192 print:print " This will increase your storage capacity per upgrade as follows:  +50 Ore +750 Bushels +500 Fish +250 Lumber":print " How many upgrades would you like to buy {1-";int(g/12500);", 0 to exit}";:input a:if a=0 then 56900
56194 if a*12500>g then print:print " That costs ";12500*a;" and you only have ";g;" gold.":goto 56192
56196 g=g-(a*12500):oreper=(a*50):fishper=(a*500):bushelper=(a*750):lumbper=(a*250):oremax=oremax+oreper:fishmax=fishmax+fishper:bushelmax=bushelmax+bushelper:lumbmax=lumbmax+lumbper
56197 print " Ore Capacity up ";a*50;"   Bushel Capacity up ";a*750;"   Fish Capacity up ";a*500;"   Lumber Capacity up ";a*250;"."
56198 print" Totals are now   Ore  ";oremax;"   Bushels  ";bushelmax;"   Fish  ";fishmax;"   Lumber  ";lumbmax;"."
56199 print " Gold down ";a*12500;".  Gold is now ";g;".":gosub 1000:goto 56900
56200 if g<15000 then print:print " That costs 15000 and you only have ";g;" gold.":gosub 1000:goto 56900
56201 if shipmerch=0 and shipwar=0 then print:print " You need to get Merchant Ships or Warships first.":gosub 1000:goto 56900
56202 print:print " How many cannon sets would you like to buy {1-";int(g/15000);", 0 to exit}";:input a:if a=0 then 56900
56204 if a*15000>g then print:print " That costs ";15000*a;" and you only have ";g;" gold.":goto 56202
56206 g=g-(a*15000):cannons=cannons+(a*2):print " Cannons up ";a*2;".  Cannons on ships = ";cannons;"."
56208 print " Gold down ";a*15000;".  Gold is now ";g;".":gosub 1000:goto 56900
56210 if g<10000 then print:print " That costs 10000 and you only have ";g;" gold.":gosub 1000:goto 56900
56211 if shipmerch=0 then print:print " You need to get Merchant Ships first.":gosub 1000:goto 56900
56212 print:print " How many +5s to Merchant Hull Armor would you like to buy {1-";int(g/10000);", 0 to exit}";:input a:if a=0 then 56900
56214 if a*10000>g then print:print " That costs ";10000*a;" and you only have ";g;" gold.":goto 56212
56216 g=g-(a*10000):hull1=hull1+(a*5):print " Merchant Hull Armor up ";a*5;".  Merchant Hull Armor is now ";hull1;"."
56218 print " Gold down ";a*10000;".  Gold is now ";g;".":gosub 1000:goto 56900
56220 if g<10000 then print:print " That costs 10000 and you only have ";g;" gold.":gosub 1000:goto 56900
56221 if shipwar=0 then print:print " You need to get Warships first.":gosub 1000:goto 56900
56222 print:print " How many +10s to Warship Hull Armor would you like to buy {1-";int(g/10000);", 0 to exit}";:input a:if a=0 then 56900
56224 if a*10000>g then print:print " That costs ";10000*a;" and you only have ";g;" gold.":goto 56222
56226 g=g-(a*10000):hull2=hull2+(a*10):print " Warship Hull Armor up ";a*10;".  Warship Hull Armor is now ";hull2;"."
56228 print " Gold down ";a*10000;".  Gold is now ";g;".":gosub 1000:goto 56900
56230 if g<10000 then print:print " That costs 10000 and you only have ";g;" gold.":gosub 1000:goto 56900
56231 if shipmerch=0 and shipwar=0 then print:print " You need to get Merchant Ships or Warships first.":gosub 1000:goto 56900
56232 print:print " How many sets of 50 crew would you like to buy {1-";int(g/10000);", 0 to exit}";:input a:if a=0 then 56900
56234 if a*10000>g then print:print " That costs ";10000*a;" and you only have ";g;" gold.":goto 56232
56236 g=g-(a*10000):crew=crew+(a*50):print " Crew up ";a*50;".  Crew is now ";crew;"."
56238 print " Gold down ";a*10000;".  Gold is now ";g;".":gosub 1000:goto 56900



58000 Rem ore/fish price merchant selling decider
58002 orep1=(int(rnd(1)*10)+1)*10:fishp1=int(rnd(1)*3)+1
58004 orep2=(int(rnd(1)*10)+1)*10:fishp2=int(rnd(1)*2)+2:if fishp2>3 then fishp2=3
58006 orep3=(int(rnd(1)*10)+1)*10:fishp3=int(rnd(1)*2)+2
58008 orep4=(int(rnd(1)*10)+1)*10:fishp4=int(rnd(1)*4)+1
58010 orep5=(int(rnd(1)*10)+1)*10:fishp5=int(rnd(1)*3)+1
58012 orep6=(int(rnd(1)*10)+1)*10:fishp6=int(rnd(1)*2)+3
58014 orep7=(int(rnd(1)*10)+1)*10:orep9=(int(rnd(1)*10)+10)*10
58016 orep8=(int(rnd(1)*10)+1)*10
58018 return
58050 rem arriving at far away port
58054 a=int(rnd(1)*10)+1:if a=1 then a$="Tven"
58056 if a=2 then a$="Galam"
58058 if a=3 then a$="Uton"
58060 if a=4 then a$="Jiran"
58062 if a=5 then a$="Poss"
58064 if a=6 then a$="Halan"
58066 if a=7 then a$="Ionnan"
58068 if a=8 then a$="Briggs"
58070 if a=9 then a$="Stone"
58072 if a=10 then a$="Plax"
58074 a=int(rnd(1)*10)+1:if a=1 then b$="berg"
58076 if a=2 then b$="ton"
58078 if a=3 then b$="stine"
58080 if a=4 then b$="beck"
58082 if a=5 then b$="tren"
58084 if a=6 then b$="fein"
58086 if a=7 then b$="ack"
58088 if a=8 then b$="van"
58090 if a=9 then b$="aton"
58092 if a=10 then b$="feld"
58094 print:print " ";shipmerch2;" Merchant Ships have arrived at a far away port of ";a$;"";b$;".":GOSUB 1005:gosub 58000
58096 fp=int(rnd(1)*3)+1:bp=int(rnd(1)*10)+12:lp=int(rnd(1)*2)+1:print " Price of Grain is ";bp;".":print " Price of Lumber is ";lp;".":GOSUB 1005:print " Price of Ore is as follows:"
58098 print " OpalOre          ";orep1;"                EmeraldOre   ";orep2
58100 print " SilverOre         ";orep3;"                CopperOre     ";orep4
58102 print " PlatinumOre    ";orep5;"                 RubyOre       ";orep6
58104 print " DiamondOre    ";orep7;"                 JadeOre        ";orep8:print " PearlOre = ";orep9
58105 GOSUB 1005:print " Price of Fish is as follows:"
58106 print " Tuna            ";fishp1;"                   Clams            ";fishp2
58108 print " Lobster         ";fishp3;"                   Prawn            ";fishp4
58110 print " Squid            ";fishp5;"                   Oysters         ";fishp6:gosub 1000
58112 print:print " You have brought  Ore ";oreship;"    Fish ";fishship;"    Bushels ";bushship;" {";bp*bushship;" gold}    Lumber ";lumbship;" {";lp*lumbship;" gold}"
58114 print " OpalOre ";oreship1;" {";orep1*oreship1;" gold}   EmeraldOre ";oreship2;" {";orep2*oreship2;" gold}":print  " SilverOre ";oreship3;" {";orep3*oreship3;" gold}    CopperOre ";oreship4;" {";orep4*oreship4;" gold}"
58116 print " PlatinumOre ";oreship5;" {";orep5*oreship5;" gold}    RubyOre ";oreship6;" {";orep6*oreship6;" gold}":print   " DiamondOre ";oreship7;" {";orep7*oreship7;" gold}    JadeOre ";oreship8;" {";orep8*oreship8;" gold}":print " PearlOre ";oreship9;" {";orep9*oreship9;" gold}":GOSUB 1005
58118 print " Tuna ";fishship1;" {";fishp1*fishship1;" gold}    Clams ";fishship2;" {";fishp2*fishship2;" gold}":print " Lobster ";fishship3;" {";fishp3*fishship3;" gold}    Prawn ";fishship4;" {";fishp4*fishship4;" gold}":print " Squid ";fishship5;" {";fishp5*fishship5;" gold}    Oysters ";fishship6;" {";fishp6*fishship6;" gold}"
58120 a=(fp*fishship)+(bp*bushship)+(orep1*oreship1)+(orep2*oreship2)+(orep3*oreship3)+(orep4*oreship4)+(orep5*oreship5)+(orep6*oreship6)+(orep7*oreship7)+(orep8*oreship8)+(orep9*oreship9)+(fishp1*fishship1)+(fishp2*fishship2)+(fishp3*fishship3)+(fishp4*fishship4)+(fishp5*fishship5)+(fishp6*fishship6):gosub 1005
58122 print " For a grand total of ";a;" Gold!":g=g+a:print " You now have ";g;" Gold.":if shipmerch2=1 then print " ";shipmerch2;" Merchant Ship is now returning.":gosub 1005:gosub 1000:GOTO 58126
58124 print " ";shipmerch2;" Merchant Ships are now returning.":gosub 1005:gosub 1000
58126 if shipmerch3>0 then shipmerch4=shipmerch3:shipmerch3=shipmerch2:goto 58130
58128 shipmerch3=shipmerch2
58130 shipmerch5=1:shipmerch2=0:oreship=0:fishship=0:bushship=0:oreship1=0:oreship2=0:oreship3=0:oreship4=0:oreship5=0:oreship6=0:oreship7=0:oreship8=0:tshmc=tshmc+1
58132 return

58150 REM shipchecker at kings menu
58152 if shipmerch4>0 then shipmerch1=shipmerch1+shipmerch4:print " *Merchant Ships Returned*  ";shipmerch4;" Merchant Ships returned to port.  Merchant Ships in port = ";shipmerch1:shipmerch4=0:return
58154 if shipmerch3>0 and shipmerch5=0 then shipmerch1=shipmerch1+shipmerch3:print " *Merchant Ships Returned*  ";shipmerch3;" Merchant Ships returned to port.  Merchant Ships in port = ";shipmerch1:shipmerch3=0
58156 return
58160 REM ENEMY SPECIAL ATTACK CHECKER
58161 ecrewskill1=0:ecrewskill2=0:ecrewskill3=0:ecrewskill4=0:ecrewskill5=0
58162 a=int(rnd(1)*100)+1:if a<=10 then ecrewskill1=1
58164 a=int(rnd(1)*100)+1:if a<=7 then ecrewskill2=1
58166 a=int(rnd(1)*100)+1:if a<=5 then ecrewskill3=1
58167 a=int(rnd(1)*100)+1:if a<=4 then ecrewskill4=1
58168 a=int(rnd(1)*100)+1:if a<=2 then ecrewskill5=1
58169 return
58200 REM Check if merchant ships are attacked
58202 if shipmerch2=0 then return
58204 n=0
58206 n=n+1:if n>shipmerch2 then gosub 58050:return
58208 a=int(rnd(1)*30)+1:if a=1 then gosub 58252
58210 goto 58206

58250 REM PIRATE ATTACK ON MERCHANT SHIP!
58252 print:print " One of your merchant ships has been attacked by Pirates!":piratemerch=1:gosub 1000:goto 58300
58255 REM PIRATE DECIDER
58256 gosub 58160:ehull=(int(rnd(1)*20)+1)*10+(clvl*10):if ehull>20 and clvl<=5 then ehull=20
58258 a=int(rnd(1)*25)+1:ecrew=crew:if a<7 then ecrew=ecrew+40
58259 if a=7 then ecrew=ecrew-40
58260 if a>7 and a<=12 then ecrew=ecrew+50
58261 if a=13 then ecrew=ecrew-50
58262 if a>13 and a<=17 then ecrew=ecrew+60
58263 if a=18 then ecrew=ecrew-60
58264 if a>18 and a<=21 then ecrew=cerew+70
58265 if a=22 then ecrew=ecrew-70
58266 if a>22 and a<=24 then ecrew=ecrew+100
58267 if a=25 then ecrew=ecrew-100
58268 if ecrew<50 then ecrew=50
58269 eaccuracy=int(rnd(1)*30)+25
58270 a=int(rnd(1)*25)+1:if a<7 then ecannons=cannons+1
58271 if a=7 then ecannons=cannons-1
58272 if a>7 and a<=12 then ecannons=cannons+2
58273 if a=13 then ecannons=cannons-2
58274 if a>13 and a<=17 then ecannons=cannons+3
58275 if a=18 then ecannons=cannons-3
58276 if a>18 and a<=21 then ecannons=cannons+4
58277 if a=22 then ecannons=cannons-4
58278 if a>22 and a<=24 then ecannons=cannons+5
58279 if a=25 then ecannons=cannons-5
58280 if ecannons<5 then ecannons=5
58281 if piratemerch=1 then 58285
58282 eore=clvl*5:a=int(rnd(1)*eore)+clvl:eore=a
58283 ebush=clvl*50:a=int(rnd(1)*ebush)+clvl:ebush=a
58284 efish=clvl*150:a=int(rnd(1)*efish)+clvl:efish=a:goto 58287
58285 a=int(rnd(1)*100)+1:if a>10 then notreas=1:goto 58287
58286 eore=int(rnd(1)*25)+1:ebush=int(rnd(1)*100)+100:efish=int(rnd(1)*100)+200
58287 a=0:if ehull>hull then a=a+1
58288 if ecrew>crew then a=a+1
58289 if ecannons>cannons then a=a+1
58290 if eaccuracy>accuracy then a=a+1
58291 if a=0 then a$="very weak"
58292 if a=1 then a$="a mediocre foe"
58293 if a=2 then a$="a dangerous advesary"
58294 if a=3 then a$="very dangerous"
58296 if a=4 then a$="extremely powerful"
58298 return
58300 gosub 58255:print " They look to be ";a$;".  They circle the merchant ship and then close in for the kill!"
58302 gosub 1000:round=1:round1=1:crew1=crew:deck=0:if piratemerch=0 then hullx=hull2
58303 if piratemerch=1 then hullx=hull1
58304 einit=0:cinit=0
58305 REM SHIP WAR PLAYER VS ENEMY
58311 cls:gosub 1005:print " Ship War Round ";round:gosub 1005:print
58312 a=int(rnd(1)*100)+1+clvl:if a>50 then print:gosub 1005:print "  You have won initiative.  Your forces may attack first!":gosub 1005:cinit=1:gosub 1000:goto 58316
58314 print:gosub 1005:print "  The enemy has won initiative.  Their forces may attack first!":gosub 1005:einit=1:gosub 1000:goto 58810
58316 cls:gosub 1005:print " Ship War Round ";round:gosub 1005:print
58317 if deck=1 then 58700
58318 print " Your ship attacks!":gosub 1000
58320 n=0:crit=0:hit=0
58322 n=n+1:if n>cannons then 58330
58324 a=int(rnd(1)*100)+1:if a>=crit then crit2=crit2+1:hit=hit+1:goto 58322
58326 if a>(100-accuracy) then hit=hit+1
58328 goto 58322
58330 print:print " You have hit ";hit;" times and have done ";hit;" damage to their Hull!":ehull=ehull-hit:gosub 1000
58334 if crit2=0 then 58346
58336 n=0:nn=0
58338 n=n+1:if n>crit2 then 58344
58340 a=int(rnd(1)*10)+1:nn=nn+a
58342 goto 58338
58344 if crit>0 then print " You have also scored Killer Blows ";crit;" times and killed off ";nn;" of the crew!":ecrew=ecrew-nn:if ecrew<=0 then 58356
58346 if ehull<=0 then print:print " The Pirate ship has become immobilized!":goto 58350
58348 print:print " The Pirate ship fights on!":gosub 1000:goto 58790
58350 print:print " Do you want to {B}oard the ship to kill off the crew or {E}scape to safer waters {B or E}";:input a$:if a$="B" then print:print " You board their ship and start attacking their crew!":deck=1:gosub 1000:goto 58790
58352 if a$="E" then print:print " You escape to safer waters and leave the immobilzed ship behind!":gosub 1000:return
58354 goto 58350

58356 REM ECREW =0
58358 print:print " The entire Pirate crew has been wiped out!  Great Job!":gosub 1000:pirates1=pirates1+1:pirates=pirates-1
58360 if notreas=1 then notreas=0:print:print " Unfortunately they carried no treasure.....":goto 58650
58362 print:print " They had treasure on board!":gosub 1005
58364 print " ";eore;" Ore":gosub 1005:print " ";efish;" Fish":gosub 1005:print " ";ebush;" Bushels of Grain":gosub 1005:if eore>0 then gosub 58420:gosub 59150
58365 gosub 1000:if piratemerch=1 then 58394
58366 print:print " Your Warship hauls in all the cargo and brings it back to port!":fish=fish+efish:cbush=cbush+ebush:ore=ore+eore:ore1=ore1+eore1:ore2=ore2+eore2:ore3=ore3+eore3:ore4=ore4+eore4:ore5=ore5+eore5:ore6=ore6+eore6:ore7=ore7+eore7:ore8=ore8+eore8
58368 print " Ore is now ";ore;"    Bushels is now ";cbush;"    Fish is now ";fish
58370  print:print " You now have  ";ore1;" OpalOre"
58378         print "                           ";ore2;" EmeraldOre"
58380         print "                           ";ore3;" SilverOre"
58382         print "                           ";ore4;" CopperOre"
58384         print "                           ";ore5;" PlatinumOre"
58386         print "                           ";ore6;" RubyOre"
58388         print "                           ";ore7;" DiamondOre"
58390         print "                           ";ore8;" JadeOre"
58392 goto 58650
58393 REM merchant ship getting loot
58394 a=0:b=0:c=0:if int(fishship/shipmerch2)<fishmax then a=fishmax-int(fishship/shipmerch2)
58396 if int(bushship/shipmerch2)<bushmax then b=bushmax-int(bushship/shipmerch2)
58398 if int(oreship/shipmerch2)<oremax then c=oremax-int(oreship/shipmerch2)
58400 print:print " Your merchant ship is able to carry ";c;" Ore, ";a;" Fish, and ";b;" Bushels of Grain more.":if a=0 and b=0 and c=0 then gosub 1000:goto 58650
58402 if a>efish then a=efish
58404 if a>(fishmax-fishship) then a=(fishmax-fishship)
58406 if b>ebush then b=ebush
58408 if b>(bushmax-bushship) then b=(bushmax-bushship)
58410 if c>eore then c=eore
58412 if c>(oremax-oreship) then c=(oremax-oreship)
58414 print:print "You collect ";c;" Ore, ";a;" Fish, and ";b;" Bushels of Grain.":bushship=bushship+b:fishship=fishship+a:if c>0 then oreship=oreship+c:goto 58452
58415 goto 58650
58420 rem Enemey ore checker
58425 n=0
58427 n=n+1:if n>eore then return
58430 a=int(rnd(1)*8)+1:if a=1 then eore1=eore1+1
58432 if a=2 then eore2=eore2+1
58433 if a=3 then eore3=eore3+1
58434 if a=4 then eore4=eore4+1
58435 if a=5 then eore5=eore5+1
58436 if a=6 then eore6=eore6+1
58437 if a=7 then eore7=eore7+1
58438 if a=8 then eore8=eore8+1
58439 goto 58427
58450 rem orepicker
58452 print:print " Which enemy Ores would you like to take:"
58454         print " 1) ";eore1;" OpalOre"
58456         print " 2) ";eore2;" EmeraldOre"
58458         print " 3) ";eore3;" SilverOre"
58460         print " 4) ";eore4;" CopperOre"
58462         print " 5) ";eore5;" PlatinumOre"
58464         print " 6) ";eore6;" RubyOre"
58466         print " 7) ";eore7;" DiamondOre"
58468         print " 8) ";eore8;" JadeOre"
58470 print " You have room for ";c;" ore."
58472 print:print " Which would you like (1-8)";:input a:if a=1 then 58500
58475 if a=2 then 58510
58477 if a=3 then 58520
58479 if a=4 then 58530
58481 if a=5 then 58540
58483 if a=6 then 58550
58485 if a=7 then 58560
58487 if a=8 then 58570
58491 goto 58452
58500 if eore1=0 then 58452
58502 print:print " How much would you like (max is ";eore1;", 0 to exit)";:input a:if a=0 then 58452
58504 if a>eore1 then print:print " There isn't that much.":goto 58502
58506 if a>c then print:print " You only have space for ";c;" ore left....":goto 58502
58508 print:c=c-a:oreship1=oreship1+a:print " You take ";a;" OpalOre.  Now You have ";oreship1;" OpalOre and ";c;" spaces left for ore.":if c<=0 then  58600
58509 goto 58452
58510 if eore2=0 then 58452
58512 print:print " How much would you like (max is ";eore2;", 0 to exit)";:input a:if a=0 then 58452
58514 if a>eore2 then print:print " There isn't that much.":goto 58502
58516 if a>c then print:print " You only have space for ";c;" ore left....":goto 58502
58518 print:c=c-a:oreship2=oreship2+a:print " You take ";a;" EmeraldOre.  Now You have ";oreship2;" EmeraldOre and ";c;" spaces left for ore.":if c<=0 then 58600
58519 goto 58452
58520 if eore3=0 then 58452
58522 print:print " How much would you like (max is ";eore3;", 0 to exit)";:input a:if a=0 then 58452
58524 if a>eore3 then print:print " There isn't that much.":goto 58502
58526 if a>c then print:print " You only have space for ";c;" ore left....":goto 58502
58528 print:c=c-a:oreship3=oreship3+a:print " You take ";a;" SilverOre.  Now You have ";oreship3;" SilverOre and ";c;" spaces left for ore.":if c<=0 then 58600
58529 goto 58452
58530 if eore4=0 then 58452
58532 print:print " How much would you like (max is ";eore4;", 0 to exit)";:input a:if a=0 then 58452
58534 if a>eore4 then print:print " There isn't that much.":goto 58502
58536 if a>c then print:print " You only have space for ";c;" ore left....":goto 58502
58538 print:c=c-a:oreship4=oreship4+a:print " You take ";a;" CopperOre.  Now You have ";oreship4;" CopperOre and ";c;" spaces left for ore.":if c<=0 then 58600
58539 goto 58452
58540 if eore5=0 then 58452
58542 print:print " How much would you like (max is ";eore5;", 0 to exit)";:input a:if a=0 then 58452
58544 if a>eore5 then print:print " There isn't that much.":goto 58502
58546 if a>c then print:print " You only have space for ";c;" ore left....":goto 58502
58548 print:c=c-a:oreship5=oreship5+a:print " You take ";a;" PlatinumOre.  Now You have ";oreship5;" PlatinumOree and ";c;" spaces left for ore.":if c<=0 then 58600
58549 goto 58452
58550 if eore6=0 then 58452
58552 print:print " How much would you like (max is ";eore6;", 0 to exit)";:input a:if a=0 then 58452
58554 if a>eore6 then print:print " There isn't that much.":goto 58502
58556 if a>c then print:print " You only have space for ";c;" ore left....":goto 58502
58558 print:c=c-a:oreship6=oreship6+a:print " You take ";a;" RubyOre.  Now You have ";oreship6;" RubyOre and ";c;" spaces left for ore.":if c<=0 then 58600
58559 goto 58452
58560 if eore7=0 then 58452
58562 print:print " How much would you like (max is ";eore7;", 0 to exit)";:input a:if a=0 then 58452
58564 if a>eore7 then print:print " There isn't that much.":goto 58502
58566 if a>c then print:print " You only have space for ";c;" ore left....":goto 58502
58568 print:c=c-a:oreship7=oreship7+a:print " You take ";a;" DiamondOre.  Now You have ";oreship7;" DiamondOre and ";c;" spaces left for ore.":if c<=0 then 58600
58569 goto 58452
58570 if eore8=0 then 58452
58572 print:print " How much would you like (max is ";eore8;", 0 to exit)";:input a:if a=0 then 58452
58574 if a>eore8 then print:print " There isn't that much.":goto 58502
58576 if a>c then print:print " You only have space for ";c;" ore left....":goto 58502
58578 print:c=c-a:oreship8=oreship8+a:print " You take ";a;" JadeOre.  Now You have ";oreship8;" JadeOre and ";c;" spaces left for ore.":if c<=0 then 58600
58579 goto 58452
58600 print:print " You have no more spaces left...."
58602 gosub 1000:print:print " You now have ";bushship;" Bushels, ";fishship;" Fish, and ";oreship;" Ore.":goto 58370
58650 REM END
58652 print:print " The battle is now over.  It lasted ";round;" Rounds Total (";round1;" on Deck).":piratexp=piratexp+1:deck=0:eore1=0:eore2=0:eore3=0:eore4=0:eore5=0:eore6=0:eore7=0:eore8=0:return

58700 REM CREW VS CREW -PC TURN
58705 cls:gosub 1005:print " Deck War Round ";round1:print " Total Rounds ";round:gosub 1005:print
58718 print " Your crew attacks!":gosub 1000
58720 n=0:hit=0
58722 n=n+1:if n>crew then 58735
58724 a=int(rnd(1)*100)+1:if a>=(100-accuracy) then hit=hit+1
58725 if a=96 and crewskill1=1 then print " Double Slash through 2 of their crew!":hit=hit+1
58726 if a=97 and crewskill2=1 then print " Triple Slash through 3 of their crew!":hit=hit+2
58727 if a=98 and crewskill3=1 then print " Dragon Slash through 4 of their crew!":hit=hit+3
58728 if a=99 and crewskill4=1 then print " Molotov Cocktail ignites!":hit=hit+((int(rnd(1)*10)+1)-1)
58729 if a=100 and crewskill5=1 then print " Powder keg blows up!":hit=hit+((int(rnd(1)*10)+5)-1)
58730 goto 58722
58735 print:print " You have hit ";hit;" times and kill ";hit;" of their crew!":ecrew=ecrew-hit:gosub 1000:if ecrew<=0 then 58356
58740 print:print " They keep fighting on!":gosub 1000:goto 58790
58750 REM CREW VS CREW -Enemy TURN
58755 cls:gosub 1005:print " Deck War Round ";round1:print " Total Rounds ";round:gosub 1005:print
58758 print " Their crew attacks!":gosub 1000
58760 n=0:hit=0
58762 n=n+1:if n>ecrew then 58779
58764 a=int(rnd(1)*100)+1:if a>=(100-eaccuracy) then hit=hit+1
58773 if a=96 and ecrewskill1=1 then print " Double Slash through 2 of your crew!":hit=hit+1
58774 if a=97 and ecrewskill1=2 then print " Triple Slash through 3 of your crew!":hit=hit+2
58775 if a=98 and ecrewskill1=3 then print " Dragon Slash through 4 of your crew!":hit=hit+3
58776 if a=99 and ecrewskill1=4 then print " Molotov Cocktail ignites!":hit=((int(rnd(1)*10)+1)-1)
58777 if a=100 and ecrewskill1=5 then print " Powder keg blows up!":hit=hit+((int(rnd(1)*10)+5)-1)
58778 goto 58762
58779 print:print " They have hit ";hit;" times and kill ";hit;" of your crew!":crew1=crew1-hit:gosub 1000:if crew1<=0 then 58900
58780 print:print " You keep fighting on!":gosub 1000:goto 58790

58790 REM INITIATIVE
58794 if cinit=1 and einit=1 then cinit=0:einit=0:round=round+1:goto 58798
58796 if cinit=1 and einit=0 then einit=1:goto 58810
58797 if cinit=0 and einit=1 then cinit=1:goto 58316
58798 if deck=1 then round1=round1+1
58800 if piratemerch=1 then print:print " Your Merchant Ship Status":print " Hull = ";hullx;"    Crew = ";crew1:goto 58802
58801 print:print " Your Warship Status":print " Hull = ";hullx;"    Crew = ";crew1
58802 print " Pirate Ship Status":print " Hull = ";ehull;"    Crew = ";ecrew:print
58804 a=int(rnd(1)*100)+1+clvl:if a>50 then print:gosub 1005:print "  You have won initiative.":gosub 1005:cinit=1:gosub 1000:goto 58316
58805 print:gosub 1005:print "  The enemy has won initiative.":gosub 1005:einit=1:gosub 1000:goto 58810

58810 if deck=1 then 58750
58811 cls:gosub 1005:print " Ship War Round ";round:gosub 1005:print
58818 print " Pirate ship attacks!":gosub 1000
58820 n=0:crit=0:hit=0
58822 n=n+1:if n>ecannons then 58830
58824 a=int(rnd(1)*100)+1
58826 if a>(100-eaccuracy) then hit=hit+1
58828 goto 58822
58830 print:print " They have hit ";hit;" times and done ";hit;" damage to your Hull!":hullx=hullx-hit:gosub 1000
58846 if hullx<=0 then print:print " Your ship has become immobilized!":deck=1:gosub 1000:goto 58790
58847 if piratemerch=0 then print:print " Your Warship fights on!!":gosub 1000:goto 58790
58848 print:print " Your Merchant ship fights on!":gosub 1000:goto 58790

58900 REM PLAYER MERCHANT SHIP DEATH
58901 if piratemerch=0 then 59074
58902 print:print " All your Crew have Perished!  Your Merchant ship has been defeated!":gosub 1000
58904 a=int(fishship/shipmerch2):b=int(bushship/shipmerch2):c=int(oreship/shipmerch2):if c>0 then gosub 58920
58905 print:print " You have lost ";c;" Ore, ";a;" Fish, and ";b;" Bushels of Grain!":shipmerch2=shipmerch2-1:if shipmerch2=0 then oreship=0:bushelship=0:fishship=0
58910 oreship=oreship-c:bushelship=bushelship-b:fishship=fishship-a
58912 gosub 1000:print:print " They set fire to the vessel and it sinks into the depths.....":gosub 1000:return
58920 rem ore decider
58922 n=0
58924 n=n+1:if n>c then return
58926 a=int(rnd(1)*8)+1:if a=1 and orship1>0 then oreship1=oreship1-1
58928 if a=2 and orship2>0 then oreship2=oreship2-1
58930 if a=3 and orship3>0 then oreship3=oreship3-1
58932 if a=4 and orship4>0 then oreship4=oreship4-1
58934 if a=5 and orship5>0 then oreship5=oreship5-1
58936 if a=6 and orship6>0 then oreship6=oreship6-1
58938 if a=7 and orship7>0 then oreship7=oreship7-1
58940 if a=8 and orship8>0 then oreship8=oreship8-1
58942 goto 58924



59074 REM PLAYER WARSHIP DEATH
59075 print:print " All your Crew have Perished!  Your Warship ship has been defeated!":shipwar=shipwar-1:ships=ships-1:gosub 1000
59077 print:print " They set fire to the vessel and it sinks into the depths.....":gosub 1000:return

59100 REM RAT MAN JACK YEARLY
59102 if rmj=0 then 59117
59105 n=0:aa=0:btrap=0
59106 n=n+1:if n>cacre then 59112
59108 a=int(rnd(1)*3)+1:aa=aa+a
59110 goto 59106
59112 if aa>traps then btrap=(traps/aa):ratskilled=traps:traps=0:goto 59117
59113 if traps=0 then ratskilled=0:goto 59115
59114 traps=traps-aa:ratskilled=aa
59115 print " Rats Killed This Year = ";ratskilled:print " Traps left = ";traps:gosub 1000:goto 2112
59117 a=int(rnd(1)*3)+1:if a=1 then a$="Rats":x=.05:goto 59120
59118 if a=2 then a$="BlackRats":x=.1:goto 59120
59119 a$="DragonRats":x=.2
59120 gosub 59175
59122 a=int(rnd(1)*xxx)+1:if a=1 then 59124
59123 goto 2112
59124 print " ";a$;" have gotten into the grain storage!!":a=int(cbush*x):if btrap>0 and rmj=1 then a=int(a*btrap):btrap=0:print:print " ";ratskilled;" Rats stopped."
59126 b=int(rnd(1)*a)+1:cbush=cbush-b
59128 print " They have destroyed ";b;" bushels of grain!!  You now have ";cbush;" bushels....":if rmj=1 then print:print " Rats Killed This Year = ";ratskilled
59130 if rmj=1 and traps=0 then print " You have no traps left!!!"
59140 print:gosub 1005:gosub 1000:goto 2112

59150         print " ";eore1;" OpalOre"
59156         print " ";eore2;" EmeraldOre"
59158         print " ";eore3;" SilverOre"
59160         print " ";eore4;" CopperOre"
59162         print " ";eore5;" PlatinumOre"
59164         print " ";eore6;" RubyOre"
59166         print " ";eore7;" DiamondOre"
59168         print " ";eore8;" JadeOre":return

59175 if cacre<100 then xxx=12:return
59177 if cacre<250 then xxx=11:return
59179 if cacre<500 then xxx=10:return
59180 if cacre<750 then xxx=9:return
59182 if cacre<1000 then xxx=8:return
59184 if cacre<5000 then xxx=7:return
59186 if cacre<10000 then xxx=6:return
59188 if cacre<15000 then xxx=5:return
59190 xxx=4:return

59200 REM SWEET SMILE SAMSON AND HIS GAMBLING BRIGADE OF PROFIT
59201 if sss=0 or setup=0 then return
59202 print:print " Current taxrate ";taxrate:print " Last Year Results ";gambling1;"% peasants played {about ";gambling4;" peasants}       Gold Made = ";gambling3:gosub 1005:gosub 1000:PRINT
59204 if taxrate>0 and taxrate <=3 then a=0
59206 if taxrate>3 and taxrate<=6 then a=10
59208 if taxrate>6 and taxrate<=9 then a=20
59210 if taxrate= 10 then a=30
59212 if taxrate= 11 then a=40
59214 if taxrate= 12 then a=50
59216 if taxrate= 13 then a=60
59218 if taxrate= 14 then a=70
59220 if taxrate= 15 then a=80
59222 b=(int(rnd(1)*9)+1)*10:b=b-a:if b<10 then b=10
59224 gambling1=b:gambling2=b/100:nn=int(popu*gambling2)
59226 REM how many played X how much was spent
59228 n=0:aa=0:aaa=0
59230 n=n+1:if n>nn then 59236
59232 a=int(rnd(1)*12)+1:aa=aa+a:if a=1 then aaa=aaa+1
59233 if a=12 then aaaa=aaaa+1
59234 goto 59230
59236 aa1=(aa*(taxrate/100)):gambling3=INT(aa1):if gambling3=0 then gambling3=1
59238 print " This Year Results ";gambling1;"% peasants played {about ";int(popu*gambling2);" peasants}":PRINT " Total Profit = ";aa;"       Tax Money Earned = ";gambling3:gambling5=gambling5+gambling3:gambling4=int(popu*gambling2):gosub 1005
59240 if taxrate<6 then print:print " You could probably make more money by increasing the taxrate =)."
59242 if taxrate>9 then print:print " You could probably make more money by decreasing the taxrate =)."
59244 n=int(popu/4):if aaa>n then print:print " Not a lot of peasants are spending their money this year =).  Hopefully it will get better next year =).":goto 59248
59246 if aaaa>n then print:print " It was a very good year and peasants were spending gold like mad =)!!  Hopefully it stays like this =)!!!"
59248 g=g+gambling3:gosub 1005:gosub 1000:return

59300 REM Traveling Caravan
59302 a=int(rnd(1)*20)+1:if a=1 then 59306
59304 goto 2150
59306 aa=0:aa=int(rnd(1)*2)+2:x1=0:x2=0:x3=0:x4=0:x5=0:x6=0:x7=0:x8=0:x9=0:a=0:n=0
59308 if n>aa then 59332
59310 a=int(rnd(1)*9)+1:if a=1 and x1=0 then n=n+1:x1=1
59312 if a=2 and x2=0 then n=n+1:x2=1
59314 if a=3 and x3=0 then n=n+1:x3=1
59316 if a=4 and x4=0 then n=n+1:x4=1
59318 if a=5 and x5=0 then n=n+1:x5=1
59320 if a=6 and x6=0 then n=n+1:x6=1
59322 if a=7 and x7=0 then n=n+1:x7=1
59324 if a=8 and x8=0 then n=n+1:x8=1
59326 if a=9 and x9=0 then n=n+1:x9=1
59330 goto 59308
59332 print:print " A traveling caravan passes through your country.":print " It seems they are short on supplies."
59334 print:print " They need the following things:"
59335 aa1=0:aa2=0:aa3=0:aa4=0:aa5=0:aa6=0:aa7=0:goto 59420
59336 if cbush<aa1 then print:print " Unfortunately, you do not have enough Grain.":gosub 1000:goto 2150
59337 if fishtype1<aa2 then print:print " Unfortunately, you do not have enough Tuna.":gosub 1000:goto 2150
59338 if fishtype2<aa3 then print:print " Unfortunately, you do not have enough Clams.":gosub 1000:goto 2150
59339 if fishtype3<aa4 then print:print " Unfortunately, you do not have enough Lobsters.":gosub 1000:goto 2150
59340 if fishtype4<aa5 then print:print " Unfortunately, you do not have enough Prawn.":gosub 1000:goto 2150
59342 if fishtype5<aa6 then print:print " Unfortunately, you do not have enough Squid.":gosub 1000:goto 2150
59344 if fishtype6<aa7 then print:print " Unfortunately, you do not have enough Oysters.":gosub 1000:goto 2150
59348 print:print " They offer you:":xx=(aa1*3)+(aa2*1)+(aa3*2)+(aa4*3)+(aa5*3)+(aa6*3)+(aa7*4):a1=0:a2=0:a3=0:a4=0:a5=0:a6=0:a7=0:a8=0:a9=0:g1=0
59352 if x1=1 then a1=(int(rnd(1)*4)+6)*10:goto 59370
59354 if x2=1 then a2=(int(rnd(1)*4)+6)*10:goto 59374
59356 if x3=1 then a3=(int(rnd(1)*4)+6)*10:goto 59378
59358 if x4=1 then a4=(int(rnd(1)*4)+6)*10:goto 59382
59360 if x5=1 then a5=(int(rnd(1)*4)+6)*10:goto 59386
59362 if x6=1 then a6=(int(rnd(1)*4)+6)*10:goto 59390
59364 if x7=1 then a7=(int(rnd(1)*4)+6)*10:goto 59394
59366 if x8=1 then a8=(int(rnd(1)*4)+6)*10:goto 59398
59368 if x9=1 then a9=xx-g1:goto 59402
59369 goto 59410
59370 xx1=int(xx/aa):xx1=int(xx1/a1)+1:print " ";xx1;" OpalOre.":g1=g1+((xx1-1)*a1):goto 59354
59372 goto 59354
59374 xx2=int(xx/aa):xx2=int(xx2/a2)+1:print " ";xx2;" EmeraldOre.":g1=g1+((xx2-1)*a2):goto 59356
59376 goto 59356
59378 xx3=int(xx/aa):xx3=int(xx3/a3)+1:print " ";xx3;" SilverOre.":g1=g1+((xx3-1)*a3):goto 59358
59380 goto 59358
59382 xx4=int(xx/aa):xx4=int(xx4/a4)+1:print " ";xx4;" CopperOre.":g1=g1+((xx4-1)*a4):goto 59360
59384 goto 59360
59386 xx5=int(xx/aa):xx5=int(xx5/a5)+1:print " ";xx5;" PlatinumOre.":g1=g1+((xx5-1)*a5):goto 59362
59388 goto 59362
59390 xx6=int(xx/aa):xx6=int(xx6/a6)+1:print " ";xx6;" RubyOre.":g1=g1+((xx6-1)*a6):goto 59364
59392 goto 59364
59394 xx7=int(xx/aa):xx7=int(xx7/a7)+1:print " ";xx7;" DiamondOre.":g1=g1+((xx7-1)*a7):goto 59366
59396 goto 59366
59398 xx8=int(xx/aa):xx8=int(xx8/a8)+1:print " ";xx8;" JadeOre.":g1=g1+((xx8-1)*a8):goto 59368
59400 goto 59368
59402 if a9<=0 then a9=1
59404 print " ";a9;" Gold."
59410 print:print " Do you accept this offer {Y/N}";:input a$:if a$="Y" then 59416
59412 if a$="N" then print:print " You refuse to trade with the caravan...":gosub 1000:goto 2150
59414 goto 59410
59416 print:print " You trade with the caravan!":gosub 1000:g=g+a9:ore1=ore1+xx1:ore2=ore2+xx2:ore3=ore3+xx3:ore4=ore4+xx4:ore5=ore5+xx5:ore6=ore6+xx6:ore7=ore7+xx7:ore8=ore8+xx8:ore=ore+xx1+xx2+xx3+xx4+xx5+xx6+xx7+xx8:cbush=cbush-aa1:fish=fish-aa2-aa3-aa4-aa5-aa6-aa7:fishtype1=fishtype1-aa2:fishtype2=fishtype2-aa3:fishtype3=fishtype3-aa4:fishtype4=fishtype4-aa5:fishtype6=fishtype6-aa7
59418 print:print " You now have ";g;" Gold, ";cbush;" Bushels, ";fish;" Fish, and ";ore;" Ore.":gosub 1000:goto 2150
59420 a=int(rnd(1)*3)+2:n=0:b1=0:b2=0:b3=0:b4=0:b5=0:b6=0:b7=0
59422 n=n+1:if n>a then 59438
59424 b=int(rnd(1)*25)+1:if b<8 then b1=b1+1:goto 59422
59426 if b>=8 and b<12 then b2=b2+1:goto 59422
59428 if b>=12 and b<15 then b3=b3+1:goto 59422
59430 if b>=15 and b<18 then b4=b4+1:goto 59422
59432 if b>=18 and b<21 then b5=b5+1:goto 59422
59434 if b>=21 and b<24 then b6=b6+1:goto 59422
59436 b7=b7+1:goto 59422
59438 if b1>0 then aa1=((int(rnd(1)*30)+20)*clvl)*b1:print " ";aa1;" Bushels of Grain."
59440 if b2>0 then aa2=((int(rnd(1)*150)+30)*clvl)*b2:print " ";aa2;" Tuna."
59442 if b3>0 then aa3=((int(rnd(1)*10)+19)*clvl)*b3:print " ";aa3;" Clams."
59444 if b4>0 then aa4=((int(rnd(1)*5)+18)*clvl)*b4:print " ";aa4;" Lobsters."
59446 if b5>0 then aa5=((int(rnd(1)*5)+17)*clvl)*b5:print " ";aa5;" Prawn."
59447 if b6>0 then aa6=((int(rnd(1)*5)+16)*clvl)*b6:print " ";aa6;" Squid."
59448 if b7>0 then aa7=((int(rnd(1)*2)+15)*clvl)*b7:print " ";aa7;" Oysters."
59449 goto 59336


58950 REM PIRATES ATTACK FISHING SHIPS?
58952 if shipfish=0 then 59450
58953 gosub 1005:print " TRADE REPORT ":gosub 1005:print " FISHING ":gosub 1005:nxn=0
58954 nxn=nxn+1:if nxn>shipfish then 58975
58956 a=int(rnd(1)*60)+1:if a=1 then print:print " A Pirate ship has attacked one of your Fishing ships.":goto 58960
58958 goto 58954
58960 a=int(rnd(1)*100)+1+clvl:if a>50 then print " Luckily it got away and arrived safely back in port.":goto 58954
58962 print " It has been sunk by Pirates!!!":shipfish=shipfish-1:goto 58954
58974 REM FISHING RESULTS - paired with pirate attack, then mining then lumberjacks
58975 print:print " Fishing ships are now fishing....":gosub 1000:n=0:xxx=0
58977 n=n+1:if n>shipfish then 58987
58979 a=int(rnd(1)*20)+1:if a<=18 then xxx=xxx+fish1
58981 if a=19 then xxx=xxx+fish1+int(fish1*.1)
58983 if a=20 then xxx=xxx+fish1+int(fish1*.2)
58985 goto 58977
58987 goto 60000
60000 REM WHAT KIND OF FISH?
60002 xxx1=int(xxx*.9):fishx1=xxx1:gosub 60012
60004 xxx1=int(xxx*.03):fishx2=xxx1:gosub 60012
60005 xxx1=int(xxx*.02):fishx3=xxx1:gosub 60012
60006 xxx1=int(xxx*.02):fishx4=xxx1:gosub 60012
60008 xxx1=int(xxx*.02):fishx5=xxx1:gosub 60012
60010 xxx1=int(xxx*.01):fishx6=xxx1:goto 60018
60012 a=int(rnd(1)*3)+1:if a=1 then xxx1=xxx-int((((rnd(1)*2)+1)/10)*xxx):goto 60014
60013 xxx=xxx+(((int(rnd(1)*2)+1)/10)*xxx):return
60014 if xxx1<=0 then 60013
60015 xxx=xxx1:return
60018 xxx=fishx1+fishx2+fishx3+fishx4+fishx5+fishx6:print:print " ";shipfish;" Fishing Ships have collected ";xxx;" fish this year!!":print " Fish Types caught are:"
60020 if fishx1>0 then print " ";fishx1;" Tuna":fishtype1=fishtype1+fishx1
60022 if fishx2>0 then print " ";fishx2;" Clams":fishtype2=fishtype2+fishx2
60024 if fishx3>0 then print " ";fishx3;" Lobsters":fishtype3=fishtype3+fishx3
60025 if fishx4>0 then print " ";fishx4;" Prawn":fishtype4=fishtype4+fishx4
60026 if fishx5>0 then print " ";fishx5;" Squid":fishtype5=fishtype5+fishx5
60027 if fishx6>0 then print " ";fishx6;" Oysters":fishtype6=fishtype6+fishx6
60030 fish=fish+fishx1+fishx2+fishx3+fishx4+fishx5+fishx6:GOTO 60045
60032 n=0:a1=0
60034 n=n+1:if n>fishx6 then 60040
60036 a=int(rnd(1)*100)+1:if a=1 then a1=a1+1
60038 goto 60034
60040 if a1=0 then fishx6=0:GOSUB 1005:GOSUB 1000:GOTO 59450
60042 ore9=ore9+a1:fishx6=0:print " ";a1;" Oysters had ";a1;" PearlOre inside them.  You now have ";ore9;" PearlOre.":GOSUB 1005:GOSUB 1000:goto 59450
60045  fishx1=0:fishx2=0:fishx3=0:fishx4=0:fishx5=0:print:print " You now have:"
60046 print " ";fishtype1;" Tuna     ";fishtype2;" Clams     ";fishtype3;" Lobsters"
60048 print " ";fishtype4;" Prawn     ";fishtype5;" Squid     ";fishtype6;" Oysters"
60050 if fishx6>0 then fishx6=int(fishx6*.25):goto 60032
60052 fishx6=0:GOSUB 1005:GOSUB 1000:goto 59450




59000 REM WARSHIPS SEARCHING FOR PIRATES!
59001 if shipwar=0 then return
59002 print:print " ";shipwar;" Warships searching for Pirates!":gosub 1000:nxn=0
59004 nxn=nxn+1:if nxn>shipwar then 59052
59006 a=int(rnd(1)*1000)+1:if a<=pirates then 59030
59028 print:print " Warship ";nxn;" found nothing.....":goto 59004
59030 REM PIRATES FOUND
59032 print:print " Warship ";nxn;" has found a Pirate!":gosub 58255:print " They look to be ";a$;".....":gosub 1000
59034 print:print " Do you wish to attack it {Y/N}";:input a$:if a$="Y" then 59050
59036 if a$="N" then print:print " Warship ";nxn;" leaves the Pirate alone and sails back to port.":gosub 1000:GOTO 59004
59038 goto 59034
59050 print:print " Warship ";nxn;" circles the pirate and attacks!":piratemerch=0:gosub 58302:GOTO 59004
59052 print:print " All of your Warships have finished searching for Pirates.":gosub 1000:return

59450 REM MINERS AND MINING FACILITIES
59452 PRINT:if miners>0 then 59456
59454 goto 59800
59456 gosub 1005:print " TRADE REPORT ":gosub 1005:print " MINING ":gosub 1005:print:if ma1=0 and ma2=0 and ma3=0 and ma4=0 and ma5=0 and ma6=0 and ma7=0 and ma8=0 then print " You have no more Ore left to mine.":print " All miners join the general population again.":popu=popu+miners:miners=0:print " Population is now ";popu;".":gosub 1000:return
59457 if miners>mines*5 then a=miners-mines*5:popu=popu+a:miners=miners-a:print:print " ";a;" Miners rejoin the population because there is no work left for them to do.":print " Population is now ";popu;".":print " miners=";miners;".":gosub 1000
59458 miners1=miners:miners2=0:miners3=0
59462 if ma1>0 and miners1=0 then 59628
59463 if ma1>0 and miners1>5 then 59466
59464 if ma1>0 and miners1>0 then miners2=miners1:miners1=miners1-miners1:GOTO 59474
59466 if ma1>0 and mmines1>1 then 59470
59467 if ma1>0 and miners1=0 then miners3=1:goto 59474
59468 if ma1>0 then miners1=miners1-5:miners2=5:GOTO 59474
59470 if ma1>0 and miners1<mmines1*5 then miners2=miners1:miners1=miners1-miners1:goto 59474
59472 if ma1>0 then miners2=mmines1*5:miners1=miners1-(mmines1*5)
59474 if ma1>0 and miners3=1 then 59628
59475 if ma1>0 then a=miners2*10:if a>ma1 then a=ma1
59476 if ma1>0 then ma1=ma1-a:print " ";miners2;" Miners mined ";a;" OpalOre.":ore1=ore1+a:ore=ore+a:print " You now have ";ore1;" OpalOre.":goto 59625
59480 if ma2>0 and miners1=0 then 59638
59481 if ma2>0 and miners1>5 then 59484
59482 if ma2>0 and miners1>0 then miners2=miners1:miners1=miners1-miners1:GOTO 59492
59484 if ma2>0 and mmines2>1 then 59488
59485 if ma2>0 and miners1=0 then miners3=1:goto 59492
59486 if ma2>0 then miners1=miners1-5:miners2=5:GOTO 59492
59488 if ma2>0 and miners1<mmines2*5 then miners2=miners1:miners1=miners1-miners1:goto 59492
59490 if ma2>0 then miners2=mmines2*5:miners1=miners1-(mmines2*5)
59492 if ma2>0 and miners3=1 then 59638
59493 if ma2>0 then a=miners2*10:if a>ma2 then a=ma2
59494 if ma2>0 then ma2=ma2-a:print " ";miners2;" Miners mined ";a;" EmeraldOre.":ore2=ore2+a:ore=ore+a:print " You now have ";ore2;" EmeraldOre.":goto 59635
59500 if ma3>0 and miners1=0 then 59648
59501 if ma3>0 and miners1>5 then 59504
59502 if ma3>0 and miners1>0 then miners2=miners1:miners1=miners1-miners1:GOTO 59512
59504 if ma3>0 and mmines3>1 then 59508
59505 if ma3>0 and miners1=0 then miners3=1:goto 59512
59506 if ma3>0 then miners1=miners1-5:miners2=5:GOTO 59512
59508 if ma3>0 and miners1<mmines3*5 then miners2=miners1:miners1=miners1-miners1:goto 59512
59510 if ma3>0 then miners2=mmines3*5:miners1=miners1-(mmines3*5)
59512 if ma3>0 and miners3=1 then 59648
59513 if ma3>0 then a=miners2*10:if a>ma3 then a=ma3
59514 if ma3>0 then ma3=ma3-a:print " ";miners2;" Miners mined ";a;" SilverOre.":ore3=ore3+a:ore=ore+a:print " You now have ";ore3;" SilverOre.":goto 59645
59520 if ma4>0 and miners1=0 then 59658
59521 if ma4>0 and miners1>5 then 59524
59522 if ma4>0 and miners1>0 then miners2=miners1:miners1=miners1-miners1:GOTO 59532
59524 if ma4>0 and mmines4>1 then 59528
59525 if ma4>0 and miners1=0 then miners3=1:goto 59532
59526 if ma4>0 then miners1=miners1-5:miners2=5:GOTO 59532
59528 if ma4>0 and miners1<mmines4*5 then miners2=miners1:miners1=miners1-miners1:goto 59532
59530 if ma4>0 then miners2=mmines4*5:miners1=miners1-(mmines4*5)
59532 if ma4>0 and miners3=1 then 59658
59533 if ma4>0 then a=miners2*10:if a>ma4 then a=ma4
59534 if ma4>0 then ma4=ma4-a:print " ";miners2;" Miners mined ";a;" CopperOre.":ore4=ore4+a:ore=ore+a:print " You now have ";ore4;" CopperOre.":goto 59655
59540 if ma5>0 and miners1=0 then 59668
59541 if ma5>0 and miners1>5 then 59544
59542 if ma5>0 and miners1>0 then miners2=miners1:miners1=miners1-miners1:GOTO 59552
59544 if ma5>0 and mmines5>1 then 59548
59545 if ma5>0 and miners1=0 then miners3=1:goto 59552
59546 if ma5>0 then miners1=miners1-5:miners2=5:GOTO 59552
59548 if ma5>0 and miners1<mmines5*5 then miners2=miners1:miners1=miners1-miners1:goto 59552
59550 if ma5>0 then miners2=mmines5*5:miners1=miners1-(mmines5*5)
59552 if ma5>0 and miners3=1 then 59668
59553 if ma5>0 then a=miners2*10:if a>ma5 then a=ma5
59554 if ma5>0 then ma5=ma5-a:print " ";miners2;" Miners mined ";a;" PlatinumOre.":ore5=ore5+a:ore=ore+a:print " You now have ";ore5;" PlatinumOre.":goto 59665
59560 if ma6>0 and miners1=0 then 59678
59561 if ma6>0 and miners1>5 then 59564
59562 if ma6>0 and miners1>0 then miners2=miners1:miners1=miners1-miners1:GOTO 59572
59564 if ma6>0 and mmines6>1 then 59568
59565 if ma6>0 and miners1=0 then miners3=1:goto 59572
59566 if ma6>0 then miners1=miners1-5:miners2=5:GOTO 59572
59568 if ma6>0 and miners1<mmines6*5 then miners2=miners1:miners1=miners1-miners1:goto 59572
59570 if ma6>0 then miners2=mmines6*5:miners1=miners1-(mmines6*5)
59572 if ma6>0 and miners3=1 then 59678
59573 if ma6>0 then a=miners2*10:if a>ma6 then a=ma6
59574 if ma6>0 then ma6=ma6-a:print " ";miners2;" Miners mined ";a;" RubyOre.":ore6=ore6+a:ore=ore+a:print " You now have ";ore6;" RubyOre.":goto 59675
59580 if ma7>0 and miners1=0 then 59688
59581 if ma7>0 and miners1>5 then 59584
59582 if ma7>0 and miners1>0 then miners2=miners1:miners1=miners1-miners1:GOTO 59592
59584 if ma7>0 and mmines7>1 then 59588
59585 if ma7>0 and miners1=0 then miners3=1:goto 59592
59586 if ma7>0 then miners1=miners1-5:miners2=5:GOTO 59592
59588 if ma7>0 and miners1<mmines7*5 then miners2=miners1:miners1=miners1-miners1:goto 59592
59590 if ma7>0 then miners2=mmines7*5:miners1=miners1-(mmines7*5)
59592 if ma7>0 and miners3=1 then 59688
59593 if ma7>0 then a=miners2*10:if a>ma7 then a=ma7
59594 if ma7>0 then ma7=ma7-a:print " ";miners2;" Miners mined ";a;" DiamondOre.":ore7=ore7+a:ore=ore+a:print " You now have ";ore7;" DiamondOre.":goto 59685
59600 if ma8>0 and miners1=0 then 59698
59601 if ma8>0 and miners1>5 then 59604
59602 if ma8>0 and miners1>0 then miners2=miners1:miners1=miners1-miners1:GOTO 59612
59604 if ma8>0 and mmines8>1 then 59608
59605 if ma8>0 and miners1=0 then miners3=1:goto 59612
59606 if ma8>0 then miners1=miners1-5:miners2=5:GOTO 59612
59608 if ma8>0 and miners1<mmines8*5 then miners2=miners1:miners1=miners1-miners1:goto 59612
59610 if ma8>0 then miners2=mmines8*5:miners1=miners1-(mmines8*5)
59612 if ma8>0 and miners3=1 then 59698
59613 if ma8>0 then a=miners2*10:if a>ma8 then a=ma8
59614 if ma8>0 then ma8=ma8-a:print " ";miners2;" Miners mined ";a;" JadeOre.":ore8=ore8+a:ore=ore+a:print " You now have ";ore8;" JadeOre.":goto 59695

59615 REM END OF MINING REPORT
59616 print:print " All your Miners have finished Mining.":gosub 1005:gosub 1000:goto 59800

59625 if ma1<=0 then mines=mines-mmines1:mmines1=mmines-1:goto 59630
59627 x=int(ma1/700)+1:if mmines1>x then print " An Opal Mine has been depleted. ":mines=mines-1:mmines1=mmines1-1:goto 59627
59628 print " ";mmines1;" Opal Mines have ";ma1;" OpalOre left.":goto 59480
59630 if miners>mines*5 then a=miners-mines*5:print:print " This Mining Facility has been depleted.":print " There are no Mining Facilities for the Miners who finished this Mining Facility.":popu=popu+a:miners1=miners1-a:miners=miners-a:print " ";a;" Miners rejoin the general population.  You now have ";popu;" peasants.":goto 59480
59632 print:print " This Mining Facility has been depleted.":print " The Miners who were working this mine move to the next mine.":goto  59480
59635 if ma2<=0 then mines=mines-mmines2:mmines2=mmines2-1:goto 59640
59637 x=int(ma2/700)+1:if mmines2>x then print " An Emerald Mine has been depleted. ":mines=mines-1:mmines2=mmines2-1:goto 59637
59638 print " ";mmines2;" Emerald Mines have ";ma2;" EmeraldOre left.":goto 59500
59640 if miners>mines*5 then a=miners-mines*5:print:print " This Mining Facility has been depleted.":print " There are no Mining Facilities for the Miners who finished this Mining Facility.":popu=popu+a:miners1=miners1-a:miners=miners-a:print " ";a;" Miners rejoin the general population.  You now have ";popu;" peasants.":goto 59500
59642 print:print " This Mining Facility has been depleted.":print " The Miners who were working this mine move to the next mine.":goto 59500
59645 if ma3<=0 then mines=mines-mmines3:mmines3=mmines3-1:goto 59650
59647 x=int(ma3/700)+1:if mmines3>x then print " A Silver Mine has been depleted. ":mines=mines-1:mmines3=mmines3-1:goto 59647
59648 print " ";mmines3;" Silver Mines have ";ma3;" SilverOre left.":goto 59520
59650 if miners>mines*5 then a=miners-mines*5:print:print " This Mining Facility has been depleted.":print " There are no Mining Facilities for the Miners who finished this Mining Facility.":popu=popu+a:miners1=miners1-a:miners=miners-a:print " ";a;" Miners rejoin the general population.  You now have ";popu;" peasants.":goto 59520
59652 print:print " This Mining Facility has been depleted.":print " The Miners who were working this mine move to the next mine.":goto 59520
59655 if ma4<=0 then mines=mines-mmines4:mmines4=mmines4-1:goto 59660
59657 x=int(ma4/700)+1:if mmine4>x then print " A Copper Mine has been depleted. ":mines=mines-1:mmines4=mmines4-1:goto 59657
59658 print " ";mmines4;" Copper Mines have ";ma4;" CopperOre left.":goto 59540
59660 if miners>mines*5 then a=miners-mines*5:print:print " This Mining Facility has been depleted.":print " There are no Mining Facilities for the Miners who finished this Mining Facility.":popu=popu+a:miners1=miners1-a:miners=miners-a:print " ";a;" Miners rejoin the general population.  You now have ";popu;" peasants.":goto 59540
59662 print:print " This Mining Facility has been depleted.":print " The Miners who were working this mine move to the next mine.":goto 59540
59665 if ma5<=0 then mines=mines-mmines5:mmines5=mmines5-1:goto 59670
59667 x=int(ma5/700)+1:if mmine5>x then print " A Platinum Mine has been depleted. ":mines=mines-1:mmines5=mmines5-1:goto 59667
59668 print " ";mmines5;" Platinum Mines have ";ma5;" PlatinumOre left.":goto 59560
59670 if miners>mines*5 then a=miners-mines*5:print:print " This Mining Facility has been depleted.":print " There are no Mining Facilities for the Miners who finished this Mining Facility.":popu=popu+a:miners1=miners1-a:miners=miners-a:print " ";a;" Miners rejoin the general population.  You now have ";popu;" peasants.":goto 59560
59672 print:print " This Mining Facility has been depleted.":print " The Miners who were working this mine move to the next mine.":goto 59560
59675 if ma6<=0 then mines=mines-mmines6:mmines6=mmines6-1:goto 59680
59677 x=int(ma6/700)+1:if mmine6>x then print " A Ruby Mine has been depleted. ":mines=mines-1:mmines6=mmines6-1:goto 59677
59678 print " ";mmines6;" Ruby Mines have ";ma6;" RubyOre left.":goto 59580
59680 if miners>mines*5 then a=miners-mines*5:print:print " This Mining Facility has been depleted.":print " There are no Mining Facilities for the Miners who finished this Mining Facility.":popu=popu+a:miners1=miners1-a:miners=miners-a:print " ";a;" Miners rejoin the general population.  You now have ";popu;" peasants.":goto 59580
59682 print:print " This Mining Facility has been depleted.":print " The Miners who were working this mine move to the next mine.":goto 59580
59685 if ma7<=0 then mines=mines-mmines7:mmines7=mmines7-1:goto 59690
59687 x=int(ma7/700)+1:if mmine7>x then print " A Diamond Mine has been depleted. ":mines=mines-1:mmines7=mmines7-1:goto 59687
59688 print " ";mmines7;" Diamond Mines have ";ma7;" DiamondOre left.":goto 59600
59690 if miners>mines*5 then a=miners-mines*5:print:print " This Mining Facility has been depleted.":print " There are no Mining Facilities for the Miners who finished this Mining Facility.":popu=popu+a:miners1=miners1-a:miners=miners-a:print " ";a;" Miners rejoin the general population.  You now have ";popu;" peasants.":goto 59600
59692 print:print " This Mining Facility has been depleted.":print " The Miners who were working this mine move to the next mine.":goto 59600
59695 if ma8<=0 then mines=mines-mmines8:mmines8=mmines8-1:goto 59700
59697 x=int(ma8/700)+1:if mmine8>x then print " A Jade Mine has been depleted. ":mines=mines-1:mmines8=mmines8-1:goto 59697
59698 print " ";mmines8;" Jade Mines have ";ma8;" JadeOre left.":goto 59615
59700 if miners>mines*5 then a=miners-mines*5:print:print " This Mining Facility has been depleted.":print " There are no Mining Facilities for the Miners who finished this Mining Facility.":popu=popu+a:miners1=miners1-a:miners=miners-a:print " ";a;" Miners rejoin the general population.  You now have ";popu;" peasants.":goto 59615
59702 print:print " This Mining Facility has been depleted.":print " The Miners who were working this mine move to the next mine.":goto 59615

59800 REM LUMBER
59802 if mills=0 then 59900
59804 print:gosub 1005:print " TRADE REPORT ":gosub 1005:print " LUMBER ":gosub 1005:n=0:x=0
59806 n=n+1:if n>lumberjacks then 59820
59808 a=int(rnd(1)*100)+1:if a<96 then x=x+40:goto 59806
59810 if a=96 then x=x+41:goto 59806
59812 if a=97 then x=x+42:goto 59806
59814 if a=98 then x=x+43:goto 59806
59816 if a=99 then x=x+44:goto 59806
59818 if a=100 then x=x+45:goto 59806
59820 print:lumber=lumber+x:print " ";lumberjacks;" Lumberjacks harvested ";x;" Lumber this year.":print " You now have ";lumber;" Lumber.":gosub 1005:gosub 1000:goto 59900

59900 REM TRADING POSTS
59901 if posts1=1 then 59970
59902 if posts=0 and mills=0 and mines=0 and shipfish=0 then return
59903 if posts=0 then print:gosub 1005:print " END of Trade Report ":gosub 1005:gosub 1000:return
59904 print:gosub 1005:print " TRADE REPORT ":gosub 1005:print " TRADING ":gosub 1005:n=0:x=0:b=0:print
59906 n=n+1:if n>posts then 59955
59908 a=int(rnd(1)*100)+1:if a=100 then b=3:goto 59914
59910 if a>=98 then b=2:goto 59914
59912 if a>=95 then print " Trading Post ";n;" was robbed this year!":goto 59920
59914 a=int(rnd(1)*240)+10:if b>0 then a=a*b:print " Trading Post ";n;" had a great year!":b=0
59916 print " Trading Post ";n;" has made ";a;" Gold":x=x+a:b=0:goto 59906
59920 a=int(rnd(1)*7)+1:if a=1 then a$="Thieves":goto 59950
59922 if a=2 then a$="Vagabonds":goto 59950
59924 if a=3 then a$="Rapscallions":goto 59950
59926 if a=4 then a$="Militants":goto 59950
59927 if a=5 then a$="Barbarians":goto 59950
59928 if a=6 then a$="Bandits":goto 59950
59929 a$="Robbers"
59950 a=int(rnd(1)*240)+10:c=int(rnd(1)*100)+1:b=c/100:a=a-int(a*b)
59952 print " ";a$;" have stolen ";c;"% of income, or ";int(a*b);" gold.":goto 59916:b=0
59955 print:print " Taxrate is ";ptax;"%.":b=ptax/100:xx=int(x*b):g=g+xx:print " Total taxable income was ";x;", giving you ";xx;" gold in taxes.  Gold is now ";g;".":print:gosub 1005:print " END of Trade Report ":gosub 1005:gosub 1000:return

59970 if posts=0 and mills=0 and mines=0 and shipfish=0 then return
59972 if posts=0 then print:gosub 1005:print " END of Trade Report ":gosub 1005:gosub 1000:return
59974 print:gosub 1005:print " TRADE REPORT ":gosub 1005:print " TRADING ":gosub 1005:n=0:x=0:b=0:x1=0:x2=0:x3=0:print
59976 n=n+1:if n>posts then 59992
59978 a=int(rnd(1)*100)+1:if a=100 then b=3:goto 59984
59980 if a>=98 then b=2:goto 59984
59982 if a>=95 then 59988
59984 a=int(rnd(1)*240)+10:if b>0 then a=a*b:b=0:x1=x1+1
59986 x=x+a:b=0:goto 59976
59988 a=int(rnd(1)*240)+10:c=int(rnd(1)*100)+1:b=c/100:a=a-int(a*b):x2=x2+1:x3=x3+int(a*b)
59990 x=x+a:b=0:goto 59976
59992 if x1>0 then print " ";x1;" Trading Posts had great years!"
59994 if x2>0 then print " ";x2;" Trading Posts were robbed of ";x3;" gold...."
59998 print:print " Taxrate is ";ptax;"%.":b=ptax/100:xx=int(x*b):g=g+xx:print " Total taxable income was ";x;", giving you ";xx;" gold in taxes.  Gold is now ";g;".":print:gosub 1005:print " END of Trade Report ":gosub 1005:gosub 1000:return
