:: mother_ask_new_clothes[events]
<<addtime 3>>
<h2>Your mother, <<=$npc('A29').fullname>></h2>
<<image "characters/pavlovsk/resident/mom/mother.jpg">>
<p>
    You wait until <<npc 'A29' undefined 'your mother'>><</npc>> is in a good mood, and then quickly swoop in.
    "<<=$npc('A29').nickname>>, I have nothing nice to wear. Can I please have some new clothes?"
</p>
<<if $pc.fame('pav_prostitute') >= 100 and getvar("$motherKnowWhore") >= 1>>
	<p>
        <<npc 'A29' undefined 'Your mother'>><</npc>> is outraged by the suggestion.
        "Really $pc.name_nick? You have lots of customers, and you're still asking me for clothes?
        You should have plenty of whore money, you can afford them yourself. Besides, I don't know where to buy clothes for a whore."
    </p>
    <<relationship 'A29' 'loathe'>>
	<<ret 'Move away from her'>>
<<elseif $pc.isSchoolStudent>>
	<<if $npc('A29').rel >= 50>>
		<<if $npcs.get('A29','motherClotheMonth',-1) != $time.month>>
			<p>
				<<npc 'A29' undefined 'Your mother'>><</npc>> lets out an exasperated sigh and throws her hands in the air.
				"Here we go again... <<=$npc('A29').nickname>>, I have nothing to wear!" she says, mocking your voice in a high pitch.
				You both laugh. "Alright then $pc.name_nick, let's go see if we can find something."
			</p>
			<<act 'Go to the store'>>
				<<gt 'mother_ask_new_clothes_store'>>
			<</act>>
		<<else>>
			<p>
				<<npc 'A29' undefined 'Your mother'>><</npc>> sadly shakes her head:
				I'm sorry $pc.name_nick, our budget is limited and we already went clothes shopping this month.
				You'll have to manage with what you have in your closet for a little while, maybe we can go again next month."
			</p>
			<<act 'Continue'>>
				<<gt 'mother'>>
			<</act>>
		<</if>>
	<<else>>
		<p>
			<<npc 'A29' undefined 'Your mother'>><</npc>> shakes her head.
			"I'm sorry $pc.name_nick, money is tight. We just can't afford it right now."
		</p>
		<<act 'Continue'>>
			<<gt 'mother'>>
		<</act>>
	<</if>>
<<else>>
	<p>
		<<npc 'A29' undefined 'Your mother'>><</npc>> shakes her head: "No $pc.name_nick, you're old enough to earn your own money and buy your own clothes.
		Get a job if you want new clothes."
	</p>
	<<act 'Continue'>>
		<<gt 'mother'>>
	<</act>>
<</if>>
<!-- END: mother_ask_new_clothes -->

:: mother_ask_new_clothes_store[event]
<<set $npc('A29').motherClotheMonth = $time.month>>
<<addtime 30>>
<<image "characters/pavlovsk/resident/mom/clothes_shopping.jpg">>
<p>
	Going clothes shopping with <<npc 'A29' undefined 'your mother'>><</npc>> is always an interesting experience.
	You never get to pick your own clothes, but she brings your clothes that she thinks would suit you and lets you try them on.
	You would argue but her taste in clothing is actually very good, always picking out cute outfits for you to wear that are quite trendy too.
	You go straight towards the changing booths, wondering what she'll bring you this time.
</p>
<<actCLA 'Try on the clothes she brings you'>>
	<<image "characters/pavlovsk/resident/mom/dressing_room.jpg">>
	<<set _motherRel = $npc('A29').rel>>
	<p>
		<<if _motherRel >= 90>>
			You mother seems to be in a very good mood and to enjoy shopping with and for you. When she shows back up, she presents you with six outfits.
			<<set _outfitsSubtypes = ['outfit','outfit','dress','dress','dress','school']>>
		<<elseif _motherRel >= 80>>
			You mother seems to be in a good mood and to enjoy shopping with and for you. When she shows back up, she presents you with five outfits.
			<<set _outfitsSubtypes = ['outfit','outfit','dress','dress','school']>>
		<<elseif _motherRel >= 70>>
			You mother seems to be in a rather good mood. When she shows back up, she presents you with four outfits.
			<<set _outfitsSubtypes = ['outfit','dress','dress','school']>>
		<<elseif _motherRel >= 60>>
			You mother seems to be in a okay mood. When she shows back up, she presents you with three outfits.
			<<set _outfitsSubtypes = ['outfit','dress','school']>>
		<<else>>
			You mother seems to be a little bit annoyed. She shows back up quickly, presenting you with two outfits.
			<<set _outfitsSubtypes = ['outfit','dress']>>
		<</if>>
	</p>

	<<set _pickedOutfits = []>>

	<<for _subtype range _outfitsSubtypes>>
		<<set _clothesOptions = $wardrobe.getItems({vendor:'gm',type:'clothes',subtype:_subtype})>>
		<<set _clothesOptionsIds = Object.keys(_clothesOptions)>>
		<<set _pickTries = 0>>
		<<set _randomClothId = _clothesOptionsIds.pluck()>>
		<<for ($wardrobe.has(_randomClothId) or _pickedOutfits.includes(_randomClothId) or $wardrobe.inhibition(_randomClothId) >= 30 or !$wardrobe.wearbleInhibition(_randomClothId)) and _pickTries < 50 && _clothesOptionsIds.length > 0>>
			<<set _randomClothId = _clothesOptionsIds.pluck()>>
			<<set _pickTries += 1>>
		<</for>>
		
		<<run _pickedOutfits.push(_randomClothId)>>
	<</for>>

	<div style="display: grid;grid-template-columns: 1fr 1fr;grid-gap: 1em;">
	<<set _i = 1>>
	<<for _pickedOutfit range _pickedOutfits>>
		<<act `'Pick Option '+_i` undefined `{capture:['_pickedOutfit']}`>>
			<<run $wardrobe.add(_pickedOutfit)>>
			<<gt 'mother_ask_new_clothes_buy' 1>>
		<</act>>
		<<image $wardrobe.itemImage(_pickedOutfit)>>
		<div>
		<h3>Option _i</h3>
		<<set _i += 1>>
		<<itemDescription _pickedOutfit>>
		</div>
		
	<</for>>
	</div>

	<<act 'Pick neither'>>
		<<gt 'mother_ask_new_clothes_buy'>>
	<</act>>

<</actCLA>>

:: mother_ask_new_clothes_buy[event]
<<addtime 30>>
<<image "characters/pavlovsk/resident/mom/shopping.jpg">>
<<if $location_var[$here][0]>>
	<p>You chose your new outfit and your mother pays for it.</p>
<<else>>
	<p>You tell your mother that you don't really like any of the outifts she picked.
	She seems to be at the same time puzzled that the two of you don't have the same taste and relieved that you doesn't have to spend money.</p>
<</if>>
<p>
	After leaving the shop, the two of you enjoy some nice time together chatting while strolling back home.
</p>
<<mood 'niceChat'>>
<<relationship 'A29' 'like'>>
<<ret 'Return Home'>>