home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 2: Collection B
/
17Bit_Collection_B.iso
/
files
/
2273.dms
/
in.adf
/
League.AMOS
/
League.amosSourceCode
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
AMOS Source Code
|
1978-02-21
|
31.6 KB
|
1,452 lines
'
' TOP OF THE LEAGUE
' *********************
'
' Football Strategy Simulation by T.Kingsmill
'
' Copyright 1992
'
' This game is Shareware. The game can be freely distributed as
' long as only a small charge is made at the very most (to cover
' disk, postage etc). Also all parts of this program, including
' credits should remain as they are. Any violations should be
' reported to the author.
'
' See accompanying document file for basic instructions of how the
' game plays.
'
' To become a fully registered user, send �4. Amongst other things,
' you will receive a registered copy of the game, a Team Names
' Editor and a Player Names Editor to customise your games.
'
' T.Kingsmill, 2O2 Park Street Lane, Park Street, St Albans,
' Hertfordshire AL2 2AQ. (England)
'
'
' * * * MAIN PROGRAM * * *
Set Buffer 53
Screen Open 0,320,256,16,Lowres
Change Mouse 2
Flash Off : PATH$="top_of_the_league:graphics/"
Load "top_of_the_league:sample.abk"
INIT:
Curs Off
Paper 0 : Cls
Dim PN$(220) : Dim PD$(16),D1$(16),D2$(16),D3$(16)
Open In 1,"Top_Of_The_League:Player_Names.DAT"
For Z=1 To 220
Input #1,PN$(Z)
Next
Close 1
Open In 1,"Top_Of_The_League:Team_Names.DAT"
For Z=1 To 16
Input #1,PD$(Z)
Input #1,D1$(Z)
Input #1,D2$(Z)
Input #1,D3$(Z)
Next
Close 1
Load Iff "Top_Of_The_League:graphics/titlescreen"
Pen 7 : Paper 6 : Locate 1,30 : Centre "Press Any Key To Continue"
Wait Key
Randomize Timer
Paper 0 : Cls
Pen 2
Locate 1,2 : Centre "Top Of The League"
Pen 1
Locate 4,8 : Print "Please Enter Your Name"
Locate 4,10 : Input NAME$
Cls : Pen 2
Locate 1,2 : Centre "Top Of The League"
Pen 1
Locate 4,8 : Print "Do you want music? Y/N"
Locate 4,10 : Input YN$
YN$=Upper$(YN$)
If YN$="Y"
MUS=1 : Rem Load "df0:song11.abk"
Else
MUS=0
End If
SKLL:
Cls : Pen 2 : Locate 1,2 : Centre "Top Of The League"
Pen 1 : Locate 4,8
Print "Enter skill level 1-3"
Locate 4,10 : Print "1 = Novice"
Locate 4,12 : Print "2 = Good"
Locate 4,14 : Print "3 = Master"
Locate 4,16 : Input SKILL_LEVEL
If SKILL_LEVEL<1
Goto SKLL
End If
If SKILL_LEVEL>3
Goto SKLL
End If
D=0
'
' * * * SELECT CLUB * * *
'
If MUS=1 Then Music 1
SELECT_CLUB:
Cls : Pen 1
Print "Please Select Club To Manage:"
Print
For Z=1 To 16
If D=0 Then Print Z,PD$(Z)
If D=1 Then Print Z,D1$(Z)
If D=2 Then Print Z,D2$(Z)
If D=3 Then Print Z,D3$(Z)
Next
Pen 2 : Print
Print "Enter number of club to manage."
Print "Press RETURN for more club."
Input X
If X<0 Then Goto SELECT_CLUB
If X>16 Then Goto SELECT_CLUB
If X>0 Then Goto SET_GAME
D=D+1
If D>3
D=0
End If
Goto SELECT_CLUB
'
' * * * SET GAME VARIABLES ETC * * *
'
SET_GAME:
If D=0 Then C$=PD$(X) : PD$(X)=D3$(16) : D3$(16)=C$
If D=1 Then C$=D1$(X) : D1$(X)=D3$(16) : D3$(16)=C$
If D=2 Then C$=D2$(X) : D2$(X)=D3$(16) : D3$(16)=C$
If D=3 Then C$=D3$(X) : D3$(X)=D3$(16) : D3$(16)=C$
DIV=3
Dim LEAGUE$(16),OPP_ATTACK(16),OPP_DEF(16)
Dim OPP_POINTS(16),TEMP(16),OPP_MORAL(16)
MR=50 : CAP=5000 : PTS=0 : WINS=0 : PLRS=14
If SKILL_LEVEL=1 Then M=2000000
If SKILL_LEVEL=2 Then M=800000
If SKILL_LEVEL=3 Then M=200000
DR=0 : WEEK=1 : LOSES=0 : BORROWED=0 : YEAR=0
Dim STATUS(220),INJ(220),AGE(220),STAMINA(220),SKILL(220),PACE(220)
Dim OVERALL(220),INJ_STATUS(220)
P_ATTACK=0 : P_DEFENCE=0 : A=0 : B=0 : F_N=1
FD=3 : FM=2 : FA=5
GF=0 : GA=0 : BAL=0 : IN=0 : EX=0 : MORAL=5
Restore GOALTYPES
Dim GOAL$(10) : For Z=1 To 10 : Read GOAL$(Z) : Next
Gosub DEFINE_CPU_CLUBS
Gosub DEFINE_PLAYERS
Goto MAIN_MENU
'
' * * *
'
GOALTYPES:
Data "Penalty kick"
Data "Free kick on edge of the area"
Data "Header from a corner kick!"
Data "Passing build up from midfield"
Data "Long ball from central defenders"
Data "Goalmouth scramble from corner kick"
Data "Bad back-pass is paid for!"
Data "Passing move between strikers"
Data "Throw-in booted into box and hit in"
Data "Pass from midfielder finds striker"
'
'
'
DEFINE_CPU_CLUBS:
For Z=1 To 16
If DIV=3 Then LEAGUE$(Z)=D3$(Z)
If DIV=2 Then LEAGUE$(Z)=D2$(Z)
If DIV=1 Then LEAGUE$(Z)=D1$(Z)
If DIV=0 Then LEAGUE$(Z)=PD$(Z)
OPP_ATTACK(Z)=Int(Rnd(99)+1)
OPP_DEF(Z)=Int(Rnd(99)+1)
OPP_POINTS(Z)=0
OPP_MORAL(Z)=Int(Rnd(9)+1)
TEMP(Z)=0
Next
Return
'
' * * *
'
DEFINE_PLAYERS:
For Z=1 To 220
K=Int(Rnd(100))
STATUS(Z)=20
If K<12
STATUS(Z)=19
End If
X=Int(Rnd(10))
If X=1 Then INJ_STATUS(Z)=1
If INJ_STATUS(Z)=1 Then INJ(Z)=Int(Rnd(9))
AGE(Z)=Int(Rnd(18)+17)
STAMINA(Z)=Int(Rnd(99)+1)
SKILL(Z)=Int(Rnd(99)+1)
PACE(Z)=Int(Rnd(99)+1)
OVERALL(Z)=Int((STAMINA(Z)+SKILL(Z)+PACE(Z))/3)
Next
HARDNESS=100-(SKILL_LEVEL*20)
If SKILL_LEVEL=1 Then HARDNESS=100
For Z=1 To 14
MAKERND:
H=Int(Rnd(219)+1)
If STATUS(H)<19 Then Goto MAKERND
If OVERALL(H)>HARDNESS Then Goto MAKERND
STATUS(H)=Z
Next
Return
'
'
' * * * MAIN MENU * * *
'
MAIN_MENU:
Paper 0 : Cls : Curs Off
Load Iff "Top_Of_The_League:Graphics/Office"
Clear Key
I$=""
While I$=""
I$=Inkey$
Wend
I$=Upper$(I$)
If I$="1" Then Gosub F_LIST
If I$="2" Then Gosub INFORMATION
If I$="3" Then Gosub BUY
If I$="4" Then Gosub SELL
If I$="5" Then Gosub GAME_LOAD
If I$="6" Then Gosub GAME_SAVE
If I$="7" Then Goto SELECT_TEAM
If I$="8" Then Gosub QUIT
Goto MAIN_MENU
'
'
'
F_LIST:
Bell
Cls
Load Iff "Top_of_the_League:graphics/fixtures"
Locate 1,6 : Print
For Z=1 To 16
If Z=WEEK Then Pen 7 Else Pen 4
If LEAGUE$(Z)<>C$ Then Print LEAGUE$(Z) Else Print "-no match-"
Next
Pen 2
Print : Print "Next Match: ";LEAGUE$(WEEK)
Pen 1 : Print : Centre "Press any key to continue"
Wait Key
Return
'
'
'
INFORMATION:
Bell
Cls : Pen 4
Load Iff "Top_of_the_league:graphics/information"
Locate 1,6 : Print
Print "Club: ";C$
Print "Manager: ";NAME$
Print "Skill Level(1-3):";SKILL_LEVEL
Print "Seasons in charge: ";YEAR
Print "Week number: ";WEEK
Print "Managerial Rating (1-100): ";MR
Print "Money Available: ";M
Print "Overdraft: ";BORROWED
Print "Division: ";DIV
Print "No. of Players in squad: ";PLRS
Print "Ground Capacity: ";CAP
Print "Points this season: ";PTS
Pen 1 : Print : Centre "Press any key to continue"
Wait Key
Return
'
'
'
BUY:
Bell : Cls
If PLRS=18
Pen 2 : Locate 1,10
Centre "Enough players already!"
Wait 150 : Goto MAIN_MENU
End If
R=0 : G$=""
For Z=1 To 220
If R=1 Then Goto LP
If STATUS(Z)=19
Cls : Pen 4
Load Iff "top_of_the_league:graphics/transfer_market"
Locate 0,7
Print "Press O to make an offer."
Print "Press RETURN to move to next player."
Print "Press X to exit back to main menu."
Print : Print
Pen 1 : Print PN$(Z)
Pen 2 : Print : Print "Age: ";AGE(Z)
Print : Print "Stamina: ";STAMINA(Z)
Print : Print "Skill: ";SKILL(Z)
Print : Print "Pace: ";PACE(Z)
Print : Print "VALUE: ";Int(OVERALL(Z)*10000)
G$=""
Print : Input G$
End If
G$=Upper$(G$)
If G$="X" Then R=1
If G$="O" Then Gosub MAKE_OFFER
LP:
Next
Return
'
'
'
MAKE_OFFER:
Cls
Pen 4
Y=Int(OVERALL(Z)*10000)
Y=Y-Int(Rnd(6000)+2000)
Locate 0,2
Print "Player: ";PN$(Z)
Locate 0,5
Print "Value: ";Int(OVERALL(Z)*10000)
Print : Input "What is your offer? ";OFFER
If OFFER>Y
Print : Print "Your offer is accepted!"
R=1 : PLRS=PLRS+1 : M=M-OFFER
'
FLAG=0
H=1
'
SEARCH:
For L=1 To 220
If STATUS(L)=H
FLAG=1
End If
Next L
If FLAG=1
H=H+1 : FLAG=0 : Goto SEARCH
End If
STATUS(Z)=H
'
Else
Print "Offer not accepted."
End If
Print
Print "Press any key"
Wait Key
G$="" : Return
'
'
'
SELL:
Bell
Cls
If PLRS=11
Pen 2 : Locate 1,10 : Centre "You must have at least 11"
Locate 1,12 : Centre "players in your squad!"
Wait 200
Return
End If
SELL2:
Load Iff PATH$+"squad"
Pen 4 : Locate 1,6 : Print "Player"
Locate 20,6 : Print "Age" : Locate 24,6 : Print "Skl"
Locate 28,6 : Print "Sta" : Locate 32,6 : Print "Pac"
Pen 1
For H=1 To 18
Locate 0,6+H : Print H
For L=1 To 220
If STATUS(L)=H
Locate 4,6+H : Print PN$(L)
Locate 19,6+H : Print AGE(L)
Locate 23,6+H : Print SKILL(L)
Locate 27,6+H : Print STAMINA(L)
Locate 31,6+H : Print PACE(L)
End If
Next
Next
Pen 2 : Locate 1,25
Input "Sell who? (RETURN to exit) ";I
If I<1 Then Return
If I>18 Then Return
Z=1 : Repeat
If STATUS(Z)=I Then P=Z
Z=Z+1 : Until Z=220
Cls
Locate 1,2
Print "Inquires for ";PN$(P)
Y=Int(OVERALL(P)*10000)
Locate 1,4 : Print "Value: ";Y : Pen 1
RAND:
Q=Rnd(16)
If LEAGUE$(Q)=C$ Then Goto RAND
OFFER=Int((OVERALL(P)*10000)-Rnd(9000))
Locate 1,7 : Print LEAGUE$(Q);" offer ";OFFER
Pen 4 : Locate 1,10
Centre "Accept offer Y/N"
Locate 15,13
Input YN$
Bell
YN$=Upper$(YN$)
If YN$<>"Y" Then Return
Locate 1,16 : Pen 1 : Centre "Ok, deal has gone ahead."
PLRS=PLRS-1
M=M+OFFER
STATUS(P)=20
Wait 100
Cls
Goto SELL2
'
'
'
GAME_SAVE:
Bell
Cls
Pen 1
Load Iff "top_of_the_league:graphics/save"
Locate 1,9
Print "Are you sure? Y/N"
Locate 1,13
Input YN$
YN$=Upper$(YN$)
If YN$<>"Y" Then Return
Pen 4
Locate 1,17
Centre "Please wait a moment.."
Open Out 1,"top_of_the_league:Save_Game.DAT"
Print #1,F_N
Print #1,FD
Print #1,FM
Print #1,FA
Print #1,GF
Print #1,GA
Print #1,MORAL
Print #1,C$
Print #1,NAME$
Print #1,MR
Print #1,M
Print #1,DIV
Print #1,PLRS
Print #1,CAP
Print #1,PTS
Print #1,WINS
Print #1,DR
Print #1,LOSES
Print #1,WEEK
Print #1,YEAR
Print #1,BORROWED
For Z=1 To 16
Print #1,PD$(Z)
Print #1,D1$(Z)
Print #1,D2$(Z)
Print #1,D3$(Z)
Print #1,LEAGUE$(Z)
Print #1,OPP_ATTACK(Z)
Print #1,OPP_DEF(Z)
Print #1,OPP_POINTS(Z)
Print #1,OPP_MORAL(16)
Next Z
For Z=1 To 220
Print #1,STATUS(Z)
Print #1,INJ_STATUS(Z)
Print #1,INJ(Z)
Print #1,AGE(Z)
Print #1,STAMINA(Z)
Print #1,SKILL(Z)
Print #1,PACE(Z)
Print #1,OVERALL(Z)
Next Z
Close 1
Return
'
'
'
GAME_LOAD:
Bell
Cls
Pen 1
Load Iff "top_of_the_league:graphics/load"
Locate 1,9
Print "Are you sure? Y/N"
Locate 1,13
Input YN$
YN$=Upper$(YN$)
If YN$<>"Y" Then Return
Pen 4
Locate 1,17
Centre "Please wait a moment.."
Open In 1,"top_of_the_league:Save_Game.DAT"
Input #1,F_N
Input #1,FD
Input #1,FM
Input #1,FA
Input #1,GF
Input #1,GA
Input #1,MORAL
Input #1,C$
Input #1,NAME$
Input #1,MR
Input #1,M
Input #1,DIV
Input #1,PLRS
Input #1,CAP
Input #1,PTS
Input #1,WINS
Input #1,DR
Input #1,LOSES
Input #1,WEEK
Input #1,YEAR
Input #1,BORROWED
For Z=1 To 16
Input #1,PD$(Z)
Input #1,D1$(Z)
Input #1,D2$(Z)
Input #1,D3$(Z)
Input #1,LEAGUE$(Z)
Input #1,OPP_ATTACK(Z)
Input #1,OPP_DEF(Z)
Input #1,OPP_POINTS(Z)
Input #1,OPP_MORAL(16)
Next Z
For Z=1 To 220
Input #1,STATUS(Z)
Input #1,INJ_STATUS(Z)
Input #1,INJ(Z)
Input #1,AGE(Z)
Input #1,STAMINA(Z)
Input #1,SKILL(Z)
Input #1,PACE(Z)
Input #1,OVERALL(Z)
Next Z
Close 1
Return
'
'
'
QUIT:
Bell : Cls : Load Iff "Top_of_the_league:graphics/quit?"
Pen 4 : Locate 1,6 : Print
Print
Input " Sure? Y/N ";YN$
YN$=Upper$(YN$)
If YN$<>"Y" Then Return
End
'
'
'
SELECT_TEAM:
Bell
Cls
If PLRS<11
Pen 2 : Locate 1,10 : Centre "You must have at least 11"
Locate 1,12 : Centre "players in your squad!"
Wait 200
Goto MAIN_MENU
End If
Pen 1 : Locate 1,1
Centre "Next Opponents"
Locate 5,4 : Pen 4
Print "Club: ";LEAGUE$(WEEK)
Locate 5,8 : Print "Attack Skill: ";OPP_ATTACK(WEEK)
Locate 5,10 : Print "Defense Skill: ";OPP_DEF(WEEK)
Locate 5,12 : Print "Team Moral(1-10): ";OPP_MORAL(WEEK)
Locate 5,14 : Print "Points this season: ";OPP_POINTS(WEEK)
Pen 2
Locate 1,19 : Centre "Press any key to continue"
Wait Key
'
TACTICS:
Cls
If F_N=1 Then FD=3 : FM=2 : FA=5 : Load Iff PATH$+"formation325"
If F_N=2 Then FD=4 : FM=2 : FA=4 : Load Iff PATH$+"formation424"
If F_N=3 Then FD=4 : FM=3 : FA=3 : Load Iff PATH$+"formation433"
If F_N=4 Then FD=4 : FM=4 : FA=2 : Load Iff PATH$+"formation442"
If F_N=5 Then FD=4 : FM=5 : FA=1 : Load Iff PATH$+"formation451"
If F_N=6 Then FD=5 : FM=3 : FA=2 : Load Iff PATH$+"formation532"
Clear Key
Pen 2 : Paper 6
Locate 1,24 : Input J$
J$=Upper$(J$)
If J$="Z" Then F_N=F_N-1
If J$="X" Then F_N=F_N+1
If J$="C" Then Goto LINEUP
If F_N<1 Then F_N=6
If F_N>6 Then F_N=1
Goto TACTICS
'
LINEUP:
Paper 0 : Pen 2 : Cls
Locate 1,0 : Centre "Team Select"
Pen 4 : Locate 1,3 : Print "Player"
Locate 20,3 : Print "Age" : Locate 24,3 : Print "Skl"
Locate 28,3 : Print "Sta" : Locate 32,3 : Print "Pac"
Pen 1
For H=1 To 18
If H>11
Pen 5
End If
Locate 0,3+H : Print H
For L=1 To 220
If STATUS(L)=H
Locate 4,3+H : Print PN$(L)
Locate 19,3+H : Print AGE(L)
Locate 23,3+H : Print SKILL(L)
Locate 27,3+H : Print STAMINA(L)
Locate 31,3+H : Print PACE(L)
End If
Next
Next
Pen 1
Print : Print "Enter Player to move(1-18)"
Input "RETURN to play. ";P
If P<1
Goto COMPILE_TEAM
End If
If P>18
Goto LINEUP
End If
' check exists
FLAG=0
For L=1 To 220
If STATUS(L)=P
FLAG=1 : PLR_NUMBER=L
End If
Next L
If FLAG=0
Print "No player exists there!"
Wait 100
Goto LINEUP
End If
'
Input "Move to where ";P2
If P2>18
Goto LINEUP
End If
'
FLAG=0
For L=1 To 220
If STATUS(L)=P2
FLAG=1 : PLR_NUMBER2=L
End If
Next L
If FLAG=0
STATUS(PLR_NUMBER)=P2
End If
If FLAG=1
STATUS(PLR_NUMBER)=P2
STATUS(PLR_NUMBER2)=P
End If
Goto LINEUP
'
' * * * Work out team performance levels * * *
'
COMPILE_TEAM:
GK=0 : DEF=0 : MID=0 : AK=0
'goalkeeper
For Z=1 To 220
If STATUS(Z)=1
GK=GK+OVERALL(Z)
End If
Next Z
' defense
For H=2 To FD+1
For Z=1 To 220
If STATUS(Z)=H
DEF=DEF+OVERALL(Z)
End If
Next Z
Next H
'midfield
For H=FD+2 To FD+FM+1
For Z=1 To 220
If STATUS(Z)=H
MID=MID+OVERALL(Z)
End If
Next
Next
'attack
For H=FD+FM+2 To 11
For Z=1 To 220
If STATUS(Z)=H
AK=AK+OVERALL(Z)
End If
Next
Next
' divide up and sort
DEF=DEF+GK
AK=AK+MID
DEF=Int(DEF/(FD+1))
AK=Int(AK/(FM+FA))
'
ACTION:
Music Off
A=0 : B=0 : GOALS=0
Cls : Paper 6
Curs Off
Load Iff PATH$+"match_pitch"
Paper 2 : Pen 1 : Locate 1,20 : Print Space$(16)
Locate 23,20 : Print Space$(16)
Gosub PRT_SCORE
'
GAME:
For Z=1 To 3 : Rem loops around three times for loadsagoals!
Wait 100
GOALNUMBER=Rnd(9)+1
CHANCE=Rnd(1)
If AK>OPP_DEF(WEEK)
If CHANCE=1
TEAM=1
Gosub PRT_GOAL
Locate 1,26 : Pen 1 : Print GOAL$(GOALNUMBER)
GOALS=GOALS+1 : A=A+1 : Gosub PRT_SCORE
Gosub WIPE_GOAL
End If
End If
Wait 100
GOALNUMBER=Rnd(9)+1
CHANCE=Rnd(1)
If OPP_ATTACK(WEEK)>AK
If CHANCE=1
TEAM=2
Gosub PRT_GOAL
Locate 1,26 : Pen 1 : Print GOAL$(GOALNUMBER)
GOALS=GOALS+1 : B=B+1 : Gosub PRT_SCORE
Gosub WIPE_GOAL
End If
End If
Wait 100
GOALNUMBER=Rnd(9)+1
CHANCE=Rnd(1)
If MORAL>OPP_MORAL(WEEK)
If CHANCE=1
TEAM=1
Gosub PRT_GOAL
Locate 1,26 : Pen 1 : Print GOAL$(GOALNUMBER)
GOALS=GOALS+1 : A=A+1 : Gosub PRT_SCORE
Gosub WIPE_GOAL
End If
End If
Wait 100
GOALNUMBER=Rnd(9)+1
CHANCE=Rnd(1)
If OPP_MORAL(WEEK)>MORAL
If CHANCE=1
TEAM=2
Gosub PRT_GOAL
Locate 1,26 : Pen 1 : Print GOAL$(GOALNUMBER)
GOALS=GOALS+1 : B=B+1 : Gosub PRT_SCORE
Gosub WIPE_GOAL
End If
End If
Wait 100
Next Z
Goto GAME_OVER
'
'
PRT_SCORE:
Paper 2 : Pen 1
Locate 1,20 : Print C$
Locate 23,20 : Print LEAGUE$(WEEK)
Paper 6 : Pen 1
Locate 17,20 : Print A
Locate 20,20 : Print B
Return
'
PRT_GOAL:
Sam Play 1
Pen 1 : Locate 17,19 : Print "GOAL!!"
Locate 1,26 : Paper 6 : Print Space$(39)
' goalscorers - player team..
If TEAM=1
FINDSCORER:
Repeat
N=Int(Rnd(219)+1)
Until STATUS(N)<12
If STATUS(N)=1
Goto FINDSCORER
End If
'This bit may not work
If STATUS(N)<(11-FA)
If Rnd(100)<70
J=Int(Rnd(FA))
J=11-J
Repeat
N=Int(Rnd(219)+1)
Until STATUS(N)=J
End If
End If
'
Locate 1,21+A
Paper 6 : Pen 0
Print PN$(N)
End If
' computer scorer..
If TEAM=2
N=Int(Rnd(219)+1)
If STATUS(N)<19
N=Int(Rnd(219)+1)
End If
Locate 23,21+B : Paper 6 : Pen 0
Print PN$(N)
End If
Return
'
WIPE_GOAL:
Wait 100 : Locate 17,19 : Print " "
Return
'
'
GAME_OVER:
Locate 1,27 : Pen 0
Print "End of match - press any key.."
Clear Key
Wait Key
'
If MUS=1
Music 1
End If
Cls
Load Iff PATH$+"finalscore"
Paper 2 : Pen 1
Locate 7,9 : Print C$
Locate 7,12 : Print LEAGUE$(WEEK)
Locate 26,9 : Print A
Locate 26,12 : Print B
Clear Key
Wait Key
'
Paper 0 : Cls
For Z=1 To 16
TEMP(Z)=0
If LEAGUE$(Z)=C$
TEMP(Z)=1 : P=Z
End If
Next
GF=GF+A : GA=GA+B
If A>B Then WINS=WINS+1 : PTS=PTS+3 : OPP_POINTS(P)=OPP_POINTS(P)+3 : MORAL=MORAL+1 : MR=MR+5
If A<B Then LOSES=LOSES+1 : OPP_POINTS(WEEK)=OPP_POINTS(WEEK)+3 : MORAL=MORAL-1 : MR=MR-6
If A=B Then DR=DR+1 : PTS=PTS+1 : OPP_POINTS(P)=OPP_POINTS(P)+1 : OPP_POINTS(WEEK)=OPP_POINTS(WEEK)+1
If MORAL<1 Then MORAL=1
If MORAL>10 Then MORAL=10
Pen 4 : Locate 3,2 : Print "How ";C$;" stands.."
Pen 2 :
Locate 5,8 : Print "Played: ";WEEK
Locate 5,9 : Print "Won: ";WINS
Locate 5,10 : Print "Drawn: ";DR
Locate 5,11 : Print "Lost: ";LOSES
Locate 5,12 : Print "Goals For: ";GF
Locate 5,13 : Print "Goals Against:";GA
Locate 5,14 : Print "Points: ";PTS
Pen 1 : Locate 1,20
Centre "Press any key to continue"
Wait Key
'
' Other results
'
Cls
Pen 6
TEMP(WEEK)=1
If DIV>0
Locate 0,0 : Print "OTHER RESULTS FROM DIVISION ";DIV
Else
Locate 0,0 : Print "OTHER PREMIER LEAGUE RESULTS"
End If
Pen 7
R=2
For E=1 To 7
R=2*E
FINDTEAM:
J=Rnd(15)+1
If TEMP(J)=1 Then Goto FINDTEAM
TEMP(J)=1 : TEAMA=J
FINDTEAM2:
J=Rnd(15)+1
If TEMP(J)=1 Then Goto FINDTEAM2
TEMP(J)=1 : TEAMB=J
TEAMASCORE=Int(OPP_MORAL(TEAMA)/2)
TEAMBSCORE=Int(OPP_MORAL(TEAMB)/2)
Locate 1,R : Print LEAGUE$(TEAMA)
Locate 16,R : Print TEAMASCORE;" -";TEAMBSCORE
Locate 24,R : Print LEAGUE$(TEAMB)
If TEAMASCORE>TEAMBSCORE Then OPP_POINTS(TEAMA)=OPP_POINTS(TEAMA)+3
If TEAMASCORE=TEAMBSCORE Then Inc OPP_POINTS(TEAMA) : Inc OPP_POINTS(TEAMB)
If TEAMBSCORE>TEAMASCORE Then OPP_POINTS(TEAMB)=OPP_POINTS(TEAMB)+3
Next E
Print : Pen 1 : Centre "Press any key to continue"
Wait Key
'
'
'
'
'
'
'
Cls
Pen 4 : Locate 1,0 : Centre "How they Stand.."
Locate 1,2 : Print "Team:"
Locate 18,2 : Print "Pts"
Pen 1
N$="" : K=0
For H=1 To 16
TEMP(H)=OPP_POINTS(H)
Next
For Y=1 To 16
For E=1 To 16
If TEMP(E)>K-1
K=TEMP(E) : N$=LEAGUE$(E) : J=E
If Y=1
PSN1=E
End If
If Y=2
PSN2=E
End If
If Y=15
PSN3=E
End If
If Y=16
PSN4=E
End If
End If
Next
If N$=C$ Then Pen 2 : PSN=Y Else Pen 1
Locate 1,Y+3 : Print N$ : Locate 18,Y+3 : Print K
K=0 : TEMP(J)=-2
Next
Print : Pen 11
Print "Current week: ";WEEK
If DIV=0 Then Print "Bottom 2 will be relegated."
If DIV=1 Then Print "Bottom 2 will be relegated." : Print "Top 2 will be promoted."
If DIV=2 Then Print "Bottom 2 will be relegated." : Print "Top 2 will be promoted."
If DIV=3 Then Print "Top 2 will be promoted."
Pen 5 : Print : Centre "Press any key to continue"
Wait Key
'
'
'
Cls
Pen 2 : Locate 1,0 : Centre "Finance"
Pen 1 : Locate 1,2
TICIN=Int(((6-DIV)*(30-PSN))*100+Int(Rnd(500)-300))*2
If(TICIN/2)>CAP Then TICIN=CAP*2
ELECEX=Int((Rnd(200)+600)*(5-DIV)) : TELEX=Int((Rnd(100)+300)*(5-DIV))
PRIEX=Int(TICIN/1.1) : POLEX=Int(Rnd(50)+2500)*(5-DIV)
WAGEX=Int(500*(6-DIV))*PLRS : OFFEX=Int(Rnd(100)+300)
PROIN=Int(Rnd(500))+Int((5-DIV)*TICIN/2)
LOTIN=Int(5-DIV)*Int(Rnd(100)+700) : ADSIN=Int(5-DIV)*Int(Rnd(1000)+5000) : CIN=Int(5-DIV)*Int(Rnd(500)+500)
IN=Int(PROIN+TICIN+LOTIN+ADSIN+CIN)
Pen 5 : Locate 5,3 : Print "INCOME" : Locate 30,3 : Print "�"
Pen 1 : Locate 5,4 : Print "GATE MONEY" : Locate 30,4 : Print TICIN
Locate 5,5 : Print "CLUB SHOP" : Locate 30,5 : Print CIN
Locate 5,6 : Print "LOTTERY" : Locate 30,6 : Print LOTIN
Locate 5,7 : Print "ADVERTISING" : Locate 30,7 : Print ADSIN
Locate 5,8 : Print "PROGRAMME SALES" : Locate 30,8 : Print PROIN
Pen 2 : Locate 5,9 : Print "TOTAL INCOME" : Locate 30,9 : Print IN
Pen 5
Locate 5,11 : Print "EXPENDITURE"
Pen 1 : Locate 5,12 : Print "WAGES" : Locate 30,12 : Print WAGEX
Locate 5,13 : Print "OFFICE EXPENSES" : Locate 30,13 : Print OFFEX
Locate 5,14 : Print "PROGRAMME PRINTING" : Locate 30,14 : Print PRIEX
Locate 5,15 : Print "TELEPHONE BILL" : Locate 30,15 : Print TELEX
Locate 5,16 : Print "ELECTRICITY BILL" : Locate 30,16 : Print ELECEX
Locate 5,17 : Print "POLICE BILL" : Locate 30,17 : Print POLEX
EX=Int(WAGEX+OFFEX+PRIEX+TELEX+ELECEX+POLEX)
Pen 2 : Locate 5,18 : Print "TOTAL EXPENSES" : Locate 30,18 : Print EX
BAL=Int(IN-EX)
Pen 4 : Locate 5,20 : Print "WEEKLY BALANCE" : Locate 30,20 : Print BAL
M=M+BAL
Clear Key
Pen 1 : Locate 1,22 : Centre "Press any key to continue"
Wait Key
Goto IN_CIDENTS
'
DELAY:
For D=1 To Int(Rnd(8000)+2500)
Next
Return
'
' * * * Incidents.. * * *
'
IN_CIDENTS:
Cls
Curs Off
Load Iff PATH$+"incidents"
Pen 11
Locate 0,8
Gosub DELAY : If Rnd(100)<19 Then Print "RESERVES EXPENSES COST �1,000" : M=M-1000
Gosub DELAY : If Rnd(100)<12 Then Print "SUPPORTERS CLUB GIVE �10,000" : M=M+10000
Gosub DELAY : If Rnd(100)<7 Then Print "VISITING FANS CAUSE �7,000 DAMAGE" : M=M-7000
Gosub DELAY : If Rnd(100)<22 Then Print "HOTEL BILL FROM AWAY MATCH �1,500" : M=M-1500
Gosub DELAY : If Rnd(100)<20 Then Print "INSURANCE Co WANTS �10,000" : M=M-10000
Gosub DELAY : If Rnd(100)<13 Then Print "LOCAL TV COVERAGE GAINS �20,000" : M=M+20000
Gosub DELAY : If Rnd(100)<20 Then Print "SCOUT'S EXPENSES COST �1,800" : M=M-1800
Gosub DELAY : If Rnd(100)<20 Then Print "CHAIRMAN GIVES CLUB �25,000" : M=M+25000
Gosub DELAY : If Rnd(100)<20 Then Print "GROUND HIRE BRINGS IN �4,000" : M=M+4000
Gosub DELAY : If Rnd(100)<20 Then Print "GROUND REPAIRS COST �5,000" : M=M-5000
Gosub DELAY : If Rnd(100)<20 Then Print "SPONSERS GIVE �2,000" : M=M+2000
Gosub DELAY : If Rnd(100)<11 Then Print "CLUB ADVERTISING COSTS �2500" : M=M-2500
Gosub DELAY : If Rnd(100)<15 Then Print "SPORTS EVENT HELD - GAIN �2,000" : M=M+2000
Gosub DELAY : If Rnd(100)<(SKILL_LEVEL*10) Then Print "BAD PRESS PUBLICITY UPSETS TEAM MEMBERS" : MORAL=MORAL-3
Gosub DELAY : If Rnd(100)<(SKILL_LEVEL*10) Then Print "PLAYERS ARGUEMENTS DEMORALIZE SQUAD" : MORAL=MORAL-4
Gosub DELAY : If Rnd(100)<(SKILL_LEVEL*10) Then Print "PLAYERS DISAGREE WITH COACH STAFF" : MORAL=MORAL-2
If MORAL<1 Then MORAL=1
Gosub DELAY
For C=1 To 220
If STATUS(C)<19
If DIV>0
If OVERALL(C)>80
If Rnd(100)<(SKILL_LEVEL*5)
Print PN$(C);" requested a move"
Print "and has been transferred"
Print "to ";PD$(Rnd(16))
FEE=Int(OVERALL(C)*10000)
Print "Tribunal fee agreed: ";FEE
M=M+FEE : PLRS=PLRS-1
STATUS(C)=20
End If
End If
End If
End If
Next
Clear Key
Pen 2 : Locate 1,22 : Centre "Press any key to continue"
Wait Key
'
'
GROUND:
Cls : Curs Off
Load Iff PATH$+"Ground_Capacity"
Pen 11
Locate 6,20
Print "Number of Seats: ";CAP
Locate 6,22 : Print "Last Attendence: ";Int(TICIN/2)
Locate 6,24 : Input "Increase Capacity? Y/N ";YN$
YN$=Upper$(YN$)
If YN$<>"Y" Then Goto BANKLOAN
Cls
Locate 0,3 : Print "Enter extra amount of seats:"
Locate 0,6
Input I
If I<1 Then Goto GROUND
If I>5000
Print
Print "You cannot increase by"
Print "that much in one week!"
Print "Press any key"
Wait Key
Goto GROUND
End If
CAP=CAP+I
M=M-(I*50)
Locate 0,9
Print "You stadium now holds ";CAP
Pen 2
Locate 1,19 : Centre "Press any key to continue"
Wait Key
'
BANKLOAN:
Cls : Curs Off
Load Iff PATH$+"bank"
Paper 2 : Pen 1
Locate 0,7
If M<0
Print "The bank would like to remind you"
Print "that you are currently running in"
Print "the red. Please spend wisely and"
Print "make cuts where possible."
Print
End If
If M<-2000000
Print "Dear ";NAME$
Print
Print "I regret to inform you that your club"
Print "is over �2,000,000 in the RED, as I"
Print "hope you are aware. As a result of"
Print "this very serious situation, I am"
Print "forced to terminate your club from"
Print "active football."
Print
Print "As I'm sure your board members will"
Print "make clear, this means your job is"
Print "no longer in existance."
Print
Print " Best wishes,"
Print " The Bank Man"
Clear Key
Wait Key
Gosub LOST_JOB
End If
If BORROWED>0
Print "Amount owed to bank: ";BORROWED
Print
Print "You are paying ";Int(BORROWED/20)
Print "in interest per week." : Print
Print "Enter amount to pay back:"
Print "(RETURN for nothing)"
Input X
If X<0
Goto BANKLOAN
End If
If X>BORROWED
Print : Print "You don't have to pay back"
Print "that much!" : Print "Press any key"
Wait Key
Goto BANKLOAN
End If
M=M-X
BORROWED=BORROWED-X
End If
Print : Print "Do you wish to borrow any"
Print "money from the bank?"
Print
Print "Please enter amount to borrow:"
Print "(RETURN for nothing)"
X=0
Input X
If X<1 Then Goto APPROACH
If X+BORROWED>5000000
Print
Print "Sorry, that is too much."
Print "You will have to come next"
Print "week to make another try."
Print "Press any key"
Wait Key
Goto APPROACH
End If
M=M+X
BORROWED=BORROWED+X
M=M-Int(BORROWED/20)
'
'
APPROACH:
If Rnd(100)<5
Cls
Load Iff PATH$+"address"
Curs Off
Paper 0 : Pen 2
Locate 1,1 : Print "STRICTLY" : Locate 1,2 : Print "CONFIDENTIAL"
Pen 1 : Locate 0,8 : Print "Dear ";NAME$
Print : Print "I am writing to you concerning"
Print "some amazing new steroids that"
Print "have become available to my club."
Print "They will dramatically improve the"
Print "moral and confidence of your players."
Print "Of course, this will come at a price,"
Print "�100,000 to cover all your players."
Print "Oh, and remember, keep this quiet,"
Print "we don't want the FA finding out."
Print : Print " Yours,"
Print " A manager"
Pen 6 : Locate 1,25 : Print "Press any key to continue"
Clear Key
Wait Key
Cls : Pen 11
Print "Do you.." : Print
Print "0 - Ignore the offer"
Print : Print "1 - Take up the offer"
Print : Print "2 - Report him to the FA"
Print : Input I
If I=2
Print : Print "The FA is extremely grateful for"
Print "your reporting of this incident."
Print "'We have been trying to track down"
Print "this manager for some time now'."
Print : Print "The club board is also very pleased"
Print "with your good sense of justice"
Print "and the supporters' club applauds you."
MR=MR+60 : MORAL=MORAL+1
Clear Key
Wait Key
End If
If I=1
Print : Print "The manager is happy you can"
Print "agree terms and he says he will have"
Print "the drugs available by the next match."
MORAL=10 : M=M-100000
Clear Key
Wait Key
End If
End If
'
'
'
RESETVARS:
If MORAL>10 Then MORAL=10
If MR>100 Then MR=100
If MR<1 Then MR=1
Inc WEEK
' Make sure player doesn't play player in next week!
If WEEK<17
If LEAGUE$(WEEK)=C$
Inc WEEK
End If
End If
' Weekly alterations to opponent attributes
For Z=1 To 16
If LEAGUE$(Z)<>C$
OPP_MORAL(Z)=OPP_MORAL(Z)+Int((Rnd(4)+2)-4)
If OPP_MORAL(Z)>10
OPP_MORAL(Z)=10
End If
If OPP_MORAL(Z)<1
OPP_MORAL(Z)=1
End If
End If
Next Z
' End of the season?
If WEEK=16
If LEAGUE$(16)=C$
Goto SEASON_END
End If
End If
If WEEK=17 Then Goto SEASON_END
If MR<15
If Rnd(100)<50
Paper 0 : Cls : Pen 2
Print : Print "After much thought, the board has"
Print "decided to end your job after your"
Print "disappointing results in recent weeks."
Print "Not to worry though, the job will soon"
Print "be filled.."
Pen 6 : Print : Centre "Press any key to continue"
Goto LOST_JOB
End If
End If
' take players on and off the transfer list
For Z=1 To 220
If STATUS(Z)=20
If Rnd(100)<6
STATUS(Z)=19
End If
End If
If STATUS(Z)=19
If Rnd(100)<20
STATUS(Z)=20
End If
End If
Next
Goto MAIN_MENU
'
'
LOST_JOB:
Pen 6 : Paper 0 : Cls
Locate 1,1
Centre "Hard luck, boss.."
Locate 3,4
Print "Better luck next time."
Locate 3,7
Print "Remaining money: ";M
Print "Full years in charge: ";YEAR
Print "Points this season: ";PTS
Print "Team moral: ";MORAL
Print "Managerial rating(%): ";MR
Pen 2
Clear Key
Wait Key
End
'
'
SEASON_END:
Curs Off
Cls
Load Iff PATH$+"season_end"
Clear Key
Wait Key
Paper 0 : Cls
Pen 1 : Locate 1,1 : Centre "End of Season"
Locate 1,4 : Under On
Pen 7
Print "Final Position: ";PSN
Print "Managerial Rating: ";MR
Print
'
Pen 2
Print "Board of Directors bonus"
Under Off : Pen 11 : Print
Print "On the rating of your performance"
Print "this season, the board has"
Print "decided to award you" : Print "�";MR*1000
Print : M=M+(MR*1000)
'
Pen 2 : Under On : Print "League Position Bonus" : Under Off
Pen 11 : Print "On merit of club position"
Print "and division, the board has"
SM=Int(16-PSN)*Int(4-DIV) : SM=Int(SM*10000)
Print "awarded you �";SM
M=M+SM : Print
'
Pen 2 : Under On : Print "Skill Level Bonus" : Under Off
Pen 11 : Print "Your skill level: ";SKILL_LEVEL
If SKILL_LEVEL=1 Then SL=0
If SKILL_LEVEL=2 Then SL=50000
If SKILL_LEVEL=3 Then SL=150000
Print "Bonus: ";SL
M=M+SL
'
Print : Print "Total Bonus �";(SL+(SM+(MR*1000)))
Locate 1,22 : Pen 6 : Centre "Press any key to continue"
Clear Key
Wait Key
'
' promotions and relegations
'
If DIV=3
' top go up
X=Int(Rnd(15)+1)
REL$=D2$(X)
D2$(X)=D3$(PSN1)
D3$(PSN1)=REL$
X=Int(Rnd(15)+1)
REL$=D2$(X)
D2$(X)=D3$(PSN2)
D3$(PSN2)=REL$
End If
If DIV=2
' bottom go down
X=Int(Rnd(15)+1)
PROM$=D3$(X)
D3$(X)=D2$(PSN3)
D2$(PSN3)=PROM$
X=Int(Rnd(15)+1)
PROM$=D3$(X)
D3$(X)=D2$(PSN4)
D2$(PSN4)=PROM$
' ups
X=Int(Rnd(15)+1)
REL$=D1$(X)
D1$(X)=D2$(PSN1)
D2$(PSN1)=REL$
X=Int(Rnd(15)+1)
REL$=D1$(X)
D1$(X)=D2$(PSN2)
D2$(PSN2)=REL$
End If
If DIV=1
' bottom go down
X=Int(Rnd(15)+1)
PROM$=D2$(X)
D2$(X)=D1$(PSN3)
D1$(PSN3)=PROM$
X=Int(Rnd(15)+1)
PROM$=D2$(X)
D2$(X)=D1$(PSN4)
D1$(PSN4)=PROM$
' ups
X=Int(Rnd(15)+1)
REL$=PD$(X)
PD$(X)=D1$(PSN1)
D1$(PSN1)=REL$
X=Int(Rnd(15)+1)
REL$=PD$(X)
PD$(X)=D1$(PSN2)
D1$(PSN2)=REL$
End If
If DIV=0
' bottom go down only
X=Int(Rnd(15)+1)
PROM$=D1$(X)
D1$(X)=PD$(PSN3)
PD$(PSN3)=PROM$
X=Int(Rnd(15)+1)
PROM$=D1$(X)
D1$(X)=PD$(PSN4)
PD$(PSN4)=PROM$
End If
If PSN=1
If DIV=0
Cls
Locate 1,10 : Pen 1
Centre "You have won the league!"
Wait Key
End If
End If
If PSN<3
If DIV>0
Cls
Locate 1,10 : Pen 1
Centre "You have been promoted!"
DIV=DIV-1
Wait Key
End If
End If
If PSN=16
If DIV=3
Cls
Locate 1,10 : Pen 1
Centre "You have finished bottom"
Locate 1,12 : Centre "of the league!"
Locate 1,14 : Centre "Try harder next season."
Wait Key
End If
End If
If PSN>14
If DIV<3
Cls
Locate 1,10 : Pen 1
Centre "You have been relegated.."
Wait Key
End If
End If
'
'Make new league
'
For Z=1 To 16
If DIV=3 Then LEAGUE$(Z)=D3$(Z)
If DIV=2 Then LEAGUE$(Z)=D2$(Z)
If DIV=1 Then LEAGUE$(Z)=D1$(Z)
If DIV=0 Then LEAGUE$(Z)=PD$(Z)
OPP_ATTACK(Z)=Int(Rnd(99)+1)
OPP_DEF(Z)=Int(Rnd(99)+1)
OPP_POINTS(Z)=0
OPP_MORAL(Z)=Int(Rnd(9)+1)
TEMP(Z)=0
Next Z
'
PTS=0 : WINS=0 : DR=0
LOSES=0
WEEK=1 : MR=50 : MORAL=50
YEAR=YEAR+1
GF=0 : GA=0
MORAL=5
For Z=1 To 220
' Reshuffle transferred players..
If STATUS(Z)>18
K=Int(Rnd(100))
STATUS(Z)=20
If K<12
STATUS(Z)=19
End If
End If
' make em older!
AGE(Z)=AGE(Z)+1
' make player improve with experience etc
If AGE(Z)<29
PACE(Z)=PACE(Z)+Int(Rnd(10))
STAMINA(Z)=STAMINA(Z)+Int(Rnd(10))
SKILL(Z)=SKILL(Z)+Int(Rnd(5))
If PACE(Z)>100
PACE(Z)=100
End If
If STAMINA(Z)>100
STAMINA(Z)=100
End If
If SKILL(Z)>100
SKILL(Z)=100
End If
End If
' make player attributes change when gets old
If AGE(Z)>30
PACE(Z)=PACE(Z)-Int(Rnd(15))
STAMINA(Z)=STAMINA(Z)-Int(Rnd(15))
If PACE(Z)<1
PACE(Z)=1
End If
If STAMINA(Z)<1
STAMINA(Z)=1
End If
End If
' remake player when too old!
If STATUS(Z)>18
If AGE(Z)>36
PACE(Z)=Int(Rnd(99)+1)
STAMINA(Z)=Int(Rnd(99)+1)
SKILL(Z)=Int(Rnd(99)+1)
AGE(Z)=17
End If
End If
OVERALL(Z)=Int((SKILL(Z)+STAMINA(Z)+PACE(Z))/3)
Next Z
Goto MAIN_MENU