# shop
!! This is the supermarket, located in several places

!! Main entrance
if $ARGS[0] = 'start':
	$shoplocation = 'main'
end

if $ARGS[0] = 'start' or $ARGS[0] = 'move':
	minut += 1
end

!! Main area
if $shoplocation = 'main':
	cla
	*clr

	'<center><b><font color="maroon">Supermarket</font></b></center>'
	'<center><img src="images/etogame/shop.jpg"></center>'

	if hour < 8 or hour > 20:
		'The supermarket is currently closed.'

		act 'Leave the store':gt $loc
		exit
	end

	'In the hall stands an <a href="exec:$shoplocation = ''ATM'' & gt ''shop'', ''move''">ATM</a>, from which you can withdraw money from your bank account.'
	'<br>Most of the space in the supermarket is taken up by the <a href="exec:$shoplocation = ''grocery'' & gt ''shop'', ''move''">grocery department</a>, but the store has many smaller departments as well. <a href="exec:$shoplocation=''cosmetics'' & gt ''shop'', ''move''">Cosmetics</a>, <a href="exec:$shoplocation = ''hardware'' & gt ''shop'', ''move''">hardware</a>, <a href="exec:$shoplocation = ''clothing'' & gt ''shop'', ''move''">clothing</a> and the department of <a href="exec:$shoplocation = ''tech'' & gt ''shop'', ''move''">household appliances</a>. Not far from the entrance is a <a href="exec:$shoplocation = ''icecream'' & gt ''shop'', ''move''">counter selling ice cream</a>.'
	clr
	gs 'stat'
	fcolor = rgb(0, 0, 0)
	bcolor = rgb(255, 255, 255)
	lcolor = rgb(106, 90, 205)
	!! The store in the town and in the altstart only
	if $loc = 'gorodok' and StoryLine = 1:
		if week < 6 and hour >= 8 and hour < 16:
			'Your sister <a href="exec:gt ''sister'', ''work''">Anja</a> sits at the checkout.'
		end
	end

	!! Store in the residential district
	if $loc = 'street':
		if rand(1, 20) = 20:
			if dimaQW = 0:
				'In the lobby of the store looks at you appreciatively what that man.'
				act 'See it':gt 'event', 'dima'
			elseif dimaQW = 1:
				'In the lobby of the store you notice Dima and binds you fear, you can not move.'
				act 'See it':gt 'event', 'scoreslut1'
			else
				'You met the same Dima who boyfriend fucking amuse you. Dima cocky grin came to you and said hello.'

				act 'Hello':
					cla
					'Come to me, I have no wife at home said Dima.'

					act 'No':gt 'shop', 'start'

					act 'Come':
						cla
						*clr

						if rand(1, 2) = 1:
							cla
							sex += 1
							oral += 1
							throat += 1
							cumlip += 1
							swallow += 1
							horny = 0
							'Dima took you to his house and there has ordered you to kneel. You got on his knees and he calling you a bitch and fuck you cocksucker began in the mouth.'
							'<center><img src="images/pics/gostDT2.jpg"></center>'
							'Dima finally finished your mouth, you obediently swallowed and licked the remnants of sperm with his big cock.'

							act 'Leave':gt 'street'
						else
							cla
							sex += 1
							anal += 1
							cumass += 1
							spank += 1
							boom = 5
							horny = 0
							'Dima has brought you to my house and right in the corridor began to kiss you and undress. After he stripped you he took you to the bathroom. There he sat in the bathroom and you unscrewing the showerhead put a water hose you in the ass. Quickly the feeling of fullness and Dima put you on the toilet. After an enema, he made you cancer and put you in the ass his big dick.'
							'<center><img src="images/pics/gostAnal2.jpg"></center>'
							'Dima long you fucked in the ass and beat his hands, you first it was painful, but gradually you got the taste and began to catch the buzz finally your ass filled with hot liquid and Dima moan grabbed your buttocks.'

							act 'Leave':gt 'street'
						end
					end
				end
			end
		end
	end

	'<br>The store is crowded with shoppers.'

	!! This is connected to the trade mission
	if TorgPredZ > 0:
		!! the location of the shop hasn''t been done today
		if ($loc = 'street' and StreetShopTPday ! day) or ($loc = 'Nord' and nordShopTPday ! day) or ($loc = 'down' and downShopTPday ! day):
			act 'Arrange products':
				if $loc = 'street':StreetShopTPday = day
				if $loc = 'Nord':nordShopTPday = day
				if $loc = 'down':downShopTPday = day

				cls
				mtprand = rand(40, 130)
				minut += mtprand
				TorgPredZ -= 1
				TorgPredZV += 1
				gs 'stat'
				'<center><img src="images/etogame/shop.jpg"></center>'
				'You arranged the products for quite a while and when I finally managed, then went to the cashier and you check it struck.'

				act 'Exit':gt 'shop', 'start'
			end

		end
	end

	act 'Leave the store':gt $loc
	exit
end

!! ATM
if $shoplocation = 'ATM':
	if karta > 0:
		act 'Withdraw money from the ATM':
			cla
			minut += 5
			kartaOUT = input ("How much money you want to withdraw?")

			if kartaOUT <= 0 or kartaOUT > karta:
				'<br>Invalid operation.'
			else
				karta -= kartaOUT
				money += kartaOUT
				'<br>You withdraw <<kartaOUT>> rubles. You have <<karta>> rubles left in your bank account.'
			end

			act 'Move away':gt 'shop', 'start'
		end
	else
		'You do not have any money in the bank.'
		act 'Move away':gt 'shop', 'start'
	end
end

!! Grocery
if $shoplocation = 'grocery':
	cla
	*clr

	'<center><b><font color="maroon">Grocery</font></b></center>'
	'<center><img src="images/etogame/shop1.jpg"></center>'

	if hour < 8 or hour > 20:
		'The grocery is currently closed.'

		act 'Leave the grocery':gt 'shop', 'start'
		exit
	end

	!! output from purchase
	*p iif($ARGS[0] = 'start' or $ARGS[0] = '' or $ARGS[0] = 'move', '<br/>', '<center><<$ARGS[0]>></center>')

	*pl '<center><table align="center">' + _
	FUNC ('$stock_item', 1, 'Regular food', 50, 'eda', $CURLOC) + _
	FUNC ('$stock_item', 1, 'Diet food', 250, 'edaD', $CURLOC) + _
	FUNC ('$stock_item', 10, 'Tea biscuits', 300, 'pranik', $CURLOC) + _
	iif(bag > 0, FUNC ('$single_stock_item', 1, 'Bottle of water', 50, 'bottle', $CURLOC), '') + _
	iif(bag > 0, FUNC ('$single_stock_item', 1, 'Sandwich', 100, 'buterbrod', $CURLOC), '') + _
	iif(bag > 0, FUNC ('$single_stock_item', 1, 'Bottle of wine', 500, 'wine', $CURLOC), '') + _
	'</table></center>'

	clr
	gs 'stat'
	fcolor = rgb(0, 0, 0)
	bcolor = rgb(255, 255, 255)
	lcolor = rgb(106, 90, 205)

	act 'Leave the grocery':gt 'shop', 'start'
end

!! Cosmetics
!! The scrunchies and hairpins sold here are from the Maruda Hair Mod
if $shoplocation= 'cosmetics':
	cla
	*clr

	'<center><b><font color="maroon">Cosmetics Department</font></b></center>'
	'<center><img src="images/etogame/shop2.jpg"></center>'

	if hour < 8 or hour > 20:
		'The cosmetics department is currently closed.'

		act 'Leave the cosmetics department':gt 'shop', 'start'
		exit
	end

	!! output from purchase
	*p iif($ARGS[0] = 'start' or $ARGS[0] = '' or $ARGS[0] = 'move', '<br/>', '<center><<$ARGS[0]>></center>')

	*pl '<center><table align="center">' + _
	FUNC ('$stock_item', 50, 'Cosmetics', 1000, 'kosmetica', $CURLOC) + _
	FUNC ('$stock_item', 10, 'Razors', 500, 'stanok', $CURLOC) + _
	FUNC ('$stock_item', 20, 'Sunblock', 500, 'krem', $CURLOC) + _
	FUNC ('$stock_item', 20, 'Tampons', 200, 'tampon', $CURLOC) + _
	FUNC ('$stock_item', 30, 'Shampoo', 500, 'shampoo', $CURLOC) + _
	FUNC ('$stock_item', 10, 'Hair scrunchies', 80, 'hscrunch', $CURLOC)

	*pl FUNC ('$stock_item', 12, 'Hair pins', 100, 'hpingrip', $CURLOC) + _
	iif(bag > 0, FUNC ('$stock_item', 10, 'Wipes', 100, 'salfetka', $CURLOC), '') + _
	iif(bag > 0, FUNC ('$stock_item', 10, 'Portable makeup', 1000, 'kosmetitka', $CURLOC), '') + _
	iif(bag > 0, FUNC ('$single_stock_item', 1, 'Comb', 150, 'greben', $CURLOC), '') + _
	FUNC ('$single_stock_item', 1, 'Handbag', 5000, 'bag', $CURLOC) + _
	'</table></center>'

	clr
	gs 'stat'
	fcolor = rgb(0, 0, 0)
	bcolor = rgb(255, 255, 255)
	lcolor = rgb(106, 90, 205)

	act 'Leave the cosmetics department':gt 'shop', 'start'
end

!! Hardware
if $shoplocation = 'hardware':
	cla
	*clr

	'<center><b><font color="maroon">Division of household goods</font></b></center>'
	'<center><img src="images/etogame/shop3.jpg"></center>'

	if hour < 8 or hour > 20:
		'The hardware department is currently closed.'

		act 'Leave the hardware department':gt 'shop', 'start'
		exit
	end

	!! output from purchase
	*p iif($ARGS[0] = 'start' or $ARGS[0] = '' or $ARGS[0] = 'move', '<br/>', '<center><<$ARGS[0]>></center>')

	*pl '<center><table align="center">' + _
	FUNC ('$stock_item', 20, 'Dishwashing detergent', 100, 'fairy', $CURLOC) + _
	FUNC ('$stock_item', 30, 'Clothing detergent', 250, 'poroshok', $CURLOC) + _
	FUNC ('$stock_item', 5, 'Plates', 300, 'cltarelka', $CURLOC) + _
	'</table></center>'

	clr
	gs 'stat'
	fcolor = rgb(0, 0, 0)
	bcolor = rgb(255, 255, 255)
	lcolor = rgb(106, 90, 205)

	act 'Leave the hardware department':gt 'shop', 'start'
end

!! Women''s clothing
if $shoplocation = 'clothing':
	cla
	*clr

	'<center><b><font color="maroon">Department of Women''s Clothing</font></b></center>'
	'<center><img src="images/etogame/shop4.jpg"></center>'

	if hour < 8 or hour > 20:
		'The women''s clothing department is currently closed.'

		act 'Leave the women''s clothing department':gt 'shop', 'start'
		exit
	end

	*p iif($ARGS[0] = 'start' or $ARGS[0] = '' or $ARGS[0] = 'move', '<br/>', '<center><<$ARGS[0]>></center>')

	*pl '<center><table align="center">' + _
	FUNC ('$stock_item', 1, 'Underwear', 300, 'clrbelo', $CURLOC) + _
	FUNC ('$stock_item', 7, 'Sale pack of underwear', 2000, 'clrbelo', $CURLOC) + _
	FUNC ('$single_stock_item', 1, 'Swimsuit', 1000, 'bikini', $CURLOC) + _
	'</table></center>'

	'<br/>Women''s clothing cost 2,500 rubles each.'

	clr
	gs 'stat'
	fcolor = rgb(0, 0, 0)
	bcolor = rgb(255, 255, 255)
	lcolor = rgb(106, 90, 205)

	act 'Leave the women''s clothing department':gt 'shop', 'start'

	!! This is not being done as a stock item because it needs to set the palto string value
	if palto < 2:
		'A winter coat is available for 10,000 rubles'
		if money >= 10000:
			act 'Purchase a winter coat for 10,000 rubles':
				cla
				money -= 10000
				palto = 2
				$palto = 'winter coat'
				'You bought a coat.'

				act 'Move away from the counter':gt 'shop'
			end
		end
	end

	if money >= 2500:
		if profi[1] = 0:
			act 'Inspect Office clothes number 1':
				cla
				*clr
				'<center><img src="images/clothes/profi1.jpg"></center>'
				'Office clothes.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					profi[1] = 1
					profiH[1] = 60
					profiB[1] = bedra
					gt 'shop', '<font color="green">You bought <b>Office clothes number 1</b>.</font>'
				end
			end
		end

		if profi[2] = 0:
			act 'Inspect Office clothes number 2':
				cla
				*clr
				'<center><img src="images/clothes/profi2.jpg"></center>'
				'Office clothes.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					profi[2] = 1
					profiH[2] = 60
					profiB[2] = bedra
					gt 'shop', '<font color="green">You bought <b>Office clothes number 2</b>.</font>'
				end
			end
		end

		if sarafan[1] = 0:
			act 'Inspect Colorful sundress':
				cla
				*clr
				'<center><img src="images/clothes/sarafan1.jpg"></center>'
				'Simple sundress, its main advantage is its dimensionless.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					sarafan[1] = 1
					sarafanH[1] = 60
					gt 'shop', '<font color="green">You bought <b>colorful sundress</b>.</font>'
				end
			end
		end

		if sarafan[2] = 0:
			act 'Inspect Light sundress':
				cla
				*clr
				'<center><img src="images/clothes/sarafan2.jpg"></center>'
				'Simple sundress, its main advantage is its dimensionless.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					sarafan[2] = 1
					sarafanH[2] = 60
					gt 'shop', '<font color="green">You bought <b>Light sundress</b>.</font>'
				end
			end
		end

		if short[1] = 0:
			act 'Inspect Black shorts with a purple t-shirt':
				cla
				*clr
				'<center><img src="images/clothes/short1.jpg"></center>'
				'Black shorts with a purple jersey.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					short[1] = 1
					shortH[1] = 60
					shortB[1] = bedra
					gt 'shop', '<font color="green">You bought <b>Black shorts with a purple t-shirt</b>.</font>'
				end
			end
		end

		if short[2] = 0:
			act 'Inspect Black shorts with a striped t-shirt':
				cla
				*clr
				'<center><img src="images/clothes/short2.jpg"></center>'
				'Black shorts with striped jersey.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					short[2] = 1
					shortH[2] = 60
					shortB[2] = bedra
					gt 'shop', '<font color="green">You bought <b>Black shorts with a striped t-shirt</b>.</font>'
				end
			end
		end

		if short[3] = 0:
			act 'Inspect Black shorts with a black jersey':
				cla
				*clr
				'<center><img src="images/clothes/short3.jpg"></center>'
				'Black shorts with a black T-shirt.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					short[3] = 1
					shortH[3] = 60
					shortB[3] = bedra
					gt 'shop', '<font color="green">You bought <b>Black shorts with a black jersey</b>.</font>'
				end
			end
		end

		if short[4] = 0:
			act 'Inspect Pink shorts with a pink jersey':
				cla
				*clr
				'<center><img src="images/clothes/short4.jpg"></center>'
				'pink shorts with the pink jersey.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					short[4] = 1
					shortH[4] = 60
					shortB[4] = bedra
					gt 'shop', '<font color="green">You bought <b>Pink shorts with a pink jersey</b>.</font>'
				end
			end
		end

		if short[5] = 0:
			act 'Inspect White shorts with a white bodice':
				cla
				*clr
				'<center><img src="images/clothes/short5.jpg"></center>'
				'white shorts with a white bodice.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					short[5] = 1
					shortH[5] = 60
					shortB[5] = bedra
					gt 'shop', '<font color="green">You bought <b>White shorts with a white bodice</b>.</font>'
				end
			end
		end

		if skirt[1] = 0:
			act 'Inspect White skirt with a colorful blouse':
				cla
				*clr
				'<center><img src="images/clothes/skirt1.jpg"></center>'
				'White skirt with a colorful blouse.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					skirt[1] = 1
					skirtH[1] = 60
					skirtB[1] = bedra
					gt 'shop', '<font color="green">You bought <b>White shirt with a colorful blouse</b>.</font>'
				end
			end
		end

		if skirt[2] = 0:
			act 'Inspect Black skirt with a red sweater':
				cla
				*clr
				'<center><img src="images/clothes/skirt2.jpg"></center>'
				'Black skirt with a red sweater.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					skirt[2] = 1
					skirtH[2] = 60
					skirtB[2] = bedra
					gt 'shop', '<font color="green">You bought <b>Black skirt with a red sweater</b>.</font>'
				end
			end
		end

		if skirt[3] = 0:
			act 'Inspect White skirt with a striped shirt':
				cla
				*clr
				'<center><img src="images/clothes/skirt3.jpg"></center>'
				'White skirt with a striped shirt.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					skirt[3] = 1
					skirtH[3] = 60
					skirtB[3] = bedra
					gt 'shop', '<font color="green">You bought <b>White skirt with a striped shirt</b>.</font>'
				end
			end
		end

		if skirt[4] = 0:
			act 'Inspect Skin black skirt with a red blouse':
				cla
				*clr
				'<center><img src="images/clothes/skirt4.jpg"></center>'
				'Black skirt under the skin with a red blouse.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					skirt[4] = 1
					skirtH[4] = 60
					skirtB[4] = bedra
					gt 'shop', '<font color="green">You bought <b>Skin black skirt with a red blouse</b>.</font>'
				end
			end
		end

		if skirt[5] = 0:
			act 'Inspect Black skirt with a white blouse':
				cla
				*clr
				'<center><img src="images/clothes/skirt5.jpg"></center>'
				'Black skirt with a white blouse.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					skirt[5] = 1
					skirtH[5] = 60
					skirtB[5] = bedra
				gt 'shop', '<font color="green">You bought <b>Black skirt with a white blouse</b>.</font>'
				end
			end
		end

		if pants[1] = 0:
			act 'Inspect Pants with a blouse number 1':
				cla
				*clr
				'<center><img src="images/clothes/pants1.jpg"></center>'
				'Pants with a blouse.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					pants[1] = 1
					pantsH[1] = 60
					pantsB[1] = bedra
					gt 'shop', '<font color="green">You bought <b>Pants with a blouse number 1</b>.</font>'
				end
			end
		end

		if pants[2] = 0:
			act 'Inspect Pants with a blouse number 2':
				cla
				*clr
				'<center><img src="images/clothes/pants2.jpg"></center>'
				'Pants with a blouse.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					pants[2] = 1
					pantsH[2] = 60
					pantsB[2] = bedra
					gt 'shop', '<font color="green">You bought <b>Pants with a blouse number 2</b>.</font>'
				end
			end
		end

		if pants[3] = 0:
			act 'Inspect Pants with a blouse number 3':
				cla
				*clr
				'<center><img src="images/clothes/pants3.jpg"></center>'
				'Pants with a blouse.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					pants[3] = 1
					pantsH[3] = 60
					pantsB[3] = bedra
					gt 'shop', '<font color="green">You bought <b>Pants with a blouse number 3</b>.</font>'
				end
			end
		end

		if pants[4] = 0:
			act 'Inspect Pants with a blouse number 4':
				cla
				*clr
				'<center><img src="images/clothes/pants4.jpg"></center>'
				'Pants with a blouse.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					pants[4] = 1
					pantsH[4] = 60
					pantsB[4] = bedra
					gt 'shop', '<font color="green">You bought <b>Pants with a blouse number 4</b>.</font>'
				end
			end
		end

		if pants[5] = 0:
			act 'Inspect Pants with a blouse number 5':
				cla
				*clr
				'<center><img src="images/clothes/pants5.jpg"></center>'
				'Pants with a blouse.'
				'Costs 2,500 rubles.'

				act 'Leave':gt 'shop'

				act 'Buy':
					cla
					money -= 2500
					pants[5] = 1
					pantsH[5] = 60
					pantsB[5] = bedra
					gt 'shop', '<font color="green">You bought <b>Pants with a blouse number 5</b>.</font>'
				end
			end
		end
	end
end

!! Household appliances
if $shoplocation = 'tech':
	cla
	*clr

	'<center><b><font color="maroon">Department of household appliances</font></b></center>'
	'<center><img src="images/etogame/shop5.jpg"></center>'

	if hour < 8 or hour > 20:
		'The household appliance department is currently closed.'

		act 'Leave the appliance department':gt 'shop', 'start'
		exit
	end

	*p iif($ARGS[0] = 'start' or $ARGS[0] = '' or $ARGS[0] = 'move', '<br/>', '<center><<$ARGS[0]>></center>')

	*pl '<center><table align="center">' + _
	FUNC ('$single_stock_item', 1, 'Small TV with a picture tube', 35000, 'TV', $CURLOC) + _
	FUNC ('$single_stock_item', 2, 'Large Plasma TV', 35000, 'TV', $CURLOC) + _
	FUNC ('$single_stock_item', 1, 'Computer', 25000, 'komp', $CURLOC) + _
	iif(komp > 0, FUNC ('$single_stock_item', 1, 'Computer game Dead Sunset', 500, 'GameCD2', $CURLOC), '') + _
	FUNC ('$single_stock_item', 1, 'Dishwasher', 50000, 'posudomashina', $CURLOC) + _
	FUNC ('$single_stock_item', 1, 'Washing machine', 50000, 'stiralka', $CURLOC) + _
	FUNC ('$single_stock_item', 1, 'Camera', 10000, 'zenit', $CURLOC) + _
	FUNC ('$single_stock_item', 1, 'Mini camera disguised as a cigarette pack', 40000, 'minifoto', $CURLOC) + _
	'</table></center>'

	clr
	gs 'stat'
	fcolor = rgb(0, 0, 0)
	bcolor = rgb(255, 255, 255)
	lcolor = rgb(106, 90, 205)

	act 'Leave the appliance department':gt 'shop', 'start'
end

!! Ice cream counter
if $shoplocation = 'icecream':
	'Ice cream is available for sale for 50 rubles.'

	act 'Move away from the counter':gt 'shop', 'start'

	if money >= 50:
		act 'Buy ice cream':
			cls
			money -= 50
			fat += 50
			manna += 500
			water = 20
			energy = 20
			!! perkice is currently only ever referenced in stat and only then to decrement itself if > 0, so it does not currently do anything
			perkice += 1
			gs 'stat'
			'<center><img src="images/etogame/icecreem.jpg"></center>'
			'You bought ice cream and ate it not going far.'

			act 'Move away from the counter':gt 'shop', 'start'
		end
	end
end

--- shop ---------------------------------
