:: kruchess
<<set $here = 'kruchess'>>
<<set $ARGS = $location_var[$here]>>
<!-- !2021/05/02-->
<<set $loc_arg = ''>>
<<set $loc = 'kruchess'>>
<<set $pc.frost = 0>>
<<set $menu_loc = 'kruchess'>>
<<set $menu_arg = ''>>
<<set $menu_off = 0>>

<h2>Chess Club</h2>
<<image "locations/pavlovsk/community/chess/kruchess.jpg">>
<<if $time.hour > 20>>
	Chess club is closed. The coach and some players are tidying away the boards and pieces.
	<<act 'Leave'>>
		<<gt 'pav_commclubs'>>
	<</act>>
<<else>>
	<<if $time.weekday != 6>>
		The kids are sitting around playing practice games, while being watched over and helped by Coach Genrikh.
		<<actCLA 'Spend an hour practicing with assistance from the coach'>>
			<<run $pc.skillExperienceGain('chess',rand(0,1))>>
			<<run $pc.skillExperienceGain('intelligence',rand(0,1))>>
			<<set $time.minutes += 60>>
			<<image "locations/pavlovsk/community/chess/play#.jpg" 1 2>>
			You spend the next hour practicing against the other players with the coach walking around and stopping to help out or point things out. You learn a little every time. You also discuss the various chess openings and which ones are the best, which can often get lively.
			<<act 'Return'>>
				<<gt 'kruchess'>>
			<</act>>
		<</actCLA>>
		<<actCLA 'Talk to the other players'>>
			<<set $time.minutes += 30>>
			<<set $pc.mood += 5>>
			<<image "locations/pavlovsk/community/chess/talk.jpg">>
			You take a break from playing and talk to a couple of your fellow chess enthusiasts. After first focusing on chess for a while, the conversation drifts off to other topics. You have a good time chatting and relaxing.
			<<act 'Return'>>
				<<gt 'kruchess'>>
			<</act>>
		<</actCLA>>
		<<actCLA 'Talk to Evgeny Kuznetsov'>>
			<<set $time.minutes += 30>>
			<<run $pc.skillExperienceGain('chess',2)>>
			<<set $npc('A151').rel += 5>>
			<<image "characters/shared/headshots_main/big151.jpg">>
			<p>You sit down next to Evgeny to talk. At first you try to catch his interest with ordinary things; he barely even responds to you, preoccupied playing against himself. Then you bring up a recent opening you have been trying and he perks up. Soon the two of you are talking about various openings and he shares with you some of his favorite ones and how he moves them to the mid game. You learn a bit about chess and feel like you are better friends with Evgeny.</p>
			<<act 'Return'>>
				<<gt 'kruchess'>>
			<</act>>
		<</actCLA>>
	<<else>>
		On Saturdays, after a week''s training, club members spend the whole day playing against each other.
		<<if getvar("$chess_win") < 5>>
			<p>You have beaten Vitalik '+str(chess_win)+' times.</p>
		<<elseif getvar("$chess_win") >= 5 and getvar("$chess_win") < 10>>
			You have beaten Vitalik 5 times. You cannot play against him anymore.
			<p>You have beaten Kostya '+str(chess_win-5)+' times.</p>
		<<elseif getvar("$chess_win") >= 10 and getvar("$chess_win") < 15>>
			You have beaten Vitalik 5 times. You cannot play against him anymore.
			You have beaten Kostya 5 times. You cannot play against him anymore.
			<p>You have beaten Sergei '+str(chess_win-10)+' times.</p>
		<<elseif getvar("$chess_win") >= 15 and getvar("$chess_win") < 20>>
			You have beaten Vitalik 5 times. You cannot play against him anymore.
			You have beaten Kostya 5 times. You cannot play against him anymore.
			You have beaten Sergei 5 times. You cannot play against him anymore.
			<p>You have beaten Coach Genrikh '+str(chess_win-15)+' times.</p>
		<<elseif getvar("$chess_win") >= 20>>
			You have beaten Vitalik 5 times. You cannot play against him anymore.
			You have beaten Kostya 5 times. You cannot play against him anymore.
			You have beaten Sergei 5 times. You cannot play against him anymore.
			You have beaten Coach Genrikh 5 times. You cannot play against him anymore.
			<p>You have beaten Evgeny Kuznetsov '+str(chess_win-20)+' times. He is the only opponent left you can challenge.</p>
		<</if>>
		<p>You have won a total of '+str(chess_win)+' chess matches.</p>
		<<if getvar("$chess_win") < 5>>
			<p>You are paired against Vitalik, the youngest boy in the club. Despite his age he has already achieved rank 4, the lowest official chess rank corresponding to an ELO rating of 1000+.</p>
			<<actCLA 'Play chess with Vitalik'>>
				<<set $chess_name = 'Vitalik'>>
				<<set $chessV = 10>>
				<<gt 'chessplay'>>
			<</actCLA>>
		<<elseif getvar("$chess_win") < 10>>
			You get to play against Kostya, who recently advanced to rank 3 after passing 1400 ELO points.
			<<actCLA 'Play chess with Kostya'>>
				<<set $chess_name = 'Kostya'>>
				<<set $chessV = 30>>
				<<gt 'chessplay'>>
			<</actCLA>>
		<<elseif getvar("$chess_win") < 15>>
			You sit down to play Sergei. You recall that he is a rank 2 player with an ELO rating of more than 1600.
			<<actCLA 'Play chess with Sergei'>>
				<<set $chess_name = 'Sergei'>>
				<<set $chessV = 50>>
				<<gt 'chessplay'>>
			<</actCLA>>
		<<elseif getvar("$chess_win") < 20>>
			You are facing Coach Genrikh. At his peak he achieved an ELO ranking of just over 2000, and despite his skills declining with age he still plays at the level of a rank 1 player.
			<<actCLA 'Play chess with Coach Genrikh'>>
				<<set $chess_name = 'Coach Genrikh'>>
				<<set $chessV = 70>>
				<<gt 'chessplay'>>
			<</actCLA>>
		<<elseif getvar("$chess_win") >= 20>>
			You are challenging Evgeny Kuznetsov. He has already won the regional championship twice and placed well at the nationals each year he has attended. He is already rated above a 2200 in the ELO rankings.
			<<actCLA 'Play chess with Evgeny'>>
				<<set $chess_name = 'Evgeny'>>
				<<set $chessV = 90>>
				<<gt 'chessplay'>>
			<</actCLA>>
		<</if>>
	<</if>>
	<<act 'Leave'>>
		<<gt 'pav_commclubs'>>
	<</act>>
<</if>>
