:: KGZfight
<<set $here = 'KGZfight'>>
<<set $ARGS = $location_var[$here]>>
<<set $time.minutes += 1>>
<<gs 'KGZdyn'>>
<<if getvar("$KGZHP") <= 0>>
	 	<<set $pc.mood -= 10>>
	<center><b>GAME OVER</b></center>
	<<act 'Quit Game'>>
		<<gt 'KGZstart'>>
	<</act>>
	$exit
<</if>>
<<if getvar("$KGZdead") <= 0>>
	<<set $KGZbatl = 1>>
	<<set $pc.mood += 10>>
	All the dead were silent on the ground.
	<<act 'Leave'>>
		<<gt 'KGZgame'>>
	<</act>>
	$exit
<</if>>
<<if getvar("$GZdist") < 0>>
	<<set $GZdist = 0>>

<</if>>
<!-- !!'<<link "Get out of the game">><<gt 'KGZstart'>><</link>>'-->
Health <<KGZHP>>. Day <<KGZday>>, h <<KGZhour>>.
<p>Edged weapons:$KGZweapon</p>
<<if getvar("$KGZgun") > 0>>
	<<$KGZgun>>

<</if>>
<<if getvar("$KGZgun2") > 0>>
	<<$KGZgun2>>

<</if>>
<<if getvar("$KGZgun3") > 0>>
	<<$KGZgun3>>

<</if>>
To you run <<KGZdead>> dead. They are at a distance <<KGZdist>> meters.
<<if getvar("$KGZdost") == 1>>
	Vincent fires a rifle.
	<<set $KGZdead -= 1>>
	One of the dead falls with prostrelyanny head.
	<<if getvar("$KGZdead") <= 0>>
		<<gt $curloc>>

	<</if>>
<</if>>
<<if getvar("$KGZgun") > 0 and getvar("$bullet") > 0>>
	<<actCLA 'Shoot a gun'>>
		<<set $bullet -= 1>>
		<<KGZgunatk>>
		<<KGZdeadmanatk>>
		<<actCLA 'Further'>>
			<<gt $curloc>>
		<</actCLA>>
	<</actCLA>>
<</if>>
<<if getvar("$KGZgun2") > 0 and getvar("$bullet2") > 0>>
	<<actCLA 'Shoot a shotgun'>>
		<<set $bullet2 -= 1>>
		<<KGZgunatk2>>
		<<KGZdeadmanatk>>
		<<actCLA 'Further'>>
			<<gt $curloc>>
		<</actCLA>>
	<</actCLA>>
<</if>>
<<if getvar("$KGZgun3") > 0 and getvar("$bullet3") > 0>>
	<<actCLA 'Shoot a machine gun (single)'>>
		<<set $bullet3 -= 1>>
		<<KGZgunatk3>>
		<<KGZdeadmanatk>>
		<<actCLA 'Further'>>
			<<gt $curloc>>
		<</actCLA>>
	<</actCLA>>
	<<if getvar("$bullet3") >= 3>>
		<<actCLA 'Shoot a machine gun (short burst)'>>
			<<set $bullet3 -= 3>>
			<<set $KGZbulgun = 3>>
			<<KGZgunatk4>>
			<<KGZdeadmanatk>>
			<<actCLA 'Further'>>
				<<gt $curloc>>
			<</actCLA>>
		<</actCLA>>
	<</if>>
	<<if getvar("$bullet3") >= 10>>
		<<actCLA 'Shoot a machine gun (long queue)'>>
			<<set $bullet3 -= 10>>
			<<set $KGZbulgun = 10>>
			<<KGZgunatk5>>
			<<KGZdeadmanatk>>
			<<actCLA 'Further'>>
				<<gt $curloc>>
			<</actCLA>>
		<</actCLA>>
	<</if>>
<</if>>
<<if getvar("$KGZgranade") > 0>>
	<<actCLA 'Throw a grenade'>>
		<<KGZgranatk>>
		<<actCLA 'Further'>>
			<<gt $curloc>>
		<</actCLA>>
	<</actCLA>>
<</if>>
<<if getvar("$KGZdist") <= 2>>
	<<actCLA 'Strike $KGZweapona'>>
		<<KGZfizatk>>
		<<actCLA 'Further'>>
			<<gt $curloc>>
		<</actCLA>>
	<</actCLA>>
<<else>>
	<<actCLA 'Wait'>>
		<<set $KGZdist -= 1>>
		<<gt $curloc>>
	<</actCLA>>
	<<actCLA 'Go to meet the dead'>>
		<<set $KGZdist -= 2>>
		<<gt $curloc>>
	<</actCLA>>
	<<actCLA 'Scoot'>>
		<<if getvar("$KGZdead") >= 10>>
			<<set $KGZdist -= 5>>
			Dead too much and they surrounded you, you can not escape.
			<<actCLA 'Fuck!'>>
				<<gt $curloc>>
			<</actCLA>>
		<<else>>
			<<set $KGZdedrandrun = rand(0, 1)>>
			<<if getvar("$KGZdedrandrun") == 0>>
				<<set $KGZbatl = 1>>
				You managed to escape from the dead.
				<<act 'Leave'>>
					<<gt 'KGZgame'>>
				<</act>>
			<<elseif getvar("$KGZdedrandrun") == 1>>
				<<set $KGZdist -= 5>>
				<<set $KGZdead += rand(KGZdead, KGZdead * 5)>>
				You have stumbled upon other dead and now you have to fight with a lot of dead.
				<<actCLA 'Fuck!'>>
					<<gt $curloc>>
				<</actCLA>>
			<</if>>
		<</if>>
	<</actCLA>>
<</if>>
