:: bouling
<<set $here = 'bouling'>>
<<set $ARGS = $location_var[$here]>>
<<if $location_var[$here][0] == 'start' or !$location_var[$here][0]>>
	<<set $sexloc = 'bouling'>>
	<<set $loc = 'bouling'>>
	<<set $loc_arg = 'start'>>
	<<set $menu_loc = 'bouling'>>
	<<set $menu_arg = 'start'>>
	<<set $menu_off = 0>>
	<<set $location_type = 'public_indoors'>>
	<center><b>Bowling</b></center>
	<<image "locations/city/citycenter/mall/bowling/boul.jpg">>
	<<act 'Leave'>>
		<<gt 'torgcentr'>>
	<</act>>
	<<if $time.hour >= 8 and $time.hour <= 20 and $finances.cash >= 300>>
		<<actCLA 'Play (300 <b>₽</b>) (1:00)'>>
			<<set $menu_off = 1>>
			<<set $time.minutes += 60>>
			<<set $boulvar = 0>>
			<<set $boulingnav += rand(0,3)>>
			<<set $boulrand = rand(0,9)>>
			<<gs 'npcgeneratec' 0 'Bowling Player' `rand(18,40)`>>
			<<setinit $sex.npcId[0] = $npclastgenerated>>
			<<setinit $boydesc[0] = $npc($npclastgenerated).usedname>>
			<<gs 'npcgeneratec' 0 'Bowling Player' `rand(18,40)`>>
			<<setinit $sex.npcId[1] = $npclastgenerated>>
			<<setinit $boydesc[1] = $npc($npclastgenerated).usedname>>
			<<act 'Leave'>>
				<<gt 'bouling'>>
			<</act>>
			<<if getvar("$boulrand") == 0>>
				<<set $boulrand to null>>
				You see two guys and they challenge you to a game.
				<<actCLA 'Gamble (2000 <b>₽</b>)'>>
					<<set $boulvar = 1>> <<gt 'bouling' 'randwin'>>
				<</actCLA>>
				<<actCLA 'Refuse and play a normal game' undefined `{willpower:['sex','resist','hard']}`>>
						
						
						<<gt 'bouling' 'randwin'>>
					<</actCLA>>
				
			<<elseif getvar("$boulrand") == 1>>
				<<set $boulrand to null>>
				<p>You meet two girls, and they suggest challenging two guys to a game: Prize 5000 <b>₽</b>, lose and they have sex with you.</p>
				<<actCLA 'Play'>>
					<<set $boulvar = 2>> <<gt 'bouling' 'randwin'>>
				<</actCLA>>
				<<actCLA 'Refuse and play a normal game' undefined `{willpower:['sex','resist','hard']}`>>
						
						
						<<gt 'bouling' 'randwin'>>
					<</actCLA>>
				
			<<elseif getvar("$boulrand") > 1>>
				<<set $boulrand to null>>
				<<gt 'bouling' 'randwin'>>
			<</if>>
		<</actCLA>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'randwin'>>
	<<if getvar("$boulingnav") < 10>>
		<<set $boulwin = rand(0, 10)>>

	<</if>>
	<<if getvar("$boulingnav") >= 10 and getvar("$boulingnav") < 20>>
		<<set $boulwin = rand(0, 12)>>

	<</if>>
	<<if getvar("$boulingnav") >= 20 and getvar("$boulingnav") < 30>>
		<<set $boulwin = rand(0, 14)>>

	<</if>>
	<<if getvar("$boulingnav") >= 30 and getvar("$boulingnav") < 40>>
		<<set $boulwin = rand(0, 16)>>

	<</if>>
	<<if getvar("$boulingnav") >= 40 and getvar("$boulingnav") < 50>>
		<<set $boulwin = rand(0, 18)>>

	<</if>>
	<<if getvar("$boulingnav") >= 50 and getvar("$boulingnav") < 60>>
		<<set $boulwin = rand(0, 20)>>

	<</if>>
	<<if getvar("$boulingnav") >= 60 and getvar("$boulingnav") < 70>>
		<<set $boulwin = rand(0, 22)>>

	<</if>>
	<<if getvar("$boulingnav") >= 70 and getvar("$boulingnav") < 80>>
		<<set $boulwin = rand(0, 24)>>

	<</if>>
	<<if getvar("$boulingnav") >= 80 and getvar("$boulingnav") < 90>>
		<<set $boulwin = rand(0, 26)>>

	<</if>>
	<<if getvar("$boulingnav") >= 90>>
		<<set $boulwin = rand(0, 28)>>

	<</if>>
	<<if getvar("$boulwin") > 10 and getvar("$boulvar") == 0>>
		<<set $finances.cash += 300>>
		<p>You win and receive 300 <b>₽</b>.</p>
		<<act 'Leave'>>
			<<gt 'bouling'>>
		<</act>>
	<<elseif getvar("$boulwin") > 10 and getvar("$boulvar") == 1>>
		<<set $finances.cash += 2000>>
		<p>You win and receive 2,000 <b>₽</b>.</p>
		<<act 'Leave'>>
			<<gt 'bouling'>>
		<</act>>
	<<elseif getvar("$boulwin") > 10 and getvar("$boulvar") == 2>>
		<<set $finances.cash += 5000>>
		<p>You win and receive 5,000 <b>₽</b>.</p>
		<<act 'Leave'>>
			<<gt 'bouling'>>
		<</act>>
	<<elseif getvar("$boulwin") <= 10 and getvar("$boulvar") == 0>>
		<<set $finances.cash -= 300>>
		<p>You lose and pay 300 <b>₽</b>.</p>
		<<act 'Leave'>>
			<<gt 'bouling'>>
		<</act>>
	<<elseif getvar("$boulwin") <= 10 and getvar("$boulvar") == 1>>
		<<set $picrand = 14>>
		<<if $finances.cash >= 2000>>
			<p>You lose and have to pay 2,000 <b>₽</b>.</p>
			<<actCLA 'Offer sex instead' undefined `{willpower:['sex','self','hard']}`>>
					
					
					<<xgt 'sexdvoe' 'var'>>
				<</actCLA>>
			
			<<actCLA 'Pay'>>
				<<set $finances.cash -= 2000>> <<gt 'bouling'>>
			<</actCLA>>
		<<else>>
			You lose, but you do not have enough money to pay. Only one thing for it.
			<<actCLA 'Offer sex instead'>>
				<<xgt 'sexdvoe' 'var'>>
			<</actCLA>>
		<</if>>
	<<elseif getvar("$boulwin") <= 10 and getvar("$boulvar") == 2>>
		<<set $picrand = 11>>
		You lose, open those legs.
		<<act 'Pay'>>
			<<gt 'sexorg' 'var'>>
		<</act>>
	<</if>>
	<<set $boulwin to null>>
<</if>>
