'$include: 'saveimage.bi'
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? on horse, boat, or wing 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)
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_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? Facing
AS _BYTE ' Last way player was moving Left or Right 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)
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.
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?
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
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
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 #Ω"
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
'------------------Layer loader------------------
Layer
(6) = _NEWIMAGE(500, 400, 32) 'map predrawLayer
(8) = _NEWIMAGE(640, 480, 32) 'background color layerLayer
(9) = _NEWIMAGE(640, 480, 32) 'temp layerLayer
(13) = _NEWIMAGE(6720, 5600, 32) 'ContinentiaLayer
(14) = _NEWIMAGE(6720, 5600, 32) 'ForestriaLayer
(15) = _NEWIMAGE(6720, 5600, 32) 'ArchipeliaLayer
(16) = _NEWIMAGE(6720, 5600, 32) 'Saharia
'------------------------------------------------
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 = 0
P.MapXPos = 48 * 11
P.MapYpos = 40 * 5
P.Current_Land = CONTINENTIA
'------------------------------------------------
'--------------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
PX.Spells(1) = 5
PX.Spells(3) = 5
PX.Spells(5) = 5
PX.Spells(7) = 5
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
'Build_Map 13
G.In_Combat = FALSE
'TIMER(G.GameTimer) ON
'DO
Build_Main_Window
Build_Map_View
Draw_Player
Build_Dismiss_Window
'Build_Menu_Window
'_DELAY .01
'LOOP UNTIL INKEY$ = CHR$(27)
'TIMER(G.GameTimer) OFF
'DumpMap
'SaveBMP "Continentia.bmp", Layer(13), 0, 0, 6719, 5599
_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
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
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
' PRINT "lined up?"; MID$(txt$, Mx%%, 7): END
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
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
Window_Header
Draw_Coins
Cover_Puzzle
Magic_Animation
Seige_Animation
Contract_Animation MAIN
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
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
SUB Unit_Animation
(x%
, y%
, Unit%%
) _PUTIMAGE (x%
, 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$
Result$ = Result$ + "K"
Special_K_Value = 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
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 / 48
Y%% = P.MapYpos / 40
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
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 / 48
Y%% = 63 - P.MapYpos / 40
f~%% = G.Window_Animation * 48
LINE (122 + X%%
* 4, 128 + Y%%
* 4)-STEP(3, 3), _RGB32(255 - f~%%
, 255 - f~%%
, 255 - f~%%
), BF
LINE (0, 16)-(639, 448), BackGround_Color
(G.Level
), BF
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%%
_PUTIMAGE (210, 224)-STEP(87, 63), Layer
(5), Layer
(1), (0 + G.Window_Animation
* 44, 800 + P.Travel_Mode
* 32)-STEP(43, 31)
Maps(Towns(i%%).MapX, Towns(i%%).MapY, Towns(i%%).Land).IsTown = i%%
SUB Add_Map_Extras
(X%%
, Y%%
) IF Land
(X%%
, Y%%
).IsTown
THEN _PUTIMAGE (288 + X%%
* 96, 240 + Y%%
* 80)-STEP(95, 79), Layer
(3), Layer
(13), (480, 160)-STEP(47, 39) IF Land
(X%%
, Y%%
).IsSign
THEN _PUTIMAGE (288 + X%%
* 96, 240 + Y%%
* 80)-STEP(95, 79), Layer
(3), Layer
(13), (432, 160)-STEP(47, 39) IF Land
(X%%
, Y%%
).IsBridge
THEN _PUTIMAGE (288 + X%%
* 96, 240 + Y%%
* 80)-STEP(95, 79), Layer
(3), Layer
(13), (336 + Land
(X%%
, Y%%
).IsBridge
* 48, 160)-STEP(47, 39)
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
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
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
'-----------------Data loader--------------------
Map01% = DecodeMaps(Map1$)
Swap_Map CONTINENTIA, SAVE
Map02% = DecodeMaps(Map1$)
Swap_Map FORESTRIA, 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
READ BackGround_Color
(i%%
) READ Spells
(i%%
).Spell_Name
'------------------------------------------------
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
IF Selection%%
= 11 THEN Selection%%
= 12 'correction for the gap in choices Display_Selection_Arrow 69, 140 + (16 * Selection%%) 'adventuring
IF RunIt%%
THEN Run_Menu_Choice Selection%%
SUB Run_Menu_Choice
(Opt%%
) Build_Main_Window
Build_Map_View
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 Build_Puzzle_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%%)
SUB Dismiss_Army
(Unit%%
) SWAP PX.Army
(i%%
), PX.Army
(i%%
+ 1) PX.Army(i%%).Unit = 0
PX.Army(i%%).Count = 0
PRINT #1, Maps
(x%%
, y%%
, 1).Terrain;
'$include:'MapDecode.bi'
'$include: 'saveimage.bm'