Playerseen
AS _BYTE ' has player seen area?(for minimap) IsScepter
AS _BYTE ' Scepters hiding place? IsTreasure
AS _BYTE ' is there treasure on map square? IsArmy
AS _BYTE ' is there an army on map square?(fight) IsArtifact
AS _BYTE ' is there an artifact on map square? IsBand
AS _BYTE ' is there a roaming band of creatures on map square?(hire) IsPlayer
AS _BYTE ' is the player on map square? IsBoat
AS _BYTE ' is the boat located on map square? IsTown
AS _BYTE ' is there a town on map square? value indicates which town IsCastle
AS _BYTE ' is there a castle on map square(entrance)? value indicates which castle IsSign
AS _BYTE ' is there a road sign on map square? value indicates which sign data IsDwelling
AS _BYTE ' which type 1-plains, 2-forest, 3-hills, 4-dungeons IsBridge
AS _BYTE ' has player used Bridge spell? which direction 1-horz 2-vert IsBlock
AS _BYTE ' does this square block armies? (3 blocks around Maximus castle) Units
AS _BYTE ' which type of unit 1-25 (peasants to dragons for to join)
SpellPower
AS _BYTE ' power of cast spells MaxSpells
AS _BYTE ' total # of spells player can purchase(finding in chests can go beyond) Artifacts
AS _BYTE ' number of artifacts found 250*difficulty Castles
AS _BYTE ' number of castle garrisoned 500*difficulty Maps_Aquired
AS _BYTE ' maps to travel to other lands Maps_Full
AS _BYTE ' has player found map orb showing all map area Puzzle_Peices
AS LONG ' Which peices have been uncovered Magic_Learned
AS _BYTE ' Does player have magic ability yet? Seige_Bought
AS _BYTE ' Has player purchased seige weapons yet? Current_Contract
AS _BYTE ' Who is the player looking for? MapXPos
AS INTEGER ' Players X Pixel location on map MapYpos
AS INTEGER ' Players Y Pixel location on map Current_Land
AS _BYTE ' Which land is player exploring? Travel_Mode
AS _BYTE ' Player on land, water, or air(horse, boat, dragon) Has_Boat
AS _BYTE ' has player leased a Boat? Moving
AS _BYTE ' is player moving or standing? Facing
AS _BYTE ' Last way player was moving Left or Right Last_Seen_Boat
AS Cords
' Where the player left the boat X,Y,Land
In_Combat
AS _BYTE ' Is the player in combat? stops time In_Menu
AS _BYTE ' Does player have menu up? stops time Last_Cast
AS _BYTE ' last spell cast by player HDR_Text
AS STRING * 38 ' text for window header Scepter_X
AS _BYTE ' Scepters X location Scepter_Y
AS _BYTE ' Scepters Y location Scepter_Land
AS _BYTE ' Which Land the Scepter is in. QuitGame
AS _BYTE ' master quit flag WinGame
AS _BYTE ' set when player finds scepter BGM
AS _BYTE ' BackGound music ON\OFF Combat_speed
AS _BYTE ' Combat speed 0-9(fast - slow)
AttackLo
AS _BYTE ' Lower end damage AttackHi
AS _BYTE ' Higher end damage Shoot
AS _BYTE ' Does the creature have ranged attacks?(1{arrows},2{fireball},3{lightning},4{boulders}) ShootLo
AS _BYTE ' Lower end damage ShootHi
AS _BYTE ' upper end damage Movement
AS _BYTE ' How many spaces may creature move in one turn?(1,2,3,4,99{fly}) ShotCount
AS _BYTE ' How many times can creature use its ranged attacks? Grouping
AS _BYTE ' Morale grouping value(1,2,3,4,5) Skill_Level
AS _BYTE ' Skill Level determines damage ratio
LastSeen
AS _BYTE ' Continent villain was last seen on Castle
AS _BYTE ' Castle Villain is held up in Is_Known
AS _BYTE ' Triggered if player knows which castle villain is located
Unit
AS _BYTE ' displays which Unit type Spell
AS _BYTE ' Selling which spell Castle
AS _BYTE 'Has Information on which castle GateX
AS _BYTE ' where player locates with Town Gate spell GateY
AS _BYTE ' where player locates with Town Gate spell Land
AS _BYTE ' used with gate spell Visited
AS _BYTE 'has player been here? BoatX
AS _BYTE ' where the boat shows when rented BoatY
AS _BYTE ' where the boat shows when rented
GateX
AS _BYTE ' where player locates with castle Gate spell GateY
AS _BYTE ' where player locates with castle Gate spell Land
AS _BYTE ' used with gate spell Visited
AS _BYTE 'has player been here? Owner
AS _BYTE ' who occupies this castle?
SignText
AS STRING * 64 'What the sign says.
CONST TRUE
= -1, FALSE
= NOT TRUE
, LEFT
= 0, RIGHT
= 1, CENTER
= 2 CONST KNIGHT
= 0, PALADIN
= 1, SORCERESS
= 2, BARBARIAN
= 3 CONST EASY
= 1, NORM
= 2, HARD
= 3, IMPOSSIBLE
= 4 CONST MAIN
= 1, SAVE
= 2, LOAD
= 4, HORZ
= 1, VERT
= 2 CONST CONTINENTIA
= 1, FORESTRIA
= 2, ARCHIPELIA
= 3, SAHARIA
= 4 CONST MASTERESC
= 27, TOWN
= 5, CASTLE
= 6, RIGHT_FACE
= 1, LEFT_FACE
= 2 CONST HORSE
= 1, BOAT
= 2, DRAGON
= 3
DIM SHARED Maps
(-1 TO 65, -1 TO 65, 4) AS MapSquare
'all 4 land maps terrain data DIM SHARED Stats
(3, 3) AS StatData
, Units
(25) AS Unit_Data
, Villains
(17) AS ContractData
ON TIMER(G.GameTimer
, .125) ClockTick
Build_Layers
MapTerrain:
DATA " #¢$ %(&$ %.&#$&##$ %'& ##$ %.& #%'( )&*+,( ),*+%,+%%,(* -%+ %#,(* -,+& #$'./ 0$12))3/ 0*12 )'32 )#* -&45-6778 -#9:;<=> #$'.?9:;-4001@? -*. @#/001 @#/005 -)+&#A8--BCDEF> #$'.?BCD-678412 )$*-(*--.@@/5--4001? -$6 7(G##A8 -%6G #$'.? -$>#A84 0$1?-.2))3/05 -&.?-677G #+$,6 7#8> #%'.? -#6G##A 7$845-4 0$5 -%68-45-+ %#& #*A7G ##'+& #$'.?-(*>#$%%& ##A78 -)677GA8 -'+ %&& #)A7G #$'.?-.?+%,(*+& #$A 7(8+& ##A 7$8 -)+ %#& #,'.?-.2 )#32*> #-A8+& #'A8--( )#* -%+& #+'.?-401/ 0#5> #$$ %%& ##A7G##$ %$&A7840012 )#*--+& ##$& #%'.? -#.?-677G ##$,-9:;-+& #$$&#'9:;-+%&A7784 0#12*--+ %#,+& #$'.2)*-.?6G #%$,--BCD--+& ##'+%,BCD -#+%&#A 7#8412* -#<H=6G #$'401?-.?+& #$$, -)+&##A8 -(<=+ %$&A8412*--EIJ> #%A78.?-.2*> #$A 7+G ##'-< H$=-KLH= -#+&A8412*--KJ+& #&'.?-41?+& #3'-KM N#F-ENIJ-<H=+&A8412*-KL=> #&'.?--.2*>##$%%& #'$&#$%%,-KJ -'KJ-EIJ-+&A841?-EIJ> #&'.2*-.@?+%%,--+%%&$&##'+%, -$KJ-< H%OJ--KL=-+&A8.?--KJ> #&'.@?-.@2* -(+,+%%, -$<HHOJ-KM N#IPLHHOPJ-->#'.?--KJ> #%$,.@?-41@2*-QR-QR -(<HHOMNNF-KJ9:;KM N%F67G$,.?--KJ> #%'(3/5--4005-ST-ST< H'OPMNF -$KJBCDKJ -&>#$,-.?--EF> #$$,./5 -(< H$OPM N'F -&KJ -#KL H$=6G$,--.? -$> #$'(3? -#()*<HHO P#MNNF -.KL=-<OPPMNNF>$,-()3?<H=-> #$'.@2 )#3/5KM N%F -$< H,OPJ-KMNNF677G'--4005ENF-> #$'4 0&5<OJ -'<HHOM N-F-EF677G$%%, -*> #$'< H'OPJ-< H%OMNNF -'6 7)G#$%, -$(*<=-<H=-> #$'KM N(F-KM N%F -#6 7&G#$ %), -$()3?EF-ENF6G #$'KJ -*EF -#6 7%G$ %',-()*-( )(3@/5 -&> #%'KL H#=<HH= -#6 7#G$ %%,( )(3/5-401@/001 @#?--<H=--+& #$'E N$FENNF--6G#$%%,( )%3/ 0(5QUUR405--.@/05--ENF677G #$A86778--9:;-->##'())3/ 0%5-QURQ U$VWWXRQR--41? -#6 7#G #('>#$,--BCD-->##'4 0#5Q U&VWXV W#YZ[WWXV\QR-45-67G##$& #(AG#A78 -&>##' -%]Y[WY Z#[WWVWW\-] W$\STQR--> ##$,+& #'$& ##A8 -%>##'( )#*STS[\9:;SZ[ W#XUV W$XUR]\-->#$%,<=+& #%$,+%%&#A78 -#+&#'40012)*QV\BCD68] W+YT]\-6G#'<=KL=+& #$'<HH=> ##A7867G#' -#401?]W\ -#+,S[WWV W#Y W#XR]\->#$,KLOPL=> #$'ENNF+ %$&AG ##'--9:;.?SZX U$RQV W$YZ[ W#YTST->#'<OM N#F> #$A78 -'+ %#&#'--BCD.2)*]WY[WXVWYZ[W\-]WY[\QUR->#'KPJ9:;6G #&'-( )#* -%>#A8 -$.@@?SZT] W$XUVWXUVYTSTS[\->#'EIJBCD+& #&'-./01? -%+%&A 7#84012))*S[ W#Y W&XRQR-ST->#A8KJ--<=> #$$%,-.?-.2 )#* -#+ %#&A8-40012*S Z#[YZ[ W$\]\ -$+&#'EF-<OJ> #$' -#.?-./001? -'>#A 7#8412))*-STQVWWYZTST-QR-->#A8--ENF> #$'-()3?-.?--.? -'+ %$&'-40012))*S Z#TQR -#ST-->##A 7$8> #$'-./05-.2*-.2)*678 -'>A78--40012))*--ST -'+ %#& ##AG #$'-.? -#.@?-401?+&' -$<=-+%&' -%40012 )#*--(*-(*-(*-+%& #''-.2)*-.@? -#.2*+,--<HOJ-<=>'--<= -$4 0$5--45-45-45 -#>#$& #$'-./05-412)*-.@2))*-KMNF-KJ>'--KLHH= -#< H#= -(<H=-+%,> #$'(3? -$4005-4 0#1?-KJ -#KJ>A8-ENIPL H#OMNIJ--<=-<=-ENF -#6G #$'41?-(* -*.?-EF-<HOJ+&' -#ENIPMNIJ-KJ--EF-EF -%67G #%A8.?-.2)*-( )$*-.2)*--ENNF->A778--ENF-KJ-EF -#6 7(G #('.?-4005-4 0#1?-./05 -'+%%&A78 -$EF -&>##$& #,$,.?--9; -#9;-.2)3? -,+%&A78 -%<=677G##'+%%&$%%& #%'-.2*-BD -#BD-./005--( )'* -#+%&A78 -#KJ>##$&$, -#+,<=> #%A8./5-9;9:;9;-45 -%. @#/0012)*-<=+%&A778EF>#$,+, -&KJ+& #%'45--BDBCDBD -%())3/005--4005-EF--+%%&A77G$,-<=-9:;-<OJ6G #%A8--<=9;-9;<=--()3 @#? -.9:;> ##$,<HOJ-BCD-ENF> #%$%A8-EFBD-BDEF--4001@@2 )** -#BCD>#$%,<OMNF -&67G #%'->' -+68--4 0,12)* -$>$,<HMNF--678686G #''->A78-678 -%>' -$6 7$8 -%4005-686GA8ENF6786G$,>AG #(A7G##A7G#A 7%GA 7$G #$A 7*GAG##A 7#G#AG#A7G #¨" DATA " #e$& #$$ %*& #&$ %%&#$ %)&$ %*& #'$%,+ %$, -*+ %&, -%+%, -)+, -*+& #&' -%()*-(* -#()* -*()* -%( )%* -$())* -&> #&'-(*--405-.?--(3@?--(*--( )#3@2)* -#./ 0#1?-())3/05 -#(*-+& #$$,-.2* -%.?-(3/05-(32*-4001 @$2)*-.?9:;.2)3/005 -$(3?--> #$'--412 )%3?-.@? -#.@@? -$./001/05-.?BCD4 0#5 -&(3@?--> #$' -#.@/ 0%5-.@2 )#3@@2 )$3?--.? -#.? -)( )$3/05--> #$A8--.@? -'./ 0+1@?--.2 )#32 ))3 @%? -$> #%A8-41?-())*-(3?6 7)8412*-./ 0,1/ 0%1? -#6G #&'--.?-4012)3/5>$ %'&A8405-456 7*8.? -%.? -#> #''--.? -#.@@/56G'( )%*+&A 7&G$ %(&'.2 )#*-.?--6G #&$,--.? -#./056G#'./ 0#12*+& #%$%,( )&*>'./001?-.?--+& #%$,-()32)*-.?67G$%,.? -#412*+&##$%,()3 @&?>'.?--.?-.2*--+& #$'--./001?-.?>#$,()3? -$.@2*>#$,()3/ 0#1/005>'.?--.?-.@? -#> #$'--.?--.?-.?+%,(3/05-(*-401?>#A841@? -#.?-67G'.?-(3?-405 -#> #$'--45--.?-.? -#.@? -#.? -#.?+&#A841? -#.?->##'.?-.@? -'> #$' -%(3?-.2 )#3/5 -#.?-()32*+&#A8.?-()3?-+%%,.?-412* -#<H=> #$' -#()3/5-./ 0$5 -#(3?-40012*+&#'.?-4012 )%3?--412*--ENF> #$'-()3@/5--.? -&()3@? -$.@2*+&'.? -#401 @%2*--.@2* -$> #$'-. @#?--(3?-())*-41@@2)*--.@/56G'.2)* -#4 0%12*-4012* -#> #$'-.@@/5--.@?-401?--./ 0#5-(3/56G$,./12)* -'405 -#.@2*-6G #$'-./05 -#.@? -#.?--.?-9:;-./56G$,(3?4012 )%* -'401?-> #%'-45 -#()3@2 )#3?--.?-BCD-.?6G#'(3/5--4 0%12* -(.?-> #%' -$()3/01@@/005--.? -%.?>$%,.@? -)412 )#* -$45-> #%' -$.@@5-./05 -$(32)*-()3?>'()3@2 )'*--401@@2* -&> #%'--()3@?--45 -#())3/005-401?>'./ 0)12* -#./012)*-(*6G #%A8-.@@/5 -%()3@/05 -&45>'45 -&9:;412)*-45-401?-.?> #''-41/5 -#())3/005 -*>A8 -'BCD-401? -&45-45> #''--45 -#(3@@/5 -'( )$*+&'())* -'68.2 )#* -'> #'A8 -%(3@@/5--<=--()3/0012*>'.@@2))* -$+,401@@?-(* -#6G$& #&A8 -#(3@/05--<OJ--.@/5--405>'4001@@2)* -&41@?-45--6G$,> #''--(3/05 -#<OMF-(3/5 -&>' -#4 0#12)* -#6841? -$6G$,-> #''-(3/5 -#<HOMF--./5 -#<=-->'<H= -$41@2*--+,-.2* -#>#'--> #''-.@? -#<OPMF--(3? -#<OJ-->'ENF -%4012* -$.@2*-->$,--> #''-./5 -#KMNF--(3/5--<OMF-->' -#Q U#R--41? -$4005-->' -#> #%$%,-45 -#<OJ -$405--<OMF -#>'<=-]YZ[\ -#45<H=-<HH=-->A8--> #$$, -&<HOPL= -'<OPJ -#6G'KJ-]\-]\--<HHOPJ-KPPJ-->#A78> #$'--< H$O P$L H'OMNF-67G#'EF-]XUV\-<OMNNIJ-KPPL=-+%&#AG #$'-<OM N)IPPM N$F -#> ##A8--S Z#T<OMF--EF-ENNIJ -#+%& #%'-KPJ -)KPMF -&67G #$A8 -%<OPJ -)KLH= -#> #%'-KPJ-< H%=-KMF -#6 7#G #'A8 -#<OMNF-<HH=-<=-KPPL=--+& #$'-KPJ-KPMNNIJ-KJ9:;->$%&##$ %#&##A8--KPJ -#KPPJ-KJ-ENIPJ-<=> #$'-EIJ-EIJ--EF-KJBCD->'->#$,9:;> ##A8-KPLH=-ENNF-KJ -#KPJ-EF> #$'--KJ--KJ -%KJ -$>'->#'-BCD+& ##'-ENIPJ -&KJ-<HOMF--6G #$'--KL=-KL H%OL H#=>A7G#' -%> ##' -#EIL H&OJ-KPPJ677G #%'--EIJ-E N*IJ+& ##A 7%G ##'(*--KM N'F-EIPJ> #(' -#KJ -,KJ-+&#$%%& #&$,45--KJ -*KPJ+& #''(*-KJ-<HH=-<=-<=-KJ-6G#'--> #$$%, -$<OL H(=-KPL=+%& #%'45-KJ-KPMF-KJ-KJ-EF6G##A77G ##$, -%<OMNIM N%IJ-KPPLH=+& #$' -#KLHOMF--KLHOJ-67G##$ %',< H%OMF-KJ -%KJ-E N#IL=> #$'-<HOMNIJ--<PPMNF6G#$%%,< H'OM N%F--EF-<H=-EF -%KPJ> #$'-ENNF-KLHHOMNF67G$%,<HHOPM N&F -+KPJ -$<=-<OPJ> #$' -&KM N#F67G#$,<HOM N#F -(<HH= -#<HHOPLH=-<OJ-KPPJ> #$'-())*-EF6 7#G$%%,<OPMF -%< H&OPPL=--E N$IPJ-KPLHOMNF> #$A84005677G#$%%,<=-ENNF--< H#O P#M N%IL= -#9:;KPJ-EIPPMF-6G #%A 7$G$ %#,<HHOJ -&<O P$MNNF6 7#8EIL=--BCDKPJ--ENNF--> #($ %#,< H#O P#LHH=-<HOM N$F677G ##A8EIL= -#<OMF -'6G #%$%%, -#<O P(MNF-ENNF -%> #&$,-EIL H#OMF -(> #&' -&E N)F -(6 7#G #&' -#E N%F -#6 7%G #&A 79G #*A 7-G #ê" DATA " #æ$ %(& #0$ %(& ##$ %)& #,$%,-()* -$+& #,$%%, -(+ %#,(* -$9:;+ %#& #(' -#412* -$> #,' -$( )#* -&(3?-(*-BCD()*-> #(' -$412* -#> #,A8 -#40012)*()*-405-.? -#(3/5-> #'$,-(*--.@? -#> #-A 7%84005405 -%.2)*-./5--> #''--.2))3/5-67G #3A 7(8 -#4005-45--6G #'A784 0$567G #>A 7%8 -%6G #*A 7&G #FA 7%G #n$ %&& #0$ %(& #:$ %#, -&+& #,$%%,< H&=+ %&& #3' -%(* -$+& #*$,<HHO P&L H&=+ %$& #.A8 -#(32))*--+& #'$%,<OM N$IPM N'IL H$=+ %$& #)$,--(3/ 0#5-<=> #''<HOMF())*KMF -'EI P$L H$=+%& #''--(3/59:;--KJ> #''ENNF-401?KJ--6 7#8--EIM N%IPLH=> #''--./5-BCD--EF> #'A8 -&.?KJ-->$%&' -#KJ( )#*K P#J> #'A8-.? -'67G #('<HH=()3?KJ--+,-+,--<OJ./01?KPPMF> #('-45-68 -#6G #*'KPPJ4005KL= -(KPJ.?-.?KPPJ6G #(' -$+,--6G #+'ENIL H$OPL H&=-KPJ45-45KPPJ+& #('-<= -%> #,A78KPPMNNIPM N&F-KPLH=--<OPPL=> #'$,-KLHH=-6G #.'ENNF--KPJ( )%*-ENNIJ--E N$F> #''--KMNNF6G #/' -&KMF./ 0#1? -$KJ -(> #''--EF--6G #0'< H%OJ(3?9:;.2*<=-KL H'=> #'' -&+%%& #.'E N%IJ.@?BCD.@?KJ-E N%IPPJ> #''--<= -%+& #-' -&KJ412*-(3/5KJ -'KPMF> #'A8-KLH= -$> #,$,< H#=-KL=405-405<OL H%=-KMF6G #('-ENNF-<=-+& #+'<O P#J-EILHH=-<HHO P'J-EF6G #)' -&KLH=+& #*'KPPMNF--EIPPJ-E N(IPJ-67G #)$,--<=--ENIJ-> #($%,KPPJ(*-(*KPPJ -*KPJ6G #*$,<=-EF -$EF6G #'$,<HOPPJ.?-.?KPPL H(=-KPJ+& #*'-EF -$(* -#> #'$,-E N#IJ.2)3?KPM N&IPPJ-KPL=+& #)' -&(3?--6G #'' -&KJ4 0#5ENF--9:;-ENIJ-KPPL=+%%& #&' -#())3/567G #'$,<HH=--KL= -)BCD -#KJ-K P$HH=+& #%A8--4 0#56G #)'<OPPLHHOPJ-< H$= -&<HOJ-KMNNIPPL=> #&A 7'G #*'K P#M N$F-KPMNIL H&OPPJ-KJ--E N#F> #9'KMNIJ( )#*-KPJ-E N*F-KJ -'> #8$,EF-KJ./01?-EIJ -.KJ--<HH=6G #8' -$KJ45-45--KJ--<H=-< H'OLHHOMNF> #9'<H=-KL=--<H=-KL=-KPJ-K P*MNF67G #+$ %#& #)'EILHOPJ--EIJ-KPLHOPJ-K P*J67G #,$,9:;+%& #'A8ENIPPL=--KJ-KPM N#F-ENI P#M N$F> #,$%,-BCD--+%& #&A78ENIPL=-EF-ENF6 7%8EIPMF6 7$G #+$, -'68-+& #'A78ENNF6 7&G #%A8ENF6G #0'(* -#68-+,--> #)A 7$G #-A 7#G #1'4568-+, -%+& #QA8->' -$<H=--> #R'-+,-<HHOPL=-+& #QA8 -#KPPMNNF--> #5$ %#& #8' -#KPPJ -%+& #1$%%, -#+%%& #5A8--ENILHH= -#+& #/$,<= -%<=+%& #4A8 -#ENNIJ -$+%%& #+$,<OLH=-<HOLH=+%& #3A8 -%KLHH= -$+ %+,<OMNNF-E N#IJ--> #4A 7#8-ENNIL= -0ENF -%9:;KL=-+& #7A 7#8ENF -#< H#=--())* -&()*-BCDEIL=-+%& #9A 7%8ENIPL=-4012)*--()3/5 -%ENF-(*> #?A78ENNF -#4005--4005 -#68 -%45> #AA 7(8 -)67GA 7'G #JA 7)G #ó" DATA " #£$ %'& #E$ %+& #%' -'+%& #>$ %$, -++& #$'-<=QR -$+ %&& #,$ %&&$%%, -(Q U%R--> #$'-EF]XUR -)+ %&&##$%%, -&+, -$Q U&V W%XR-> #$'-QUVWWX U'R -(+%%, -$QUUR -$<=QV W+YZT-> #$'-] W,X U$R<= -&QUUVWWX U#REF] W&YZ[ W#\<=-> #$'-] W#Y Z&[ W&\EFQ U%V W)XUUV W&XRS[WW\EF-> #$'-S[WW\< H$=] W&XUUV W:XR]WWXR--> #$'--S[W\KMNNIJ]WWY Z%[ W(Y Z$[ W.XV W#\--> #$A8--]W\KJ--KJ]WW\( )#*S Z%[WW\())*]WY Z%[ W)YZT-6G #%A8-]W\KLHHOJ]WW\401@2))* -#SZZT401?]W\( )#*S[ W(\ -#> #''-]W\E N$F]WWXUR401@@? -#()* -#.?]YT40012*SZ[ W&\-67G #''-]WX U$R-S Z$T--4012 )#3/5--(3?ST -$./5--S Z#[WW\-+& #('-] W%YT-( )%* -#41/ 0#5 -#.@2* -%.?--( )#*]WW\--+& #''-] W%\()3/ 0#1? -$.? -'41/5 -$(32))3/01?]WW\ -#> #''-] W%\4005-68.?--68.? -#(* -#.?6778-. @%?-45]WW\<=-> #''-]WWYZZT -%+,.?--+,.? -#.? -#.?+%%,-./ 0#1?--QVWW\EF-+& #%$,-]WW\())* -%(32 )$32 )#32 )#32 )%3?9:;.?--] W#XUR--> #%'--]WW\41@2* -$./ 061?BCD.2)*] W%XR-> #%'-QVWWXR41@2 )$3? -6.? -#401?] W&\-> #$$,-] W$XR41/ 0$1?-( )**-( )%*-45 -%45] W$YZT-> #$'--] W%XR.?-9:;.?-./ 0&1/05-4 0$1? -(QUV W$\ -#> #$'-QV W&\45-BCD.?-.? -&.? -(.2 )'*SZ[ W$\-67G #$'-SZ[ W%XUR -$.?-.?-()*-(32 )&*-./ 0&12)*S[ W#\-+& #%'-<=] W'XR())3?-.?-./5-4 0'1?-.? -&4012*] W#\--> #%'-EF]WWY Z%T4001?-.?-.? -*.?-.2 )$* -#405] W#XR-+& #$'-QUVWW\())* -%.?-.?-.?-( )&*-.?-./ 0#12)*--QUV W#YT--> #$'-] W$\4012* -$.?-.?-.?-./ 0$1?-.2)3?68-4012)*S[ W$\<=-> #$'-]WYZZT--412 )$3?-.?-.?-.? -$.?-./01?+, -#4012*] W$\EF-> #$'-]W\()* -#4 0%1?-.?-.2)3? -$.?-.?-.2* -&405] W$XUR-> #$'-]W\.@2* -$6778.?-.?-./012))*-.?-45-.@2 )#*Q U$V W&\-> #$'-]W\4012)*--+%%,.?-.?-.?-4 0#5-.? -$./ 0$5] W*YT-> #$'-]WXUR4012 )&3?-.?-.? -'.?-(*-.? -%SZ[ W(\--> #$'-]WWYT--./ 0&1?-.?-.2 )#*-()32)3?-.?-( )$*] W'YT-6G #$'-]WW\())3? -&.?-.?-4001/5-4 0$1?-.2)3/001?S[ W%YT--> #%'-]WW\4 0#5 -#())3?-.? -$.? -'.?-.@@/5--.2*] W%\--6G #%'-S[WXUR -$()3 @#?-.2*-()32)*-(*-(3?-./05 -#405] W$YT-6G #&'--] W#\( )#3/ 0#1?-405-401/05-45-405-.? -%QUUV W$\--> #'A8-S[WW\4 0$5 -#.? -'.? -*.? -$QV W'\-6G #('--SZ[X U%R -#.2 )'32 )*32*--QV W(\-> #)A8-<=] W#YZZT())3 @#/ 0$1@@/ 0%1/0012*-S[ W(\-+& #($,-EF]WWYT())3/ 0#1/5 -$.@/5 -%.?68.@2)*SZ[ W%YT--> #('--QUVWW\(3@@/5 -#.? -$(3@? -$()3?+,40012)*] W%\<=-> #('-QV W$\4 0#5 -#(32* -#.@@? -#(3/05--QUR401?] W%\EF-> #('-S[ W$X U&R(3@@2)*-4012*--405Q U#VWXUR45] W%XR--> #('--] W+\4 0#1@?QUR412*Q U#V W'XUUV W%YT-6G #(A8-S[WY Z&[WX U#R41?]WXR405] W4\--> #*'--]W\< H$=S[ W$XR.?]WWX U#V W%Y Z&[ W'\-6G #*A8-]W\EIMNIL=] W%\45] W,\9:;<H=] W'\-+& #*$,-]WXRKJ-KMF] W%XUUV W,\BCDKPJ] W'\--> #)$,--]WW\EF-EFQV W5\ -#ENF] W'XR-> #($,--QVWWX U%V W/Y Z#[WWX U&V W#YZZ[W\-+& #''--QV W+Y Z&[ W&\<H=] W-\--]W\--+%& #%'-QV W*YZT -&SZ[ W#YTENFSZZ[ W*XUUVWXR -#+& #$'-] W&Y Z$T -#6778 -#S Z#T -'S Z([ W'XUR--> #$'-SZZ[WYZT -&67G##A78 -'6 7#8 -*SZZ[ W&XR-> #$'-<=-SZT -#6 7$G #&A 7'G ##A 7(8 -$S Z%[YT-> #$'-EF -%67G #@A778 -'ST--> #$' -%677G #EA 7%8 -$6G #$A 7%G #NA 7$G #¢"
BackgroundColors:
DATA 4282417216,4282400896,4286595136,4286611584 Lands:
DATA "Continentia","Forestria","Archipelia","Saharia" Names:
DATA "Sir Crimsaun","Lord Palmer","Tynnestra","Mad Moham" Titles:
DATA "Knight","General","Marshal","Lord" DATA "Paladin","Crusader","Avenger","Champion" DATA "Sorceress","Magcian","Mage","Archmage" DATA "Barbarian","Chieftain","Warlord","Overlord" Advancement:
DATA 100,2,1,1000,7500,100,3,1,1000,0,300,4,1,2000,0,500,5,2,4000,0 DATA 80,3,1,1000,10000,80,4,2,1000,0,240,5,2,2000,0,400,6,2,4000,0 DATA 60,5,2,3000,10000,60,8,3,1000,0,180,10,5,1000,0,300,12,5,1000,0 DATA 100,2,1,2000,7500,100,2,1,2000,0,300,3,1,2000,0,500,3,1,2000,0 Units:
' name ,hp ,AtkL,AtkH,Sht,SL,Mv,Cost,Shts,Grp,ShtL,ShtH
DATA Peasant
,1,1,1,0,1,1,10,0,1,0,0 DATA Sprite
,1,1,2,0,1,99,10,0,3,0,0 DATA Militia
,2,1,2,0,2,2,50,0,1,0,0 DATA Wolf
,3,1,3,0,2,3,40,0,4,0,0 DATA Skeleton
,3,1,2,0,2,2,40,0,5,0,0 DATA Zombie
,5,2,2,0,2,1,50,0,5,0,0 DATA Gnome
,5,1,3,0,2,1,60,0,3,0,0 DATA Orc
,5,2,3,1,2,2,75,6,4,1,2 DATA Archer
,10,1,2,1,2,2,250,12,2,1,3 DATA Elf
,10,1,2,1,3,3,200,24,3,2,4 DATA Pikeman
,10,2,4,0,3,2,300,0,2,0,0 DATA Nomad
,15,2,4,0,3,2,300,0,3,0,0 DATA Dwarf
,20,2,4,0,3,1,300,0,3,0,0 DATA Ghost
,10,3,4,0,4,3,400,0,5,0,0 DATA Knight
,35,6,10,0,5,1,1000,0,2,0,0 DATA Ogre
,40,3,5,0,4,1,750,0,4,0,0 DATA Barbarian
,40,1,6,0,4,3,750,0,3,0,0 DATA Troll
,50,2,5,0,4,1,1000,0,4,0,0 DATA Calvery
,20,3,5,0,4,4,800,0,2,0,0 DATA Druid
,25,2,3,1,5,2,750,3,3,10,10 DATA Archmage
,25,2,3,1,5,99,1200,2,3,25,25 DATA Vampire
,30,3,6,0,5,99,1500,0,5,0,0 DATA Giant
,60,10,20,1,5,3,2000,6,3,5,10 DATA Deamon
,50,5,7,0,6,99,3000,0,5,0,0 DATA Dragon
,200,25,50,0,6,99,5000,0,4,0,0
Contract_Data:
DATA "Murray the Miser","None",5000,1 DATA "Threadbare clothes, bald patch with hair combed to cover it, incessant cough." DATA "Murray is wanted for various petty crimes as well as for treason. He allowed a group of pirates to enter the castle and free criminals."
DATA "Hack the Rogue","The Spitter",6000,1 DATA "Bushy ebon beard stained with tobacco juice, numerous battle scars, brash, arrogant behavior." DATA "Along with many minor infractions, Hack is wanted for conspiracy against the Crown and grave-robbing."
DATA "Princess Aimola","Lady Deceit",7000,1 DATA "Excessive use of make-up to hide aging features, ever-present lace handkerchief." DATA "The Princess violated her status as a visiting dignitary by encouraging a murder and joining the conspiracy against the Crown."
DATA "Baron Johnno Makahl","Johnno",8000,1 DATA "Expensive and gaudy clothes, overweight, and a scruffy beard." DATA "Johnno is wanted for various crimes against the Kingdom, including leading a direct assualt against the Crown and conspiracy."
DATA "Dread Pirate Rob","Terror of the Sea",9000,1 DATA "Pencil thin moustache and elegantly trimmed beard never without a rapier." DATA "Rob is wanted for piracy as well as conspiracy and for breaking out five traitors sentenced to death in the Royal Dungeons."
DATA "Caneghor the Mystic","The Majestic Sage",10000,1 DATA "Voluminous robes, bald head, magic symbols engraved on body, levitating ability." DATA "Caneghor is wanted for grave robbing, conspiracy against the Crown, and plundering the Royal Library."
DATA "Sir Moradon the Cruel","None",12000,2 DATA "Always wearing armor and concealed weapons, has two prominent front teeth and an unkept beard." DATA "Sir Moradon, an emissary from another land, is wanted for joining a conspiracy to topple the kingdom."
DATA "Prince Barrowpine","The Elf Lord",14000,2 DATA "Pointed ears, sharp elfin features, pale blue eyes with no whites, glimmering enchanted coin." DATA "The prince is one of the leaders of the conspiracy against the Crown, he also traffics stolen artifacts."
DATA "Bargash Eyesore","Old One Eye",16000,2 DATA "Single eye centered in middle of forehead, over ten feet tall, only hair on body is in beard." DATA "Bargash is wanted for conspiracy against the Crown and for leading an outright attack against the King."
DATA "Rinaldus Drybone","The Death Lord",18000,2 DATA "Rinaldus is a magically animated skeleton, an undead, he is easily identifiable by the ancient crown he wears." DATA "Rinaldus is wanted for conspiracy against the Crown and leading a rebellion on the continent of Saharia."
DATA "Ragface","None",20000,3 DATA "Ragface is an undead, he is covered from head to foot in moldering green strips of cloth. A rotting smell follows him." DATA "Conspiracy against the Crown and leading an insurrection in Saharia."
DATA "Mahk Bellowspeak","Bruiser",25000,3 DATA "Bright orange body hair on a fluorescent green body, a tendency to shout for no apparent reason." DATA "Mahk is wanted for the conspiracy against the Crown, leading a jail break, and for piracy on the open seas."
DATA "Auric Whiteskin","The Barbarian",30000,3 DATA "Auric is heavily muscled and wears a protective skin made from the hides of baby lambs." DATA "Auric is wanted for conspiracy and for leading the rebellion of the continent Saharia."
DATA "Czar Nickolai the Mad","The Mad Czar",35000,3 DATA "The Czar has eyes which change color constantly, also a sulphuric smell emanates from his body." DATA "The Czar is wanted for conspiracy against the Crown, violating diplomatic status, and murder."
DATA "Magus Deathspell","None",40000,4 DATA "Pupil-less eyes, flowing white beard, always wears crimson robes and a matching skull cap." DATA "Magus is wanted for conspiracy against the Crown and for practicing forbidden magics."
DATA "Urthrax Killspite","The Demon King",45000,4 DATA "Green, scaly skin, glowing red eyes, horns protruding from sides of head, over 7 feet tall." DATA "Urthrax is wanted for conspiracy against the Crown."
DATA "Arech Dragonbreath","Mastermind",50000,4 DATA "Arech is an immense dragon with a green body and blue wings, he breathes fire." DATA "Arech is wanted for leading the conspiracy against the Crown, arranging jailbreaks, formenting rebellion, stealing the Sceptre of Order."
CastleData:
DATA "Azram ",30,26,1,30,27 DATA "Basefit ",47,05,2,47,6 DATA "Cancomar ",36,48,1,36,49 DATA "Duvock ",30,17,2,30,18 DATA "Endryx ",11,45,3,11,46 DATA "Faxis ",22,48,1,22,49 DATA "Goobare ",41,35,3,41,36 DATA "Hyppus ",43,26,3,43,27 DATA "Irok ",11,29,1,11,30 DATA "Jhan ",41,33,2,41,34 DATA "Kookamunga ",57,57,1,57,58 DATA "Lorsche ",52,56,3,52,57 DATA "Mooseweigh ",25,38,2,25,39 DATA "Nilslag ",22,23,1,22,24 DATA "Ophiraund ",06,56,1,6,57 DATA "Portalis ",58,22,1,58,23 DATA "Quinderwitch",42,55,2,42,56 DATA "Rythacon ",54,05,1,54,6 DATA "Spockana ",17,38,4,17,39 DATA "Tylitch ",09,17,3,9,18 DATA "Uzare ",41,11,4,41,12 DATA "Vutar ",40,04,1,40,5 DATA "Wankelforte ",40,40,1,40,41 DATA "Xelox ",45,05,3,45,6 DATA "Yeneverre ",19,18,2,19,19 DATA "Zyzzarzaz ",46,42,4,46,43 TownData:
DATA "Anomaly ",0,0,04,35,23,2,34,23 DATA "Bayside ",0,0,15,48,58,1,41,58 DATA "Centrapf ",0,0,08,09,38,3,9,39 DATA "Dark Corner ",0,0,17,58,59,2,58,60 DATA "Elan's Landing",0,0,13,03,36,2,3,37 DATA "Fjord ",0,0,23,47,35,1,46,35 DATA "Grimwold ",0,0,19,09,59,4,9,60 DATA "Hunterville ",0,1,22,12,04,1,12,3 DATA "Isla Vista ",0,0,18,56,05,1,57,5 DATA "Japper ",0,0,24,13,08,3,13,7 DATA "Kings Haven ",0,0,14,16,21,1,17,21 DATA "Lake Veiw ",0,0,06,16,44,1,17,44 DATA "Midland ",0,0,10,57,33,2,58,33 DATA "Nyre ",0,0,16,50,14,1,50,13 DATA "Overthere ",0,0,12,57,56,3,57,57 DATA "Paths end ",0,0,03,38,49,1,38,50 DATA "Quiln Point ",0,0,09,13,27,1,14,27 DATA "Riverton ",0,0,01,29,11,1,29,12 DATA "Simpleton ",0,0,07,12,60,3,13,60 DATA "Topshore ",0,0,05,05,49,3,5,50 DATA "Underfoot ",0,0,02,57,04,2,58,4 DATA "Vengance ",0,0,21,06,03,4,7,3 DATA "Woods End ",0,0,25,03,09,2,3,8 DATA "Xoctan ",0,0,11,51,29,1,51,28 DATA "Yakonia ",0,0,20,50,08,3,49,8 DATA "Zaezoizu ",0,0,26,58,47,4,58,48 SpellData:
DATA "Bridge",100,"Time Stop",200,"Find Villain",1000,"Castle Gate",1000,"Town Gate",500,"Instant Army",1000,"Raise Control",500 DATA "Close",2000,"Teleport",500,"FireBall",1500,"Lightning",500,"Freeze",300,"Resurrect",5000,"Turn Undead",2000 PuzzleData:
DATA 7,22,2,18,4,20,30,25,28,23,0,27,33,31,6,17,32,29,26,21,1,24,5,19,3 SignData:
DATA "Rent a boat and sail the seas. Explore the easy way!",14,3,1 DATA "Treasure Island",3,3,1 DATA "Aurange is north",5,6,1 DATA "The Secptre will never be fonud!",3,9,1 DATA "King's Tresure Garden",12,10,1 DATA "There are two artifacts per continent.",15,10,1 DATA "Pond of Peril",20,16,1 DATA "Peasant Way",25,11,1 DATA "Six villains rule Continentia.",38,3,1 DATA "It takes time to cross the desert.",45,16,1 DATA "Wonder Woods",40,12,1 DATA "Irok guards the north",10,28,1 DATA "A-maze-ing Forest",15,33,1 DATA "All maps are found in chests",58,33,1 DATA "Bridge Port",51,38,1 DATA "Hidden Grove",34,39,1 DATA "Secret Pass",9,41,1 DATA "Pirate's Cove",7,55,1 DATA "Isle of Death",24,49,1 DATA "Boon Docks",43,59,1 DATA "Welcome to Kookamunga!",55,59,1
DATA "Wood's End is south.",3,15,2 DATA "Time is on our side.",42,3,2 DATA "Passage to Basefit.",52,3,2 DATA "The end is near.",57,11,2 DATA "Peasants are fodder!",59,22,2 DATA "Remember, whereever you go there you are.",60,28,2 DATA "Undead are everywhere!",41,15,2 DATA "The ogres are back... and they're hungry!",27,14,2 DATA "Treasure at the river's end.",22,14,2 DATA "Monster Way",18,26,2 DATA "There is one town for each castle.",42,27,2 DATA "No Trespassing!",37,35,2 DATA "You'll never find the Sceptre here!",39,39,2 DATA "Crossroads",22,34,2 DATA "Forestria maze entrance!",7,32,2 DATA "Beware the moors!",6,37,2 DATA "Wrong Way!",16,58,2 DATA "Don't go any farther!",22,49,2 DATA "Stay on the road!",64,48,2 DATA "Your Quest is doomed!",56,39,2 DATA "Four villains rule Forestria",55,60,2
DATA "Welcome to Archipelia!",10,60,3 DATA "The islands hide treasures.",3,56,3 DATA "Four villains rule here.",11,50,3 DATA "There are five islands here.",9,33,3 DATA "There's no turning back!",28,6,3 DATA "Pirate's Treasure Trove",25,22,3 DATA "Pirates have no mercy!",29,28,3 DATA "Corak was here!",37,22,3 DATA "The dead live!",40,28,3 DATA "Thieves will be eaten!",53,24,3 DATA "Pool of Prosperity",41,43,3 DATA "Maximus will DIE!",34,39,3 DATA "Time is on our side!",31,56,3 DATA "Down with the King!",51,35,3
DATA "Your army will perish here!",40,11,4 DATA "Three villains rule Saharia.",52,9,4 DATA "Wading Pool",14,30,4 DATA "There is no escaping the prophecy!",18,38,4 DATA "Time is running out!",17,46,4 DATA "this place is a nightmare!",11,59,4 DATA "Treasure Trough",25,47,4 DATA "Treasure Zone",35,50,4 DATA "Volcano Guardian",47,42,4 DATA "Oasis of Plenty",46,33,4
villainarmydata:
DATA 50,20,25,30,25,0,3,1,0,0 DATA 10,30,20,60,40,11,2,2,0,0 DATA 75,50,20,20,5,1,1,4,5,15 DATA 30,20,10,5,5,3,7,8,17,12 DATA 50,50,10,10,5,2,2,8,9,16 DATA 200,10,10,5,5,1,13,14,20,20
DATA 100,25,20,15,15,3,9,11,19,15 DATA 30,30,10,30,300,10,21,20,11,2 DATA 150,20,10,5,80,8,16,18,23,4 DATA 500,100,30,10,5,5,6,14,22,24
DATA 600,200,50,20,10,5,6,14,22,24 DATA 30,5,30,200,200,23,25,16,8,7 DATA 300,40,20,100,700,7,17,23,12,1 DATA 40,100,80,60,5,9,11,19,15,25
DATA 30,50,100,500,5000,24,22,21,7,1 DATA 50,10,200,250,60,24,25,19,15,21 DATA 100,25,25,100,100,25,25,25,24,22
Load_Data
'---------------starting stats-------------------
G.Days = 900
G.TimeStop = 0
G.Level = EASY
P.Class = KNIGHT
P.Promotion = 0
P.Maps_Aquired = 1
P.Artifacts_Aquired = 0
P.Puzzle_Peices = 2 ^ 25 - 1
P.Magic_Learned = FALSE
P.Seige_Bought = FALSE
P.Current_Contract = 1 '<------------------
P.MapXPos = 1386 '96 * 14.5
P.MapYpos = 80 * 5
P.Current_Land = CONTINENTIA
P.Travel_Mode = HORSE
'------------------------------------------------
'--------------Basic Controls--------------------
Control.Up_Key = 18432
Control.Down_Key = 20480
Control.Left_Key = 19200
Control.Right_Key = 19712
Control.Start_Button = 13 'enter
Control.A_Button = 97 ' a
Control.B_Button = 115 ' s
Control.C_Button = 100 ' d
G.BGM = TRUE
G.SFX = TRUE
G.Combat_speed = 5
G.BGM_VOL = 50
G.SFX_VOL = 50
PX.Spells(2) = 0
PX.Army(0).Unit = 3
PX.Army(0).Count = 20
PX.Army(1).Unit = 9
PX.Army(1).Count = 2
PX.Army(2).Unit = 11
PX.Army(2).Count = 2
PX.Army(3).Unit = 19
PX.Army(3).Count = 2
PX.Army(4).Unit = 4
PX.Army(4).Count = 2
G.HDR_Text = Names(P.Class) + " the " + Title(P.Class, P.Promotion)
Add_Player_Advancement 'players first advnacement from Nobody to hero set base values
Place_Extras
Set_BackGround_Color
G.Scepter_Land = CONTINENTIA
Hide_Scepter G.Scepter_Land
Swap_Map P.Current_Land, LOAD
Build_Map 13
'Swap_Map FORESTRIA, LOAD
'Build_Map 14
'Swap_Map ARCHIPELIA, LOAD
'Build_Map 15
'Swap_Map SAHARIA, LOAD
'Build_Map 16
'Build_Map 13
'Build_Main_Window
'Build_Town_Window
'_PUTIMAGE , Layer(1), Layer(0)
'END
G.In_Combat = FALSE
CASE Control.A_Button
, Control.C_Button
Build_Menu_Window
Exitflag%% = TRUE
IF P.Travel_Mode
= HORSE
OR P.Travel_Mode
= BOAT
THEN speed%%
= 6 IF P.Travel_Mode
= DRAGON
THEN speed%%
= 8 IF In_Desert
AND P.Travel_Mode
= HORSE
THEN speed%%
= speed%%
- 2
OldX% = P.MapXPos: OldY% = P.MapYpos
P.Facing = LEFT_FACE: P.Moving = TRUE
P.MapXPos = P.MapXPos - speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapXPos
= OldX%
P.MapYpos = P.MapYpos + speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapYpos
= OldY%
P.Facing = RIGHT_FACE: P.Moving = TRUE
P.MapXPos = P.MapXPos + speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapXPos
= OldX%
P.MapYpos = P.MapYpos + speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapYpos
= OldY%
P.Facing = LEFT_FACE: P.Moving = TRUE
P.MapXPos = P.MapXPos - speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapXPos
= OldX%
P.MapYpos = P.MapYpos - speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapYpos
= OldY%
P.Facing = RIGHT_FACE: P.Moving = TRUE
P.MapXPos = P.MapXPos + speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapXPos
= OldX%
P.MapYpos = P.MapYpos - speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapYpos
= OldY%
P.Moving = TRUE
P.MapYpos = P.MapYpos + speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapYpos
= OldY%
P.Moving = TRUE
P.MapYpos = P.MapYpos - speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapYpos
= OldY%
P.Facing = LEFT_FACE: P.Moving = TRUE
P.MapXPos = P.MapXPos - speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapXPos
= OldX%
P.Facing = RIGHT_FACE: P.Moving = TRUE
P.MapXPos = P.MapXPos + speed%%
IF Movement_Allowed
<> TRUE
THEN P.MapXPos
= OldX%
P.Moving = FALSE
'-----------the Boundries of Fantasia-----------
IF P.MapXPos
< 224 AND P.Maps_Aquired
= 1 THEN P.MapXPos
= 224 ELSE Build_Travel_Window
IF P.MapXPos
> 6432 AND P.Maps_Aquired
= 1 THEN P.MapXPos
= 6432 ELSE Build_Travel_Window
IF P.MapYpos
< -136 AND P.Maps_Aquired
= 1 THEN P.MapYpos
= -136 ELSE Build_Travel_Window
IF P.MapYpos
> 5080 AND P.Maps_Aquired
= 1 THEN P.MapYpos
= 5080 ELSE Build_Travel_Window
'-----------------------------------------------
Check_Map_Squares
Build_Main_Window
Build_Map_View2
Draw_Player
Update_Map_Squares OldX%, OldY%
X%% = P.MapXPos / 96 - .49 - 3
Y%% = 65 - P.MapYpos / 80 - .49 - 1
LOCATE 1, 1:
PRINT P.MapXPos; P.MapYpos; X%%; Y%%; In_Desert; G.Window_Animation; Movement_Allowed
IF G.WinGame
THEN G.QuitGame
= TRUE
'victory
IF G.WinGame
THEN Build_Victory_March
IF G.WinGame
THEN Build_Victory_March
'DumpMap
SUB Update_Map_Squares
(OX%
, OY%
) X%% = P.MapXPos / 96 - .49 - 3
Y%% = 64 - P.MapYpos / 80 - .49 - 1
OldX%% = OX% / 96 - .49 - 3
OldY%% = 64 - OY% / 80 - .49 - 1
Land(OldX%%, OldY%%).IsPlayer = FALSE
Land(X%%, Y%%).IsPlayer = TRUE
X%% = P.MapXPos / 96 - .49 - 3
Y%% = 64 - P.MapYpos / 80 - .49 - 1
IF Land
(X%%
, Y%%
).IsTown
AND Land
(X%%
, Y%%
).IsPlayer
= FALSE
THEN Build_Town_Window
'only enter town if player just entered square IF Land
(X%%
, Y%%
).IsSign
THEN behappy
= TRUE
IF Land
(X%%
, Y%%
).IsTreasure
THEN behappy
= TRUE
IF Land
(X%%
, Y%%
).IsArtifact
THEN behappy
= TRUE
DIM ContractAvail
(5) AS _BYTE 'current contracts available' only 5 at a time '-------------load Villain contracts------------
i%% = 1: j%% = 1
i%% = i%% + 1
ContractAvail(j%%) = i%%
IF P.Current_Contract
= ContractAvail
(j%%
) THEN current%%
= j%%
j%% = j%% + 1
i%% = i%% + 1
IF i%%
= 18 THEN Full%%
= TRUE
'if player has caught more than 12 then there wont be 5
'-----------------------------------------------
Selection%% = Last_Choice
j%% = j%% - 1
X%% = P.MapXPos / 96 - .49 - 3
Y%% = 64 - P.MapYpos / 80 - .49 - 1
KB_Print 16, 316, "Town of", 0, LEFT
KB_Print 144, 316, Towns(Land(X%%, Y%%).IsTown).The_Name, 0, LEFT
IF P.VilliansCaught
< 17 THEN KB_Print
48, 348, "Get New Contract", 0, LEFT
KB_Print 48, 364, "Rent Boat", 0, LEFT
IF P.Artifacts_Aquired
AND 4 THEN b$
= "(100 week)" ELSE b$
= "(500 week)" KB_Print 204, 364, b$, 0, LEFT
KB_Print 48, 364, "Cancel Rental", 0, LEFT
KB_Print 48, 380, "Gather Information", 0, LEFT
IF NOT P.Seige_Bought
THEN KB_Print
48, 412, "Buy Seige Weapons (3000)", 0, LEFT
b$
= RTRIM$(Spells
(Towns
(Land
(X%%
, Y%%
).IsTown
).Spell
).Spell_Name
) c$
= " spell (" + LTRIM$(STR$(Spells
(Towns
(Land
(X%%
, Y%%
).IsTown
).Spell
).Cost
)) + ")" KB_Print 48, 396, b$ + c$, 0, LEFT
KB_Print 352, 332, "GP=", 0, LEFT
Selection%% = Selection%% - 1
IF P.VilliansCaught
= 17 THEN 'has player caught all villians? IF Selection%%
< 1 THEN Selection%%
= 1 IF Selection%%
< 0 THEN Selection%%
= 0 G.HDR_Text = Names(P.Class) + " the " + Title(P.Class, P.Promotion)
Window_Header
Selection%% = Selection%% + 1
IF P.Seige_Bought
THEN 'has player already bought the seige weapons? IF Selection%%
> 3 THEN Selection%%
= 3 IF Selection%%
> 4 THEN Selection%%
= 4 G.HDR_Text = Names(P.Class) + " the " + Title(P.Class, P.Promotion)
Window_Header
Last_Choice = Selection%%
IF current%%
<= j%%
AND j%%
> 1 THEN current%%
= current%%
+ 1 IF current%%
> j%%
THEN current%%
= 1 P.Current_Contract = ContractAvail(current%%)
_PUTIMAGE , Layer
(9), Layer
(11) 'save current town temp layer Build_Contract_Window
_PUTIMAGE , Layer
(11), Layer
(9) 'restore current town temp layer Rent_Boat Land(X%%, Y%%).IsTown
Buy_Spell Towns(Land(X%%, Y%%).IsTown).Spell
Selection%% = 3: Last_Choice = 3
exitflag%% = TRUE
G.HDR_Text = Names(P.Class) + " the " + Title(P.Class, P.Promotion)
exitflag%% = TRUE
G.QuitGame = TRUE
KB_Print 400, 332, G$, 0, LEFT
Display_Selection_Arrow 32, 346 + (16 * Selection%%)
Run_Animations
IF P.Artifacts_Aquired
AND 4 THEN 'does player have the anchor? IF P.Gold
> 100 THEN 'then player pays 100 P.Has_Boat = TRUE
P.Gold = P.Gold - 100
KB_Print 48, 364, "Cancel Rental", 0, LEFT
G.HDR_Text = " You do not have enough gold!"
Window_Header
P.Has_Boat = TRUE
P.Gold = P.Gold - 500
KB_Print 48, 364, "Cancel Rental", 0, LEFT
G.HDR_Text = " You do not have enough gold!"
Window_Header
P.Last_Seen_Boat.Xloc = Towns(TID%%).BoatX
P.Last_Seen_Boat.Yloc = Towns(TID%%).BoatY
P.Last_Seen_Boat.Land = P.Current_Land
Place_Boat
ELSE 'player has boat so un-have it P.Has_Boat = FALSE
Remove_Boat
KB_Print 48, 364, "Rent Boat", 0, LEFT
IF P.Artifacts_Aquired
AND 4 THEN b$
= "(100 week)" ELSE b$
= "(500 week)" KB_Print 204, 364, b$, 0, LEFT
IF P.Gold
> Spells
(ID%%
).Cost
THEN IF Total_Spells
< P.MaxSpells
THEN PX.Spells(ID%%) = PX.Spells(ID%%) + 1
P.Gold = P.Gold - Spells(ID%%).Cost
G.HDR_Text
= " You can learn" + STR$(P.MaxSpells
- Total_Spells
) + " more spells!" Window_Header
G.HDR_Text = " You can not learn anymore spells!"
Window_Header
G.HDR_Text = " You do not have enough gold!"
Window_Header
P.Seige_Bought = TRUE
P.Gold = P.Gold - 3000
Result%% = TRUE
G.HDR_Text = " You do not have enough gold!"
Window_Header
Result%% = FALSE
Buy_Seige = Result%%
Result%% = 0
Result%% = Result%% + PX.Spells(i%%)
Total_Spells = Result%%
'check whether or not a player can move into a square
'changes player from horse to boat and back again when going
'from land to water and vice-versa,also updates where boat is in the world
X%% = P.MapXPos / 96 - .49 - 3
Y%% = 64 - P.MapYpos / 80 - .49 - 1
Result%% = FALSE
'horse travel
Result%% = TRUE
CASE 1 TO 4, 8, 9, 19, 20, 21, 27, 30, 36 'shore Result%% = TRUE
P.Travel_Mode = BOAT
Land(X%%, Y%%).IsBoat = FALSE 'stop static display of boat
Remove_Boat
Result%% = Land(X%%, Y%%).Terrain
Result%% = Land(X%%, Y%%).Terrain
Land(X%%, Y%%).IsBoat = TRUE 'map location displays boat
P.Last_Seen_Boat.Xloc = X%%
P.Last_Seen_Boat.Yloc = Y%%
P.Last_Seen_Boat.Land = P.Current_Land
Place_Boat
P.Travel_Mode = HORSE
Result%% = TRUE
CASE 0 TO 4, 8, 9, 19, 20, 21, 27, 30, 36 'shore Result%% = TRUE
Result%% = FALSE
Movement_Allowed = Result%%
L%% = 12 + P.Last_Seen_Boat.Land
ix%%
= Land
(P.Last_Seen_Boat.Xloc
, P.Last_Seen_Boat.Yloc
).Terrain
MOD 13 IF Land
(P.Last_Seen_Boat.Xloc
, P.Last_Seen_Boat.Yloc
).Terrain
> 12 THEN iy%%
= Land
(P.Last_Seen_Boat.Xloc
, P.Last_Seen_Boat.Yloc
).Terrain \
13 ELSE iy%%
= 0 _PUTIMAGE (288 + P.Last_Seen_Boat.Xloc
* 96, 240 + P.Last_Seen_Boat.Yloc
* 80)-STEP(95, 79), Layer
(3), Layer
(L%%
), (0 + 48 * ix%%
, 0 + 40 * iy%%
)-STEP(47, 39)
L%% = 12 + P.Last_Seen_Boat.Land
_PUTIMAGE (288 + P.Last_Seen_Boat.Xloc
* 96, 240 + P.Last_Seen_Boat.Yloc
* 80)-STEP(91, 63), Layer
(5), Layer
(L%%
), (0 + G.Window_Animation
* 46, 800 + (4 * 32))-STEP(45, 31)
X% = P.MapXPos ' / 48
Y% = (65 * 80) - P.MapYpos
sy% = Y% - 48 * 2
sx% = X% - 40 * 2
_PUTIMAGE (16, 63)-STEP(479, 383), Layer
(13), Layer
(1), (P.MapXPos
- 192, Y%
- 120)-STEP(479, 383)
X%% = P.MapXPos / 96 - .49
Y%% = 65 - P.MapYpos / 80 - .49
IF Land
(X%%
, Y%%
).Terrain
>= 46 AND Land
(X%%
, Y%%
).Terrain
<= 58 THEN Result%%
= TRUE
ELSE Result%%
= FALSE
In_Desert = Result%%
c$
= MID$(M$
, i%
+ 1, 1) 'repeated value EL~%%
= ASC(MID$(M$
, i%
+ 2, 1)) - 32 'repeat count UnEnc$ = UnEnc$ + c$
i% = i% + 2
UnEnc$ = UnEnc$ + c$
IF LEN(UnEnc$
) = 4096 THEN 'uncompressed map size is 4k only pass if len is this number! i% = 1
Land
(x%%
, y%%
).Terrain
= ASC(MID$(UnEnc$
, i%
, 1)) - 35 i% = i% + 1
DecodeMaps = TRUE
Window_Header
_PUTIMAGE (0, 51 + i%%
* 80)-STEP(639, 91), Layer
(2), Layer
(1), (300, 600)-STEP(319, 45) IF PX.Army
(i%%
).Unit
THEN Unit_Data i%%
, i%%
IF PX.Army
(i%%
).Unit
THEN Unit_Animation
24, 63 + i%%
* 80, PX.Army
(i%%
).Unit
, RIGHT_FACE
SUB Unit_Animation
(x%
, y%
, Unit%%
, Face%%
) _PUTIMAGE (x%
, y%
)-STEP(87, 63), Layer
(5), Layer
(1), (0 + (48 * G.Window_Animation
), 0 + (Unit%%
- 1) * 32)-STEP(47, 31) _PUTIMAGE (x%
+ 87, y%
)-STEP(-87, 63), Layer
(5), Layer
(1), (0 + (48 * G.Window_Animation
), 0 + (Unit%%
- 1) * 32)-STEP(47, 31)
SUB Unit_Data
(Unit%%
, Slot%%
) y% = 80 * Slot%%
ID%% = PX.Army(Unit%%).Unit
a$ = Units(ID%%).Unit_Name
IF PX.Army
(Unit%%
).Count
> 1 THEN b~% = PX.Army(Unit%%).Count
a$ = b$ + " " + a$
IF Units
(ID%%
).Movement
= 99 THEN M$
= " Fly" ELSE M$
= STR$(Units
(ID%%
).Movement
) KB_Print 112, y% + 80, a$, 0, LEFT
KB_Print
112, y%
+ 96, "SL:" + STR$(Units
(ID%%
).Skill_Level
) + " MV:" + M$
, 0, LEFT
KB_Print 112, y% + 112, "Morale: " + Units_Morale(Unit%%), 0, LEFT
KB_Print 358, y% + 80, "HitPts: " + Units_HP(Unit%%), 0, LEFT
KB_Print 358, y% + 96, "Damage: " + Units_Attack(Unit%%), 0, LEFT
KB_Print 358, y% + 112, "G-Cost: " + Units_Cost(Unit%%), 0, LEFT
IF Units
(PX.Army
(Unit%%
).Unit
).Grouping
= 1 THEN a%%
= 0: b%%
= 0: c%%
= 0: d%%
= -1: e%%
= -1 IF Units
(PX.Army
(Unit%%
).Unit
).Grouping
= 2 THEN a%%
= 0: b%%
= 0: c%%
= 0: d%%
= 0: e%%
= -1 IF Units
(PX.Army
(Unit%%
).Unit
).Grouping
= 3 THEN a%%
= 0: b%%
= 0: c%%
= 1: d%%
= -1: e%%
= -1 IF Units
(PX.Army
(Unit%%
).Unit
).Grouping
= 4 THEN a%%
= 0: b%%
= 0: c%%
= 0: d%%
= 1: e%%
= 0 IF Units
(PX.Army
(Unit%%
).Unit
).Grouping
= 5 THEN a%%
= 0: b%%
= 0: c%%
= 0: d%%
= 0: e%%
= 0 Total%% = 0
Total%% = Total%% + a%%
Total%% = Total%% + b%%
Total%% = Total%% + c%%
Total%% = Total%% + d%%
Total%% = Total%% + e%%
IF Total%%
= 0 THEN Result$
= "Norm" IF Total%%
< 0 THEN Result$
= "Low" IF Total%%
> 0 THEN Result$
= "High" Units_Morale = Result$
Result~% = Units(PX.Army(unit%%).Unit).HitPts * PX.Army(unit%%).Count
Units_HP = Result$
lo~% = Units(PX.Army(unit%%).Unit).AttackLo * PX.Army(unit%%).Count
hi~% = Units(PX.Army(unit%%).Unit).AttackHi * PX.Army(unit%%).Count
Result$ = lo$ + "-" + hi$
Units_Attack = Result$
Result~% = (Units(PX.Army(unit%%).Unit).Cost * PX.Army(unit%%).Count) \ 10
Units_Cost = Result$
SUB Build_Contract_Window
Contract_Animation 0
KB_Print 16, 175, "Name: " + Villains(P.Current_Contract).Villain, 0, LEFT
KB_Print
16, 191, "Alias: " + Villains
(P.Current_Contract
).
Alias, 0, LEFT
KB_Print 16, 207, "Reward: " + Contract_Reward(Villains(P.Current_Contract).Bounty), 0, LEFT
KB_Print 16, 223, "Last Seen: " + Lands(Villains(P.Current_Contract).LastSeen), 0, LEFT
KB_Print 16, 239, "Castle: " + Castles(Villains(P.Current_Contract).Is_Known).The_Name, 0, LEFT
KB_Print 16, 255, "Distinguishing Features: ", 0, LEFT
y% = 272 'allows for different lenths of discriptions cause the routine changes the value
KB_Print_Wrap 48, y%, Villains(P.Current_Contract).Description, 432
KB_Print 16, y%, "Crimes: ", 0, LEFT
KB_Print_Wrap 48, y%, " " + Villains(P.Current_Contract).Crimes, 432
KB_Print 79, 239, "You have no contract.", 0, LEFT
Contract_Animation 0
Run_Animations
Result$
= LEFT$(temp$
, LEN(temp$
) - 3) + "," + RIGHT$(temp$
, 3) + " Gold" Contract_Reward = Result$
KB_Print 90, 400, "X= Position Y=", 0, LEFT
X%% = (P.MapXPos / 96) - 3
Y%% = P.MapYpos / 80
KB_Print 122, 400, X$, 0, LEFT
KB_Print 378, 400, Y$, 0, RIGHT
KB_Print 240, 96, Lands(P.Current_Land), 0, CENTER
Draw_MiniMap_Terrain
Draw_Minimap_Objects
Draw_Minimap_Player
Run_Animations
LINE (122, 128)-STEP(255, 255), _RGB32(0, 32, 128), BF
'oceanic back ground CASE 1 TO 4, 8, 9, 19, 20, 21, 27, 30, 36 'shore LINE (122 + x%%
* 4, 128 + y%%
* 4)-STEP(3, 3), _RGB32(32, 96, 192), BF
LINE (122 + x%%
* 4, 128 + y%%
* 4)-STEP(3, 3), _RGB32(32, 160, 0), BF
CASE 5, 6, 7, 11 TO 18, 28, 29 'mountain LINE (122 + x%%
* 4, 128 + y%%
* 4)-STEP(3, 3), _RGB32(128, 64, 0), BF
LINE (122 + x%%
* 4, 128 + y%%
* 4)-STEP(3, 3), _RGB32(224, 224, 224), BF
CASE 25, 26, 34, 35, 37 TO 45 'forest LINE (122 + x%%
* 4, 128 + y%%
* 4)-STEP(3, 3), _RGB32(224, 224, 0), BF
'sign posts, towns, treasures, armys, dwellings, artifacts
test%%
= Land
(x%%
, y%%
).IsTreasure
OR Land
(x%%
, y%%
).IsArmy
OR Land
(x%%
, y%%
).IsArtifact
OR Land
(x%%
, y%%
).IsBand
test%%
= test%%
OR Land
(x%%
, y%%
).IsTown
OR Land
(x%%
, y%%
).IsSign
OR Land
(x%%
, y%%
).IsBlock
X%% = (P.MapXPos / 96) - 3 - .49
Y%% = 63 - P.MapYpos / 80 - .49
f~%% = G.Window_Animation * 48
LINE (122 + X%%
* 4, 128 + Y%%
* 4)-STEP(3, 3), _RGB32(255 - f~%%
, 255 - f~%%
, 255 - f~%%
), BF
AX! = P.MapXPos / 96 - 3
AY! = 63 - P.MapYpos / 80
_PUTIMAGE (16 + i%%
* 96, 271)-STEP(95, 175), Layer
(2), Layer
(1), (256, 416)-STEP(47, 87)
Window_Header
KB_Print 210, 79, Names(P.Class) + " the " + Title(P.Class, P.Promotion), 0, LEFT
KB_Print 210, 111, "Leadership", 0, LEFT
KB_Print 210, 127, "Commission/Week", 0, LEFT
KB_Print 210, 143, "Gold", 0, LEFT
KB_Print 210, 159, "Spell Power", 0, LEFT
KB_Print 210, 175, "Max # of Spells ", 0, LEFT
KB_Print 210, 191, "Villians caught", 0, LEFT
KB_Print 210, 207, "Artifacts found", 0, LEFT
KB_Print 210, 223, "Castles garrisoned", 0, LEFT
KB_Print 210, 239, "Followers killed", 0, LEFT
KB_Print 210, 255, "Current score", 0, LEFT
KB_Print
600, 111, STR$(P.Leadership
), 0, RIGHT
KB_Print
600, 127, STR$(P.Commission
), 0, RIGHT
KB_Print
600, 143, STR$(P.Gold
), 0, RIGHT
KB_Print
600, 159, STR$(P.SpellPower
), 0, RIGHT
KB_Print
600, 175, STR$(P.MaxSpells
), 0, RIGHT
KB_Print
600, 191, STR$(P.VilliansCaught
), 0, RIGHT
KB_Print
600, 207, STR$(P.Artifacts
), 0, RIGHT
KB_Print
600, 223, STR$(P.Castles
), 0, RIGHT
KB_Print
600, 239, STR$(P.Deaths
), 0, RIGHT
KB_Print
600, 255, STR$(P.Score
), 0, RIGHT
Window_Header
Draw_Coins
Cover_Puzzle
Run_Animations
Gp~% = P.Gold \ 10000
Sp%%
= (P.Gold \
1000) MOD 10 Cp%%
= (P.Gold \
100) MOD 10 IF Gp~%
> 10 THEN Gp~%
= 10: Sp%%
= 10: Cp%%
= 10 'over 100k gold all stacks full!
x%% = x%% + 16
IF x%%
= 80 THEN x%%
= 0: y%%
= y%%
+ 12
_PUTIMAGE (524, 223)-STEP(87, 63), Layer
(4), Layer
(1), (240 + (44 * G.Window_Animation
), 576)-STEP(43, 31) 'magic power frames
_PUTIMAGE (524, 143)-STEP(87, 63), Layer
(4), Layer
(1), (240 + (44 * G.Window_Animation
), 544)-STEP(43, 31) 'magic power frames
SUB Contract_Animation
(Loca%%
) IF Loca%%
= MAIN
THEN Xo%
= 524: Yo%
= 63 ELSE Xo%
= 211: Yo%
= 91 y% = 32 * (P.Current_Contract - 1)
_PUTIMAGE (Xo%
, Yo%
)-STEP(87, 63), Layer
(4), Layer
(1), (240 + (44 * G.Window_Animation
), 0 + y%
)-STEP(43, 31) 'magic power frames
IF Last_Cast
= 0 AND PX.Spells
(i%%
) <> 0 THEN Last_Cast
= i%%
ASPC%% = ASPC%% + PX.Spells(i%%)
CSPC%% = CSPC%% + PX.Spells(7 + i%%)
KB_Print 90, 98, "Adventuring Spells", 0, LEFT
KB_Print 122, 276, "Combat Spells", 0, LEFT
KB_Print
154, 114 + i%%
* 16, LTRIM$(STR$(PX.Spells
(i%%
))), 0, RIGHT
KB_Print 170, 114 + i%% * 16, Spells(i%%).Spell_Name, 0, LEFT
KB_Print
154, 290 + i%%
* 16, LTRIM$(STR$(PX.Spells
(7 + i%%
))), 0, RIGHT
KB_Print 170, 290 + i%% * 16, Spells(7 + i%%).Spell_Name, 0, LEFT
KB_Print 2, 31, "You have no Combat Spell to cast!", 0, LEFT
Spell_Selection
KB_Print 2, 31, "You have no Adventuring Spell to cast!", 0, LEFT
Spell_Selection
SUB Display_Selection_Arrow
(X%
, Y%
) _PUTIMAGE (X%
, Y%
)-STEP(23, 15), Layer
(2), Layer
(1), (388 + G.Window_Animation
* 12, 216)-STEP(11, 7)
IF PX.Spells
(Last_Combat
) = 0 THEN Last_Combat
= 0 IF PX.Spells
(Last_Adventure
) = 0 THEN Last_Adventure
= 0
IF Last_Combat
= 0 AND PX.Spells
(7 + i%%
) <> 0 THEN Last_Combat
= 7 + i%%
IF Last_Adventure
= 0 AND PX.Spells
(i%%
) <> 0 THEN Last_Adventure
= i%%
_PUTIMAGE , Layer
(1), Layer
(9) 'save screen so we don't have to constantly recreate it.
IF G.In_Combat
THEN Selection%%
= Last_Combat
ELSE Selection%%
= Last_Adventure
good%% = FALSE
Selection%% = Selection%% - 1
'find next available spell
IF G.In_Combat
AND Selection%%
= 7 THEN Selection%%
= 14 IF PX.Spells
(Selection%%
) THEN good%%
= TRUE
ELSE Selection%%
= Selection%%
- 1 good%% = FALSE
Selection%% = Selection%% + 1
'find next available spell
IF G.In_Combat
AND Selection%%
= 15 THEN Selection%%
= 8 IF PX.Spells
(Selection%%
) THEN good%%
= TRUE
ELSE Selection%%
= Selection%%
+ 1 IF G.In_Combat
THEN Last_Combat
= Selection%%
ELSE Last_Adventure
= Selection%%
exitflag%% = TRUE
PX.Spells(Selection%%) = PX.Spells(Selection%%) - 1
Cast_Spells Selection%%
exitflag%% = TRUE
exitflag%% = TRUE
Display_Selection_Arrow 112, 288 + (16 * (Selection%% - 7)) 'in combat
Display_Selection_Arrow 112, 114 + (16 * Selection%%) 'adventuring
Run_Animations
SUB Cast_Spells
(Spell%%
) G.TimeStop = G.TimeStop + (10 * P.SpellPower)
Villains(P.Current_Contract).Is_Known = Villains(P.Current_Contract).Castle
v%%
= v%%
+ ABS(Castles
(i%%
).Visited
) 'has player been to any castles? IF v%%
= 0 THEN G.HDR_Text
= " You have not been to any castles!": Window_Header
IF v%%
THEN Build_Gate_Window CASTLE
v%%
= v%%
+ ABS(Towns
(i%%
).Visited
) 'has player been to any towns? IF v%%
= 0 THEN G.HDR_Text
= " You have not been to any towns!": Window_Header
IF v%%
THEN Build_Gate_Window TOWN
P.Control_Bonus = P.Control_Bonus + 100 * P.SpellPower
IF P.Control_Bonus
+ P.Leadership
> 65535 THEN P.Control_Bonus
= 65535 - P.Leadership
SUB Build_Gate_Window
(Spell%%
) Build_Main_Window
IF Spell%%
= TOWN
THEN a$
= "Towns" ELSE a$
= "Castles" KB_Print 48, 96, a$ + " you have been to", 0, LEFT
KB_Print 80, 384, "Revisit which " + a$, 0, LEFT
IF Spell%%
= TOWN
AND Towns
(i%%
).Visited
THEN KB_Print 48, 128 + i%% * 16, Towns(i%%).The_Name, 0, LEFT
KB_Print 272, 128 + i%% * 16, Towns(13 + i%%).The_Name, 0, LEFT
IF Spell%%
= CASTLE
AND Castles
(i%%
).Visited
THEN KB_Print 48, 128 + i%% * 16, Castles(i%%).The_Name, 0, LEFT
KB_Print 272, 128 + i%% * 16, Castles(13 + i%%).The_Name, 0, LEFT
_PUTIMAGE , Layer
(1), Layer
(9) 'save screen so we don't have to constantly recreate it.
IF G.In_Combat
THEN Selection%%
= Last_Combat
ELSE Selection%%
= Last_Adventure
good%% = FALSE
Selection%% = Selection%% - 1
'find next available town or castle
IF Selection%%
< 1 THEN Selection%%
= 26 IF Towns
(Selection%%
).Visited
THEN good%%
= TRUE
ELSE Selection%%
= Selection%%
+ 1 good%% = FALSE
Selection%% = Selection%% + 1
'find next available town or castle
IF Selection%%
> 26 THEN Selection%%
= 1 IF Towns
(Selection%%
).Visited
THEN good%%
= TRUE
ELSE Selection%%
= Selection%%
+ 1 exitflag%% = TRUE
exitflag%% = TRUE
exitflag%% = TRUE
IF Selection%%
< 13 THEN x%%
= 16: y%%
= Selection%%
ELSE x%%
= 250: y%%
= Selection%%
- 13 Display_Selection_Arrow x%%, 128 + (16 * y%%) 'adventuring
X%% = G.Scepter_X ' / 48
Y%% = G.Scepter_Y ' / 40
Land%% = 13 + G.Scepter_Land
sy%% = Y%% - 2
sx%% = X%% - 2
_PUTIMAGE (16, 64)-STEP(479, 383), Layer
(13), Layer
(1), (288 + 96 * sx%%
, 224 + 80 * sy%%
)-STEP(479, 383)
xo% = 36: yo% = 95
y% = 32 * (Puzzle(X%%, Y%%) - 17)
IF NOT Villains
(Puzzle
(X%%
, Y%%
) - 17).Caught
THEN _PUTIMAGE (xo%
+ X%%
* 88, yo%
+ Y%%
* 64)-STEP(87, 63), Layer
(4), Layer
(1), (240 + (44 * G.Window_Animation
), 0 + y%
)-STEP(43, 31) 'magic power frames IF Puzzle
(X%%
, Y%%
) >= 4 THEN y%
= 32 * 20: XA%%
= Puzzle
(X%%
, Y%%
) - 4 ELSE y%
= 32 * 19: XA%%
= Puzzle
(X%%
, Y%%
) IF (P.Artifacts_Aquired
AND 2 ^ Puzzle
(X%%
, Y%%
)) = FALSE
THEN _PUTIMAGE (xo%
+ X%%
* 88, yo%
+ Y%%
* 64)-STEP(87, 63), Layer
(4), Layer
(1), (240 + (44 * XA%%
), 0 + y%
)-STEP(43, 31) 'magic power frames Run_Animations
G.In_Menu = TRUE
'304,472 208,128
Selection%% = Last_Choice
IF Selection%%
= 0 THEN Selection%%
= 1
Selection%% = Selection%% - 1
IF Selection%%
<= 0 THEN Selection%%
= 12 'correction for the gap in choices IF Selection%%
= 11 THEN Selection%%
= 10 'correction for the gap in choices Selection%% = Selection%% + 1
IF Selection%%
>= 13 THEN Selection%%
= 1 Last_Choice = Selection%%
RunIt%% = TRUE
exitflag%% = TRUE
exitflag%% = TRUE
exitflag%% = TRUE
G.QuitGame = TRUE
IF Selection%%
= 11 THEN Selection%%
= 12 'correction for the gap in choices Display_Selection_Arrow 69, 140 + (16 * Selection%%) 'adventuring
Run_Animations
IF RunIt%%
THEN Run_Menu_Choice Selection%%
G.In_Menu = FALSE
SUB Run_Menu_Choice
(Opt%%
) Build_Main_Window
Build_Map_View2
Draw_Player
Build_Army_Window
Build_Stat_Window
Build_MiniMap_Window
Build_Spell_Window
CASE 5 'view contract info Build_Contract_Window
CASE 6 'wait till end of week IF G.TimeStop
THEN G.TimeStop
= 0 IF drop%%
= 0 OR drop%%
= 5 THEN G.Days
= G.Days
- 5 ELSE G.Days
= G.Days
- (G.Days
MOD 5) Build_EndOfWeek_Window
Build_Puzzle_Window
Build_Search_Window
Build_Dismiss_Window
Build_Control_Window
G.In_Menu = TRUE
KB_Print 80, 316, "Dismiss which army?", 0, LEFT
Selection%% = 0
Selection%% = Selection%% - 1
IF Selection%%
<= -1 THEN Selection%%
= 0 Selection%% = Selection%% + 1
IF Selection%%
>= 4 THEN Selection%%
= Selection%%
- 1 IF PX.Army
(Selection%%
).Unit
= 0 THEN Selection%%
= Selection%%
- 1 IF Selection%%
= 0 THEN 'check and make sure player has more than one army IF PX.Army
(1).Unit
= 0 THEN 'player is trying to dismiss last army KB_Print 2, 31, " You man not dismiss your last army!", 0, LEFT
Dismiss_Army Selection%%
ELSE 'if player isn't dismissing army 0 then they have more than one. Dismiss_Army Selection%%
Selection%% = Selection%% - 1 'bump the arrow up one space
exitflag%% = TRUE
exitflag%% = TRUE
IF PX.Army
(i%%
).Unit
THEN KB_Print
272, 348 + i%%
* 16, Units
(PX.Army
(i%%
).Unit
).Unit_Name
, 0, CENTER
Display_Selection_Arrow 164, 346 + (16 * Selection%%)
Run_Animations
SUB Dismiss_Army
(Unit%%
) SWAP PX.Army
(i%%
), PX.Army
(i%%
+ 1) PX.Army(i%%).Unit = 0
PX.Army(i%%).Count = 0
KB_Print 16, 316, "Search...", 0, LEFT
a$ = "It will take"
IF P.VilliansCaught
= 17 THEN a$
= a$
+ " 1 " ELSE a$
= a$
+ " 10 " a$ = a$ + "day to do a"
KB_Print 24, 348, a$, 0, LEFT
KB_Print 16, 364, "search of this area, search?", 0, LEFT
KB_Print 224, 396, "No", 0, LEFT
KB_Print 224, 412, "Yes", 0, LEFT
Selection%% = 0
Selection%% = 0
Selection%% = 1
exitflag%% = TRUE
IF Selection%%
= 1 THEN search_area
exitflag%% = TRUE
exitflag%% = TRUE
G.QuitGame = TRUE
Display_Selection_Arrow 212, 394 + (16 * Selection%%)
Run_Animations
X%% = P.MapXPos / 48
Y%% = 63 - P.MapYpos / 40
IF Land
(X%%
, Y%%
).IsScepter
THEN G.WinGame = TRUE
G.TimeStop = 0
G.Days = G.Days - 1
G.TimeStop = 0
G.Days = G.Days - 5
Build_Main_Window
Build_Map_View
Draw_Player
Build_EndOfWeek_Window
Draw_Coins
G.Days = G.Days - 5
Build_Main_Window
Build_Map_View
Draw_Player
Build_EndOfWeek_Window
py% = 0: px%% = 4
_PUTIMAGE (0 + x%%
* 96, 63 + y%%
* 80)-STEP(95, 79), Layer
(3), Layer
(1), (0 + 48 * 10, 0 + 40 * 0)-STEP(47, 39) x%% = 0: y%% = 0: Facing%% = RIGHT_FACE
Unit_Animation 28 + x%% * 98, 63 + y%% * 80, i%%, Facing%%
x%% = x%% + 1
IF x%%
= 4 THEN x%%
= 5: Facing%%
= LEFT_FACE
'skip this space and flip facing IF x%%
= 6 THEN x%%
= 0: y%%
= y%%
+ 1: Facing%%
= RIGHT_FACE
_PUTIMAGE (28 + px%%
* 98, 630 - py%
)-STEP(87, 63), Layer
(5), Layer
(1), (0 + G.Window_Animation
* 44, 800 + 2 * 32)-STEP(43, 31)
Window_Header
py% = py% + 3
IF py%
= 639 THEN exitflag%%
= TRUE
Display_Victory
Window_Header
KB_Print 304, 112, Names(P.Class) + "!", 0, LEFT
KB_Print
592, 400, STR$(Player_Score
), 0, RIGHT
Selection%% = 0
Selection%% = Selection%% - 1
IF Selection%%
= -1 THEN Selection%%
= 0 Selection%% = Selection%% + 1
IF Selection%%
= 3 THEN Selection%%
= 2 Run_Control_Option Selection%%
exitflag%% = TRUE
CASE Control.C_Button
'used for decreasing combat speed Run_Control_Option Selection%% + 10
exitflag%% = TRUE
G.QuitGame = TRUE
Display_Selection_Arrow 128, 238 + (16 * Selection%%)
KB_Print 240, 239, BGMV$, 0, LEFT
KB_Print 240, 255, SFXV$, 0, LEFT
KB_Print
336, 271, STR$(G.Combat_speed
), 0, LEFT
Run_Animations
SUB Run_Control_Option
(Opt%%
) CASE 0 'Back ground music IF G.BGM
= TRUE
THEN G.BGM
= FALSE
ELSE G.BGM
= TRUE
IF G.SFX
= TRUE
THEN G.SFX
= FALSE
ELSE G.SFX
= TRUE
CASE 2 'Combat speed faster G.Combat_speed = G.Combat_speed - 1
IF G.Combat_speed
= -1 THEN G.Combat_speed
= 9 CASE 12 'combat speed slower G.Combat_speed = G.Combat_speed + 1
IF G.Combat_speed
= 10 THEN G.Combat_speed
= 0 Build_Extra_Options_Window
Build_Main_Window
Build_Map_View
Draw_Player
SUB Build_Extra_Options_Window
KB_Print 232, 96, "Xtra Options", 0, CENTER
KB_Print 232, 128, "Music Volume: ", 0, CENTER
KB_Print 232, 144, "Sound Volume: ", 0, CENTER
KB_Print 120, 176, "Up : UP Arw", 0, LEFT
KB_Print 120, 192, "Down : DN Arw", 0, LEFT
KB_Print 120, 208, "Left : LT Arw", 0, LEFT
KB_Print 120, 224, "Right : RT Arw", 0, LEFT
KB_Print 120, 240, "A Button: A", 0, LEFT
KB_Print 120, 256, "B Button: S", 0, LEFT
KB_Print 120, 272, "C Button: D", 0, LEFT
KB_Print 120, 288, "Start : Enter", 0, LEFT
Selection%% = 0
Selection%% = Selection%% - 1
IF Selection%%
= -1 THEN Selection%%
= 0 Selection%% = Selection%% + 1
IF Selection%%
= 2 THEN Selection%%
= 1 Run_Extra_Option Selection%%
exitflag%% = TRUE
CASE Control.C_Button
'used for decreasing Run_Extra_Option Selection%% + 10
exitflag%% = TRUE
G.QuitGame = TRUE
Display_Selection_Arrow 108, 125 + (16 * Selection%%)
KB_Print
368, 129, STR$(G.BGM_VOL
), 0, RIGHT
KB_Print
368, 145, STR$(G.SFX_VOL
), 0, RIGHT
Run_Animations
SUB Run_Extra_Option
(Opt%%
) CASE 0 'Back ground music vol- IF G.BGM_VOL
> 0 THEN G.BGM_VOL
= G.BGM_VOL
- 2 IF G.SFX_VOL
> 0 THEN G.SFX_VOL
= G.SFX_VOL
- 2 CASE 10 'Back ground music vol+ IF G.BGM_VOL
< 100 THEN G.BGM_VOL
= G.BGM_VOL
+ 2 IF G.SFX_VOL
< 100 THEN G.SFX_VOL
= G.SFX_VOL
+ 2
SUB Build_EndOfWeek_Window
KB_Print 16, 316, "Week #" + EOW_Week, 0, LEFT
KB_Print 16, 348, "Astrologers proclaim:", 0, LEFT
Dwelling$ = EOW_Dwelling
KB_Print 16, 364, "Week of the " + Dwelling$, 0, LEFT
KB_Print 16, 396, "All " + Dwelling$ + " dwellings are", 0, LEFT
KB_Print 16, 412, "repopulated.", 0, LEFT
CASE Control.A_Button
, Control.B_Button
, Control.C_Button
exitflag%% = TRUE
Run_Animations
exitflag%% = FALSE
Build_Budget_window
Result$
= STR$((900 - G.Days
) / 5) Result$
= STR$((600 - G.Days
) / 5) Result$
= STR$((400 - G.Days
) / 5) Result$
= STR$((200 - G.Days
) / 5) EOW_Week = Result$
Result$ = Units(1).Unit_Name
Repopulate 1
Change_Ghosts
Result$ = Units(Un%%).Unit_Name
Repopulate Un%%
EOW_Dwelling
= RTRIM$(Result$
)
KB_Print 16, 316, "Week #" + EOW_Week, 0, LEFT
KB_Print 464, 316, "Budget", 0, RIGHT
KB_Print 16, 348, "On Hand", 0, LEFT
KB_Print 16, 364, "Payment", 0, LEFT
KB_Print 16, 380, "Boat", 0, LEFT
KB_Print 16, 396, "Army", 0, LEFT
KB_Print 16, 412, "Balance", 0, LEFT
KB_Print 224, 348, Special_K_Value(P.Gold), 0, RIGHT
KB_Print 224, 364, Special_K_Value(P.Commission), 0, RIGHT
b% = 0
KB_Print 224, 396, Special_K_Value(Army_Cost), 0, RIGHT
P.Gold = P.Gold + (P.Commission + (P.Castles * 250) - Army_Cost - b%)
KB_Print 224, 412, Special_K_Value(P.Gold), 0, RIGHT
KB_Print
240, 348 + i%%
* 16, RTRIM$(Units
(PX.Army
(i%%
).Unit
).Unit_Name
), 0, LEFT
KB_Print 464, 348 + i%% * 16, Special_K_Value(Units(PX.Army(i%%).Unit).Cost * PX.Army(i%%).Count \ 2), 0, RIGHT
CASE Control.A_Button
, Control.B_Button
, Control.C_Button
exitflag%% = TRUE
Run_Animations
exitflag%% = FALSE
Result~% = Result~% + Units(PX.Army(i%%).Unit).Cost * PX.Army(i%%).Count
Result~% = Result~% \ 2
Army_Cost = Result~%
IF Land
(x%%
, y%%
).IsDwelling
THEN IF Land
(x%%
, y%%
).Units
= Units%%
THEN IF Land
(x%%
, y%%
).Population
>= Land
(x%%
, y%%
).Start_Population
THEN 'if no units missing add a few Land
(x%%
, y%%
).Population
= Land
(x%%
, y%%
).Population
+ INT(RND * (Land
(x%%
, y%%
).Start_Population
/ 10)) + 1 ELSE 'if player had hired units then refill Land
(x%%
, y%%
).Population
= Land
(x%%
, y%%
).Start_Population
+ INT(RND * (Land
(x%%
, y%%
).Start_Population
/ 10)) + 1
IF Castles
(i%%
).Owner
= PLAYER
THEN 'only if player controls castle IF CX.Army
(j%%
).Unit
= 14 THEN CX.Army
(j%%
).Unit
= 1 'change ghosts to peasants
SUB Swap_Map
(ID%%
, Action%%
) IF Action%%
= SAVE
THEN Maps
(X%%
, Y%%
, ID%%
).Terrain
= Land
(X%%
, Y%%
).Terrain
IF Action%%
= LOAD
THEN Land
(X%%
, Y%%
) = Maps
(X%%
, Y%%
, ID%%
)
X%% = P.MapXPos / 48
Y%% = 63 - P.MapYpos / 40
sy%% = Y%% - 2
sx%% = X%% - 2
_PUTIMAGE (16, 63)-STEP(479, 383), Layer
(13), Layer
(1), (288 + 96 * sx%%
, 224 + 80 * sy%%
)-STEP(479, 383)
ix%%
= Land
(x%%
, y%%
).Terrain
MOD 13 IF Land
(x%%
, y%%
).Terrain
> 12 THEN iy%%
= Land
(x%%
, y%%
).Terrain \
13 ELSE iy%%
= 0 _PUTIMAGE (288 + x%%
* 96, 240 + y%%
* 80)-STEP(95, 79), Layer
(3), Layer
(ID%%
), (0 + 48 * ix%%
, 0 + 40 * iy%%
)-STEP(47, 39) Add_Map_Extras x%%, y%%, ID%%
IF P.Facing
= RIGHT_FACE
THEN YO%%
= 0 IF P.Facing
= LEFT_FACE
THEN YO%%
= 2 IF P.Moving
THEN YO%%
= YO%%
+ 1 IF P.Facing
= RIGHT_FACE
THEN YO%%
= 4 IF P.Facing
= LEFT_FACE
THEN YO%%
= 6 IF P.Moving
THEN YO%%
= YO%%
+ 1 IF P.Facing
= RIGHT_FACE
THEN YO%%
= 8 IF P.Facing
= LEFT_FACE
THEN YO%%
= 9
_PUTIMAGE (166, 203)-STEP(91, 63), Layer
(5), Layer
(1), (0 + G.Window_Animation
* 46, 800 + (YO%%
* 32))-STEP(45, 31)
'----------------Place towns-----------------------
'---------Make sure all spells are available-----
Towns(8).Spell = 1 'this town always has bridge
good%% = FALSE
IF Towns
(t%%
).Spell
= 0 THEN good%%
= TRUE
Towns(t%%).Spell = i%%
'------------------------------------------------
Maps(Towns(i%%).MapX, Towns(i%%).MapY, Towns(i%%).Land).IsTown = i%%
IF Towns
(i%%
).Spell
= 0 THEN Towns
(i%%
).Spell
= INT(RND * 14) + 1 'fill remaining towns with random spells '--------------------------------------------------
'---------------Place SignPosts------------------
Maps(Sign(i%%).MapXLoc, Sign(i%%).MapYLoc, Sign(i%%).Land).IsSign = i%%
'------------------------------------------------
'--------------Set Path blocks-------------------
Maps(7, 63 - 8, 1).IsBlock = TRUE
Maps(17, 63 - 7, 1).IsBlock = TRUE
Maps(17, 63 - 6, 1).IsBlock = TRUE
'------------------------------------------------
SUB Add_Map_Extras
(X%%
, Y%%
, ID%%
) IF Land
(X%%
, Y%%
).IsTown
THEN _PUTIMAGE (288 + X%%
* 96, 240 + Y%%
* 80)-STEP(95, 79), Layer
(3), Layer
(ID%%
), (480, 160)-STEP(47, 39) IF Land
(X%%
, Y%%
).IsSign
THEN _PUTIMAGE (288 + X%%
* 96, 240 + Y%%
* 80)-STEP(95, 79), Layer
(3), Layer
(ID%%
), (432, 160)-STEP(47, 39) IF Land
(X%%
, Y%%
).IsBridge
THEN _PUTIMAGE (288 + X%%
* 96, 240 + Y%%
* 80)-STEP(95, 79), Layer
(3), Layer
(ID%%
), (336 + Land
(X%%
, Y%%
).IsBridge
* 48, 160)-STEP(47, 39)
SUB Hide_Scepter
(Land%%
) good%% = FALSE
IF Maps
(x%%
, y%%
, Land%%
).Terrain
= 10 THEN good%%
= TRUE
G.Scepter_X = x%%
G.Scepter_Y = y%%
Maps(x%%, y%%, Land%%).IsScepter = TRUE
SUB KB_Print
(x%
, y%
, Txt$
, Null%%
, Aline%%
) Xo% = 0: Yo% = 672 'sheet offsets
IF Aline%%
= RIGHT
THEN Ax%
= LEN(Txt$
) * 16: x%
= x%
- Ax%
IF Aline%%
= CENTER
THEN Ax%
= LEN(Txt$
) * 8: x%
= x%
- Ax%
So%
= (ASC(MID$(Txt$
, i~%%
, 1)) - 31) * 8 _PUTIMAGE (x%
+ (i~%%
* 16), y%
)-STEP(15, 15), Layer
(2), Layer
(1), (Xo%
+ So%
, Yo%
)-STEP(7, 7)
SUB KB_Print_Wrap
(X%
, Y%
, txt$
, MaxX%
) 'max number of characters with Wrap max of MaxX%%
Finished%% = FALSE
Mx%% = SMx%% 'restore Mx to Starting Mx(Mx= Max X length in pixels)
' text is nice enough to land on a space
j%% = j%% + 1
Lines
(j%%
) = LEFT$(txt$
, Mx%%
) txt$
= MID$(txt$
, Mx%%
+ 1) ' back track to find first space
Found%% = FALSE
j%% = j%% + 1 'set to next line
Lines
(j%%
) = MID$(txt$
, 1, Mx%%
) txt$
= MID$(txt$
, Mx%%
+ 1) 'reduce string length
'print wraped lines
KB_Print X%, Y%, Lines(I%%), 0, LEFT
Y% = Y% + 16
Result$ = Result$ + "K"
Special_K_Value = Result$
_PUTIMAGE (16, 30)-STEP(608, 18), Layer
(8), Layer
(1), (16, 30)-STEP(608, 18) 'clean header area KB_Print 2, 31, G.HDR_Text, 0, LEFT
KB_Print 398, 31, "TimeStop:", 0, LEFT
KB_Print
606, 31, STR$(G.TimeStop
), 0, RIGHT
KB_Print 398, 31, "Days Left:", 0, LEFT
KB_Print
606, 31, STR$(G.Days
), 0, RIGHT
STATIC CurrentCount~%%
, AnimationCount~%%
AnimationCount~%% = AnimationCount~%% + 1
IF (NOT G.In_Menu
) AND (NOT G.In_Combat
) THEN 'time pauses when in a menu window or combat CurrentCount~%% = CurrentCount~%% + 1
IF CurrentCount~%%
> 3 THEN G.TimeStop
= G.TimeStop
- 1: CurrentCount~%%
= 0 IF CurrentCount~%%
> 127 THEN G.Days
= G.Days
- 1: CurrentCount~%%
= 0
IF AnimationCount~%%
> 0 THEN G.Window_Animation
= G.Window_Animation
+ 1: AnimationCount~%%
= 0 IF G.Window_Animation
> 3 THEN G.Window_Animation
= 0
SUB Add_Player_Advancement
P.Leadership = P.Leadership + Stats(P.Class, P.Promotion).Leadership
P.Commission = P.Commission + Stats(P.Class, P.Promotion).Commission
P.SpellPower = P.SpellPower + Stats(P.Class, P.Promotion).SpellPower
P.MaxSpells = P.MaxSpells + Stats(P.Class, P.Promotion).MaxSpells
P.Gold = P.Gold + Stats(P.Class, P.Promotion).Gold 'just for starting gold at moment
LINE (0, 16)-(639, 448), BackGround_Color
(G.Level
), BF
'g.level=1,2,4,8 so half final results to make .5,1,2,4(easy, normal, hard, impossible)
Result~% = P.Artifacts * (250 * G.Level) / 2
Result~% = Result~% + P.Castles * (100 * G.Level) / 2
Result~% = Result~% + P.VilliansCaught * (500 * G.Level) / 2
Result~% = Result~% - (P.Deaths * G.Level) / 2
Player_Score = Result~%
Magic_Animation
Seige_Animation
Contract_Animation MAIN
IF P.Has_Boat
AND P.Travel_Mode
<> BOAT
THEN Place_Boat
'-----------------Data loader--------------------
Sign(i%%).MapYLoc = 63 - Sign(i%%).MapYLoc 'correct Y value for bottom start
Map01% = DecodeMaps(Map1$)
Swap_Map CONTINENTIA, SAVE
Map02% = DecodeMaps(Map1$)
Swap_Map FORESTRIA, SAVE
Map03% = DecodeMaps(Map1$)
Swap_Map ARCHIPELIA, SAVE
Map04% = DecodeMaps(Map1$)
Swap_Map SAHARIA, SAVE
READ Stats
(i%%
, j%%
).Leadership
READ Stats
(i%%
, j%%
).MaxSpells
READ Stats
(i%%
, j%%
).SpellPower
READ Stats
(i%%
, j%%
).Commission
READ Stats
(i%%
, j%%
).Gold
READ Units
(i%%
).Unit_Name
READ Units
(i%%
).Skill_Level
READ Villains
(i%%
).Villain
READ Villains
(i%%
).Bounty
READ Villains
(i%%
).LastSeen
READ Villains
(i%%
).Description
READ Villains
(i%%
).Crimes
Villains(i%%).Is_Known = FALSE
READ Castles
(i%%
).The_Name
Castles(i%%).MapY = 63 - Castles(i%%).MapY 'correct Y value for bottom start
Castles(0).The_Name = "Unknown"
Towns(i%%).MapY = 63 - Towns(i%%).MapY 'correct Y value for bottom start
IF i%%
= 8 THEN Towns
(i%%
).BoatX
= 11: Towns
(i%%
).BoatY
= 63 - 3 READ BackGround_Color
(i%%
) READ Spells
(i%%
).Spell_Name
'------------------------------------------------
PRINT #1, Maps
(x%%
, y%%
, 1).Terrain;
'------------------Layer loader------------------
GFX_Loader
Layer(2) = LoadGFX&(GFX_FOffset&(1), GFX_Size(1))
Layer(3) = LoadGFX&(GFX_FOffset&(2), GFX_Size(2))
Layer(4) = LoadGFX&(GFX_FOffset&(3), GFX_Size(3))
Layer(5) = LoadGFX&(GFX_FOffset&(4), GFX_Size(4))
Layer(6) = LoadGFX&(GFX_FOffset&(5), GFX_Size(5))
'Layer(2) = _LOADIMAGE("Windows.bmp", 32)
'Layer(3) = _LOADIMAGE("MapTiles.bmp", 32)
'Layer(4) = _LOADIMAGE("BackGrounds.bmp", 32)
'Layer(5) = _LOADIMAGE("Units.bmp", 32)
'Layer(6) = _LOADIMAGE("StartScreens.bmp", 32)
Layer
(8) = _NEWIMAGE(640, 480, 32) 'background color layer Layer
(9) = _NEWIMAGE(640, 480, 32) 'temp layer Layer
(10) = _NEWIMAGE(640, 448, 32) 'victory march layer Layer
(11) = _NEWIMAGE(640, 480, 32) 'temp layer 2(in town for contract window) Layer
(13) = _NEWIMAGE(6720, 5600, 32) 'Continentia 'Layer(14) = _NEWIMAGE(6720, 5600, 32) 'Forestria
'Layer(15) = _NEWIMAGE(6720, 5600, 32) 'Archipelia
'Layer(16) = _NEWIMAGE(6720, 5600, 32) 'Saharia
'------------------------------------------------
'-------------layer loader-----------------------
GET #1, , c~%%
'number of records GET #1, , GFX_FOffset&
(w%
) GFX_FOffset&(w%) = GFX_FOffset&(w%) + 1
'------------------------------------------------