:: kikbox
<<set $here = 'kikbox'>>
<<set $ARGS = $location_var[$here]>>
<<if $location_var[$here][0] == 'start'>>
	<<if $pc.pcs_health <= 0>>
		killvar'damage'
		<b><font color = red>You lost by TKO</font></b>
		<<xgt 'enderKik' 'lossKO'>>
		$exit
	<<elseif getvar("$healthV") <= 0>>
		killvar'damage'
		<b><font color = green><<$boydesc>> lost by TKO</font></b>
		<<xgt 'enderKik' 'winKO'>>
		$exit
	<</if>>
	<<if getvar("$round") >= 1>>
		<center><b>Round <<round>></b></center>
		<<if getvar("$sparing") == 1>>
			<<image "locations/city/citycenter/gym/kickboxing/kik1.jpg">>
		<<else>>
			<<image 'locations/city/citycenter/gym/kickboxing/ring<<round>>.jpg'>>
		<</if>>
		<<set $minround += 1>>
		<b>= = = = = = = = = = = = = (ROUND <<round>>) = = = = = = = = = = = = =</b>
		<<if getvar("$minround") == 1>>
			<b>Start of the round</b>

		<</if>>
		<<if getvar("$minround") == 2>>
			<b>Time in round 0:30</b>

		<</if>>
		<<if getvar("$minround") == 3>>
			<b>Time in round 1:00</b>

		<</if>>
		<<if getvar("$minround") == 4>>
			<b>Time in round 1:30</b>

		<</if>>
		<<if getvar("$minround") == 5>>
			<b>Time in round 2:00</b>

		<</if>>
		<<if getvar("$minround") == 6>>
			<b>Time in round 2:30</b>

		<</if>>
		<b><<$boydesc>></b> Life <b><font color="red"><<healthV>></font></b>, Endurance <b><font color="green"><<staminaV>></font></b>
		Your life <b><font color="red"><<pcs_health>></font></b>, Endurance <b><font color="green"><<pcs_stam>></font></b>
		<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>
		Your points <<pointKik>>  Points opponent <<pointKikV>>
		<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>
		<<gs 'initKik'>>
		<<if getvar("$hod") == 0>>
			<!-- !!Player attacks-->
			<font color="green">You can attack</font>
			<<actCLA 'Fast Jab'>>
				<<set $damage = rand(pcs_stren/12, pcs_stren/8)>>
				<<if getvar("$damage") <= 0>>
					<<set $damage = 1>>

				<</if>>
				<<set $koefatak = ($pc.skillLevel("agility") + $pc.skillLevel("reaction") + $pc.skillLevel("jabs")) * 2>>
				<<set $koefpop = $koefatak * 20 / 100>>
				<<set $popad = rand(koefatak - koefpop, koefatak + koefpop)>>
				<font color="green">You go for the quick jab and step forward.</font>
				<<gs 'Kikatak' 'player'>>
				<<xgt 'kikbox' 'sta'>>
			<</actCLA>>
			<<actCLA 'Power punch'>>
				<<set $damkoef = $pc.skillLevel("strength") * 20 / 100>>
				<<set $damage = rand(pcs_stren - damkoef, pcs_stren + damkoef)>>
				<<if getvar("$damage") <= 0>>
					<<set $damage = 1>>

				<</if>>
				<<set $koefatak = ($pc.skillLevel("agility") + $pc.skillLevel("reaction") + $pc.skillLevel("punch"))>>
				<<set $koefpop = $koefatak * 20 / 100>>
				<<set $popad = rand(koefatak - koefpop, koefatak + koefpop)>>
				<font color="green">You attempt a powerful punch.</font>
				<<gs 'Kikatak' 'player'>>
				<<xgt 'kikbox' 'sta'>>
			<</actCLA>>
			<<actCLA 'Big kick'>>
				<<set $damkoef = $pc.skillLevel("strength") * 20 / 100>>
				<<set $damage = rand(($pc.skillLevel("strength") - $damkoef) * 3, ($pc.skillLevel("strength") + $damkoef) * 3)>>
				<<if getvar("$damage") <= 0>>
					<<set $damage = 1>>

				<</if>>
				<<set $koefatak = ($pc.skillLevel("agility") + $pc.skillLevel("reaction") + $pc.skillLevel("kick")) / 2>>
				<<set $koefpop = $koefatak * 20 / 100>>
				<<set $popad = rand(koefatak - koefpop, koefatak + koefpop)>>
				<font color="green">You try a powerful kick.</font>
				<<gs 'Kikatak' 'player'>>
				<<xgt 'kikbox' 'sta'>>
			<</actCLA>>
		<<else>>
			<!-- !!Enemy attacks-->
			<font color="red"><<$boydesc>> attacks</font>
			<<set $tiprand = rand(0, 2)>>
			<<if getvar("$tiprand") == 0>>
				<<set $damage = rand(strenV / 12, strenV / 8)>>
				<<if getvar("$damage") <= 0>>
					<<set $damage = 1>>

				<</if>>
				<<set $koefatak = ($pc.speedV + $reactV + $JabV) * 2>>
				<<set $koefpop = $koefatak * 20 / 100>>
				<<set $popad = rand(koefatak - koefpop, koefatak + koefpop)>>
				<font color="red"><<$boydesc>> deals with quick jab, stepping forward.</font>
				<<gs 'Kikatak' 'enemy'>>
				<<xgt 'kikbox' 'sta'>>
			<<elseif getvar("$tiprand") == 1>>
				<<set $damkoef = $strenV * 20 / 100>>
				<<set $damage = rand(strenV - damkoef, strenV + damkoef)>>
				<<if getvar("$damage") <= 0>>
					<<set $damage = 1>>

				<</if>>
				<<set $koefatak = ($pc.speedV + $reactV + $punchV)>>
				<<set $koefpop = $koefatak * 20 / 100>>
				<<set $popad = rand(koefatak - koefpop, koefatak + koefpop)>>
				<font color="red"><<$boydesc>> applies a power punch.</font>
				<<gs 'Kikatak' 'enemy'>>
				<<xgt 'kikbox' 'sta'>>
			<<elseif getvar("$tiprand") == 2>>
				<<set $damkoef = $strenV * 20 / 100>>
				<<set $damage = rand(($strenV - $damkoef) * 3, ($strenV + $damkoef) * 3)>>
				<<if getvar("$damage") <= 0>>
					<<set $damage = 1>>

				<</if>>
				<<set $koefatak = ($pc.speedV + $reactV + $kikV) / 2>>
				<<set $koefpop = $koefatak * 20 / 100>>
				<<set $popad = rand(koefatak - koefpop, koefatak + koefpop)>>
				<font color="red"><<$boydesc>> goes for a kick.</font>
				<<gs 'Kikatak' 'enemy'>>
				<<xgt 'kikbox' 'sta'>>
			<</if>>
		<</if>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'sta'>>
	<<set $ionce = 0>>
	<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>
	<<if getvar("$minround") == 1>>
		<b>Time in round 0:30</b>

	<</if>>
	<<if getvar("$minround") == 2>>
		<b>Time in round 1:00</b>

	<</if>>
	<<if getvar("$minround") == 3>>
		<b>Time in round 1:30</b>

	<</if>>
	<<if getvar("$minround") == 4>>
		<b>Time in round 2:00</b>

	<</if>>
	<<if getvar("$minround") == 5>>
		<b>Time in round 2:30</b>

	<</if>>
	<<if getvar("$minround") == 6>>
		<b>Time in round 3:00</b>

	<</if>>
	<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>
	<b><<$boydesc>></b> Life <b><font color="red"><<healthV>></font></b>, Endurance <b><font color="green"><<staminaV>></font></b>
	Your life <b><font color="red"><<pcs_health>></font></b>, Endurance <b><font color="green"><<pcs_stam>></font></b>
	<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>
	<<act 'Further'>>
		<<gt 'kikbox' 'start'>>
	<</act>>
	<<if getvar("$minround") == 6>>
		<<set $minround = 0>>
		<<set $round += 1>>
		The bell rings indicating the end of round <<round>>.
		<<if $round <= $formula>>
			<<actCLA 'Back to the corner'>>
				<<image "locations/city/citycenter/gym/kickboxing/kickboxing_corner.jpg">>
				You try to rest as best as you can.
				<<act 'Return to the ring'>>
					<<gt 'kikbox' 'start'>>
				<</act>>
			<</actCLA>>
		<<elseif $round > $formula and getvar("$sparing") == 0>>
			<<actCLA 'Go to the middle of the ring for the announcement'>>
				<<if $pointKik > $pointKikV>>
					killvar'damage'
					<<gt 'enderKik' 'win'>>
				<<elseif $pointKik < $pointKikV>>
					killvar'damage'
					<<gt 'enderKik' 'loss'>>
				<<elseif $pointKik == $pointKikV>>
					killvar'damage'
					<<gt 'enderKik' 'draw'>>
				<</if>>
			<</actCLA>>
		<<elseif $round > $formula and getvar("$sparing") == 1>>
			<<if $pointKik > $pointKikV>>
				killvar'damage'
				<<gt 'enderKik' 'win'>>
			<<elseif $pointKik < $pointKikV>>
				killvar'damage'
				<<gt 'enderKik' 'loss'>>
			<<elseif $pointKik == $pointKikV>>
				killvar'damage'
				<<gt 'enderKik' 'draw'>>
			<</if>>
		<</if>>
	<</if>>
<</if>>
