# KGZfight
minut += 1
gs 'stat'
gs 'KGZdyn'

if KGZHP <= 0:
cla
*clr
manna -= 100
'<center><B>GAME OVER</B></center>'
act 'Quit Game': gt 'KGZstart'
exit
end

if KGZdead <= 0:
cls
KGZbatl = 1
manna += 100
'All the dead were silent on the ground.'
act 'Leave': gt 'KGZgame'
exit
end
if GZdist < 0: GZdist = 0

!'<a href="exec:GT ''KGZstart''">Get out of the game</a>'
'Health <<KGZHP>>. Day <<KGZday>>, h <<KGZhour>>.'
'Edged weapons: <<$KGZweapon>>'
if KGZgun > 0: '<<$KGZgun>>'
if KGZgun2 > 0: '<<$KGZgun2>>'
if KGZgun3 > 0: '<<$KGZgun3>>'
'To you run <<KGZdead>> dead. They are at a distance <<KGZdist>> meters.'

if KGZdost = 1:
'Vincent fires a rifle.'
KGZdead -= 1
'One of the dead falls with prostrelyanny head.'
	if KGZdead <= 0: gt $curloc
end

if KGZgun > 0 and bullet > 0:
	act 'Shoot a gun':
	cls
	bullet -= 1
	dynamic $KGZgunatk
	dynamic $KGZdeadmanatk
	act 'Further': gt $curloc
	end
end

if KGZgun2 > 0 and bullet2 > 0:
	act 'Shoot a shotgun':
	cls
	bullet2 -= 1
	dynamic $KGZgunatk2
	dynamic $KGZdeadmanatk
	act 'Further': gt $curloc
	end
end

if KGZgun3 > 0 and bullet3 > 0:
	act 'Shoot a machine gun (single)':
	cls
	bullet3 -= 1
	dynamic $KGZgunatk3
	dynamic $KGZdeadmanatk
	act 'Further': gt $curloc
	end

	if bullet3 >= 3:
		act 'Shoot a machine gun (short burst)':
		cls
		bullet3 -= 3
		KGZbulgun = 3
		dynamic $KGZgunatk4
		dynamic $KGZdeadmanatk
		act 'Further': gt $curloc
		end
	end

	if bullet3 >= 10:
		act 'Shoot a machine gun (long queue)':
		cls
		bullet3 -= 10
		KGZbulgun = 10
		dynamic $KGZgunatk5
		dynamic $KGZdeadmanatk
		act 'Further': gt $curloc
		end
	end
end

if KGZgranade > 0:
	act 'Throw a grenade':
	cls
	dynamic $KGZgranatk
	act 'Further': gt $curloc
	end
end

if KGZdist <= 2:
	act 'Strike <<$KGZweapona>>':
	cls
	dynamic $KGZfizatk
	act 'Further': gt $curloc
	end
else
	act 'Wait':
	cls
	KGZdist -= 1
	gt $curloc
	end

	act 'Go to meet the dead':
	cls
	KGZdist -= 2
	gt $curloc
	end

	act 'Scoot':
	cls
		if KGZdead >= 10:
		KGZdist -= 5
		'Dead too much and they surrounded you, you can not escape.'
		act 'Fuck!': gt $curloc
		else
		KGZdedrandrun = RAND(0,1)
			if KGZdedrandrun = 0:
			KGZbatl = 1
			'You managed to escape from the dead.'
			act 'Leave': gt 'KGZgame'
			end
			if KGZdedrandrun = 1:
			KGZdist -= 5
			KGZdead += RAND(KGZdead, KGZdead * 5)
			'You have stumbled upon other dead and now you have to fight with a lot of dead.'
			act 'Fuck!': gt $curloc
			end
		end
	end
end
--- KGZfight ---------------------------------

