mirror of
https://github.com/pkali/feudal-economy.git
synced 2026-05-20 22:33:54 +02:00
back to working condition
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
+238
-238
@@ -6,38 +6,38 @@
|
|||||||
'pressing 0 in taxes screen hangs game'
|
'pressing 0 in taxes screen hangs game'
|
||||||
'???return (0) after development continues'
|
'???return (0) after development continues'
|
||||||
'+after suicide loop with asking about continuation'
|
'+after suicide loop with asking about continuation'
|
||||||
'+dead(E) is not checked anywhere'
|
'+dead(player) is not checked anywhere'
|
||||||
'+ after suicide "how many units of 76' when bad first letter
|
'+ after suicide "how many units of 76' when bad first letter
|
||||||
'+loading game does not really work, it starts again'
|
'+loading game does not really work, it starts again'
|
||||||
|
|
||||||
''$options +optimize, optimize=-fixed_vars-const_replace
|
$options +optimize, optimize=-fixed_vars-const_replace
|
||||||
'$options mode=compatible
|
'$options mode=compatible
|
||||||
|
|
||||||
REM modified 061485 by Bruce Ramsey 411 N 61st, Seattle, WA 98103
|
REM modified 061485 by Bruce Ramsey 411 N 61st, Seattle, WA 98103
|
||||||
REM players=# of players;E=player;Y1=year
|
REM players=# of players;player=player;year=year
|
||||||
' G=$/grain,D1=demand;W=weather;
|
' G=$/grain,D1=demand;weather=weather;
|
||||||
' L=land price;C1=customs revenue
|
' L=land price;C1=customs revenue
|
||||||
REM S1=sales tax rev.;I1=income tax rev.;
|
REM S1=sales tax rev.;I1=income tax rev.;
|
||||||
' J=net justice revenue
|
' J=net justice revenue
|
||||||
REM markets(E)=# of markets;merchants(E)=# of merchants (5 per market):
|
REM markets(player)=# of markets;merchants(player)=# of merchants (5 per market):
|
||||||
' mills(E)=# of woollen mills:serfs(E)=# of serfs
|
' mills(player)=# of woollen mills:serfs(player)=# of serfs
|
||||||
REM palace_points(E)=palace pts:nobles(E)=nobles(RND 1-2/palace_points(E));
|
REM palace_points(player)=palace pts:nobles(player)=nobles(RND 1-2/palace_points(player));
|
||||||
' cathedral_points(E)=cathedral pts.
|
' cathedral_points(player)=cathedral pts.
|
||||||
REM clergymen(E)=# of clergymen(RND 1-6 per cath.point;
|
REM clergymen(player)=# of clergymen(RND 1-6 per cath.point;
|
||||||
' cash(E)=cash;land(E)=land
|
' cash(player)=cash;land(player)=land
|
||||||
' troops(E)=troops(paid $3/turn)
|
' troops(player)=troops(paid $3/turn)
|
||||||
REM customs_duty(E)=customs duty;sales_tax(E)=sales tax
|
REM customs_duty(player)=customs duty;sales_tax(player)=sales tax
|
||||||
' income_tax(E)=income tax;justice(E)=justice
|
' income_tax(player)=income tax;justice(player)=justice
|
||||||
' victory_points(E)=victory pts.(15 to win)
|
' victory_points(player)=victory pts.(15 to win)
|
||||||
REM death_date(E)=you will die by this date (1440-1455);
|
REM death_date(player)=you will die by this date (1440-1455);
|
||||||
' grain(E)=grain reserves
|
' grain(player)=grain reserves
|
||||||
' dead(E) 0=alive,1=dead;sex(E)=sex
|
' dead(player) 0=alive,1=dead;sex(player)=sex
|
||||||
REM titles$=titles;W$=weather & harvest;
|
REM titles$=titles;W$=weather & harvest;
|
||||||
' names$=names;justice$=level of justice;
|
' names$=names;justice$=level of justice;
|
||||||
' winner(E)are you already sup.ruler?
|
' winner(player)are you already sup.ruler?
|
||||||
REM status_points(E)=status pts.:cathedral pt. adds 1;palace,0.5;mill,0.25;
|
REM status_points(player)=status pts.:cathedral pt. adds 1;palace,0.5;mill,0.25;
|
||||||
' market,0.1;
|
' market,0.1;
|
||||||
' land_prices(E)=land prices
|
' land_prices(player)=land prices
|
||||||
|
|
||||||
'$define POKMSK = 16
|
'$define POKMSK = 16
|
||||||
$define LMARGN = 82
|
$define LMARGN = 82
|
||||||
@@ -59,15 +59,15 @@ $define key_ret = 155
|
|||||||
DELAY=15
|
DELAY=15
|
||||||
DIM names$(49),titles$(215),W$(34),land(7),troops(7),cathedral_points(6)
|
DIM names$(49),titles$(215),W$(34),land(7),troops(7),cathedral_points(6)
|
||||||
dim mills(6),markets(6),palace_points(6),serfs(6),A$(23),cash(6)
|
dim mills(6),markets(6),palace_points(6),serfs(6),A$(23),cash(6)
|
||||||
dim N1(30),N2(30),land_prices(6)
|
dim titles_start_pos(30),titles_end_pos(30),land_prices(6)
|
||||||
DIM winner(6),customs_duty(6),sex(7),sales_tax(6),income_tax(6)
|
DIM winner(6),customs_duty(6),sex(7),sales_tax(6),income_tax(6)
|
||||||
dim justice(6),death_date(6),grain(6),victory_points(7),status_points(6)
|
dim justice(6),death_date(6),grain(6),victory_points(7),status_points(6)
|
||||||
dim nobles(6),clergymen(6),merchants(6),justice$(12),dead(6)
|
dim nobles(6),clergymen(6),merchants(6),justice$(12),dead(6)
|
||||||
Y1=1400
|
year=1400
|
||||||
FOR A=1 TO 30
|
FOR A=1 TO 30
|
||||||
N1(A)=LEN(titles$)+1
|
titles_start_pos(A)=LEN(titles$)+1
|
||||||
READ A$
|
READ A$
|
||||||
N2(A)=LEN(titles$)+LEN(A$)
|
titles_end_pos(A)=LEN(titles$)+LEN(A$)
|
||||||
titles$(LEN(titles$)+1)=A$
|
titles$(LEN(titles$)+1)=A$
|
||||||
NEXT A
|
NEXT A
|
||||||
POKE @LMARGN,2
|
POKE @LMARGN,2
|
||||||
@@ -79,9 +79,9 @@ $define key_ret = 155
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
do: 'main game loop'
|
do: 'main game loop'
|
||||||
E=E+1
|
player=player+1
|
||||||
IF victory_points(E)=-1
|
IF victory_points(player)=-1
|
||||||
E=E+1
|
player=player+1
|
||||||
endif
|
endif
|
||||||
AX=0
|
AX=0
|
||||||
FOR A=1 TO players
|
FOR A=1 TO players
|
||||||
@@ -96,22 +96,22 @@ $define key_ret = 155
|
|||||||
NEXT A
|
NEXT A
|
||||||
IF AX=0 THEN run
|
IF AX=0 THEN run
|
||||||
|
|
||||||
IF E>players
|
IF player>players
|
||||||
E=0
|
player=0
|
||||||
Y1=Y1+1: 'next year
|
year=year+1: 'next year
|
||||||
else
|
else
|
||||||
IF Y1<=death_date(E) and dead(E) = 0
|
IF year<=death_date(player) and dead(player) = 0
|
||||||
IF Y1=death_date(E) OR land(E)<1001
|
IF year=death_date(player) OR land(player)<1001
|
||||||
exec game_over
|
exec game_over
|
||||||
else
|
else
|
||||||
exec weather
|
exec get_weather
|
||||||
exec grain_land_trade
|
exec grain_land_trade
|
||||||
exec modify_taxes
|
exec modify_taxes
|
||||||
exec map
|
exec map
|
||||||
'666'
|
'666'
|
||||||
exec development
|
exec development
|
||||||
exec winner_check
|
exec winner_check
|
||||||
IF cash(E)>0 THEN cash(E)=INT(cash(E)*1.1)
|
IF cash(player)>0 THEN cash(player)=INT(cash(player)*1.1)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -186,7 +186,7 @@ proc initial_settings
|
|||||||
income_tax(A)=5
|
income_tax(A)=5
|
||||||
justice(A)=2
|
justice(A)=2
|
||||||
death_date(A)=1440+RaND(15)
|
death_date(A)=1440+RaND(15)
|
||||||
cash(A)=100000:'1000 'Initial wealth
|
cash(A)=1000:'1000 'Initial wealth
|
||||||
land(A)=10000
|
land(A)=10000
|
||||||
grain(A)=5000
|
grain(A)=5000
|
||||||
victory_points(A)=1
|
victory_points(A)=1
|
||||||
@@ -199,50 +199,50 @@ proc initial_settings
|
|||||||
land_prices(A)=2
|
land_prices(A)=2
|
||||||
NEXT A
|
NEXT A
|
||||||
|
|
||||||
? "\7D\1D\1D\1D\1D\1D PODAJ POZIOM GRY (0-9)"
|
? "\7D\1D\1D\1D\1D\1D ";"PODAJ POZIOM GRY (0-9)"
|
||||||
exec get_digit, 9
|
exec get_digit, 9
|
||||||
status_points(0)=key+6
|
status_points(0)=key+6
|
||||||
endproc
|
endproc
|
||||||
|
|
||||||
proc top_of_the_screen
|
proc top_of_the_screen
|
||||||
if victory_points>0
|
if victory_points(player)>0
|
||||||
? titles$(N1(victory_points(E)+sex(E)),N2(victory_points(E)+sex(E)));" ";
|
? titles$(titles_start_pos(victory_points(player)+sex(player)), titles_end_pos(victory_points(player)+sex(player)));" ";
|
||||||
endif
|
endif
|
||||||
X=0
|
X=0
|
||||||
repeat
|
repeat
|
||||||
? names$(E*7-6+X,E*7-6+X);
|
? names$(player*7-6+X,player*7-6+X);
|
||||||
X=X+1
|
X=X+1
|
||||||
until names$(E*7-6+X,E*7-6+X)=" " or X>=7
|
until names$(player*7-6+X,player*7-6+X)=" " or X>=7
|
||||||
endproc
|
endproc
|
||||||
|
|
||||||
proc weather
|
proc get_weather
|
||||||
POKE @LMARGN,1
|
POKE @LMARGN,1
|
||||||
W=rand(5) + 1
|
weather=rand(5) + 1
|
||||||
if w = 1 then W$="SUSZA GROZI GLOD"
|
if weather = 1 then W$="SUSZA GROZI GLOD"
|
||||||
if w = 2 then W$="ZLA POGODA-LICHE ZBIORY"
|
if weather = 2 then W$="ZLA POGODA-LICHE ZBIORY"
|
||||||
if w = 3 then W$="NORMALNA POGODA-PRZECIETNE ZBIORY"
|
if weather = 3 then W$="NORMALNA POGODA-PRZECIETNE ZBIORY"
|
||||||
if w = 4 then W$="DOBRA POGODA-B.DOBRE ZBIORY"
|
if weather = 4 then W$="DOBRA POGODA-B.DOBRE ZBIORY"
|
||||||
if w = 5 then W$="WSPANIALA POGODA-$WIETNE ZBIORY"
|
if weather = 5 then W$="WSPANIALA POGODA-$WIETNE ZBIORY"
|
||||||
R=rand(25)+1
|
R=rand(25)+1
|
||||||
V=(grain(E)*R)/100
|
V=(grain(player)*R)/100
|
||||||
grain(E)=grain(E)-V
|
grain(player)=grain(player)-V
|
||||||
REM rats eat R%
|
REM rats eat R%
|
||||||
X=land(E)
|
X=land(player)
|
||||||
Y=(serfs(E)-mills(E)*100)*5
|
Y=(serfs(player)-mills(player)*100)*5
|
||||||
IF Y<0 THEN Y=0
|
IF Y<0 THEN Y=0
|
||||||
REM subtract 100 serfs from harvest for each mill
|
REM subtract 100 serfs from harvest for each mill
|
||||||
IF Y<X THEN X=Y
|
IF Y<X THEN X=Y
|
||||||
REM usable land
|
REM usable land
|
||||||
Y=grain(E)*2
|
Y=grain(player)*2
|
||||||
IF Y<X THEN X=Y
|
IF Y<X THEN X=Y
|
||||||
REM penalty if seed<0.5*land
|
REM penalty if seed<0.5*land
|
||||||
Y=W-0.5
|
Y=weather-0.5
|
||||||
H1=X*Y
|
H1=X*Y
|
||||||
grain(E)=grain(E)+H1-INT(X/2)
|
grain(player)=grain(player)+H1-INT(X/2)
|
||||||
REM harvest=weather*land with labor and seed support;subtract seed
|
REM harvest=weather*land with labor and seed support;subtract seed
|
||||||
D1=nobles(E)*100+clergymen(E)*40+merchants(E)*30+troops(E)*10+serfs(E)*5
|
D1=nobles(player)*100+clergymen(player)*40+merchants(player)*30+troops(player)*10+serfs(player)*5
|
||||||
REM nobles eat more than serfs
|
REM nobles eat more than serfs
|
||||||
L=(3*W+RaND(6)+1+RaND(6)+1+10)/10
|
L=(3*weather+RaND(6)+1+RaND(6)+1+10)/10
|
||||||
IF H1<1
|
IF H1<1
|
||||||
Y=2
|
Y=2
|
||||||
else
|
else
|
||||||
@@ -253,19 +253,19 @@ proc weather
|
|||||||
L=L*Y
|
L=L*Y
|
||||||
L=INT(L*10)/10
|
L=INT(L*10)/10
|
||||||
REM land price=2dice,weather;proportion of grain purchased raises land price
|
REM land price=2dice,weather;proportion of grain purchased raises land price
|
||||||
IF L>land_prices(E)+0.8 THEN L=land_prices(E)+0.8
|
IF L>land_prices(player)+0.8 THEN L=land_prices(player)+0.8
|
||||||
REM max amt land price can rise=0.8
|
REM max amt land price can rise=0.8
|
||||||
IF L<land_prices(E)-0.5 THEN L=land_prices(E)-0.5
|
IF L<land_prices(player)-0.5 THEN L=land_prices(player)-0.5
|
||||||
REM max amt land price can fall=0.5
|
REM max amt land price can fall=0.5
|
||||||
land_prices(E)=L
|
land_prices(player)=L
|
||||||
REM store player E's land price
|
REM store player player's land price
|
||||||
Z=6-W
|
Z=6-weather
|
||||||
G=(Z*3+RaND(5)+1+RaND(5)+1)/5*Y*20
|
G=(Z*3+RaND(5)+1+RaND(5)+1)/5*Y*20
|
||||||
G=INT(G*4)
|
G=INT(G*4)
|
||||||
endproc
|
endproc
|
||||||
|
|
||||||
proc harvest_report
|
proc harvest_report
|
||||||
grain(E)=INT(grain(E))
|
grain(player)=INT(grain(player))
|
||||||
H1=INT(H1)
|
H1=INT(H1)
|
||||||
? "Szczury zjadly ";R;"% twego ziarna "
|
? "Szczury zjadly ";R;"% twego ziarna "
|
||||||
?
|
?
|
||||||
@@ -275,12 +275,12 @@ proc harvest_report
|
|||||||
endproc
|
endproc
|
||||||
|
|
||||||
proc land_report
|
proc land_report
|
||||||
? "ZIEMIA ";land(E);" hektarow"
|
? "ZIEMIA ";land(player);" hektarow"
|
||||||
POSITION 20,8
|
POSITION 20,8
|
||||||
SD=INT(land(E)/2)
|
SD=INT(land(player)/2)
|
||||||
IF SD>grain(E)-D1 THEN SD=grain(E)-D1
|
IF SD>grain(player)-D1 THEN SD=grain(player)-D1
|
||||||
IF SD<0 THEN SD=0
|
IF SD<0 THEN SD=0
|
||||||
? "NASIONA ";SD;" (";INT(100*SD/(land(E)/2));"%)"
|
? "NASIONA ";SD;" (";INT(100*SD/(land(player)/2));"%)"
|
||||||
FOR V=1 TO 37
|
FOR V=1 TO 37
|
||||||
? "\0E";
|
? "\0E";
|
||||||
NEXT V
|
NEXT V
|
||||||
@@ -288,7 +288,7 @@ proc land_report
|
|||||||
? "ZAPAS ZAP. NA CENA CENA SKARB"
|
? "ZAPAS ZAP. NA CENA CENA SKARB"
|
||||||
? "ZIARNA ZIARNO ZIARNA ZIEMI"
|
? "ZIARNA ZIARNO ZIARNA ZIEMI"
|
||||||
Z9=PEEK(@ROWCRS)
|
Z9=PEEK(@ROWCRS)
|
||||||
? grain(E)-SD
|
? grain(player)-SD
|
||||||
POSITION 9,Z9
|
POSITION 9,Z9
|
||||||
? D1
|
? D1
|
||||||
POSITION 17,Z9
|
POSITION 17,Z9
|
||||||
@@ -296,7 +296,7 @@ proc land_report
|
|||||||
POSITION 24,Z9
|
POSITION 24,Z9
|
||||||
? L
|
? L
|
||||||
POSITION 31,Z9
|
POSITION 31,Z9
|
||||||
? cash(E)
|
? cash(player)
|
||||||
? "Korce Korce Tys.K Hektar Dukaty "
|
? "Korce Korce Tys.K Hektar Dukaty "
|
||||||
endproc
|
endproc
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ proc grain_land_trade
|
|||||||
?
|
?
|
||||||
exec top_of_the_screen
|
exec top_of_the_screen
|
||||||
POSITION 27,1
|
POSITION 27,1
|
||||||
? " Rok ";Y1
|
? " Rok ";year
|
||||||
?
|
?
|
||||||
exec harvest_report
|
exec harvest_report
|
||||||
POKE @CRSINH,1
|
POKE @CRSINH,1
|
||||||
@@ -328,38 +328,38 @@ proc grain_land_trade
|
|||||||
if i1 = 1
|
if i1 = 1
|
||||||
? "\9CILE ZIARNA I NASION \CB\D5\D0\D5\CA\C5\D3\DA ";
|
? "\9CILE ZIARNA I NASION \CB\D5\D0\D5\CA\C5\D3\DA ";
|
||||||
exec input_number, 1, 500000
|
exec input_number, 1, 500000
|
||||||
cash(E)=cash(E)-(I1*G/1000)
|
cash(player)=cash(player)-(I1*G/1000)
|
||||||
grain(E)=grain(E)+I1
|
grain(player)=grain(player)+I1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if i1 = 2
|
if i1 = 2
|
||||||
? "\9CILE ZIARNA I NASION \D3\D0\D2\DA\C5\C4\C1\CA\C5\D3\DA";
|
? "\9CILE ZIARNA I NASION \D3\D0\D2\DA\C5\C4\C1\CA\C5\D3\DA";
|
||||||
exec input_number, 1, 500000
|
exec input_number, 1, 500000
|
||||||
IF I1>grain(E)
|
IF I1>grain(player)
|
||||||
? "\1C\9CTYLE NIE POSIADASZ\FD"
|
? "\1C\9CTYLE NIE POSIADASZ\FD"
|
||||||
pause DELAY
|
pause DELAY
|
||||||
else
|
else
|
||||||
cash(E)=cash(E)+(I1*G/1000)
|
cash(player)=cash(player)+(I1*G/1000)
|
||||||
grain(E)=grain(E)-I1
|
grain(player)=grain(player)-I1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if i1 = 3
|
if i1 = 3
|
||||||
? "\9CILE HEKTAROW \CB\D5\D0\D5\CA\C5\D3\DA";
|
? "\9CILE HEKTAROW \CB\D5\D0\D5\CA\C5\D3\DA";
|
||||||
exec input_number, 1, 100000
|
exec input_number, 1, 100000
|
||||||
land(E)=land(E)+I1
|
land(player)=land(player)+I1
|
||||||
cash(E)=cash(E)-(I1*L)
|
cash(player)=cash(player)-(I1*L)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if i1 = 4
|
if i1 = 4
|
||||||
? "\9CILE HEKTAROW \D3\D0\D2\DA\C5\C4\C1\CA\C5\D3\DA";
|
? "\9CILE HEKTAROW \D3\D0\D2\DA\C5\C4\C1\CA\C5\D3\DA";
|
||||||
exec input_number, 1, 100000
|
exec input_number, 1, 100000
|
||||||
IF I1>land(E)-5000
|
IF I1>land(player)-5000
|
||||||
? "\1C\9CMUSISZ TRZYMAC CO NAJMNIEJ 5000 HEKTAROW!\FD"
|
? "\1C\9CMUSISZ TRZYMAC CO NAJMNIEJ 5000 HEKTAROW!\FD"
|
||||||
pause DELAY
|
pause DELAY
|
||||||
else
|
else
|
||||||
land(E)=land(E)-I1
|
land(player)=land(player)-I1
|
||||||
cash(E)=cash(E)+(I1*L)
|
cash(player)=cash(player)+(I1*L)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -384,31 +384,31 @@ proc calc_round_results
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
POKE @CRSINH,1
|
POKE @CRSINH,1
|
||||||
IF G1>grain(E)
|
IF G1>grain(player)
|
||||||
? "\1C\9C\9CBRAKUJE CI ";G1-INT(grain(E));" KORCOW !\FD"
|
? "\1C\9C\9CBRAKUJE CI ";G1-INT(grain(player));" KORCOW !\FD"
|
||||||
pause DELAY+DELAY
|
pause DELAY+DELAY
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
loop
|
loop
|
||||||
do: 'fake loop'
|
do: 'fake loop'
|
||||||
grain(E)=grain(E)-G1
|
grain(player)=grain(player)-G1
|
||||||
POKE @LMARGN,2
|
POKE @LMARGN,2
|
||||||
? "\7D"
|
? "\7D"
|
||||||
exec top_of_the_screen
|
exec top_of_the_screen
|
||||||
? ", ";Y1
|
? ", ";year
|
||||||
?
|
?
|
||||||
Z=G1/D1-1
|
Z=G1/D1-1
|
||||||
IF Z>0 THEN Z=Z/2
|
IF Z>0 THEN Z=Z/2
|
||||||
IF Z>0.25 THEN Z=Z/10+0.25
|
IF Z>0.25 THEN Z=Z/10+0.25
|
||||||
Z1=50-customs_duty(E)-sales_tax(E)-income_tax(E)
|
Z1=50-customs_duty(player)-sales_tax(player)-income_tax(player)
|
||||||
IF Z1<0 THEN Z1=Z1*justice(E)
|
IF Z1<0 THEN Z1=Z1*justice(player)
|
||||||
Z1=Z1/10
|
Z1=Z1/10
|
||||||
IF Z1>0 THEN Z1=Z1+3-justice(E)
|
IF Z1>0 THEN Z1=Z1+3-justice(player)
|
||||||
Z=Z+(Z1/10)
|
Z=Z+(Z1/10)
|
||||||
IF Z>0.5 THEN Z=0.5
|
IF Z>0.5 THEN Z=0.5
|
||||||
IF G1<(D1-1) THEN exec get_births_and_deaths:exit
|
IF G1<(D1-1) THEN exec get_births_and_deaths:exit
|
||||||
IF serfs(E)<0 THEN serfs(E)=0
|
IF serfs(player)<0 THEN serfs(player)=0
|
||||||
A=7
|
A=7
|
||||||
?
|
?
|
||||||
exec births
|
exec births
|
||||||
@@ -416,14 +416,14 @@ proc calc_round_results
|
|||||||
exec deaths
|
exec deaths
|
||||||
|
|
||||||
REM if sales+customs tax_rates<35%, add 1-4 extra merchants/turn
|
REM if sales+customs tax_rates<35%, add 1-4 extra merchants/turn
|
||||||
IF (customs_duty(E)+sales_tax(E))<35 THEN merchants(E)=merchants(E)+RaND(4)+1
|
IF (customs_duty(player)+sales_tax(player))<35 THEN merchants(player)=merchants(player)+RaND(4)+1
|
||||||
REM if income_tax rate less than a random number 1-20 then add 0-1 nobles, 0-2 clergy
|
REM if income_tax rate less than a random number 1-20 then add 0-1 nobles, 0-2 clergy
|
||||||
IF income_tax(E) < RaND(20)+1
|
IF income_tax(player) < RaND(20)+1
|
||||||
nobles(E)=nobles(E)+RaND(2)
|
nobles(player)=nobles(player)+RaND(2)
|
||||||
clergymen(E)=clergymen(E)+RaND(3)
|
clergymen(player)=clergymen(player)+RaND(3)
|
||||||
endif
|
endif
|
||||||
IF G1<(D1*1.3) THEN exit
|
IF G1<(D1*1.3) THEN exit
|
||||||
Z1=serfs(E)/1000
|
Z1=serfs(player)/1000
|
||||||
Z=(G1-D1)/D1*10
|
Z=(G1-D1)/D1*10
|
||||||
Z=Z*Z1*RaND(25) + 1 + RaND(20) + 1
|
Z=Z*Z1*RaND(25) + 1 + RaND(20) + 1
|
||||||
IF Z>32000 THEN Z=32000
|
IF Z>32000 THEN Z=32000
|
||||||
@@ -431,63 +431,63 @@ proc calc_round_results
|
|||||||
Z=INT(RaND(Z1)+INT(Z1/5))
|
Z=INT(RaND(Z1)+INT(Z1/5))
|
||||||
? Z;" przybylo do twego lenna"
|
? Z;" przybylo do twego lenna"
|
||||||
?
|
?
|
||||||
serfs(E)=serfs(E)+Z
|
serfs(player)=serfs(player)+Z
|
||||||
Z1=Z/5
|
Z1=Z/5
|
||||||
Z=RaND(Z1)+1
|
Z=RaND(Z1)+1
|
||||||
IF Z>50 THEN Z=50
|
IF Z>50 THEN Z=50
|
||||||
merchants(E)=merchants(E)+Z
|
merchants(player)=merchants(player)+Z
|
||||||
nobles(E)=nobles(E)+1
|
nobles(player)=nobles(player)+1
|
||||||
clergymen(E)=clergymen(E)+2
|
clergymen(player)=clergymen(player)+2
|
||||||
REM migration adds 1 noble, 2 clergy, up to 50 merchants(0-20% of new serfs)
|
REM migration adds 1 noble, 2 clergy, up to 50 merchants(0-20% of new serfs)
|
||||||
exit: 'not a real loop'
|
exit: 'not a real loop'
|
||||||
loop
|
loop
|
||||||
|
|
||||||
IF justice(E)>2
|
IF justice(player)>2
|
||||||
J1=serfs(E)/100*(justice(E)-2)*(justice(E)-2)
|
J1=serfs(player)/100*(justice(player)-2)*(justice(player)-2)
|
||||||
J1=RaND(J1)+1
|
J1=RaND(J1)+1
|
||||||
serfs(E)=serfs(E)-J1
|
serfs(player)=serfs(player)-J1
|
||||||
? J1;" poddanych zbieglo"
|
? J1;" poddanych zbieglo"
|
||||||
?
|
?
|
||||||
endif
|
endif
|
||||||
|
|
||||||
IF cash(E)<0
|
IF cash(player)<0
|
||||||
cash(E)=INT(cash(E)*1.5)
|
cash(player)=INT(cash(player)*1.5)
|
||||||
? "Lichwiarze domagaja sie zwrotu ";ABS(INT(cash(E)/3));" dukatow"
|
? "Lichwiarze domagaja sie zwrotu ";ABS(INT(cash(player)/3));" dukatow"
|
||||||
?
|
?
|
||||||
endif
|
endif
|
||||||
Z=11-INT(sales_tax(E)/10)
|
Z=11-INT(sales_tax(player)/10)
|
||||||
A=INT((serfs(E)-500+300*mills(E))/1000)
|
A=INT((serfs(player)-500+300*mills(player))/1000)
|
||||||
FOR V=1 TO 10
|
FOR V=1 TO 10
|
||||||
IF markets(E)>A*V THEN Z=Z-1
|
IF markets(player)>A*V THEN Z=Z-1
|
||||||
REM margins
|
REM margins
|
||||||
NEXT V
|
NEXT V
|
||||||
Z1=Z/100*markets(E)*1000
|
Z1=Z/100*markets(player)*1000
|
||||||
cash(E)=cash(E)+Z
|
cash(player)=cash(player)+Z
|
||||||
IF Z1>0 THEN ? "Kramy przyniosly ";Z1;" dukatow (";Z;"%)"
|
IF Z1>0 THEN ? "Kramy przyniosly ";Z1;" dukatow (";Z;"%)"
|
||||||
IF serfs(E)<32766
|
IF serfs(player)<32766
|
||||||
'why this check is here?'
|
'why this check is here?'
|
||||||
serfs(E)=int(serfs(E))
|
serfs(player)=int(serfs(player))
|
||||||
endif
|
endif
|
||||||
Z=180-customs_duty(E)*2-justice(E)*10-income_tax(E)
|
Z=180-customs_duty(player)*2-justice(player)*10-income_tax(player)
|
||||||
IF Z<0 OR serfs(E)/100<mills(E) THEN Z=0
|
IF Z<0 OR serfs(player)/100<mills(player) THEN Z=0
|
||||||
Z=mills(E)*(Z+RaND(Z)+1)
|
Z=mills(player)*(Z+RaND(Z)+1)
|
||||||
IF Z>0
|
IF Z>0
|
||||||
cash(E)=cash(E)+Z
|
cash(player)=cash(player)+Z
|
||||||
? "Mlyny przyniosly ";Z;" dukatow (";INT((Z/mills(E))/20);"%)"
|
? "Mlyny przyniosly ";Z;" dukatow (";INT((Z/mills(player))/20);"%)"
|
||||||
endif
|
endif
|
||||||
troops(E)=INT(troops(E))
|
troops(player)=INT(troops(player))
|
||||||
Z=troops(E)*3
|
Z=troops(player)*3
|
||||||
?
|
?
|
||||||
? troops(E);" Wojownikow kosztuje ";Z;" dukatow"
|
? troops(player);" Wojownikow kosztuje ";Z;" dukatow"
|
||||||
?
|
?
|
||||||
?
|
?
|
||||||
cash(E)=cash(E)-Z
|
cash(player)=cash(player)-Z
|
||||||
IF (land(E)/1000)>troops(E) THEN exec military_attack
|
IF (land(player)/1000)>troops(player) THEN exec military_attack
|
||||||
REM CHECK DEFENSES
|
REM CHECK DEFENSES
|
||||||
while (land(E)/500)>=troops(E)
|
while (land(player)/500)>=troops(player)
|
||||||
'nested ifs did not work, but while/exit is almost an if
|
'nested ifs did not work, but while/exit is almost an if
|
||||||
FOR A=1 TO players
|
FOR A=1 TO players
|
||||||
IF A <> E and troops(A)>(troops(E)*2) THEN exec military_attack
|
IF A <> player and troops(A)>(troops(player)*2) THEN exec military_attack
|
||||||
NEXT A
|
NEXT A
|
||||||
exit
|
exit
|
||||||
wend
|
wend
|
||||||
@@ -498,36 +498,36 @@ endproc
|
|||||||
|
|
||||||
proc show_taxes
|
proc show_taxes
|
||||||
'justice$=""
|
'justice$=""
|
||||||
J=INT((justice(E)*300-500)*victory_points(E))
|
J=INT((justice(player)*300-500)*victory_points(player))
|
||||||
IF justice(E)=1 THEN justice$=" LAGODNE"
|
IF justice(player)=1 THEN justice$=" LAGODNE"
|
||||||
IF justice(E)=2 THEN justice$="UMIARKOWANE"
|
IF justice(player)=2 THEN justice$="UMIARKOWANE"
|
||||||
IF justice(E)=3 THEN justice$=" SUROWE"
|
IF justice(player)=3 THEN justice$=" SUROWE"
|
||||||
IF justice(E)=4 THEN justice$="DRAKONSKIE"
|
IF justice(player)=4 THEN justice$="DRAKONSKIE"
|
||||||
Y=150-customs_duty(E)-sales_tax(E)-income_tax(E)
|
Y=150-customs_duty(player)-sales_tax(player)-income_tax(player)
|
||||||
IF Y<1 THEN Y=1
|
IF Y<1 THEN Y=1
|
||||||
REM you get points if your 3 tax rates add up to less than 50
|
REM you get points if your 3 tax rates add up to less than 50
|
||||||
C1=(nobles(E)*180+clergymen(E)*75+merchants(E)*20)*(Y/100)+status_points(E)*100
|
C1=(nobles(player)*180+clergymen(player)*75+merchants(player)*20)*(Y/100)+status_points(player)*100
|
||||||
REM taxable trade=Nobles, clergy, merchants, points, tax<50
|
REM taxable trade=Nobles, clergy, merchants, points, tax<50
|
||||||
S1=(nobles(E)*50+merchants(E)*25+status_points(E)*10)*(Y/100)*(5-justice(E))/2
|
S1=(nobles(player)*50+merchants(player)*25+status_points(player)*10)*(Y/100)*(5-justice(player))/2
|
||||||
REM taxable retail sales=nobles,merch,points,tax<50,JUSTICE
|
REM taxable retail sales=nobles,merch,points,tax<50,JUSTICE
|
||||||
I1=nobles(E)*250+status_points(E)*20+(10*justice(E)*merchants(E))*(Y/100)
|
I1=nobles(player)*250+status_points(player)*20+(10*justice(player)*merchants(player))*(Y/100)
|
||||||
REM TAXABLE INCOME=nobles, points, merchants*justice
|
REM TAXABLE INCOME=nobles, points, merchants*justice
|
||||||
C1=C1*customs_duty(E)/100
|
C1=C1*customs_duty(player)/100
|
||||||
IF C1<32760 THEN C1=INT(C1)
|
IF C1<32760 THEN C1=INT(C1)
|
||||||
S1=S1*sales_tax(E)/100
|
S1=S1*sales_tax(player)/100
|
||||||
IF S1<32760 THEN S1=INT(S1)
|
IF S1<32760 THEN S1=INT(S1)
|
||||||
I1=I1*income_tax(E)/100
|
I1=I1*income_tax(player)/100
|
||||||
IF I1<32760 THEN I1=INT(I1)
|
IF I1<32760 THEN I1=INT(I1)
|
||||||
? "Twoje Dochody ";J+C1+S1+I1;" dukatow"
|
? "Twoje Dochody ";J+C1+S1+I1;" dukatow"
|
||||||
?
|
?
|
||||||
? " CLO SPRZEDAZ KUPNO PRAWO "
|
? " CLO SPRZEDAZ KUPNO PRAWO "
|
||||||
Z9=PEEK(@ROWCRS)
|
Z9=PEEK(@ROWCRS)
|
||||||
POSITION 3,Z9
|
POSITION 3,Z9
|
||||||
? customs_duty(E);"%"
|
? customs_duty(player);"%"
|
||||||
POSITION 12,Z9
|
POSITION 12,Z9
|
||||||
? sales_tax(E);"%"
|
? sales_tax(player);"%"
|
||||||
POSITION 20,Z9
|
POSITION 20,Z9
|
||||||
? income_tax(E);"%"
|
? income_tax(player);"%"
|
||||||
POSITION 27,Z9
|
POSITION 27,Z9
|
||||||
? justice$
|
? justice$
|
||||||
?
|
?
|
||||||
@@ -549,7 +549,7 @@ proc modify_taxes
|
|||||||
POKE @CRSINH,1
|
POKE @CRSINH,1
|
||||||
exec top_of_the_screen
|
exec top_of_the_screen
|
||||||
?
|
?
|
||||||
? "Rok ";Y1;" Ziemia ";land(E);" hektarow"
|
? "Rok ";year;" Ziemia ";land(player);" hektarow"
|
||||||
?
|
?
|
||||||
exec show_taxes
|
exec show_taxes
|
||||||
?
|
?
|
||||||
@@ -578,7 +578,7 @@ proc modify_taxes
|
|||||||
I=1
|
I=1
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
customs_duty(E)=I1
|
customs_duty(player)=I1
|
||||||
endif
|
endif
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
@@ -590,7 +590,7 @@ proc modify_taxes
|
|||||||
''? "\7D"
|
''? "\7D"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
sales_tax(E)=I1
|
sales_tax(player)=I1
|
||||||
endif
|
endif
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
@@ -602,7 +602,7 @@ proc modify_taxes
|
|||||||
''? "\7D"
|
''? "\7D"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
income_tax(E)=I1
|
income_tax(player)=I1
|
||||||
endif
|
endif
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
@@ -618,7 +618,7 @@ proc modify_taxes
|
|||||||
?
|
?
|
||||||
? " <4> Drakonskie"
|
? " <4> Drakonskie"
|
||||||
exec get_digit, 4
|
exec get_digit, 4
|
||||||
justice(E)=key
|
justice(player)=key
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
loop
|
loop
|
||||||
@@ -628,23 +628,23 @@ endproc
|
|||||||
|
|
||||||
proc births
|
proc births
|
||||||
POKE @CRSINH,1
|
POKE @CRSINH,1
|
||||||
Z= (RaND(A)+1)*serfs(E)/100
|
Z= (RaND(A)+1)*serfs(player)/100
|
||||||
Z1=INT(Z)
|
Z1=INT(Z)
|
||||||
? Z1;" poddanych sie urodzilo"
|
? Z1;" poddanych sie urodzilo"
|
||||||
serfs(E)=serfs(E)+Z1
|
serfs(player)=serfs(player)+Z1
|
||||||
endproc
|
endproc
|
||||||
|
|
||||||
proc deaths
|
proc deaths
|
||||||
Z= (RaND(A)+1)*serfs(E)/100
|
Z= (RaND(A)+1)*serfs(player)/100
|
||||||
Z1=INT(Z)
|
Z1=INT(Z)
|
||||||
? Z1;" poddanych zmarlo"
|
? Z1;" poddanych zmarlo"
|
||||||
IF Z1>serfs(E)*0.3
|
IF Z1>serfs(player)*0.3
|
||||||
dead(E)=1
|
dead(player)=1
|
||||||
pause DELAY
|
pause DELAY
|
||||||
A=7
|
A=7
|
||||||
endif
|
endif
|
||||||
?
|
?
|
||||||
serfs(E)=serfs(E)-Z1
|
serfs(player)=serfs(player)-Z1
|
||||||
endproc
|
endproc
|
||||||
|
|
||||||
proc get_births_and_deaths
|
proc get_births_and_deaths
|
||||||
@@ -727,8 +727,8 @@ proc results_table
|
|||||||
endproc
|
endproc
|
||||||
|
|
||||||
proc is_bankrupt
|
proc is_bankrupt
|
||||||
cash(E)=cash(E)+C1+S1+I1+J
|
cash(player)=cash(player)+C1+S1+I1+J
|
||||||
IF cash(E)<(-10000*victory_points(E))
|
IF cash(player)<(-10000*victory_points(player))
|
||||||
GRAPHICS 0
|
GRAPHICS 0
|
||||||
exec top_of_the_screen
|
exec top_of_the_screen
|
||||||
? " JEST BANKRUTEM!"
|
? " JEST BANKRUTEM!"
|
||||||
@@ -737,19 +737,19 @@ proc is_bankrupt
|
|||||||
? " twoje aktywa!"
|
? " twoje aktywa!"
|
||||||
?
|
?
|
||||||
exec press_any
|
exec press_any
|
||||||
markets(E)=0
|
markets(player)=0
|
||||||
grain(E)=nobles(E)*100+clergymen(E)*40+merchants(E)*30+troops(E)*10+serfs(E)*5+2000
|
grain(player)=nobles(player)*100+clergymen(player)*40+merchants(player)*30+troops(player)*10+serfs(player)*5+2000
|
||||||
palace_points(E)=0
|
palace_points(player)=0
|
||||||
cathedral_points(E)=0
|
cathedral_points(player)=0
|
||||||
mills(E)=0
|
mills(player)=0
|
||||||
land(E)=6000
|
land(player)=6000
|
||||||
status_points(E)=1
|
status_points(player)=1
|
||||||
cash(E)=100
|
cash(player)=100
|
||||||
victory_points(E)=victory_points(E)-2
|
victory_points(player)=victory_points(player)-2
|
||||||
merchants(E)=25
|
merchants(player)=25
|
||||||
nobles(E)=5
|
nobles(player)=5
|
||||||
clergymen(E)=5
|
clergymen(player)=5
|
||||||
troops(E)=troops(E)/2
|
troops(player)=troops(player)/2
|
||||||
endif
|
endif
|
||||||
endproc
|
endproc
|
||||||
|
|
||||||
@@ -757,7 +757,7 @@ proc military_attack
|
|||||||
Z=0
|
Z=0
|
||||||
FOR A=1 TO players
|
FOR A=1 TO players
|
||||||
REM war
|
REM war
|
||||||
IF A<>E and troops(A)>=troops(E) and troops(A)>=(1.2*(land(A)/1000))
|
IF A<>player and troops(A)>=troops(player) and troops(A)>=(1.2*(land(A)/1000))
|
||||||
IF troops(A)>troops(Z) THEN Z=A
|
IF troops(A)>troops(Z) THEN Z=A
|
||||||
REM define invader
|
REM define invader
|
||||||
endif
|
endif
|
||||||
@@ -767,21 +767,21 @@ proc military_attack
|
|||||||
A=RaND(9000)+1001
|
A=RaND(9000)+1001
|
||||||
REM "Peppone"
|
REM "Peppone"
|
||||||
else
|
else
|
||||||
A=INT((troops(Z)-troops(E)))*50
|
A=INT((troops(Z)-troops(player)))*50
|
||||||
IF A>land(E)-1000 THEN A=land(E)-1000
|
IF A>land(player)-1000 THEN A=land(player)-1000
|
||||||
endif
|
endif
|
||||||
IF A<1000 THEN A=1000
|
IF A<1000 THEN A=1000
|
||||||
? titles$(N1(Z)+sex(Z),N2(Z)+sex(Z));" ";names$(Z*7-6,Z*7)
|
? titles$(titles_start_pos(Z)+sex(Z),titles_end_pos(Z)+sex(Z));" ";names$(Z*7-6,Z*7)
|
||||||
? "najechal i zajal ";A
|
? "najechal i zajal ";A
|
||||||
? "hektarow ziemi!"
|
? "hektarow ziemi!"
|
||||||
land(Z)=land(Z)+A
|
land(Z)=land(Z)+A
|
||||||
land(E)=land(E)-A
|
land(player)=land(player)-A
|
||||||
Z=INT(RaND(40)*(A/1000))
|
Z=INT(RaND(40)*(A/1000))
|
||||||
IF Z>troops(E)-15 THEN Z=troops(E)-15
|
IF Z>troops(player)-15 THEN Z=troops(player)-15
|
||||||
IF Z<0 THEN Z=0
|
IF Z<0 THEN Z=0
|
||||||
exec top_of_the_screen
|
exec top_of_the_screen
|
||||||
? " stracil ";Z;" wojownikow!"
|
? " stracil ";Z;" wojownikow!"
|
||||||
troops(E)=troops(E)-Z
|
troops(player)=troops(player)-Z
|
||||||
?
|
?
|
||||||
'exec press_any
|
'exec press_any
|
||||||
endproc
|
endproc
|
||||||
@@ -834,10 +834,10 @@ proc development
|
|||||||
? "-";
|
? "-";
|
||||||
NEXT V
|
NEXT V
|
||||||
?
|
?
|
||||||
? cash(E);" Dukatow"
|
? cash(player);" Dukatow"
|
||||||
?
|
?
|
||||||
?
|
?
|
||||||
? "MOZLIWO$CI, ROK ";Y1
|
? "MOZLIWO$CI, ROK ";year
|
||||||
? "\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D"
|
? "\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D\0D"
|
||||||
? "<1> Kram 1000"
|
? "<1> Kram 1000"
|
||||||
? "<2> Mlyn 2000"
|
? "<2> Mlyn 2000"
|
||||||
@@ -856,20 +856,20 @@ proc development
|
|||||||
if key < 1 then exit
|
if key < 1 then exit
|
||||||
IF key=6
|
IF key=6
|
||||||
exec results_table
|
exec results_table
|
||||||
cash(E)=cash(E)-100
|
cash(player)=cash(player)-100
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
IF key=7
|
IF key=7
|
||||||
exec map
|
exec map
|
||||||
cash(E)=cash(E)-100
|
cash(player)=cash(player)-100
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
IF key=8
|
IF key=8
|
||||||
? "\9CPodaj pierwsza litere imienia";
|
? "\9CPodaj pierwsza litere imienia";
|
||||||
get key
|
get key
|
||||||
POKE @CH,255
|
POKE @CH,255
|
||||||
IF names$(E*7-6,E*7-6)=CHR$(key)
|
IF names$(player*7-6,player*7-6)=CHR$(key)
|
||||||
dead(E)=1
|
dead(player)=1
|
||||||
exec game_over
|
exec game_over
|
||||||
key=-1
|
key=-1
|
||||||
endif
|
endif
|
||||||
@@ -887,32 +887,32 @@ proc development
|
|||||||
IF ZZ<1 THEN exit
|
IF ZZ<1 THEN exit
|
||||||
FOR IJ=1 TO ZZ
|
FOR IJ=1 TO ZZ
|
||||||
if i=1
|
if i=1
|
||||||
markets(E)=markets(E)+1
|
markets(player)=markets(player)+1
|
||||||
merchants(E)=merchants(E)+5
|
merchants(player)=merchants(player)+5
|
||||||
cash(E)=cash(E)-1000
|
cash(player)=cash(player)-1000
|
||||||
status_points(E)=status_points(E)+0.1
|
status_points(player)=status_points(player)+0.1
|
||||||
endif
|
endif
|
||||||
if i=2
|
if i=2
|
||||||
mills(E)=mills(E)+1
|
mills(player)=mills(player)+1
|
||||||
cash(E)=cash(E)-2000
|
cash(player)=cash(player)-2000
|
||||||
status_points(E)=status_points(E)+0.25
|
status_points(player)=status_points(player)+0.25
|
||||||
endif
|
endif
|
||||||
if i=3
|
if i=3
|
||||||
palace_points(E)=palace_points(E)+1
|
palace_points(player)=palace_points(player)+1
|
||||||
nobles(E)=nobles(E)+RaND(2)+1
|
nobles(player)=nobles(player)+RaND(2)+1
|
||||||
cash(E)=cash(E)-3000
|
cash(player)=cash(player)-3000
|
||||||
status_points(E)=status_points(E)+0.5
|
status_points(player)=status_points(player)+0.5
|
||||||
endif
|
endif
|
||||||
if i=4
|
if i=4
|
||||||
cathedral_points(E)=cathedral_points(E)+1
|
cathedral_points(player)=cathedral_points(player)+1
|
||||||
clergymen(E)=clergymen(E)+RaND(6)+1
|
clergymen(player)=clergymen(player)+RaND(6)+1
|
||||||
cash(E)=cash(E)-5000
|
cash(player)=cash(player)-5000
|
||||||
status_points(E)=status_points(E)+1
|
status_points(player)=status_points(player)+1
|
||||||
endif
|
endif
|
||||||
if i=5
|
if i=5
|
||||||
troops(E)=troops(E)+20
|
troops(player)=troops(player)+20
|
||||||
serfs(E)=serfs(E)-20
|
serfs(player)=serfs(player)-20
|
||||||
cash(E)=cash(E)-500
|
cash(player)=cash(player)-500
|
||||||
endif
|
endif
|
||||||
NEXT IJ
|
NEXT IJ
|
||||||
loop
|
loop
|
||||||
@@ -924,44 +924,44 @@ endproc
|
|||||||
|
|
||||||
proc winner_check
|
proc winner_check
|
||||||
Z=0
|
Z=0
|
||||||
A=markets(E)
|
A=markets(player)
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=palace_points(E)
|
A=palace_points(player)
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=cathedral_points(E)*2
|
A=cathedral_points(player)*2
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=mills(E)
|
A=mills(player)
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=cash(E)/5000
|
A=cash(player)/5000
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=land(E)/4000
|
A=land(player)/4000
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=merchants(E)/40
|
A=merchants(player)/40
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=nobles(E)
|
A=nobles(player)
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=troops(E)/20
|
A=troops(player)/20
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=clergymen(E)/10
|
A=clergymen(player)/10
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=serfs(E)/1000
|
A=serfs(player)/1000
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
A=status_points(E)/5
|
A=status_points(player)/5
|
||||||
exec adjust_points
|
exec adjust_points
|
||||||
REM enough points to win?
|
REM enough points to win?
|
||||||
A=Z/status_points(0)-justice(E)
|
A=Z/status_points(0)-justice(player)
|
||||||
A=INT(A)
|
A=INT(A)
|
||||||
IF A>15
|
IF A>15
|
||||||
A=15
|
A=15
|
||||||
endif: 'TBXL-parser error!!!
|
endif: 'TBXL-parser error!!!
|
||||||
REM adjust for difficulty,justice
|
REM adjust for difficulty,justice
|
||||||
IF (Y1+2)=death_date(E) THEN victory_points(E)=victory_points(E)+1
|
IF (year+2)=death_date(player) THEN victory_points(player)=victory_points(player)+1
|
||||||
IF A<1 THEN A=1
|
IF A<1 THEN A=1
|
||||||
IF victory_points(E)-1<=A
|
IF victory_points(player)-1<=A
|
||||||
victory_points(E)=A
|
victory_points(player)=A
|
||||||
while winner(E)<>1 and victory_points(E)>=15
|
while winner(player)<>1 and victory_points(player)>=15
|
||||||
GRAPHICS 7
|
GRAPHICS 7
|
||||||
winner(E)=1
|
winner(player)=1
|
||||||
? "* ";
|
? "* ";
|
||||||
exec top_of_the_screen
|
exec top_of_the_screen
|
||||||
? " WYNIKI KONCOWE!"
|
? " WYNIKI KONCOWE!"
|
||||||
@@ -994,10 +994,10 @@ proc game_over
|
|||||||
exec top_of_the_screen
|
exec top_of_the_screen
|
||||||
? " zeszedl $miertelnie"
|
? " zeszedl $miertelnie"
|
||||||
?
|
?
|
||||||
victory_points(E)=-1
|
victory_points(player)=-1
|
||||||
dead(e) = dead(e) + 1:'to prevent displaying game over more than once
|
dead(player) = dead(player) + 1:'to prevent displaying game over more than once
|
||||||
do:'fake loop
|
do:'fake loop
|
||||||
IF land(E)<1001
|
IF land(player)<1001
|
||||||
? "podczas powstania"
|
? "podczas powstania"
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
@@ -1007,8 +1007,8 @@ proc game_over
|
|||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
Y=RaND(6)+1
|
Y=RaND(6)+1
|
||||||
IF Y1>1455
|
IF year>1455
|
||||||
? "ze staro$ci w R.P. ";Y1
|
? "ze staro$ci w R.P. ";year
|
||||||
else
|
else
|
||||||
IF Y=1 THEN ? "podczas zarazy"
|
IF Y=1 THEN ? "podczas zarazy"
|
||||||
IF Y=2 THEN ? "na tyfus"
|
IF Y=2 THEN ? "na tyfus"
|
||||||
@@ -1028,13 +1028,13 @@ endproc
|
|||||||
proc map
|
proc map
|
||||||
GRAPHICS 7
|
GRAPHICS 7
|
||||||
SETCOLOR 4,11,5
|
SETCOLOR 4,11,5
|
||||||
SETCOLOR 2,E-1,2
|
SETCOLOR 2,player-1,2
|
||||||
CC=3
|
CC=3
|
||||||
exec draw_map
|
exec draw_map
|
||||||
endproc
|
endproc
|
||||||
|
|
||||||
proc draw_map
|
proc draw_map
|
||||||
LL=int(land(E)/1000)
|
LL=int(land(player)/1000)
|
||||||
do: 'emulating if elif with do loop exit'
|
do: 'emulating if elif with do loop exit'
|
||||||
IF LL<10
|
IF LL<10
|
||||||
X=100
|
X=100
|
||||||
@@ -1078,7 +1078,7 @@ proc draw_map
|
|||||||
PLOT X,Y
|
PLOT X,Y
|
||||||
DRAWTO X,79
|
DRAWTO X,79
|
||||||
|
|
||||||
IF troops(E)-5>=land(E)/1000
|
IF troops(player)-5>=land(player)/1000
|
||||||
REM simple tower
|
REM simple tower
|
||||||
FOR A=X+1 TO X+6
|
FOR A=X+1 TO X+6
|
||||||
FOR B=Y+1 TO Y+9
|
FOR B=Y+1 TO Y+9
|
||||||
@@ -1089,7 +1089,7 @@ proc draw_map
|
|||||||
PLOT Z,Y-1
|
PLOT Z,Y-1
|
||||||
NEXT Z
|
NEXT Z
|
||||||
endif
|
endif
|
||||||
IF troops(E)/2>=land(E)/1000
|
IF troops(player)/2>=land(player)/1000
|
||||||
REM 2-turret tower
|
REM 2-turret tower
|
||||||
FOR A=X+7 TO X+10
|
FOR A=X+7 TO X+10
|
||||||
FOR B=Y+1 TO Y+9
|
FOR B=Y+1 TO Y+9
|
||||||
@@ -1110,7 +1110,7 @@ proc draw_map
|
|||||||
PLOT X+10,Y-2
|
PLOT X+10,Y-2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Z=cathedral_points(E)
|
Z=cathedral_points(player)
|
||||||
COLOR CC
|
COLOR CC
|
||||||
IF Z>15 THEN Z=15
|
IF Z>15 THEN Z=15
|
||||||
REM cathedral points
|
REM cathedral points
|
||||||
@@ -1240,7 +1240,7 @@ proc draw_map
|
|||||||
endif
|
endif
|
||||||
'-------end-of-cathedral-------'
|
'-------end-of-cathedral-------'
|
||||||
|
|
||||||
Z=palace_points(E)
|
Z=palace_points(player)
|
||||||
IF Z<>0
|
IF Z<>0
|
||||||
REM PALACE POINTS
|
REM PALACE POINTS
|
||||||
COLOR CC
|
COLOR CC
|
||||||
@@ -1287,9 +1287,9 @@ proc draw_map
|
|||||||
PLOT 102,56
|
PLOT 102,56
|
||||||
COLOR CC
|
COLOR CC
|
||||||
endif
|
endif
|
||||||
Z=serfs(E)-mills(E)*100
|
Z=serfs(player)-mills(player)*100
|
||||||
IF Z<1 THEN Z=1
|
IF Z<1 THEN Z=1
|
||||||
Z=Z*5/land(E)*10+1
|
Z=Z*5/land(player)*10+1
|
||||||
IF Z>10 THEN Z=10
|
IF Z>10 THEN Z=10
|
||||||
Z=(Z/10)*(77-Y)
|
Z=(Z/10)*(77-Y)
|
||||||
Z=INT(79-Z)
|
Z=INT(79-Z)
|
||||||
@@ -1307,7 +1307,7 @@ proc draw_map
|
|||||||
NEXT A
|
NEXT A
|
||||||
PLOT 144,Z-1
|
PLOT 144,Z-1
|
||||||
PLOT 153,Z-1
|
PLOT 153,Z-1
|
||||||
Z=markets(E)*2
|
Z=markets(player)*2
|
||||||
IF Z>0
|
IF Z>0
|
||||||
REM draw market stalls
|
REM draw market stalls
|
||||||
IF Z>154-X THEN Z=154-X
|
IF Z>154-X THEN Z=154-X
|
||||||
@@ -1318,7 +1318,7 @@ proc draw_map
|
|||||||
PLOT A+1,62
|
PLOT A+1,62
|
||||||
NEXT A
|
NEXT A
|
||||||
endif
|
endif
|
||||||
Z=mills(E)
|
Z=mills(player)
|
||||||
IF Z<>0
|
IF Z<>0
|
||||||
REM draw mills
|
REM draw mills
|
||||||
IF Z>153-X THEN Z=153-X
|
IF Z>153-X THEN Z=153-X
|
||||||
@@ -1333,7 +1333,7 @@ proc draw_map
|
|||||||
endif
|
endif
|
||||||
COLOR CC
|
COLOR CC
|
||||||
?
|
?
|
||||||
? "ROK: ";Y1;" ";
|
? "ROK: ";year;" ";
|
||||||
exec top_of_the_screen
|
exec top_of_the_screen
|
||||||
?
|
?
|
||||||
exec press_any
|
exec press_any
|
||||||
@@ -1347,10 +1347,10 @@ proc save_game
|
|||||||
? #1;names$
|
? #1;names$
|
||||||
? #1;players
|
? #1;players
|
||||||
? #1;U
|
? #1;U
|
||||||
? #1;E
|
? #1;player
|
||||||
? #1;W
|
? #1;weather
|
||||||
? #1;AX
|
? #1;AX
|
||||||
? #1;Y1
|
? #1;year
|
||||||
? #1;status_points(0)
|
? #1;status_points(0)
|
||||||
FOR A=1 TO players
|
FOR A=1 TO players
|
||||||
? #1;land(A)
|
? #1;land(A)
|
||||||
@@ -1378,8 +1378,8 @@ proc save_game
|
|||||||
? #1;land_prices(A)
|
? #1;land_prices(A)
|
||||||
NEXT A
|
NEXT A
|
||||||
FOR A=1 TO 30
|
FOR A=1 TO 30
|
||||||
? #1;N1(A)
|
? #1;titles_start_pos(A)
|
||||||
? #1;N2(A)
|
? #1;titles_end_pos(A)
|
||||||
NEXT A
|
NEXT A
|
||||||
CLOSE #1
|
CLOSE #1
|
||||||
POKE @CRSINH,1
|
POKE @CRSINH,1
|
||||||
@@ -1400,10 +1400,10 @@ proc load_game
|
|||||||
INPUT #1;names$
|
INPUT #1;names$
|
||||||
INPUT #1;players
|
INPUT #1;players
|
||||||
INPUT #1;U
|
INPUT #1;U
|
||||||
INPUT #1;E
|
INPUT #1;player
|
||||||
INPUT #1;W
|
INPUT #1;weather
|
||||||
INPUT #1;AX
|
INPUT #1;AX
|
||||||
INPUT #1;Y1
|
INPUT #1;year
|
||||||
INPUT #1;B
|
INPUT #1;B
|
||||||
status_points(0)=B
|
status_points(0)=B
|
||||||
FOR A=1 TO players
|
FOR A=1 TO players
|
||||||
@@ -1456,9 +1456,9 @@ proc load_game
|
|||||||
NEXT A
|
NEXT A
|
||||||
FOR A=1 TO 30
|
FOR A=1 TO 30
|
||||||
INPUT #1;B
|
INPUT #1;B
|
||||||
N1(A)=B
|
titles_start_pos(A)=B
|
||||||
INPUT #1;B
|
INPUT #1;B
|
||||||
N2(A)=B
|
titles_end_pos(A)=B
|
||||||
NEXT A
|
NEXT A
|
||||||
CLOSE #1
|
CLOSE #1
|
||||||
POKE @CRSINH,0
|
POKE @CRSINH,0
|
||||||
@@ -1477,6 +1477,6 @@ endproc
|
|||||||
DATA SANTA PARAVIA ,FIUMACCIO ,TORRICELLA ,VENIZIA ,MOLINETTO ,FONTANILE
|
DATA SANTA PARAVIA ,FIUMACCIO ,TORRICELLA ,VENIZIA ,MOLINETTO ,FONTANILE
|
||||||
'the code below gets never executed
|
'the code below gets never executed
|
||||||
'FOR A=1 TO 30
|
'FOR A=1 TO 30
|
||||||
'? titles$(N1(A),N2(A))
|
'? titles$(titles_start_pos(A),titles_end_pos(A))
|
||||||
'NEXT A
|
'NEXT A
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user