code:
# end_day_screen
!End Day Screen
!Overhauled by crushboss

gs '_layout'

killvar '$text'
menu_form = 0
$info_bar = ''
$place = ''
$npc_id = ''
$interaction_type = ''
$bg_path = ''
jpg = 0
npc = 0

if end_day_phase = 0:
	end_day_phase = 1
	if sound_on = 1: close all & play 'content/snd/night.wav', music_volume, 'only, loop'
end

if exam_in_progress = 1:
	gs 'demo_estate'
	slave['energy'] = slave['stamina']
end

if slave_auto_rest = 1:
	slave_auto_rest = 0
	$text = $idle[rand(1,5)]
	$bg_path = func('display_pic', 'slave', 'rest', 'girls/normal_scenes/')
	$place = 'bedroom'
	if assistant_quiet_rule = 0: jump 'loop'
end

if slave_auto_cook = 1:
	slave_auto_cook = 0
	assistant_auto_cook = 0
	master_auto_cook = 0
	$bg_path = func('display_pic', 'slave', 'cook', 'girls/normal_scenes/')
	$place = 'kitchen'
	slave_skill = min(slave['cook'], max(1, slave['mood']))
	dynamic $replace("$text = '  <<$slave_cook_description[min(slave_skill, cooked_food_plus)]>>'", 'dyn'+'slave', 'slave') &! description based on lesser of meal quality or skill
	if assistant_quiet_rule = 0: jump 'loop'
end

if assistant_auto_cook = 1:
	assistant_auto_cook = 0
	master_auto_cook = 0
	slave_auto_cook = 0
	$bg_path = func('display_pic', 'assistant', 'cook', 'girls/normal_scenes/')
	$place = 'kitchen'
	slave_skill = min(assistant['cook'], max(1, assistant['mood']))
	dynamic $replace("$text = '  <<$slave_cook_description[min(slave_skill, cooked_food_plus)]>>'", 'dyn'+'slave', 'assistant') &! description based on lesser of meal quality or skill
	if assistant_quiet_rule = 0: jump 'loop'
end

if master_auto_cook = 1:
	master_auto_cook = 0
	assistant_auto_cook = 0
	slave_auto_cook = 0
	if kitchen > 0:
		$bg_path = 'scene\master_cooking'
		g = rand(1, picMax['master_cooking'])
		if g > 1: $bg_path += '_' + $str(g)
		$place = 'kitchen'
		$text = $master_cook_description[cooked_food_plus] &! description based on meal quality
	else
		$place = 'study'
		$text = $replace($master_cook_description[cooked_food_plus], 'the kitchen', 'your pile of canned food')
	end
	if assistant_quiet_rule = 0: jump 'loop'
end

if master_eats_dinner = 1:
	master_eats_dinner = 0
	! if the slaver ate out during the day, he skips dinner unless it would raise his strength
	! eating high quality food can raise master health up to one level below the food quality grade (max of A+ health with S+ food)
	if sound_on = 1: play 'content/snd/dinner.wav', sound_volume
	if kitchen > 0:
		$place = 'kitchen'
	else
		$place = 'study'
	end
!	$bg_path = 'scene/show_food'
!	g = rand(1, picMax['show_food'])
!	if g > 1: $bg_path += '_' + $str(g)
	$text = '  Tonight’s dinner:
 <<$meal_name[$cooked_meal]>>'
	if assistant_quiet_rule = 0: jump 'loop'
end

if slave_auto_wash > 0:
	slave_auto_wash = 0
	$bg_path = func('display_pic', 'slave', 'wash', 'girls/normal_scenes/')
	$place = 'bathroom'
	$text = $slave_washes_master
	if assistant_quiet_rule = 0: jump 'loop'
end

if assistant_auto_wash > 0:
	assistant_auto_wash = 0
	$bg_path = func('display_pic', 'assistant', 'wash', 'girls/normal_scenes/')
	$place = 'bathroom'
	$text = $assistant_washes_master
	if assistant_quiet_rule = 0: jump 'loop'
end

if slave_auto_tentacle = 3 - end_day_phase:
	slave_auto_tentacle = 0 &! reset first - two branches because of quiet rule
	$bg_path = func('display_pic', 'slave', 'tentacles', 'girls/sex_scenes/')
	$place = 'study'
	if slave['sub_tentacles'] > tentacle_size:
		$text = '  <<$slave_name>> takes a bucket-pot and goes to the fiend pen. Thanks to previous experience, she manages not to lose control. While some insatiable slippery tentacles penetrate all her holes, she grabs the other feelers and milks them directly into the bucket. Fiend Cum Gained: <<semen_gain[max(0, tentacle_size - spawn_milked)]>>'
		decade_semen += semen_gain[max(0, tentacle_size - spawn_milked)]
		spawn_milked += slave['sub_tentacles']
		if spawn_milked > tentacle_size: tentacle_state = 2 &! satisfied
		if felicity = 1 and $quest12 ! 'fail' and active[$quest[12]] = 1 and slave_type ! 2572: $quest12 = 'fail' & $quest12_failreason = 'It seems you haven’t been making her care for your fiend, slaver.'
		if assistant_quiet_rule = 0: jump 'loop'
	else
		$text = '  <<$slave_name>> takes a bucket-pot and goes to the fiend pen. Nevertheless, her efforts to milk the thing lead to nothing. Braided with powerful tentacles, your slave completely loses touch with reality and gets orgasm after orgasm until the fiend pumps her holes with seed.'
		jump 'loop'
	end
end

if assistant_auto_tentacle = 3 - end_day_phase:
	assistant_auto_tentacle = 0 &! reset first - two branches because of quiet rule
	$bg_path = func('display_pic', 'assistant', 'tentacles', 'girls/sex_scenes/')
	$place = 'study'
	if assistant['sub_tentacles'] > tentacle_size:
		$text = '  <<$assistant_name>> takes a bucket-pot and goes to the fiend pen. Thanks to previous experience, she manages not to lose control. While some insatiable slippery tentacles penetrate all her holes, she grabs the other feelers and milks them directly into the bucket. Fiend Cum Gained: <<semen_gain[max(0, tentacle_size - spawn_milked)]>>'
		decade_semen += semen_gain[max(0, tentacle_size - spawn_milked)]
		spawn_milked += assistant['sub_tentacles']
		if spawn_milked > tentacle_size: tentacle_state = 2 &! satisfied
		if felicity = 1 and $quest12 ! 'fail' and active[$quest[12]] = 1 and assistant_type ! 2572: $quest12 = 'fail' & $quest12_failreason = 'It seems you haven’t been making her care for your fiend, slaver.'
		if assistant_quiet_rule = 0: jump 'loop'
	else
		$text = '  <<$assistant_name>> takes a bucket-pot and goes to the fiend pen. Nevertheless, her efforts to milk the thing lead to nothing. Braided with powerful tentacles, your assistant completely loses touch with reality and gets orgasm after orgasm until the fiend pumps her holes with seed.'
		jump 'loop'
	end
end

if slave_auto_clean = 3 - end_day_phase:
	slave_auto_clean = 0
	assistant_auto_clean = 0
	master_auto_clean = 0
	$bg_path = func('display_pic', 'slave', 'clean', 'girls/normal_scenes/')
	$place = 'study'
	slave_skill = slave['service']
	if slave['mood'] < 0 and slave_skill > 0: slave_skill = max(1, slave_skill + slave['mood'])
	dynamic $replace("$text = '  <<$slave_cleans_description[slave_skill]>>'", 'dyn'+'slave', 'slave') &! evaluate delayed sub-expressions
	if assistant_quiet_rule = 0: jump 'loop'
end

if assistant_auto_clean = 3 - end_day_phase:
	assistant_auto_clean = 0
	slave_auto_clean = 0
	master_auto_clean = 0
	$bg_path = func('display_pic', 'assistant', 'clean', 'girls/normal_scenes/')
	$place = 'study'
	dynamic $replace("$text = '  <<$slave_cleans_description[assistant[""service""]]>>'", 'dyn'+'slave', 'assistant') &! evaluate delayed sub-expressions
	if assistant_quiet_rule = 0: jump 'loop'
end

if master_auto_clean = 1:
	master_auto_clean = 0
	assistant_auto_clean = 0
	slave_auto_clean = 0
	$bg_path = 'scene/master_clean'
	g = rand(1, picMax['master_clean'])
	if g > 1: $bg_path += '_' + $str(g)
	$place = 'study'
	$text = $master_clean_description[master_butler]
	if assistant_quiet_rule = 0: jump 'loop'
end

if assistant_washed_slave = 3 - end_day_phase:
	assistant_washed_slave = 0
	$bg_path = func('display_pic', 'slave, assistant', 'lesbath', 'girls/normal_scenes/')
	$place = 'bathroom'
	$text = $assistant_washes_slave
	if assistant_quiet_rule = 0: jump 'loop'
end

if slave_auto_bathing = 3 - end_day_phase:
	slave_auto_bathing = 0
	$bg_path = func('display_pic', 'slave', 'bath', 'girls/normal_scenes/')
	$place = 'bathroom'
	dynamic $replace("$text = '<<$bathing_slave_alone[$slave_psy_status]>>'", 'dyn'+'slave', 'slave') &! evaluate delayed sub-expressions with substitution
	if assistant_quiet_rule = 0: jump 'loop'
end

if bath = 0 and assistant_state = CONST_INT['slave_exist'] and assistant['hygiene'] > 2 and assistant['energy'] > 0 and farmhand_state = CONST_INT['slave_exist'] and farmhand['hygiene'] > 1 and farmhand['energy'] > 0 and sparks > 2:
	$place = 'onsen'
	$text = '  To maintain their hygiene, <<$assistant_name>> and <<$farmhand_name>> went to clean themselves at the public bath (cost: 2 sparks).'
	assistant_rate['angst'] -= (assistant['custom'] + assistant['instinct'] + assistant['rational'] + assistant['moral'])
	farmhand_rate['angst'] -= (farmhand['custom'] + farmhand['instinct'] + farmhand['rational'] + farmhand['moral'])
	assistant['pos_games'] = max(assistant['pos_games'], 2)
	farmhand['pos_games'] = max(farmhand['pos_games'], 2)
	sparks -= 2
	assistant['half_action'] += 2
	farmhand['half_action'] += 2
	dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'assistant')
	dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'farmhand')
	if assistant_quiet_rule = 0: jump 'loop'
else
	if assistant_state = CONST_INT['slave_exist'] and assistant['hygiene'] > 2 and assistant['energy'] > 0 and sparks > 2:
		if bath = 0:
			$place = 'onsen'
			$text = '  To maintain her hygiene, <<$assistant_name>> went to clean herself at the public bath (cost: 2 sparks).'
			assistant_rate['angst'] -= (assistant['custom'] + assistant['instinct'] + assistant['rational'] + assistant['moral'])
			assistant['pos_games'] = max(assistant['pos_games'], 2)
			sparks -= 2
			assistant['half_action'] += 2
		else
			$place = 'bathroom'
			$bg_path = func('display_pic', 'assistant', 'bath', 'girls/normal_scenes/')
			dynamic $replace("$text = '<<$bathing_slave_alone[$assistant_psy_status]>>'", 'dyn'+'slave', 'assistant') &! evaluate delayed sub-expressions with substitution
			assistant['half_action'] += 1
		end
		dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'assistant')
		if assistant_quiet_rule = 0: jump 'loop'
	end
	if farmhand_state = CONST_INT['slave_exist'] and farmhand['hygiene'] > 2 and farmhand['energy'] > 0 and sparks > 2 and $farmhand_psy_status ! '':
		if bath = 0:
			$place = 'onsen'
			$text = '  To maintain her hygiene, <<$farmhand_name>> went to clean herself at the public bath (cost: 2 sparks).'
			farmhand_rate['angst'] -= (farmhand['custom'] + farmhand['instinct'] + farmhand['rational'] + farmhand['moral'])
			farmhand['pos_games'] = max(farmhand['pos_games'], 2)
			sparks -= 2
			farmhand['half_action'] += 2
		else
			$place = 'bathroom'
			$bg_path = func('display_pic', 'farmhand', 'bath', 'girls/normal_scenes/')
			dynamic $replace("$text = '<<$bathing_slave_alone[$farmhand_psy_status]>>'", 'dyn'+'slave', 'farmhand') &! evaluate delayed sub-expressions with substitution
			farmhand['half_action'] += 1
		end
		dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'farmhand')
		if assistant_quiet_rule = 0: jump 'loop'
	end
end

if slave_beg_for_sex = 1:
	slave_beg_for_sex = 0
	$bg_path = $slave["fullimage"]
	dynamic $replace("$text = '<<$slave_begs_for_sex[rand(1,10)]>>'", 'dyn'+'slave', 'slave')
	$place = 'bedroom'
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if assistant_beg_for_sex = 1:
	assistant_beg_for_sex = 0
	$bg_path = $assistant["fullimage"]
	dynamic $replace("$text = '<<$slave_begs_for_sex[rand(1,10)]>>'", 'dyn'+'slave', 'assistant')
	$place = 'bedroom'
	npc = 1
	$npc_id = 'ваша_ассистентка'
	if assistant_quiet_rule = 0: jump 'loop'
end

if slave_will_masturbate = 1 and previous_energy >= 0:
	slave_will_masturbate = 0
	$place = 'bedroom'
	$bg_path = func('display_pic', 'slave', 'masturbation', 'girls/sex_scenes/')
	$subskill = 'slave["sub_masturbation"]'
	$subskill_xp = 'slave["sub_masturbation_xp"]'
	dynamic $replace($dyn_advance_sex_skills_nolesson, 'dyn'+'slave', 'slave')
	if slave['no_orgasm_rule'] = 0:
		$text = '  You caught your slave during masturbation, but she does not stop it. Looking into your eyes, <<$slave_name>> fingers more fiercely, her movements sharp and jittery, and then she throws her head back and writhes in the orgasmic throes, uttering moans of pleasure.'
		slave_rate['mood'] += slave['arousal']
		slave_rate['arousal'] -= ((slave['sub_masturbation']*3) + (slave['arousal']*3))
		slave['pos_orgasm'] += 1 &! moodlet exponentially decays in next_day -ImperatorAugustus
	elseif slave['no_orgasm_rule'] = 1:
		if slave['rules_broken'] = 1 or slave['arousal'] > slave['obedience']:
			$text = '  You caught your slave during masturbation, but she does not stop it. You let her continue, recalling however, that she cannot cum. Nevertheless, <<$slave_name>> can’t or doesn’t want to stop in time, and she can not hide her moan of orgasm. Well, you have to punish her now…'
			slave_rate['arousal'] -= ((slave['sub_masturbation']*3) + (slave['arousal']*3))
			slave['pos_orgasm'] += 1 &! moodlet exponentially decays in next_day -ImperatorAugustus
			dynamic $sin_gained_now, 'slave', 4
			slave['caught_masturbating'] = 3 &! how many days to remember being caught
		else
			$text = '  You caught your slave during masturbation, but she does not stop it. You let her continue, recalling however, that she cannot cum. Obeying your will <<$slave_name>> does not bring herself to climax, pausing at the end. Poor thing will exhaust herself…'
			slave_rate['arousal'] += (slave['sub_masturbation'] * slave['arousal'])
			slave_rate['custom'] += 1
		end
	end
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if slave_masturbating_anyway = 1 and previous_energy >= 0:
	slave_masturbating_anyway = 0
	$place = 'bedroom'
	$bg_path = func('display_pic', 'slave', 'masturbation', 'girls/sex_scenes/')
	$subskill = 'slave["sub_masturbation"]'
	$subskill_xp = 'slave["sub_masturbation_xp"]'
	dynamic $replace($dyn_advance_sex_skills_nolesson, 'dyn'+'slave', 'slave')
	if slave['obedience'] + slave['no_orgasm_rule'] >= slave['arousal']:
		$text = '  You caught your slave during masturbation, and she stops immediately, knowing she broke the rules you set.'
		slave_rate['arousal'] += slave['sub_masturbation'] + (slave['arousal']*3)
	else
		$text = '  You caught your slave during masturbation, but she’s either too disobedient or too aroused to care that she’s breaking the rules you set. Her movements become sharp and jittery, and then she throws her head back and writhes in orgasmic throes, uttering moans of pleasure.'
		slave_rate['arousal'] -= ((slave['sub_masturbation']*3) + (slave['arousal']*3))
		slave['pos_orgasm'] += 1 &! moodlet exponentially decays in next_day -ImperatorAugustus
	end
	dynamic $sin_gained_now, 'slave', 4
	slave['caught_masturbating'] = 3 &! how many days to remember being caught
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if tentacle_grow_event = 1:
	$place = 'study'
	$text = $tentacle_grow[tentacle_size]
	lab_store['slime'] += semen_gain[tentacle_size]
	tentacle_size += 1 &! increment before setting bg_path
	$bg_path = 'scene\tentacle_growth_<<tentacle_size>>'
	tentacle_hp = 0
	tentacle_grow_event = 0
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if tentacle_death_event = 1:
	$text = $tentacle_death[tentacle_size]
	$place = 'study'
	$bg_path = 'scene\tentacle_death'
	lab_store['slime'] += semen_gain[tentacle_size]
	pet_tentacle = 0
	tentacle_size = 0
	tentacle_hp = 0
	tentacle_death_event = 0
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if end_of_the_day = 1:
	$text = $nothing_special
	$place = 'bedroom'
!	$bg_path = 'scene/night'
!	g = rand(1, picMax['night'])
!	if g > 1: $bg_path += '_' + $str(g)
	end_of_the_day = 0
	jump 'loop'
end

if cow_escape = 1:
	$place = 'barn'
	$text = '  Your slave cannot endure this night in the cowshed, and comes back home during the night. You can punish her for it, and put her back in the barn: but you might have to lock her in to be sure she does not leave the cowshed next time. Anyway this night out of the barn probably didn’t have any positive outcome on her training…'
	$bg_path = $cow["fullimage"]
	dynamic $sin_gained_now, 'cow', cow['cowSK'] &! guilt cap set to cow training level, was uncapped before - ImperatorAugustus
	cow['neg_barn'] = 2
	cow['neg_barn_plus'] = 1
	cow_escape = 0
	barn_first_night = 0
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if barn_first_night = 1:
	$place = 'barn'
	$bg_path = $cow["fullimage"]
	$text = 'If you read this there is something wrong.'
	if cow['barn_custom'] = 0:
		$text = '  The mind of your cow is broken. She doesn’t care about being in the barn or elsewhere. However, her production will definitely remain quite low.'
		no_more_barn_update = 1
	elseif cow['barn_custom'] = 6:
		$text = '  At daybreak you go to the barn: your cow obviously looks happy in her new environment. This new life is exactly what she needs and wants: she can stay there forever, or until you choose to sell her.'
	elseif cow['barn_custom'] = 5:
		$text = '  After this first night <<$cow_name>> looks fairly confident, and seems to be in familiar territory. She has some room for improvement, but she will eventually become a productive and happy cow.'
	elseif cow['barn_custom'] = 4:
		$text = '  After a first night in the barn, you note that <<$cow_name>> seems to be on familiar ground, but does not look very confident. However she could become a perfect cow if she accepts, in the end, her new condition.'
	elseif cow['barn_custom'] = 3:
		$text = '  After a night you can clearly note that your (potential) cow is lacking experience with barns and didn’t renounce her former life. But with enough experience, even if her mind resists, she could accept it a bit more each day…'
	elseif cow['barn_custom'] = 2:
		$text = '  After a night you can clearly note that your (potential) cow is lacking experience with barns and didn’t renounce her former life. Even worse, her mind seems unstable, and would probably break before <<$cow_name>> would accept her fate.'
	elseif cow['barn_custom'] = 1:
		$text = '  In the morning you go to the cowshed: your slave clearly had a terrible night. She’s standing, and asks you to take her back home. You notice angst in her voice: she’s definitely not ready for the barn… You can leave <<$cow_name>> locked up here, but it will be disastrous for her mind.'
	end
	barn_first_night = 0
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if barn_first_decade = 1 and no_more_barn_update = 0:
	$place = 'barn'
	$bg_path = $cow["fullimage"]
	$text = 'If you read this there is something wrong.'
	if cow['barn_custom'] = 0:
		$text = '  After a decade in the barn, it’s obvious that the mind of your cow is broken. She doesn’t care about being here or elsewhere. Her skill as a cow will slowly increase, however, her production will definitely remain rather low.'
	elseif cow['barn_custom'] = 6:
		$text = '  The girl you put in the barn is now a perfect milk cow. She will probably never be able to happily live elsewhere than in a cowshed, where she belongs. You can keep her there, for her milk production, or sell her to the public farm, where she will be perfectly content.'
	elseif cow['barn_custom'] = 5:
		$text = '  Ten days later, your cow has nearly accepted her new role, and lives rather happily, loafing in the straw, waiting for milking and impregnations. She’s on the right track to definitely become a perfect milk cow.'
	elseif cow['barn_custom'] = 4:
		$text = '  Your cow has been in the barn for a decade: she has nearly accepted her new role as a mere milk cow, and seems to like it, but her mind is damaged. To complete the training yourself could help her to finish her "transformation", but… wouldn’t it be easier to just let things happen?'
	elseif cow['barn_custom'] = 3:
		$text = '  After a decade, your cow is still reluctant to accept the barn as her new home. But time does wonders, and your slave’s spirit is strong enough to hope that she will consider herself as a cow before her mind breaks.'
	elseif cow['barn_custom'] = 2:
		$text = '  A decade later, your cow is in a deplorable mental state, still having trouble considering herself as a mere milk cow. She will probably not make it, and her mind will shatter long before she accepts her new status.'
	elseif cow['barn_custom'] = 1:
		$text = '  After a decade, your cow is still not used to the barn: her life here is a nightmare, and it’s more than likely that her spirit will break, sooner or later. But, after all, does a cow need a sound mind?'
	end
	barn_first_decade = 0
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if slave_attack = 1:
	$place = 'bedroom'
	dynamic $sin_gained_now, 'slave'
	slave['angst'] += 1
	slave_rate['angst'] = 10
	! added angst increase for slave attacking master - ImperatorAugustus
	количество_врагов = 1
	$враг[1] = 'воспитуемая'
	slave['beaten'] = 1
	slave['beaten_ever'] = 1
	$fight_return = 'end_day_screen'
	fighting_experience = slave['gladiatrix']
	msg '  You wake feeling threatened and instinctively roll off the bed. Where you had just laid is stuck a knife! Looks like <<$slave_name>> stole it from the kitchen and decided to kill you!'
	combatant = 0 &! master is in the defending slot
	gt 'начать_бой'
end

if slave['menstruation'] = 1:
	$text = $menstrual_anounce
	$place = 'bedroom'
	$bg_path = 'scene\menstruation'
	g = rand(1, picMax['menstruation'])
	if g > 1: $bg_path += '_' + $str(g)
	slave['menstruation'] = 2
	if assistant_quiet_rule = 0: jump 'loop'
end

if assistant['menstruation'] = 1:
	$text = $menstrual_anounce_assistant
	$place = 'bedroom'
	$bg_path = 'scene\menstruation'
	g = rand(1, picMax['menstruation'])
	if g > 1: $bg_path += '_' + $str(g)
	assistant['menstruation'] = 2
	if assistant_quiet_rule = 0: jump 'loop'
end

!Egglaying - fixed - crushboss (revised and added note about barn taking excess eggs from fridge to sell - ImperatorAugustus)
if total_eggs_laid_today > 0:
	$text = ''
	$end_day_screen_collect_eggs = {
		if dynslave['egg_time'] > 0 and dynslave_state = CONST_INT['slave_exist']:
			$text += ' <<$dynslave_name>> laid a fresh egg for you.
'
			decade_eggs += 1
			dynslave['egg_time'] = 0
		end
	}
	dynamic $do_for_each_slave_in_list, '$end_day_screen_collect_eggs', '$unfrozen_slave_characters'
	$place = 'bedroom'
	if kitchen > 0: $place = 'kitchen'
	$bg_path = 'scene\egg_birth'
	g = rand(1, picMax['egg_birth'])
	if g > 1: $bg_path += '_' + $str(g)
	if fridge_space > 0: fridge['eggs'] += min(fridge_space, total_eggs_laid_today) &! if you have a barn, excess eggs (more than 5) will be sold tomorrow night
	total_eggs_laid_today = 0 &! excess eggs that cannot fit in the fridge are discarded
	if assistant_quiet_rule = 0: jump 'loop'
end

!Rules Broken Message - Improved and fixed - crushboss
if rules_broken_message = 1 and slave_state = CONST_INT['slave_exist']:
	$text = '  <<$slave_name>> does not even try to hide that she is disobeying the rules you set for her.'
	if slave['silence_rule_broken']: $text += ' She does not remain silent.'
	if slave['humility_rule_broken']: $text += ' She does not act humbly.'
	if slave['no_shit_rule_broken']: $text += ' She uses the toilet.'
	if slave['pet_rule_broken']: $text += ' She does not behave like a pet.'
	if slave['blowjob_rule_broken']: $text += ' She does not deliver your morning blowjob.'
	if slave['urinal_rule_broken']: $text += ' She does not accept your bladder.'
	if slave['toilet_rule_broken']: $text += ' She does not accept your shit.'
	if slave['v_balls_rule_broken']: $text += ' She does not wear her vaginal balls.'
	$text += ' It can not be ignored!'

	$place = 'study'
	$bg_path = $slave["fullimage"]
	rules_broken_message = 0
	dynamic $sin_gained_now, 'slave'
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

!Starvation Warning Message - Improved and fixed - crushboss
if cheat_no_starve = 0 and slave['starvation_warning'] = 1 and slave_state ! CONST_INT['no_slave']:
	$place = 'study'
	$text = '   You notice signs of starvation on your slave. She obviously is not getting enough food, which will be detrimental to her health. It is necessary to increase her diet or reduce the load.'
	slave['starvation_warning'] = 2 &! will be reset in next_day when no longer starving
	$bg_path = $slave["fullimage"]
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

!Starvation Warning Message - duplicated for assistant - ImperatorAugustus
if cheat_no_starve = 0 and assistant['starvation_warning'] = 1 and assistant_state ! CONST_INT['no_slave']:
	$place = 'study'
	$text = '   You notice signs of starvation on your assistant. She obviously is not getting enough food, which will be detrimental to her health. It is necessary to increase her diet or reduce the load.'
	assistant['starvation_warning'] = 2 &! will be reset in next_day when no longer starving
	$bg_path = $assistant["fullimage"]
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

!Slave Suicide Event - Overhauled - crushboss
if slave_suicide = 1 and assistant['supervise_rule'] = 1:
	$place = 'study'
	$text = '  Due to <<$assistant_name>>’s diligent supervision, she catches <<$slave_name>> attempting suicide and takes the bleeding knife away from her. <<$assistant_name>> wakes you up and informs you of what just occurred. <<$slave_name>> needs medical attention!'
	slave_suicide = 0
	slave_rate['wounds'] += slave['stamina']*25
	slave_rate['scars'] += rand(0,30)
	dynamic $sin_gained_now, 'slave'
	dynamic $master_energy_drop
	dynamic $slave_energy_drop
	dynamic $slave_energy_drop
	dynamic $assistant_energy_drop
	master_moodlet['neg_slave_suicidal'] = 1
	gs '$mod_master_drop', 1
	gs '$mood_drop', 'slave', 1
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
elseif slave_suicide = 1 and assistant['supervise_rule'] = 0:
	$place = 'study'
	$text = '  You find your slave lying on the floor in a pool of blood. She’s not breathing. It happens sometimes, but every time is unpleasant - waste of sparks. Now you have to buy a new one…'
	slave_suicide = 0
	master_moodlet['neg_slave_died'] = 10
	dynamic $master_energy_drop
	gs '$mod_master_drop', 1
	$bg_path = 'girls/normal_scenes/suicide'
	g = rand(1, picMax['suicide'])
	if g > 1: $bg_path += '_' + $str(g)
	dynamic $clear_slave_instance, 'slave'
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if slave_escape = 1:
	$place = 'study'
	$bg_path = 'scene/escape'
	g = rand(1, picMax['escape'])
	if g > 1: $bg_path += '_' + $str(g)
	$text = '  While you were sleeping, <<$slave_name>> managed to steal the key to the door and slide out onto the street. By morning she had vanished. It’s unlikely she will be able to survive alone on the street, but you have to buy a new slave…'
	!новый мудлет для обозначения сбежавших рабынь
	master_moodlet['neg_escape'] = 10
	gs '$mod_master_drop', 1
	slave_escape = 0
	dynamic $clear_slave_instance, 'slave'
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

!Magical Brand works like it should now - added code section - crushboss
if slave_escape = 2:
	$place = 'study'
	$bg_path = 'scene/escape'
	g = rand(1, picMax['escape'])
	if g > 1: $bg_path += '_' + $str(g)
	$text = '  While you were sleeping, <<$slave_name>> managed to steal the key to the door and slide out onto the street. By morning she had vanished. Due to her having your magical brand you easily track her down using magic and bring her back without incident…'
	slave['virtue'] = 0
	dynamic $sin_gained_now, 'slave'
	slave['angst'] += 1
	slave_rate['angst'] += 10
	! added angst increase for failed escape - ImperatorAugustus
	master_mage_rate += master_mage
	dynamic $master_energy_drop
	dynamic $master_energy_drop
	dynamic $slave_energy_drop
	dynamic $slave_energy_drop
	slave_rate['rational'] += 5
	master_moodlet['neg_rebell'] = 1 &! slave returned, so different moodlet - ImperatorAugustus
	gs '$mod_master_drop', 1
	slave_escape = 0
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

!Slave is returned if wearing a slave collar and has your brand - crushboss
if slave_escape = 3:
	$place = 'study'
	$bg_path = 'scene/escape'
	g = rand(1, picMax['escape'])
	if g > 1: $bg_path += '_' + $str(g)
	$text = '  While you were sleeping, <<$slave_name>> managed to steal the key to the door and slide out onto the street. By morning she had vanished. Due to her having your brand and wearing a slave collar, she is spotted on the streets and brought back to your apartment by someone from your guild…'
	slave['virtue'] = 0
	dynamic $sin_gained_now, 'slave'
	slave['angst'] += 1
	slave_rate['angst'] += 10
	! added angst increase for failed escape - ImperatorAugustus
	dynamic $slave_energy_drop
	dynamic $slave_energy_drop
	slave_rate['rational'] += 5
	master_moodlet['neg_rebell'] = 1 &! slave returned, so different moodlet - ImperatorAugustus
	gs '$mod_master_drop', 1
	slave_escape = 0
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

!Slave is returned if wearing a slave collar and the guild brand - crushboss
if slave_escape = 4:
	$place = 'study'
	$bg_path = 'scene/escape'
	g = rand(1, picMax['escape'])
	if g > 1: $bg_path += '_' + $str(g)
	$text = '  While you were sleeping, <<$slave_name>> managed to steal the key to the door and slide out onto the street. By morning she had vanished. Due to her having the guild brand and wearing a slave collar, she is spotted on the streets and turned into the guild. The next morning a representative of your guild knocks on your door and chastises you for allowing her to escape. You lose a bit of reputation.'
	slave['virtue'] = 0
	dynamic $sin_gained_now, 'slave'
	slave['angst'] += 1
	slave_rate['angst'] += 10
	! added angst increase for failed escape - ImperatorAugustus
	dynamic $slave_energy_drop
	dynamic $slave_energy_drop
	slave_rate['rational'] += 5
	guild_reputation_rate -= 2
	master_moodlet['neg_rebell'] = 1 &! slave returned, so different moodlet - ImperatorAugustus
	gs '$mod_master_drop', 1
	slave_escape = 0
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if slave_died = 1:
	slave_died = 0
	$bg_path = $slave["fullimage"] &! retrieve image before clear_slave_instance
	$place = 'study'
	$text = '  My slave did not wake up. Her deplorable state finally made itself felt. Now I have to buy a new one…'
	dynamic $clear_slave_instance, 'slave'
	master_moodlet['neg_slave_died'] = 10
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if assistant_died = 1:
	assistant_died = 0
	$bg_path = $assistant["fullimage"] &! retrieve image before clear_slave_instance
	$place = 'study'
	$text = '  My assistant did not wake up. Her deplorable state finally made itself felt. Now I have to train a new one…'
	dynamic $clear_slave_instance, 'assistant'
	master_moodlet['neg_slave_died'] = 10
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if prisoner_died = 1:
	prisoner_died = 0
	$bg_path = $prisoner["fullimage"] &! retrieve image before clear_slave_instance
	$place = 'dungeon'
	$text = '  My prisoner did not wake up. Her deplorable state finally made itself felt. What a waste of sparks…'
	dynamic $clear_slave_instance, 'prisoner'
	master_moodlet['neg_slave_died'] = 10
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if farmhand_died = 1:
	farmhand_died = 0
	$bg_path = $farmhand["fullimage"] &! retrieve image before clear_slave_instance
	$place = 'barn'
	$text = '  My farmhand did not wake up. Her deplorable state finally made itself felt. Now I have to train a new one…'
	dynamic $clear_slave_instance, 'farmhand'
	master_moodlet['neg_slave_died'] = 10
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if cow_died = 1:
	cow_died = 0
	$bg_path = $cow["fullimage"] &! retrieve image before clear_slave_instance
	$place = 'barn'
	$text = '  My cow did not wake up. Her deplorable state finally made itself felt. Now I have to train a new one…'
	dynamic $clear_slave_instance, 'cow'
	master_moodlet['neg_slave_died'] = 10
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if harpy_died = 1:
	harpy_died = 0
	$bg_path = $harpy["fullimage"] &! retrieve image before clear_slave_instance
	$place = 'barn'
	$text = '  My egglayer did not wake up. Her deplorable state finally made itself felt. Now I have to train a new one…'
	dynamic $clear_slave_instance, 'harpy'
	master_moodlet['neg_slave_died'] = 10
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if pig_died = 1:
	pig_died = 0
	$bg_path = $pig["fullimage"] &! retrieve image before clear_slave_instance
	$place = 'barn'
	$text = '  My pig did not wake up. Her deplorable state finally made itself felt. Now I have to train a new one…'
	dynamic $clear_slave_instance, 'pig'
	master_moodlet['neg_slave_died'] = 10
	jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
end

if assistant_quiet_rule = 1 and EndOfDayEventCnt = 0:
	$text = '  The evening passes without incident.'
	$place = 'bedroom'
!	$bg_path = 'scene/night'
!	g = rand(1, picMax['night'])
!	if g > 1: $bg_path += '_' + $str(g)
	jump 'loop'
end

a = rand(2,15) &! TODO 2.3
if slave['parasite'] > a:
	$return_lock = $curloc
	interaction = 9921
	gt 'interaction'
end

if assistant['parasite'] > a:
	$return_lock = $curloc
	interaction = 9922
	gt 'interaction'
end

if prisoner['parasite'] > a:
	$return_lock = $curloc
	interaction = 9923
	gt 'interaction'
end

if active[$quest[3]] = 1 and noble_status = 1:
	active[$quest[3]] = 0
	gt 'epic_win' &! returns to end_day_screen if user chooses to continue playing
end

if end_day_phase = 1:
	gs '$end_day_variable_reset'
	gs '$combat_variable_reset'
	end_day_phase = 2 &! indicates beginning of next day - disables night music and triggers scenes delayed due to exhaustion (3 - 2 = 1)
	gt $curloc
end

!Post Patrician Quest - crushboss
if $quest12 = 'fail':
	$place = 'bedroom'
	$text = '  Your home was overrun during the night by assassins. You were hopelessly overwhelmed. Your hands and feet were cut off with an axe. You were then left chained to the bed while your home was torched. Your screams could be heard for several blocks as you burned to death.'
	$text += ' The last thing you remember hearing was one of the assassins saying: "' + $quest12_failreason + '"'
	dynamic $death, $text
	! execution stops at the line above
end

!Auto Casting Rules - crushboss (must be done after $end_day_variable_reset - ImperatorAugustus)
!Auspex
if auspex_auto_cast = 1 and auspex ! 1 and already_done_today['61'] = 0 and $master_head_gear ! 'raven_crown' and sparks > 1:
	already_done_today['61'] = 1 &! necessary to avoid looping, because interaction redirects back to here before incrementing the counter
	$return_lock = $curloc
	interaction = menu_auspex
	gt 'interaction'
end

!Magna Magnifika
if magna_magnifika_auto_cast = 1 and magna_magnifika = 0 and already_done_today['65'] = 0 and sparks > 4 and master_mage > 0:
	already_done_today['65'] = 1 &! necessary to avoid looping, because interaction redirects back to here before incrementing the counter
	$return_lock = $curloc
	interaction = menu_magna_magnifika
	gt 'interaction'
end

!Sententia Veritas
if sententia_auto_cast = 1 and already_done_today['64'] = 0 and slave_state = CONST_INT['slave_exist'] and sparks > 4 and master_mage > 1:
	already_done_today['64'] = 1 &! necessary to avoid looping, because interaction redirects back to here before incrementing the counter
	$return_lock = $curloc
	interaction = menu_sententia_veritas
	gt 'interaction'
end

!Delayed consequences of ill or parasite-infected slaves being sold to clients or given to the guild - ImperatorAugustus
if end_day_guild_visit = 0:
	if gave_guild_ill_slave > 0 or gave_guild_parasite_slave > 0:
		$place = $replace($estate, 'house', 'street_rental')
		npc = 1
		$npc_id = 'master_vong'
		$text = '  There is a sudden loud knock at your door, and you open it to find Master Vong staring at you with an irate expression.
  [MASTER VONG]
- The slave<<iif(gave_guild_parasite_slave > 1 or gave_guild_ill_slave > 1, "s", "")>> you brought to the Guild <<iif(gave_guild_parasite_slave > 1 or gave_guild_ill_slave > 1, "were", "was")>>'
		if gave_guild_ill_slave > 0 and gave_guild_parasite_slave > 0 and gave_guild_parasite_slave = gave_guild_ill_slave:
			if gave_guild_parasite_slave > 1:
				$text += ' infected with Fog fiend larvae and sick with Rotphilis. Fortunately, it was discovered in time.'
			else
				$text += ' infected with a Fog fiend larva and sick with Rotphilis. Fortunately, it was discovered in time.'
			end
			guild_reputation_rate -= min(guild_reputation_rate, 90)
		elseif gave_guild_parasite_slave > 0:
			if gave_guild_parasite_slave > 1:
				$text += ' infected with Fog fiend larvae. Fortunately, it was discovered in time.'
			else
				$text += ' infected with a Fog fiend larva. Fortunately, it was discovered in time.'
			end
			guild_reputation_rate -= min(guild_reputation_rate, 80)
		elseif gave_guild_ill_slave > 0:
			if gave_guild_ill_slave > 1:
				$text += ' sick with Rotphilis. Fortunately it was discovered before the slaves were sold. It will take some time for you to <<iif(guild_reputation > 0, "re", "")>>gain our trust after this.'
			else
				$text += ' sick with Rotphilis. Fortunately it was discovered before the slave was sold. It will take some time for you to <<iif(guild_reputation > 0, "re", "")>>gain our trust after this.'
			end
			guild_reputation_rate -= min(guild_reputation_rate, 10 * gave_guild_ill_slave)
		end
		if gave_guild_parasite_slave > 0 and parasite_slave_warned_before = 1:
			$text += ' You have been deemed unfit for this profession and expelled from the Guild of Trainers.'
			dynamic $death, $text
		elseif gave_guild_parasite_slave > 0:
			$text += ' Do not let it happen again!'
			master_mood_rate -= 20
			gs '$mod_master_drop', 5
			parasite_slave_warned_before = 1
		end
		gs '$mod_master_drop', 1
		gave_guild_ill_slave = 0
		gave_guild_parasite_slave = 0
		end_day_guild_visit = 1
		jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
	elseif sold_ill_slave > 0 or sold_parasite_slave > 0:
		$place = $replace($estate, 'house', 'street_rental')
		npc = 1
		$npc_id = 'mistress_angelika'
		$text = '
  There is a sudden loud knock at your door, and you open it to find Mistress Angelika herself staring at you with an irate expression.
  [MISTRESS ANGELIKA]
- <<$master_name>>, you sold <<iif(sold_parasite_slave > 1 or sold_ill_slave > 1, "slaves that were", "a slave that was")>>'
		if sold_ill_slave > 0 and sold_parasite_slave > 0 and sold_ill_slave = sold_parasite_slave:
			if sold_parasite_slave > 1:
				$text += ' infected with Fog fiend larvae and sick with Rotphilis! The clients noticed the illness and had the slaves treated at the Technosphere, where they discovered the parasites.'
			else
				$text += ' infected with a Fog fiend larva and sick with Rotphilis! The client noticed the illness and had the slave treated at the Technosphere, where they discovered the parasite.'
			end
			guild_reputation_rate = 0
			brand_rate = 0
		elseif sold_parasite_slave > 0:
			if sold_parasite_slave > 1:
				$text += ' infected with Fog fiend larvae! The slaves were devoured by the fiend spawn that were growing inside of them.'
			else
				$text += ' infected with a Fog fiend larva! The slave was devoured by the fiend spawn that was growing inside of her.'
			end
			guild_reputation_rate = 0
			brand_rate = 0
		elseif sold_ill_slave > 0:
			if sold_ill_slave > 1:
				$text += ' sick with Rotphilis! The clients noticed the illness and had the slaves treated at the Technosphere, but this reflects badly on your brand and the Guild by association. It will take some time for you to <<iif(guild_reputation > 0, "re", "")>>gain our trust after this.'
			else
				$text += ' sick with Rotphilis! The client noticed the illness and had the slave treated at the Technosphere, but this reflects badly on your brand and the Guild by association. It will take some time for you to <<iif(guild_reputation > 0, "re", "")>>gain our trust after this.'
			end
			guild_reputation_rate -= min(guild_reputation_rate, 10 * sold_ill_slave)
			brand_rate -= 10
		end
		if sold_parasite_slave > 0 and parasite_slave_warned_before = 1:
			$text += ' You have been deemed unfit for this profession and expelled from the Guild of Trainers.
'
			dynamic $death, $text
		elseif sold_parasite_slave > 0:
			$text += ' Word of what clients can expect from your brand is spreading rapidly. You are still a member of the Guild only because I personally interceded on your behalf. You must never do this again!'
			master_mood_rate -= 20
			gs '$mod_master_drop', 5
			master_moodlet['neg_slave_died'] = 10
			parasite_slave_warned_before = 1
		end
		$text += '
'
		gs '$mod_master_drop', 1
		sold_ill_slave = 0
		sold_parasite_slave = 0
		end_day_guild_visit = 1
		jump 'loop' &! assistant_quiet_rule does not suppress this - ImperatorAugustus
	end
end

end_day_guild_visit = 0 &! reset for tomorrow
end_day_phase = 0 &! reset for tomorrow

if exam_in_progress = 1:
	gt 'demo_menu_form'
else
	gs 'interior_restore'
	gt 'menu_form'
end

:loop

EndOfDayEventCnt += 1 &! something noteworthy happened (suppresses 'evening passes without incident' scene when assistant quiet rule is enabled) - resets to zero in next_day

if $place ! '': *p '
<img src="content\pic\bg\<<$bg[$place]>>.png">
'
*p '
<<$text>>
'

if nsfw = 0 and $bg_path ! '': *p '
<img src="content\pic\<<$bg_path>>.png">
'

if npc = 1:
	$info_bar = ''
	if nsfw = 1:
		*p '

'
	elseif $npc_image[$npc_id] ! '':
		*p '
<img src="content\pic\characters\<<$npc_image[$npc_id]>>.png">
'
	end
	*p '

<<$npc_name[$npc_id]>>
<<$npc_status[$npc_id]>>
'
	*nl 'Information for consideration:'
	*nl '
'
	*p '
<<$npc_attitude[npc_attitude[$npc_id]]>>'
	*nl '<<$npc_info[$npc_id]>>
'
else
	$info_bar = ''
	*p '

<<$place_name[$place]>>
<<$place_location[$place]>>
'
	*nl 'Information for consideration:
'
	*nl '
<<$place_info[$place]>>
'
end

!Info bar not currently used in end_day_screen - crushboss
!*p '
<<$info_bar>>
'

addobj ''
txt = 1 & $text[2] = '   ' &! make forward button return to this location

--- end_day_screen ---------------------------------


code:
# epic_win
!end screen of story mode
day -= 1
base_score += day/2
score = base_score/day
!Implemented a more robust score calculation system - crushboss
if sparks > 25000: score += 1
if sparks > 50000: score += 1
if sparks > 75000: score += 1
if sparks > 100000: score += 1
if master_brand = 5: score += 1
if master_str = 5 and master_domination = 5 and (master_fighter - boost_up['master_fighter']) = 5: score += 1
if master_cha >= 4 and (master_butler - boost_up['master_butler']) = 5 and (master_artdirector - boost_up['master_artdirector']) = 5: score += 1
if (master_medic - boost_up['master_medic']) = 5 and (master_mage - boost_up['master_mage']) = 5 and master_tutor = 5: score += 1
if master_petting = 5 and master_penetration = 5 and master_oral = 5 and master_fetish = 5: score += 1
if score < 0: score = 4
if score > 10: score = 10

$backimage = 'content/pic/title.png'
MAINDESC_X = 1
MAINDESC_Y = 1
MAINDESC_W = 1280
MAINDESC_H = 800

$yes = {gt 'end_day_screen'} &! fixed return location - ImperatorAugustus
$no = {gt 'Start'}

if sound_on = 1: play 'content/snd/patrician_credits.wav', music_volume, 'only, loop'

*p '

'
*p '

Congratulations!
'
*nl 'You have achieved the status of a patrician, got the best customers, and thus completed the story of the game with a rating of
'
*nl '
<<$patrician_rating[score]>>
'
*nl 'Days spent: <<day>>
'
*nl 'Played as: <<$master_base_name[hero_choice]>>
'
*nl 'Wish to continue in free mode?
'

day += 1 &! bugfix - ImperatorAugustus

*p '

'
*p '

'

--- epic_win ---------------------------------

repo_name: Sutopia/game

license: unknown


code:
# exit

clr
*clr

gs '_layout'

*p '

'

*p '
'
	*p '
GAME OVER
'
	*nl '
Information for consideration:
'
*p '
'

*p '

<<$args[0]>>
'

*p '

  You can load a saved game or return to the main menu.
'

--- exit ---------------------------------


code:
# expert_to_slave
!Expert sends found slave to master

dynamic $swap_slave_instances, 'slave', 'selected'
master_moodlet['pos_new_slave'] = 6 - brand_reputation

killvar 'search'

--- expert_to_slave ---------------------------------


code:
# generate_clone
!Create a slave clone
gs 'generate_stock'

!attributes
stock['base_beauty'] = 4
stock_rate['beauty'] = 80
stock['base_exotic'] = 0
stock_rate['exotic'] = 0

stock['stamina'] = 4
stock['sensitivity'] = 3
stock['temper'] = 3
stock['ego'] = 3
stock['pride'] = 4
stock['intellect'] = 3

stock['custom'] = 5
stock['moral'] = 1
stock['instinct'] = 1
stock['rational'] = 5

stock['expression'] = 3
stock['pet'] = 3
stock['dressage'] = 3
stock['cowSK'] = 3
stock['nurse'] = 3
stock['service'] = 3
stock['cook'] = 3
stock['gladiatrix'] = 3
stock['alchemy'] = 3
stock['enchanter'] = 3
stock['art'] = 3
stock['music'] = 3
stock['calisthenics'] = 3
stock['secretary'] = 3

stock['sub_hj'] = 3
stock['sub_fj'] = 3
stock['sub_hug'] = 3
stock['sub_paizuri'] = 3
stock['sub_kiss'] = 3
stock['sub_tongue'] = 3
stock['sub_bj'] = 3
stock['sub_dt'] = 3
stock['sub_asslik'] = 3
stock['sub_vaginal'] = 3
stock['sub_anal'] = 3
stock['sub_fisting'] = 3
stock['anal_stretch']= 3
stock['sub_seduce'] = 3
stock['sub_masturbation'] = 3
stock['sub_dildo'] = 3
stock['sub_exhibit'] = 3
stock['sub_humiliation'] = 3
stock['sub_enema'] = 3
stock['sub_mazo'] = 3
stock['sub_selfpain'] = 3
stock['sub_piss'] = 3
stock['sub_kopro'] = 3
stock['sub_threesome'] = 3
stock['sub_dp'] = 3
stock['sub_tp'] = 3
stock['sub_gangbang'] = 3
stock['sub_bukkake'] = 3
stock['sub_zoosex'] = 3
stock['sub_bestiality'] = 3
stock['sub_horse'] = 3
stock['sub_tentacles'] = 3
stock['sub_arachnidspider'] = 3
stock['sub_polypusvermin'] = 3

stock['fat'] = 1
stock['metabolism'] = 3

!traits
stock['virginity'] = 0

!BACKGROUND
$stock_world_description = 'I know almost nothing about the world in which I was created, master. There’s highly developed technology, this I know. But I almost did not see anything, and remember much less.'
$stock_family_description = 'I was swimming in a vat of liquid. From time to time people were walking around in white coats. On my face was a breathing mask and a feeding tube came right in my throat. And my body was connected to wires.'
$stock_occupation_description = 'Mostly I remember the process of downloading data and ideomotor skills through neural interface. It is difficult to describe. Then I was taken out of the vat, pumped with sedatives and put in a box. And then I got here.'
$stock_name = 'Object №<<rand(101,998)>>'

!No starting ailments - crushboss
stock_rate['bruises'] = 0
stock_rate['wounds'] = 0
stock_rate['scars'] = 0
stock_rate['arousal'] = 0
stock['fear'] = 0
stock['angst'] = 0
stock['spoil'] = 0
stock['ill'] = 0
stock['pregnant'] = 0
stock['parasite'] = 0
stock['issues'] = 0

!psy status determination
$stock_psy_basic = 'soft'

stock['neg_slave'] = 0
stock['calories'] = 3

!EQUIPMENT
$stock['wpn'] = 'безоружный'
$stock['armor'] = 'без_брони'
$stock['scnd'] = ''

$stock['back_wpn'] = ''
$stock['left_wpn'] = ''
$stock['right_wpn'] = ''
$stock['arm_wpn'] = ''
$stock['leg_wpn'] = ''

$stock['cloth'] = 'голая'

stock['newness'] = 1

stock['energy'] = stock['stamina']

--- generate_clone ---------------------------------