# KGDgame
minut += 1
gs 'stat'
gs 'KGDexp'
'<center><B>Date <<KGDday>></B></center>'
'<center><B>Your town</B></center>'
'<center>Buildings</center>'
'Tower Hero, which stores <<KGDmoney>> Resources'
'Farms <<KGDfarm>> pieces'
''
'<center><B>List Party hero (6t people maximum)</B></center>'
'Hero. Level <<KGDlvl>>Life <<KGDHP>>Done <<KGDdam>>'
if KGDsput2 > 0: '<<$KGDname2>>. Level <<KGDlvl2>>Life <<KGDHP2>>Done <<KGDdam2>>'
if KGDsput3 > 0: '<<$KGDname3>>. Level <<KGDlvl3>>Life <<KGDHP3>>Done <<KGDdam3>>'
if KGDsput4 > 0: '<<$KGDname4>>. Level <<KGDlvl4>>Life <<KGDHP4>>Done <<KGDdam4>>'
if KGDsput5 > 0: '<<$KGDname5>>. Level <<KGDlvl5>>Life <<KGDHP5>>Done <<KGDdam5>>'
if KGDsput6 > 0: '<<$KGDname6>>. Level <<KGDlvl6>>Life <<KGDHP6>>Done <<KGDdam6>>'
''
'<center><B>Brands for</B></center>'
'Do you own <<KGDkarta>>% of'


act 'Next Day':
cls
KGDbrod = 0
KGDday += 1
KGDmoney += KGDkarta * 5 + KGDfarm * 10
gt $curloc
end

if KGDmoney >= 150 and KGDfarm > KGDkarta:
	act 'Build a farm (150 resources)':
	cls
	KGDmoney -= 150
	KGDfarm += 1
	gt $curloc
	end
end

	act 'Arrange the soldiers':
	cls
	KGDpartyCreate = 1
	$kgdplace = '1st place empty'
	$kgdplace2 = '2nd place is empty'
	$kgdplace3 = '3rd place is empty'
	$kgdplace4 = '4th place is empty'
	$kgdplace5 = '5th place is empty'
	$kgdplace6 = '6th place is empty'
	kgdplace = 0
	kgdplace2 = 0
	kgdplace3 = 0
	kgdplace4 = 0
	kgdplace5 = 0
	kgdplace6 = 0
	gt 'KGDparty'
	end

if KGDbrod = 0 and KGDpartyCreate > 0:
	act 'Win territory':
	cls
	KGDbrod = 1

	gt 'KGDbefore'
	end
end



if KGDsput6 = 0 and KGDmoney >= 250:
	act 'Hire a satellite (250 resources)':
	cls
	KGDmoney -= 250
	KGDpartyCreate = 0
		act 'Warrior':
			if KGDsput2 = 0:
			$KGDname2 = 'Warrior'
			KGDlvl2 = 1
			KGDHP2 = 100
			KGDdam2 = 10
			KGDsput2 = 1
			KGDexp2 = 0
			gt $curloc
			exit
			end

			if KGDsput3 = 0:
			$KGDname3 = 'Warrior'
			KGDlvl3 = 1
			KGDHP3 = 100
			KGDdam3 = 10
			KGDsput3 = 1
			KGDexp3 = 0
			gt $curloc
			exit
			end

			if KGDsput4 = 0:
			$KGDname4 = 'Warrior'
			KGDlvl4 = 1
			KGDHP4 = 100
			KGDdam4 = 10
			KGDsput4 = 1
			KGDexp4 = 0
			gt $curloc
			exit
			end

			if KGDsput5 = 0:
			$KGDname5 = 'Warrior'
			KGDlvl5 = 1
			KGDHP5 = 100
			KGDdam5 = 10
			KGDsput5 = 1
			KGDexp5 = 0
			gt $curloc
			exit
			end

			if KGDsput6 = 0:
			$KGDname6 = 'Warrior'
			KGDlvl6 = 1
			KGDHP6 = 100
			KGDdam6 = 10
			KGDsput6 = 1
			KGDexp6 = 0
			gt $curloc
			exit
			end

		end

		act 'Magician':
			if KGDsput2 = 0:
			$KGDname2 = 'Magician'
			KGDlvl2 = 1
			KGDHP2 = 60
			KGDdam2 = 20
			KGDsput2 = 1
			KGDexp2 = 0
			gt $curloc
			exit
			end

			if KGDsput3 = 0:
			$KGDname3 = 'Magician'
			KGDlvl3 = 1
			KGDHP3 = 60
			KGDdam3 = 20
			KGDsput3 = 1
			KGDexp3 = 0
			gt $curloc
			exit
			end

			if KGDsput4 = 0:
			$KGDname4 = 'Magician'
			KGDlvl4 = 1
			KGDHP4 = 60
			KGDdam4 = 20
			KGDsput4 = 1
			KGDexp4 = 0
			gt $curloc
			exit
			end

			if KGDsput5 = 0:
			$KGDname5 = 'Magician'
			KGDlvl5 = 1
			KGDHP5 = 60
			KGDdam5 = 20
			KGDsput5 = 1
			KGDexp5 = 0
			gt $curloc
			exit
			end

			if KGDsput6 = 0:
			$KGDname6 = 'Magician'
			KGDlvl6 = 1
			KGDHP6 = 60
			KGDdam6 = 20
			KGDsput6 = 1
			KGDexp6 = 0
			gt $curloc
			exit
			end

		end

		act 'Archer':
			if KGDsput2 = 0:
			$KGDname2 = 'Archer'
			KGDlvl2 = 1
			KGDHP2 = 80
			KGDdam2 = 15
			KGDsput2 = 1
			KGDexp2 = 0
			gt $curloc
			exit
			end

			if KGDsput3 = 0:
			$KGDname3 = 'Archer'
			KGDlvl3 = 1
			KGDHP3 = 80
			KGDdam3 = 15
			KGDsput3 = 1
			KGDexp3 = 0
			gt $curloc
			exit
			end

			if KGDsput4 = 0:
			$KGDname4 = 'Archer'
			KGDlvl4 = 1
			KGDHP4 = 80
			KGDdam4 = 15
			KGDsput4 = 1
			KGDexp4 = 0
			gt $curloc
			exit
			end

			if KGDsput5 = 0:
			$KGDname5 = 'Archer'
			KGDlvl5 = 1
			KGDHP5 = 80
			KGDdam5 = 15
			KGDsput5 = 1
			KGDexp5 = 0
			gt $curloc
			exit
			end

			if KGDsput6 = 0:
			$KGDname6 = 'Archer'
			KGDlvl6 = 1
			KGDHP6 = 80
			KGDdam6 = 15
			KGDsput6 = 1
			KGDexp6 = 0
			gt $curloc
			exit
			end

		end

		act 'Priest':
			if KGDsput2 = 0:
			$KGDname2 = 'Priest'
			KGDlvl2 = 1
			KGDHP2 = 40
			KGDdam2 = 20
			KGDsput2 = 1
			KGDexp2 = 0
			gt $curloc
			exit
			end

			if KGDsput3 = 0:
			$KGDname3 = 'Priest'
			KGDlvl3 = 1
			KGDHP3 = 40
			KGDdam3 = 20
			KGDsput3 = 1
			KGDexp3 = 0
			gt $curloc
			exit
			end

			if KGDsput4 = 0:
			$KGDname4 = 'Priest'
			KGDlvl4 = 1
			KGDHP4 = 40
			KGDdam4 = 20
			KGDsput4 = 1
			KGDexp4 = 0
			gt $curloc
			exit
			end

			if KGDsput5 = 0:
			$KGDname5 = 'Priest'
			KGDlvl5 = 1
			KGDHP5 = 40
			KGDdam5 = 20
			KGDsput5 = 1
			KGDexp5 = 0
			gt $curloc
			exit
			end

			if KGDsput6 = 0:
			$KGDname6 = 'Priest'
			KGDlvl6 = 1
			KGDHP6 = 40
			KGDdam6 = 20
			KGDsput6 = 1
			KGDexp6 = 0
			gt $curloc
			exit
			end

		end
	end
end

act 'Quit Game': gt 'Komp','start'
--- KGDgame ---------------------------------

