code:
# slave_auction_buy
!Auction. Buy untrained slaves.
if farid_potential_debt > 0:
	if slave_state = CONST_INT['no_slave']: interaction_city = 1191
	if slave_state > CONST_INT['no_slave']: interaction_city = 1192
	gt 'interaction_city'
end

if farid_debt > 0: interaction_city = 1193 & gt 'interaction_city'
killobj

! possible to arrive via home "no slave" avatar portrait without passing through city_screen, so make sure we are playing city music
if noble_status = 1 or brand_reputation >= 5:
	$city_sound = 'content/snd/city_honor.wav'
elseif $estate = 'slum_house':
	$city_sound = 'content/snd/city_poor.wav'
else
	$city_sound = 'content/snd/city_citizen.wav'
end

if sound_on = 1:
	play $city_sound, music_volume, 'only, loop'
else
	close all
end

if stock_state = CONST_INT['no_slave']:
	gs 'generate_stock'
	if stock['base_beauty'] = 0: stock['base_beauty'] = 1 & stock_rate['beauty'] += 10 &! no F- natural beauty slaves will be generated for the market - ImperatorAugustus
else
	gs '$slave_price', 'stock'
end
$place = 'slave_stage'
gs '_layout'

if stock_sold = 0:
	$text = '<<$auction_start>>'
end

if auction_phase = 0:
	if stock_sold = 1:
		$text = '  [FARID]
- Our first lot for today! <<$stock_name>> - <<$stock_epithet>> <<$stock_occupation_auk>> from <<$stock_world_auk>>, <<$stock_family_auk>>. Starting price <<slave_base_price>> sparks. So, who is placing the first bid?'
	end
	if stock_sold > 1:
		$text = '  [FARID]
- Next lot! <<$stock_name>> - <<$stock_epithet>> <<$stock_occupation_auk>> from <<$stock_world_auk>>, <<$stock_family_auk>>. Starting price <<slave_base_price>> sparks. So, who is placing the first bid?'
	end
	if stock_sold >= stock_limit:
		$text = '  [FARID]
- And last lot for today! <<$stock_name>> - <<$stock_epithet>> <<$stock_occupation_auk>> from <<$stock_world_auk>>, <<$stock_family_auk>>. Starting price <<slave_base_price>> sparks. So, who is placing the first bid?'
	end
end

if auction_phase = 2:
	b = rand (1,9)
	$text = '  [FARID]
- Accepted! <<cur_stock_price>> sparks, one... <<$auk_add[b]>>'
end

if auction_phase = 3:
	b = rand (1,6)
	$text = '  [FARID]
- <<cur_stock_price>> sparks, two... <<$auk_add[b]>>'
end

if auction_phase = 4:
	b = rand (1,6)
	$text = '  [FARID]
- <<cur_stock_price>> sparks, three! Sold.'
end

if auction_phase = 5:
	$text = '  [FARID]
- And that concludes our auction today! All lots are sold. Please come back tomorrow - Fogs will give us many more wondrous beauties!'
	dynamic $clear_slave_instance, 'stock' &! remove the final lot (not purchased by player) so it does not appear again the next day - ImperatorAugustus
end

if auction_phase = 6:
	total_bought += 1
	$text = '  You take your newly acquired slave with you and leave the market.'
	!Tracking user preference for lolis to unlock explicit text setting
	if stock['age'] = CONST_INT['loli_age']: lolis_bought += 1
	if total_bought > total_bought_threshold and ((100*lolis_bought) / total_bought) > IIF(no_milf = 1, 65, 50): likes_lolis = 1

	if likes_lolis = 1 and perv_revealed < 1 and stock['age'] = CONST_INT['loli_age']:
		$text = '  [FARID]
- Another young one, my dear? And such a delectable child, no doubt she will give you many hours of pleasure...' + _
		' Maybe you are a man who truly appreciates the beauty of youth? Many would not understand, but I, too, am a connoisseur of "unripened femininity". Please accept a new Settings option:' + _
		'        Loli aged descriptions are explicit'
		perv_revealed = 1
		no_loli = 2
		msg '   As you are leaving with your new purchase, Farid makes a point of seeking you out. With a knowing, somewhat-creepy manner and a conspiratorial tone he notes:'

	elseif no_loli ! 1 and is_perv = 3 and loli_magic < 2 and stock['age'] = CONST_INT['loli_age'] and stock['beauty'] > 2:
		$text = '  You pay for your purchase and leave the market.

  Oddly, as you take the girl’s little hand to lead her home you feel a stirring in your breeches. As you have not had a proper erection in many years, this is rather strange. Is it some sort of Eternal Rome magic?'
		loli_magic += 1
		is_perv = 2
		master_perv_rate += 7
		if master_excitement_rate < 16: master_excitement_rate = 16
		master_mood_rate += 16

	elseif no_loli ! 1 and is_perv = 2 and loli_magic = 2 and stock['age'] = CONST_INT['loli_age'] and stock['beauty'] > 2 and assistant_state > CONST_INT['no_slave'] and assistant['age'] = CONST_INT['loli_age'] and assistant['beauty'] > 2:
		$text = '  You pay for your purchase and leave the market.

  As you take the girl’s<<$little_txt>> hand to lead her home, just imagining what you can do with this new slave and your adorable assistant has you ignited!'
		is_perv = 1
		master_perv_rate += 14
		if master_excitement_rate < 32: master_excitement_rate = 32
		master_libido_rate = max(master_libido_rate, master_libido_rate_cap[1])
		master_mood_rate += 32

	elseif stock['boobs'] > 2 and is_kid = 1 and kid_msg1 ! 1:
		$text = '  As boys do, when you introduce yourself to your new acquisition you speak to her <<$slave_boobs_txt[stock["boobs"]]>> instead of looking her in the eye. The entire walk home you keep looking back to get another eyeful of her magnificent bust. You own those!'
		kid_msg1 = 1
		master_libido_rate += 4 * stock['boobs']
		msg '   Young lads like you love women with huge tits. You figure the bigger your slave’s tits are, the better a woman she is and so the better a slaver you must be...

  if you can dominate her.'

	elseif is_perv ! 0 and perv_msg1 ! 1 and stock['boobs'] > 3:
		$text = '  You take your newly acquired slave with you and leave the market.'
		perv_msg1 = 1
		master_libido_rate -= 4 * stock['boobs']
		master_excitement_rate = -100
		msg '   You feel intimidated by your new slave’s <<$slave_boobs_txt[stock["boobs"]]>>. Maybe she is too much woman for you. What if you are not able to perform?'

	elseif is_perv ! 0 and perv_msg2 ! 1 and stock['age'] = CONST_INT['milf_age']:
		$text = '  You take your newly acquired slave with you and leave the market.'
		perv_msg2 = 1
		master_libido_rate -= 4 * stock['boobs']
		master_excitement_rate = -100
		msg '   You feel intimidated by your new slave’s maturity. Maybe she is too experienced for you to easily dominate. Maybe someone younger would have been better...'

	else
		$text = '  You take your newly acquired slave with you and leave the market.'
	end
	if sound_on = 1: play $large_money_sound, sound_volume
end

if auction_phase = 7:
	$text = '  [FARID]
- Auction was ended, my dear! Come back tomorrow!'
end

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

'
if auction_phase = 5 or auction_phase = 7: if nsfw = 0:*p '

'
if stock_sold > 0 and auction_phase < 5: if nsfw = 0:*p '
<img src="content\pic\<<$stock[''fullimage'']>>.png">
'
*p '
<<$text>>
'

if haggling_stage = 1:
	if auction_phase < 4 and sparks >= rise_stock_price: *p '
Bid <<rise_stock_price>> sparks
' & *p '

'
else
	if haggling_stage = 2: *p '
Bid: <<cur_stock_price>> sparks
'
end

if haggling_stage = 1 and auction_phase < 6:
	*p '

'
end

addobj ''

gs '$addon', 'info_box'

if stock_sold > 0 and auction_phase < 5:
	*p '

<<$place_name[$place]>>

'
	if stock['lactation'] > 1:
		$boobs_milk0_txt = 'milk-swollen udders'
		$boobs_milk04_txt = ' milk-swollen udders'
		$boobs_milk05_txt = ' milk-swollen udders'
		$boobs_milk2_txt = 'milk-distended udders'
		$boobs_milk24_txt = ' milk-swollen udders'
		$boobs_milk25_txt = ' milk-swollen udders'
	else
		$boobs_milk0_txt = 'shapely balloons'
		$boobs_milk2_txt = 'empty breast-sacks'
		$boobs_milk04_txt = ', round tits'
		$boobs_milk05_txt = ', firm melons'
		$boobs_milk24_txt = ' marshmallowy tits'
		$boobs_milk25_txt = ', motherly breasts'
	end
	$slave_boobs2[3] = 'Big<<$boobs_milk24_txt>>'
	$slave_boobs2[4] = 'Huge<<$boobs_milk25_txt>>'
	$slave_boobs2[5] = 'Enormous <<$boobs_milk2_txt>>'
	$slave_boobs2[6] = 'Gargantuan <<$boobs_milk2_txt>>'
	$slave_boobs0[3] = 'Big<<$boobs_milk04_txt>>'
	$slave_boobs0[4] = 'Huge<<$boobs_milk05_txt>>'
	$slave_boobs0[5] = 'Massive <<$boobs_milk0_txt>>'
	$slave_boobs0[6] = 'Stupendous <<$boobs_milk0_txt>>'
	if stock['age'] = CONST_INT['loli_age']:
		$stock_boobs = $slave_boobs1[stock['boobs']]
	elseif stock['age'] = CONST_INT['milf_age']:
		$stock_boobs = $slave_boobs2[stock['boobs']]
	else
		$stock_boobs = $slave_boobs0[stock['boobs']]
	end
	*p '
'
	*nl
	*nl 'Name: <<$stock_name>>'
	*nl 'Age:  <<$slave_age_name[stock["age"]]>>'
	if $master_head_gear = 'raven_crown':
		*nl 'Attributes Rating:  <<$rating[rating]>>
'
	else
		*nl
	end
	*nl 'ATTRIBUTES'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'beauty', stock['beauty'], 1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: msg $красота_справка & msg $красота_справка_2"><<$beauty[stock["beauty"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'stamina', stock['stamina'], 1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $здоровье_справка & dynamic $msg, $здоровье_справка_2"><<$stamina[stock["stamina"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'sensitivity', stock['sensitivity'], 1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $чувствительность_справка & dynamic $msg, $чувствительность_справка_2"><<$sensitivity[stock["sensitivity"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'temper', stock['temper'], 1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $темперамент_справка & dynamic $msg, $темперамент_справка_2"><<$temper[stock["temper"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'intellect', stock['intellect'], 1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $ум_справка & dynamic $msg, $ум_справка_2"><<$intellect[stock["intellect"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'ego', stock['ego'], 1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $характер_справка & dynamic $msg, $характер_справка_2"><<$ego[stock["ego"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'pride', stock['pride'], -1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $гордыня_справка & dynamic $msg, $гордыня_справка_2"><<$pride[stock["pride"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'exotic', stock['exotic'], 1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $экзотичность_справка & dynamic $msg, $экзотичность_справка_2"><<$exotic[stock["exotic"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'fat', IIF(stock['fat'] = 1 or stock['fat'] = 5, 1, 6 - stock['fat']))
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $жыр_справка & dynamic $msg, $жыр_справка_2"><<$fat[stock["fat"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'style', stock['style'], 1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $стиль_справка & dynamic $msg, $стиль_справка_2"><<$style[stock["style"]]>>'
	$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'fame', stock['fame'], 1)
	*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $слава_справка & dynamic $msg, $слава_справка_2"><<$girl_fame[stock["fame"]]>>'
	*nl
	*nl 'TRAITS'
	*nl '<<$ucase($mid($stock_boobs,1,1))+$mid($stock_boobs,2)>>'
	*nl '<<$stock_features_list>>
'
elseif auction_phase = 7:
	$npc_id = 'фарид_аукционщик'
	*p '

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

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

'
end

if sound_on = 1 and $play_sound[txt] ! '': play 'content\snd\<<$play_sound[txt]>>.wav', sound_volume
if $play_sound[txt] ! '': $play_sound[txt] = ''

--- slave_auction_buy ---------------------------------


code:
# slave_auction_buyout
!Slave buyout - created by crushboss
if sparks >= ((cur_stock_price*5)/2):
 	sparks -= ((cur_stock_price*5)/2)
 	auction_phase = 6
 	stock_sold = stock_limit + 1
else
 	msg 'You don’t have enough sparks to purchase this slave!'
end

gt 'slave_auction_buy'

--- slave_auction_buyout ---------------------------------

repo_name: Tcallas/game

license: unknown


code:
# slave_auction_next
!Skip auction lot

if stock_sold >= stock_limit:
	auction_phase = 5
	haggling_stage = 0
else
	auction_phase = 0
	haggling_stage = 0
	gs 'generate_stock'
	gt 'slave_auction_pass'
end

gt 'slave_auction_buy'

--- slave_auction_next ---------------------------------


code:
# slave_auction_pass
!Skip over one auction phase (buying slave)
if auction_phase = 5:
	haggling_stage = 0
	auction_phase = 7
	gt 'city_menu_form'
end

if auction_phase = 7:
	haggling_stage = 0
	gt 'city_menu_form'
end

if auction_phase = 6:
	sparks -= cur_stock_price
	haggling_stage = 0
	auction_phase = 7
	$return_lock = 'city_menu_form'
	gt 'stock_to_slave'
end

if auction_phase = 4:
	if stock_sold >= stock_limit:
		auction_phase = 5
	else
		if haggling_stage = 1:
			auction_phase = 0
			haggling_stage = 0
			gs 'generate_stock'
		end
		rises = 0
	end
	if haggling_stage = 2:
		auction_phase = 6
		gt 'slave_auction_buy'
	end
end

if  haggling_stage > 0:
	stake_size = 0
	:loop
		rise_chance = rand(1,haggling_limit)
		rise_chance += rises
		if rise_chance <= haggling_limit:
			rises += 1
			stake_size += 1
			if stake_size < 10: jump 'loop'
		end

	if stake_size = 0:
		if auction_phase < 4: auction_phase += 1
	else
		cur_stock_price += stake_size * 5
		rise_stock_price = cur_stock_price + 5
		a = rand(1,35)
		$text = '<<$rival_stake[a]>> <<$stake_size[stake_size]>>'
		haggling_stage = 1
		auction_phase = 1
	end
end

if haggling_stage = 0:
	stock_sold += 1
	cur_stock_price = slave_base_price
	rise_stock_price = slave_base_price
	haggling_stage = 1
else
	rise_stock_price = cur_stock_price + 5
end

gt 'slave_auction_buy'
--- slave_auction_pass ---------------------------------


code:
# slave_auction_rise
!Place your bets on auction

auction_phase = 1
if cur_stock_price > slave_base_price: cur_stock_price += 5
rise_stock_price = cur_stock_price + 5
rises += 1
haggling_stage = 2

a = rand(1,5)
$text = '<<$auction_buy_player_bets[a]>>'

killobj

gt 'slave_auction_buy'

--- slave_auction_rise ---------------------------------


code:
# slave_auction_sell
!Sell slave to Farid
if farid_potential_debt > 0:
	if slave_state = CONST_INT['no_slave']: interaction_city = 1191
	if slave_state ! CONST_INT['no_slave']: interaction_city = 1192
	gt 'interaction_city'
end
if farid_debt > 0: interaction_city = 1193 & gt 'interaction_city'

$place = 'slave_stage'
gs '_layout'
if slave['brand'] = 0: is_stock = 1 &! stock ratings are based purely on attribute_sum and the greater of beauty or fame, ignoring skills, obedience and stamina
gs '$slave_price'

sell_price = slaveprice/2
if sell_price < 10: sell_price = 10

$npc_id = 'фарид_аукционщик'
npc = 1
txt = max(1, txt)

killvar '$text'
$text[1] = '[FARID]
- Oh! This is my good friend <<$master_name>>!!! Always glad to see you, my dear! Well, who did you bring with you? This is one of your pupils? Wah, so lovely!
'
$text[2] = '[<<$master_name>>]
- Hi Farid. Be a friend and see what she’s truly worth? I would like to pass her to you for sale if we split the difference.
'
if slave['brand'] > 0 and brand_reputation <= 3:
	$text[3] = '[FARID]
- Well, this is bad... The girl is branded! Not my profile. I cannot take her, my dear. Would be happy to, but I can’t. The Guild would pull the skin off of me for such things.
'
else
	if slave['brand'] = 0:
		$text[3] = '[FARID]
- Not branded? Well this is my profile, yes, but I will not pay a lot, you know. I will evaluate only her appearance... Well, show yourself, sweet...
'
	elseif brand_reputation > 3:
		$text[3] = '[FARID]
- Оh! The girl is branded! Not quite my profile, but for you I will find way to sell her, my dear. Tell me what you taught her? How does she behave?
'
	end
	$text[4] = '[FARID]
- Yeah... Yeah... Well, I see. Not to be left without a penny, I’ll give you <<sell_price>> sparks for her. More sparks? No, my dear, I can’t.
'
	$text[5] = '[<<$master_name>>]
- Robbing in broad daylight, Farid. Oh well... deal!
' + _
	'- This is awful! Being bent over with no lube, I can find a better buyer.'
end

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

if npc = 1:
	if nsfw = 0 and $npc_image[$npc_id] ! '': *p '
<img src="content\pic\characters\<<$npc_image[$npc_id]>>.png">
'
	*p '

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

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

'
end

if txt > 1: addobj ''
if txt ! 5: addobj '' &! add forward button last so spacebar activates it

--- slave_auction_sell ---------------------------------


code:
# slave_auction_sell_end
guild_reputation_rate += rating/3
if slave['ill'] > 0: sold_ill_slave = 1 &! trigger follow-up event
if slave['parasite'] > 0: sold_parasite_slave = 1 &! trigger follow-up event
dynamic $sold_clothing
dynamic $clear_slave_instance, 'slave'

sparks += sell_price
gt 'city_menu_form'

--- slave_auction_sell_end ---------------------------------


code:
# slave_free_time
! UNUSED LOCATION

if free_time > 0 and assistant["washes_slave_rule"] ! 1:
	if bath > 0 and slave["hygiene"] > 1:
		free_time -= 1
		slave['energy'] -= 1
		slave_rate["mood"] += slave["hygiene"]
		slave_rate["hygiene"] = 0
		$bg_path = func('display_pic', 'slave', 'bath', 'girls/normal_scenes/')
		dynamic $replace("$text[] = '<<$bathing_slave_alone[$slave_psy_status]>>'", 'dyn'+'slave', 'slave') &! evaluate delayed sub-expressions with substitution
	end
end

if txt = 0:
	$text[1] = '<<$slave_name>>'
	slave['well_rested'] += free_time
	slave_rate["mood"] += free_time
	slave['energy'] -= free_time
end

--- slave_free_time ---------------------------------


code:
# slave_sell
!DIALOGUE FOR SLAVE SALE TO INDIVIDUAL
gs '_layout'
price_bonus = 0
virgin_price = 0
$virgin_price = ''
$text_display = ''
sp_txt = 1
txt = 1
if sl_txt = 0: sl_txt = 1

if $special_text = '':
	gs 'slave_sell_chek'
	$special_text = '!'
end

if sl_txt = 100:
	$text[1] = '  The client examines the slave and refuses without even listening to price bids. You must be attentive to the individual wishes and preferences of each customer.'
	func('$menu', 'spacer', 6)

	func('$menu', '===BEGIN===', 'column_0')
	func('$menu', 'exec_options', $menu_item_Cancel_deal, 'gt $return_lock', 'No deal')
	func('$menu', '===END===')
end

if sl_txt = 101:
	$text[1] = '  The client examines the slave and refuses without even listening to price bids. In order to motivate such a customer, you have to raise the rating of your slave to no less than <<$rating[demand_rating[$npc_id]]>>.'
	func('$menu', 'spacer', 6)

	func('$menu', '===BEGIN===', 'column_0')
	func('$menu', 'exec_options', $menu_item_Cancel_deal, 'gt $return_lock', 'No deal')
	func('$menu', '===END===')
end

if sl_txt = 103 or sl_txt = 104 or sl_txt = 105:
	$text[1] = '  The client examines the slave and refuses without even listening to price bids. It’s not about the quality of training, the client just didn’t like something in her. Well, the customer has the right to be choosy..'
	func('$menu', 'spacer', 6)

	func('$menu', '===BEGIN===', 'column_0')
	func('$menu', 'exec_options', $menu_item_Cancel_deal, 'gt $return_lock', 'No deal')
	func('$menu', '===END===')
end

if sl_txt = 102:
	$text[1] = '  The client interrogates you about the abilities of your slave to understand whether she is good enough. You know that she is not, but you can embellish a little...'
	func('$menu', 'spacer', 4)

	func('$menu', '===BEGIN===', 'column_0')
	func('$menu', 'exec_options', $menu_item_Lie_about_slave, 'sl_txt = 3 & gt $curloc', 'Lie about slave abilities')
	func('$menu', 'exec_options', $menu_item_Cancel_deal, 'gt $return_lock', 'No deal')
	func('$menu', '===END===')
	if wizard_mode = 1: msg 'Disability: <<$flaw_msg>>'
end

if sl_txt = 1:
	client_satisfaction = 1
	$text[1] = '  You honestly explain the abilities and qualities of your slave, as they perfectly meet the stated requirements. The average price of slaves with <<$rating[rating]>> rating on the market is about <<common_price[rating]>> sparks, but you can try to get more money.'
	func('$menu', 'spacer', 3)

	func('$menu', '===BEGIN===', 'column_0')
	func('$menu', 'exec_options', $menu_item_Bargain, 'sl_txt = 11 & gt $curloc', 'Bargain')
	func('$menu', 'exec_options', $menu_item_Hold_price, 'sl_txt = 12 & gt $curloc', 'Hold firm price')
	func('$menu', 'exec_options', $menu_item_Make_discount, 'sl_txt = 13 & gt $curloc', 'Make a discount')
	func('$menu', 'exec_options', $menu_item_Cancel_deal, 'gt $return_lock', 'Cancel the deal')
	func('$menu', '===END===')
end

if sl_txt = 2:
	client_satisfaction = 1 + rating - demand_rating[$npc_id]
	$text[1] = '  The rating of your slave is even higher than customer expectations. Unfortunately this does not mean that the price will be better - payment is offered based on the desired rating <<$rating[demand_rating[$npc_id]]>>, and the price on the market for that rating is about <<common_price[demand_rating[$npc_id]]>> sparks. Maybe you can get a better price.'
	func('$menu', 'spacer', 3)

	func('$menu', '===BEGIN===', 'column_0')
	func('$menu', 'exec_options', $menu_item_Bargain, 'sl_txt = 11 & gt $curloc', 'Bargain')
	func('$menu', 'exec_options', $menu_item_Hold_price, 'sl_txt = 12 & gt $curloc', 'Hold firm price')
	func('$menu', 'exec_options', $menu_item_Make_discount, 'sl_txt = 13 & gt $curloc', 'Make a discount')
	func('$menu', 'exec_options', $menu_item_Cancel_deal, 'gt $return_lock', 'Cancel the deal')
	func('$menu', '===END===')
end

if sl_txt = 3:
	client_satisfaction = -2
	$text[1] = '  You slightly embellished your slave’s skills, so she will fit the client’s requirements. The client is ready to buy a slave with rating <<$rating[demand_rating[$npc_id]]>>. The price on the market for this rating is about <<common_price[demand_rating[$npc_id]]>> sparks. But you can still grow insolent and bargain.'
	func('$menu', 'spacer', 3)

	func('$menu', '===BEGIN===', 'column_0')
	func('$menu', 'exec_options', $menu_item_Bargain, 'sl_txt = 11 & gt $curloc', 'Bargain')
	func('$menu', 'exec_options', $menu_item_Hold_price, 'sl_txt = 12 & gt $curloc', 'Hold firm price')
	func('$menu', 'exec_options', $menu_item_Make_discount, 'sl_txt = 13 & gt $curloc', 'Make a discount')
	func('$menu', 'exec_options', $menu_item_Cancel_deal, 'gt $return_lock', 'Cancel the deal')
	func('$menu', '===END===')
end

if sl_txt = 11:
	interaction_city = 911
	city_form_transfer = city_form
	$return_lock_transfer = $return_lock
	$place_transfer = $place
	gt 'interaction_city'
end

if sl_txt = 12:
	interaction_city = 912
	city_form_transfer = city_form
	$return_lock_transfer = $return_lock
	$place_transfer = $place
	gt 'interaction_city'
end

if sl_txt = 13:
	interaction_city = 913
	city_form_transfer = city_form
	$return_lock_transfer = $return_lock
	$place_transfer = $place
	client_satisfaction += 1
	gt 'interaction_city'
end

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

$info_bar = ''
if nsfw = 0 and $npc_image[$npc_id] ! '': *p '
<img src="content\pic\characters\<<$npc_image[$npc_id]>>.png">
'
!*p '

<<$npc_name[$npc_id]>>
<<$npc_status[$npc_id]>>'

!Information for consideration:
!

!*p '
<<$npc_attitude[npc_attitude[$npc_id]]>>'

! <<$npc_info[$npc_id]>>
!

if nsfw = 1: *p '

' & not_safe = 1

$master_stats = ''
$master_stats += '<<$master_cha[master_cha]>>
'
$master_stats += '<<$master_style[master_style]>>
'
$master_stats += '<<$brand[brand_reputation]>>
'

$slave_stats = '
'
$slave_stats += 'SLAVE RANK: <<$rating[rating]>>
'
$slave_stats += '<<$charm_stat>>
'

*p '
<img src = "<<$master_ava>>">
'
*p '
<img src = "<<$slave[''ava'']>>.png">
'
*p '

<<$master_name>>

'
*p '

<<$slave_name>>

'
*p '
<<$master_stats>>
'
*p '
<<$slave_stats>>
'

*p '
<<$info_bar>>
'
*p '
<<$text_display>>
'

--- slave_sell ---------------------------------


code:
# slave_sell_chek
!Slave Sell Check
!Overhauled by crushboss
!Testing for failure to meet the demands of the customer
buyer_interested = 0

killvar 'stat_importance'

gs '$slave_price'

if rating < demand_rating[$npc_id]: sl_txt = 101 & exit

killvar 'demand'
demand['refuse_age'] = 99
demand['max_exotic'] = 99
demand['max_fat'] = 99
demand['min_fat'] = 1
dynamic $buyer_demand[$npc_id]
if slave['age'] = demand['refuse_age']: sl_txt = 100 & $text[1] = 'I do not want a <<$age[demand["refuse_age"]]>> slave.' & exit
if demand['agree_age'] ! 0:
	if slave['age'] ! demand['agree_age']: sl_txt = 100 & $text[1] = 'I only want a <<$age[demand["agree_age"]]>> slave.' & exit
end

if demand['nowitches'] = 1:
	if slave['alchemy'] > 0:
		sl_txt = 100 & $text[1] = 'I do not want a witch!' & exit
	elseif slave['enchanter'] > 0:
		sl_txt = 100 & $text[1] = 'I do not want a witch!' & exit
	end
end

if demand['pure'] = 1:
	if slave['oral'] > 1 or slave['penetration'] > 1 or slave['roleplay'] > 1 or slave['fetishism'] > 1 or slave['orgy'] > 1 or slave['xenophily'] > 1:
		sl_txt = 100 & $text[1] = 'I want a slave who is sexually pure.' & exit
	end
end

if demand['noperversion'] = 1:
	if slave['fetishism'] > 1 or slave['xenophily'] > 1 or (slave['perversion'] > 0 and slave['perversion_revealed'] > 0):
		sl_txt = 100 & $text[1] = 'I want a slave without perversions.' & exit
	end
end

if demand['notattoos'] = 1:
	if slave['tattoo'] > 1:
		sl_txt = 100 & $text[1] = 'I do not want any tattoos.' & exit
	end
end

killvar 'virgin_price'
if demand['virginity'] = 1:
	if slave['virginity'] > 1:
		sl_txt = 100 & $text[1] = 'I want a virgin.' & exit
	end
end

if demand['selftorture'] > 0:
	if slave['sub_selfpain'] < demand['selftorture']:
		sl_txt = 100 & $text[1] = 'I want a slave more skilled in self-torture.' & exit
	end
end

if demand['specialisation'] = 1:
	if slave_specialisation[$interesting_specialisation[$npc_id]] = 0:
		sl_txt = 102 & $text[1] = 'I want a slave with the required specialisation.' & exit
	end
end

if demand['artist'] > 0:
	if max(slave['calisthenics'], slave['music'], slave['art']) < demand['artist']:
		sl_txt = 102 & $text[1] = 'I want a slave with more artistic training.' & exit
	end
end

if slave['exotic'] > demand['max_exotic']: sl_txt = 100 & $text[1] = 'I want a less exotic slave.' & exit
if slave['exotic'] < demand['min_exotic']: sl_txt = 100 & $text[1] = 'I want a more exotic slave.' & exit
if slave['beauty'] < demand['min_beauty']: sl_txt = 100 & $text[1] = 'I want a more beautiful slave.' & exit
if slave['brand'] = 0 or slave['brand'] = 4: sl_txt = 100 & $text[1] = 'She does not have your brand.' & exit
if slave['fat'] < demand['min_fat']: sl_txt = 100 & $text[1] = 'She is too thin.' & exit
if slave['fat'] > demand['max_fat']: sl_txt = 100 & $text[1] = 'She is too fat.' & exit

if slave['wounds'] > 0 or slave['energy'] < 0 or slave['stamina'] < 2: sl_txt = 104 & exit
! or slave['parasite'] > 0 &! removed from line above because how would the buyer know? - ImperatorAugusts
if slave['rehabilitation'] > 0 or $slave_psy_status = 'broken': sl_txt = 104 & exit
if slave['pregnant'] > 0 and slave['pregnant_revealed'] > 0: sl_txt = 105 & exit

if slave[$npc_id] > 0 and (day - slave[$npc_id]) >= 10: slave[$npc_id] = 0
if slave['hygiene'] > 3:
	sl_txt = 103 & exit
elseif buyer_from_house = 0:
	!charm_demand_max = 15 + demand_rating[$npc_id]
	!charm_demand = rand(5,charm_demand_max)
									charm_demand = 6  &! require D- charm ( 6+) at F-/D-/D+ rating    (0-2)
	if demand_rating[$npc_id] >= 3: charm_demand = 12 &! require C- charm (12+) at C-/C+ rating       (3-4)
	if demand_rating[$npc_id] >= 5: charm_demand = 16 &! require B+ charm (16+) at B-/B+ rating       (5-6)
	if demand_rating[$npc_id] >= 7: charm_demand = 20 &! require A+ charm (20+) at A-/A+/S-/S+ rating (7-10)
	if charm_demand > charm: slave[$npc_id] = day
	if slave[$npc_id] > 0: sl_txt = 103 & exit
end

if wizard_mode = 1:
	msg 'charm_demand_max = <<charm_demand_max>>' + _
	'charm_demand = <<charm_demand>>' + _
	'charm = <<charm>>' + _
	'slave[$npc_id] = <<slave[$npc_id]>>'
end

dynamic $npc_preferences[$npc_id]
if stat_importance['sensitivity'] > slave['sensitivity']: sl_txt = 102 & exit
if stat_importance['temper'] > slave['temper']: sl_txt = 102 & exit
if stat_importance['intellect'] > slave['intellect']: sl_txt = 102 & exit
if stat_importance['ego'] > slave['ego']: sl_txt = 102 & exit
if stat_importance['pride'] > 0 and stat_importance['pride'] < slave['pride']: sl_txt = 102 & exit

if stat_importance['service'] > slave['service']: sl_txt = 102 & exit
if stat_importance['cook'] > slave['cook']: sl_txt = 102 & exit
if stat_importance['secretary'] > slave['secretary']: sl_txt = 102 & exit
if stat_importance['expression'] > slave['expression']: sl_txt = 102 & exit
if stat_importance['nurse'] > slave['nurse']: sl_txt = 102 & exit
if stat_importance['alchemy'] > slave['alchemy']: sl_txt = 102 & exit
if stat_importance['enchanter'] > slave['enchanter']: sl_txt = 102 & exit
if stat_importance['gladiatrix'] > slave['gladiatrix']: sl_txt = 102 & exit
if stat_importance['calisthenics'] > slave['calisthenics']: sl_txt = 102 & exit
if stat_importance['music'] > slave['music']: sl_txt = 102 & exit
if stat_importance['art'] > slave['art']: sl_txt = 102 & exit
if stat_importance['pet'] > slave['pet']: sl_txt = 102 & exit
if stat_importance['cowSK'] > slave['cowSK']: sl_txt = 102 & exit
if stat_importance['dressage'] > slave['dressage']: sl_txt = 102 & exit
if stat_importance['animal'] > max(slave['pet'], slave['dressage'], slave['cowSK']): sl_txt = 102 & exit &! alternative condition satisfied by pet OR pony OR cow skill, currently used by Hip chef

if stat_importance['petting'] > slave['petting']: sl_txt = 102 & exit
if stat_importance['oral'] > slave['oral']: sl_txt = 102 & exit
if stat_importance['penetration'] > slave['penetration']: sl_txt = 102 & exit
if stat_importance['orgy'] > slave['orgy']: sl_txt = 102 & exit
if stat_importance['roleplay'] > slave['roleplay']: sl_txt = 102 & exit
if stat_importance['fetishism'] > slave['fetishism']: sl_txt = 102 & exit
if stat_importance['xenophily'] > slave['xenophily']: sl_txt = 102 & exit

if slave['virginity'] < 2: virgin_price += (50*relative_rating)

if virgin_price > 0: $virgin_price = ' plus <<virgin_price>> for virginity'

if rating > demand_rating[$npc_id] and sl_txt = 1: sl_txt = 2

if sl_txt < 3: buyer_interested = 1

--- slave_sell_chek ---------------------------------


code:
# slave_sell_done
!ЗАВЕРШЕНИЕ СДЕЛКИ ПО ПРОДАЖЕ КЛЕЙМЛЕНОЙ РАБЫНИ ЧАСТНОМУ ЛИЦУ
npc_money[$npc_id] -= sell_price
sparks += sell_price

if price >= npc_worth[$npc_id] and npc_bennies[$npc_id] > 0:
	npc_bennies[$npc_id] -= 1
	npc_relations[$npc_id] += 1
	if slave['brand'] ! 4 and slave['brand'] ! 0: brand_rate += 1
	if personal_relations[$npc_id] > 3: brand_rate += 1
end

if price > sell_price and npc_bennies[$npc_id] > 0:
	personal_relations[$npc_id] += 2
end

if price < sell_price and npc_bennies[$npc_id] > 0:
	npc_bennies[$npc_id] -= 1
	personal_relations[$npc_id] -= 2
	if slave['brand'] ! 4: brand_rate -= 1
end

if slave['ill'] > 0: sold_ill_slave = 1 &! trigger follow-up event
if slave['parasite'] > 0: sold_parasite_slave = 1 &! trigger follow-up event
dynamic $sold_clothing
dynamic $clear_slave_instance, 'slave'

gt '<<$return_lock>>'

--- slave_sell_done ---------------------------------


code:
# slave_stat
!SLAVE STAT SCREEN
gs '$newloc' &! ensure all stats are updated before displaying them

if slave_state = CONST_INT['slave_faint']:
	$info_text = '  <<$slave_name>> is exhausted and moans quietly. She is clearly in a very bad condition. You have to give her a rest or even medical assistance.'
elseif slave_state = CONST_INT['slave_dead']:
	$info_text = '  <<$slave_name>> is dead. Her lifeless corpse is lying on the floor.'
elseif $info_text = '':
	dynamic $replace("$info_text = '<<$psy_status[$slave_psy_status]>>'", 'dyn'+'slave', 'slave') &! evaluate delayed sub-expressions with substitution
end

!reset equipment selection when switching tabs
if slot = 0: $equip_choice = ''
slot = 0

!Fix blank screen bug - crushboss
if slave_state ! CONST_INT['no_slave']:
	if $slave["wpn"] = '': $slave["wpn"] = 'безоружный'
	if $slave["armor"] = '': $slave["armor"] = 'без_брони'
	if $slave["cloth"] = '': $slave["cloth"] = 'голая'
end

stat_importance['stamina'] = 1
stat_importance['sensitivity'] = 1
stat_importance['temper'] = 1
stat_importance['intellect'] = 1
stat_importance['ego'] = 1
stat_importance['exotic'] = 1
stat_importance['fat'] = 1

stat_importance['obedience'] = 1
stat_importance['moral'] = 1
stat_importance['custom'] = 1
stat_importance['instinct'] = 1
stat_importance['rational'] = 1
stat_importance['pride'] = 1
stat_importance['spoil'] = 1

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

stat_importance['oral'] = 1
stat_importance['penetration'] = 1
stat_importance['petting'] = 1
stat_importance['orgy'] = 1
stat_importance['roleplay'] = 1
stat_importance['xenophily'] = 1
stat_importance['fetishism'] = 1

gs '$slave_price'
gs 'stats_layout'

*p '
Rules
'
*p '
Anatomy
'
*p '
Equipment
'
*p '
Aura
'
if exam_in_progress = 1:
	*p '

'
elseif is_home = 1:
	*p '

'
else
	*p '

'
end

gs '$slave_traits'
gs '$addon_custom_data'
gs '$addon', 'info_box'

!lillimerge add more tooltips?

*p '
'
*nl 'Name:  <<$slave_name>>'
*nl 'Age:  <<$slave_age_name[slave["age"]]>>'
if slave['age_count'] = 1:
	*nl 'Owned for:  1 day'
elseif slave['age_count'] < 1000:
	*nl 'Owned for:  <<slave["age_count"]>> days'
else
	*nl 'Owned for:  <<slave["age_count"]/10>> decades'
end
*nl 'Rank:  <<$rating[rating]>>'
*nl 'ATTRIBUTES '
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'beauty', slave['beauty'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $красота_справка & dynamic $msg, $красота_справка_2 & $info_text = $красота_совет & gt $curloc"><<$beauty[slave["beauty"]]>>'
$tooltip_text = func('$addon', 'stat_tooltip_text', 'stamina')
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $здоровье_справка & dynamic $msg, $здоровье_справка_2 & $info_text = $здоровье_совет & gt $curloc"><<$stamina[slave["stamina"]]>>'
$tooltip_text = func('$addon', 'stat_tooltip_text', 'sensitivity')
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $чувствительность_справка & dynamic $msg, $чувствительность_справка_2 & $info_text = $чувствительность_совет & gt $curloc"><<$sensitivity[slave["sensitivity"]]>>'
$tooltip_text = func('$addon', 'stat_tooltip_text', 'temper')
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $темперамент_справка & dynamic $msg, $темперамент_справка_2 & $info_text = $темперамент_совет & gt $curloc"><<$temper[slave["temper"]]>>'
$tooltip_text = func('$addon', 'stat_tooltip_text', 'intellect')
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $ум_справка & dynamic $msg, $ум_справка_2 & $info_text = $ум_совет & gt $curloc"><<$intellect[slave["intellect"]]>>'
$tooltip_text = func('$addon', 'stat_tooltip_text', 'ego')
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $характер_справка & dynamic $msg, $характер_справка_2 & $info_text = $характер_совет & gt $curloc"><<$ego[slave["ego"]]>>'
$tooltip_text = func('$addon', 'stat_tooltip_text', 'pride', -1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $гордыня_справка & dynamic $msg, $гордыня_справка_2 & $info_text = $гордыня_совет & gt $curloc"><<$pride[slave["pride"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'exotic', slave['exotic'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $экзотичность_справка & dynamic $msg, $экзотичность_справка_2 & $info_text = $экзотичность_совет & gt $curloc"><<$exotic[slave["exotic"]]>>'
$tooltip_text = func('$addon', 'physique_tooltip_text', 'fat', slave['fat'])
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $жыр_справка & dynamic $msg, $жыр_справка_2 & $info_text = $жыр_совет & gt $curloc"><<$fat[slave["fat"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'style', slave['style'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $стиль_справка & dynamic $msg, $стиль_справка_2 & $info_text = $стиль_совет & gt $curloc"><<$style[slave["style"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'fame', slave['fame'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $слава_справка & dynamic $msg, $слава_справка_2 & $info_text = $слава_совет & gt $curloc"><<$girl_fame[slave["fame"]]>>'
$tooltip_text = func('$addon', 'no_rate_full_grade_tooltip_text', 'mood', slave['mood'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: msg $mood_chart & $info_text = $slave_mood_help & gt $curloc"><<$mood[slave_mood_plus]>>'
*nl 'TRAITS'
*nl '<<$slave_features_list>>'
*p '
'

!calculation of the food cost
food_cost = 2
!if slave_ration = -2: food_cost = 1 - slave_ration is never non-zero, so this is always false - ImperatorAugustus
!if slave_ration > -2: food_cost = 2 - slave_ration is never non-zero, so this is always true (therefore set food_cost = 2 above, instead of = 0)
!if slave_ration = 1: food_cost = 5 - slave_ration is never non-zero, so this is always false
!if double_ration = 1: food_cost += food_cost - double_ration is never set, so this is always false
!if enable_dessert = 1: food_cost += 2 - enable_dessert is never non-zero, so this is always false
if slave["diet_supplements"] = 1: food_cost += 1

daily_cost = food_cost

if slave_stat_screen = 0:
	*p '

'
	*p '

'
	*p '

'
	*p '

'
	if is_home = 1:
		*p '
<img src = "content\pic\bg\<<$interior_study[$study]>>.png">
'
	else
	  	*p '
<img src = "content\pic\bg\<<$bg[$place]>>_small.png">
'
	end
	if nsfw = 0: *p '
<img src="content\pic\<<$slave["fullimage"]>>.png">
'
	if presets_list = 0:
		*p '
SLEEP:'
		!*nl '
'
		*nl '     - in the cells'
		*nl '     - on the floor'
		*nl '     - on a bedroll'
		*nl '     - in my bed'
		*nl '     - in the boudoir'
		*nl 'DIET:'
		*nl '     - Dehydrated food'
		*nl '     - Fresh food'
		*nl '     - Fiend’s cum'
		*nl '     - Your leftovers'
		*nl '     - Supplements'
		*nl 'PORTION SIZE:'
		*nl '     - Restricted'
		*nl '     - Moderate'
		*nl '     - Generous'
		if max(master_medic, assistant['nurse']) > 4:
			*nl '     - Calculated'
		else
			*nl '     - Nutritionist'
		end
		if difficulty_setting = 2 or slave['diet_portion'] ! 4:
			*nl 'CALORIES REMAINING:'
			*p '<<IIF(slave["calories"] > 0, "+", "")>><<slave["calories"]*100>> cal'
		end
		*p '
'

	else
		*p '
PRESETS:
'
		*p '
'
		*nl '<<$preset_name[1]>>&nbsp[Save]'
		*nl '<<$preset_name[2]>>&nbsp[Save]'
		*nl '<<$preset_name[3]>>&nbsp[Save]'
		*nl '<<$preset_name[4]>>&nbsp[Save]'
		*nl '<<$preset_name[5]>>&nbsp[Save]
'
		*nl 'Reset&nbsp[?]'
		*nl 'Close
'
	end

	*p '
'
	*nl 'Act as cook -     '
	*nl 'Act as maid -     '
	*nl 'Bath slave -     '
	*nl 'Behave: alarm -     '
	*nl 'Behave: humility -     '
	*nl 'Behave: pet -     '
	*nl 'Behave: silence -     '
	*nl 'Behave: toilet -     '
	*nl 'Behave: urinal -     '
	*nl 'Deny orgasm -     '
	*nl 'Deny toileting -     '
	*nl 'Milk the fiend -     '
	*nl 'No masturbation -     '
	*nl 'Use vaginal beads -     '
	*nl '
Enforce rules -
'
	if $slave['rules_explanations'] ! '':
		*nl '<<$rules_obedience[slave["rules_broken"]]>>'
	else
		*nl ''
	end
	*nl 'PRESETS'
	*nl '1    2    3    4    5
'

	if presets_list = 0:
		if dungeon > 0:
			if slave["sleep_condition"] = -2:
				*p '

'
			else
				*p '

'
			end
		else
			*p '

'
		end
		if slave["sleep_condition"] = -1:
			*p '

'
		else
			*p '

'
		end
		if slave["sleep_condition"] = 0:
			*p '

'
		else
			*p '

'
		end
		if slave["sleep_condition"] = 1:
			*p '

'
		else
			*p '

'
		end
		if boudoir > 0:
			if slave["sleep_condition"] = 2:
				*p '

'
			else
				*p '

'
			end
		else
			*p '

'
		end
		if slave["diet_food_type"] = 0:
			*p '

'
		else
			*p '

'
		end
		if slave["diet_food_type"] = 1:
			*p '

'
		else
			*p '

'
		end
		if slave["diet_food_type"] = 2:
			*p '

'
		else
			*p '

'
		end
		if spawn_semen < 5 and kitchen = 0 and exam_in_progress = 0:
			! made this available outside the Slums and tutorial, because if he has a kitchen (stasis chamber) he can buy and store even if he does not have a fiend of his own - ImperatorAugustus
			*p '

'
		end
		if slave["diet_leftovers"] = 1:
			*p '

'
		else
			*p '

'
		end
		if slave["diet_supplements"] = 1:
			*p '

'
		else
			*p '

'
		end

		if slave['diet_food_type'] = -1:
			*p '

'
			*p '

'
			*p '

'
			*p '

'
		else
			if slave['diet_portion'] = 1:
				*p '

'
			else
				*p '

'
			end
			if slave['diet_portion'] = 2:
				*p '

'
			else
				*p '

'
			end
			if slave['diet_portion'] = 3:
				*p '

'
			else
				*p '

'
			end
			if slave['diet_portion'] = 4:
				*p '

'
			elseif master_medic > 4:
				*p '

'
			elseif assistant_state = CONST_INT['slave_exist'] and assistant['nurse'] > 4:
				*p '

'
			else
				*p '

'
			end
		end

		if difficulty_setting = 2 or slave['diet_portion'] ! 4: *p '

'
	else
		if slave["selected_rules_preset"] = 1:
			*p '

'
		else
			*p '

'
		end
		if slave["selected_rules_preset"] = 2:
			*p '

'
		else
			*p '

'
		end
		if slave["selected_rules_preset"] = 3:
			*p '

'
		else
			*p '

'
		end
		if slave["selected_rules_preset"] = 4:
			*p '

'
		else
			*p '

'
		end
		if slave["selected_rules_preset"] = 5:
			*p '

'
		else
			*p '

'
		end
	end

	overnight_rules_count = 0
	if kitchen <= 0:
		*p '

'
	elseif slave["cooks_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["cleans_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if bath <= 0:
		*p '

'
	elseif slave["washes_master_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["blowjob_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["humility_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["pet_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["silence_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["toilet_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["urinal_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["no_orgasm_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["no_shit_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if pet_tentacle <= 0:
		*p '

'
	elseif slave["tentacle_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if slave["masturbation_rule"] = 1:
		overnight_rules_count += 1
		*p '

'
	else
		*p '

'
	end

	if inventory['vaginal_balls'] > 0 and slave["virginity"] > 1:
		if slave["v_balls_rule"] = 1:
			overnight_rules_count += 1
			*p '

'
		else
			*p '

'
		end
	else
		*p '

'
		if slave["virginity"] < 2 and inventory['vaginal_balls'] > 0: *p '

'
	end

	if slave["force_rules"] = 1:
		*p '

'
	else
		*p '

'
	end

	! display rules heading with count obtained above
	*p '
RULES (<<IIF(overnight_rules_count < IIF(difficulty_setting = 2, 3, 2), "
" + dyneval($vb_cycle, 0, $str(overnight_rules_count)) + "
", overnight_rules_count)>>):
'

	!lillimerge quick preset switch buttons
	if slave["selected_rules_preset"] = 1:
		*p '

'
	else
		*p '

'
	end
	if slave["selected_rules_preset"] = 2:
		*p '

'
	else
		*p '

'
	end
	if slave["selected_rules_preset"] = 3:
		*p '

'
	else
		*p '

'
	end
	if slave["selected_rules_preset"] = 4:
		*p '

'
	else
		*p '

'
	end
	if slave["selected_rules_preset"] = 5:
		*p '

'
	else
		*p '

'
	end

end

!ANATOMY TAB
!removed hairstyle_demo hardcode
if slave_stat_screen = 1:
	*p '

'
	*p '

'
	*p '

'
	*p '

'
	if ui_style = 2:
		*p '

'
	else
		*p '

'
	end
	if nsfw = 0: *p '
<img width = "370px" src = "content\pic\girls\body\<<$slave["boobs_img"]>>.png">
'
	if nsfw = 0: *p '
<img width = "370px" src = "content\pic\girls\body\<<$slave["pussy_img"]>>.png">
'
	*p '
'
		*p '<<$красота[slave["beauty"]]>> = <<$природная_красота[slave["base_beauty"]]>> + <<$пластика[slave["beauty_enhanced"]]>> - (<<$шрамы[slave["scars"]]>> + <<$синяки[slave["bruises"]]>> + <<$charm_physique[slave["fat"]]>>)'
		*nl '<<$экзотика[slave["exotic"]]>> = <<$природная_экзотика[slave["base_exotic"]]>> + <<$slave_tattoo[slave["tattoo"]]>> + <<$пирсинг[slave["piercing_count"]]>> + <<$wear_ex[slave["ex_count"]]>>'
		*nl '<<$стиль[slave["style"]]>> = <<$wear_st[slave["st_count"]]>> + <<$slave_makeup[slave["makeup"]]>> + <<$hair_style[slave["hairstyle"]]>> + <<$мейкап[slave["makeup_count"]]>> + <<$грация[slave["grace_count"]]>> - <<$гигиена[slave["hygiene"]]>>'
		if auspex = 1:
			*nl '<<$charm_aura[max(0, 5 + charm_from_aura)]>> = <<$charm_moral[slave["moral"]]>> - (<<$charm_angst[slave["angst"]]>> + <<$charm_spoil[slave["spoil"]]>>)'
			*nl '<<$charm_stat>>  = <<$brand[brand_reputation]>> + <<$girl_fame[slave["fame"]]>> + <<$стиль[slave["style"]]>> + <<$экзотика[slave["exotic"]]>> + <<$charm_aura[max(0, 5 + charm_from_aura)]>> + <<$charm_physique[slave["fat"]]>> - <<$шрамы[slave["scars"]]>> - <<$синяки[slave["bruises"]]>>' &! $charm_stat is updated by $slave_price call earlier
		else
			*nl 'You must cast Auspex to view the aura and charm rating of your slave '
		end
	*p '
'
	*p '
'
		*p '<<$slave_boobs>><<$slave_boobsx>>'
		if slave['lactation'] > 0:
			*nl '<<$slave_lactation[slave["lactation"]]>>  <<$impregnation_rate[slave["impregnation"]]>>  '
		else
			*nl '<<$slave_lactation[slave["lactation"]]>>'
		end
		*nl '<<$nipple_piercing[slave["nipple_piercing"]]>>'
		*nl '<<$boobs_modification[slave["breast_enhanced"]]>>'
		*nl '<<$slave_age_name[slave["age"]]>>'
	*p '
'
	*p '
'
		*p '<<$virginity[slave["virginity"]]>>'
		*nl '<<$slave_anal_description[slave["anal_stretch"]]>>'
		*nl '<<$clit_piercing[slave["clit_piercing"]]>>'
		*nl '<<$vaginal_modification[slave["vaginal_modification"]]>>'
		if slave['brand'] = 0:
			*nl '<<$slave_brand[0]>>'
		else
			*nl '<<$slave_brand[slave["brand"]]>>'
		end
	*p '
'
end

!EQUIPMENT TAB
if slave_stat_screen = 2:
	$earrings_plural = ''
	if $item_name[$slave["earrings"]] ! '' and $item_name[$slave["earrings"]] ! '-': $earrings_plural = 's'
	$nipplerings_plural = ''
	if $item_name[$slave["nipplerings"]] ! '' and $item_name[$slave["nipplerings"]] ! '-' and $slave["nipplerings"] ! 'nipple_chain': $nipplerings_plural = 's'
	*p '

'
	*p '

'
	*p '

'
	*p '

'
	if ui_style = 2:
		*p '

'
	else
		*p '

'
	end
	*p '
'
		*p 'SLAVE EQUIPMENT'
		*p '
Armour: <<$item_name[$slave["armor"]]>>
'
		*p '
Shoulder Holster: <<$item_name[$slave["back_wpn"]]>>
'
		*p '
Left Hand: <<$item_name[$slave["left_wpn"]]>>
'
		*p '
Right Hand: <<$item_name[$slave["right_wpn"]]>>
'
		*nl '
Clothes: <<$item_name[$slave["cloth"]]>>
'
		*p '
Headgear: <<$item_name[$slave["headband"]]>>
'
		*p '
Neck: <<$item_name[$slave["collar"]]>>
'
		*p '
Hands: <<$item_name[$slave["gloves"]]>>
'
		*p '
Feet: <<$item_name[$slave["boots"]]>>
'
		*p '
Ring 1: <<$item_name[$slave["ring_left"]]>>
'
		*p '
Ring 2: <<$item_name[$slave["ring_right"]]>>
'
		*p '
Earrings: <<$item_name[$slave["earrings"]]>><<$earrings_plural>>
'
		*p '
Tongue: <<$item_name[$slave["tongue"]]>>
'
		*p '
Nipples: <<$item_name[$slave["nipplerings"]]>><<$nipplerings_plural>>
'
		*p '
Navel: <<$item_name[$slave["navel"]]>>
'
		*p '
Clitoris: <<$item_name[$slave["clitring"]]>>
'
	*p '
'
	*p '
AVAILABLE OPTIONS
<<$equip_choice>>
'
end

!Slave Aura Tab
if slave_stat_screen = 3:
	*p '

'
	*p '

'
	*p '

'
	*p '

'
	if ui_style = 2:
		*p '

'
	else
		*p '

'
	end
 	assistant_aura = 0
	gs 'auspex_list'
	*p '
<<$auspex_list>>
'
	!Testing Code - crushboss
	!dynamic $msg, 'Exhibitionism: <<slave["exhibitionism_xp"]>>
masochism: <<slave["masochism_xp"]>>
Nymphomania: <<slave["nymphomania_xp"]>>
Perversion: <<slave["perversion_xp"]>>
Lesbian: <<slave["lesbian_xp"]>>
<<slave_type>>
<<rating>>
<<slave["sex_sum"]>>
<<slave["pride"]>>
<<slave["spoil"]>>
<<slave["moral"]>>
<<slave["has_ride_win"]>>
Tattoo: <<slave["tattoo"]>>
'
	!end of Testing Code - crushboss
end

if slave_state = CONST_INT['slave_exist'] and is_home = 1:
	!ImperatorAugustus: added is_home check to disable skill training links when not at home
	$skill_text = ''
	$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a maid lesson for <<$slave_name>>" href = "EXEC: interaction = 1211 & gt ''interaction''"><<$slave_service[slave["service"]]>>
'
	$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a cooking lesson for <<$slave_name>>" href = "EXEC: interaction = 1212 & gt ''interaction''"><<$slave_cook[slave["cook"]]>>
'
	$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a secretary lesson for <<$slave_name>>" href = "EXEC: interaction = 1214 & gt ''interaction''"><<$slave_secretary[slave["secretary"]]>>
'
	$skill_text += '<a class="tooltip-left" tooltip-data="Conduct an elocution lesson for <<$slave_name>>" href = "EXEC: interaction = 1231 & gt ''interaction''"><<$slave_expression[slave["expression"]]>>
'
	$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a nursing lesson for <<$slave_name>>" href = "EXEC: interaction = 1213 & gt ''interaction''"><<$slave_nurse[slave["nurse"]]>>
'
	if exam_in_progress = 1:
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct an alchemy lesson for <<$slave_name>>" href = "EXEC: msg $no_services_exam & gt $curloc"><<$slave_alchemy[slave["alchemy"]]>>
'
	elseif lab < 1:
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct an alchemy lesson for <<$slave_name>>" href = "EXEC: msg $no_lab & gt $curloc"><<$slave_alchemy[slave["alchemy"]]>>
'
	else
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct an alchemy lesson for <<$slave_name>>" href = "EXEC: interaction = 1243 & gt ''interaction''"><<$slave_alchemy[slave["alchemy"]]>>
'
	end
	if library >= 0:
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a witchcraft lesson for <<$slave_name>>" href = "EXEC: interaction = 1244 & gt ''interaction''"><<$slave_enchanter[slave["enchanter"]]>>
'
	end
	$skill_text += '<a class="tooltip-left" tooltip-data="Conduct an athletics lesson for <<$slave_name>>" href = "EXEC: interaction = 1221 & gt ''interaction''"><<$gym_lesson[slave["stamina"]]>>
'
	if slave['stamina'] >= 2:
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a gladiatrix lesson for <<$slave_name>>" href = "EXEC: interaction = 1223 & gt ''interaction''"><<$slave_gladiatrix[slave["gladiatrix"]]>>
'
	else
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a gladiatrix lesson for <<$slave_name>>" href = "EXEC: msg $no_slave_stamina & gt $curloc"><<$slave_gladiatrix[slave["gladiatrix"]]>>
'
	end
	if slave['stamina'] >= 2:
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a dance lesson for <<$slave_name>>" href = "EXEC: interaction = 1222 & gt ''interaction''"><<$slave_calisthenics[slave["calisthenics"]]>>
'
	else
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a dance lesson for <<$slave_name>>" href = "EXEC: msg $no_slave_stamina & gt $curloc"><<$slave_calisthenics[slave["calisthenics"]]>>
'
	end
	$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a music lesson for <<$slave_name>>" href = "EXEC: menu_form = 1233 & $place = ''home_lux'' & gt ''menu_form''"><<$slave_music[slave["music"]]>>
'
	$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a painting lesson for <<$slave_name>>" href = "EXEC: interaction = 1234 & gt ''interaction''"><<$slave_art[slave["art"]]>>
'
	$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a pet lesson for <<$slave_name>>" href = "EXEC: interaction = 1241 & gt ''interaction''"><<$slave_pet[slave["pet"]]>>
'
	if slave['stamina'] >= IIF(slave['dressage'] < 3, 2, 3):
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a pony racing lesson for <<$slave_name>>" href = "EXEC: interaction = 1224 & gt ''interaction''"><<$slave_dressage[slave["dressage"]]>>
'
	else
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a pony racing lesson for <<$slave_name>>" href = "EXEC: msg $no_slave_stamina & gt $curloc"><<$slave_dressage[slave["dressage"]]>>
'
	end
	if slave['stamina'] >= 2:
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a cow lesson for <<$slave_name>>" href = "EXEC: interaction = 1226 & gt ''interaction''"><<$slave_cowSK[slave["cowSK"]]>>
'
	else
		$skill_text += '<a class="tooltip-left" tooltip-data="Conduct a cow lesson for <<$slave_name>>" href = "EXEC: msg $no_slave_stamina & gt $curloc"><<$slave_cowSK[slave["cowSK"]]>>
'
	end
	*p '
'
		*nl '
SKILLS
'
		*p '<<$skill_text>>'
		*p '
SEX TECHNIQUES
'
		*p '<a class="tooltip-left" tooltip-data="Conduct a petting lesson for <<$slave_name>>" href = "EXEC: menu_form = 131 & $place = ''home_lux'' & gt ''menu_form''"><<$slave_petting[slave["petting"]]>>'
		*nl '<a class="tooltip-left" tooltip-data="Conduct an oral pleasure lesson for <<$slave_name>>" href = "EXEC: menu_form = 132 & $place = ''home_lux'' & gt ''menu_form''"><<$slave_oral[slave["oral"]]>>'
		*nl '<a class="tooltip-left" tooltip-data="Conduct a penetration lesson for <<$slave_name>>" href = "EXEC: menu_form = 133 & $place = ''home_lux'' & gt ''menu_form''"><<$slave_penetration[slave["penetration"]]>>'
		if exam_in_progress = 1:
			*nl '<a class="tooltip-left" tooltip-data="Conduct a group sex lesson for <<$slave_name>>" href = "EXEC: msg $no_services_exam & gt $curloc"><<$slave_orgy[slave["orgy"]]>>'
		else
			*nl '<a class="tooltip-left" tooltip-data="Conduct a group sex lesson for <<$slave_name>>" href = "EXEC: menu_form = 134 & $place = ''home_lux'' & gt ''menu_form''"><<$slave_orgy[slave["orgy"]]>>'
		end
		*nl '<a class="tooltip-left" tooltip-data="Conduct a demonstration lesson for <<$slave_name>>" href = "EXEC: menu_form = 137 & $place = ''home_lux'' & gt ''menu_form''"><<$slave_roleplay[slave["roleplay"]]>>'
		*nl '<a class="tooltip-left" tooltip-data="Conduct a fetishism lesson for <<$slave_name>>" href = "EXEC: menu_form = 136 & $place = ''home_lux'' & gt ''menu_form''"><<$slave_fetishism[slave["fetishism"]]>>'
		if exam_in_progress = 1:
			*nl '<a class="tooltip-left" tooltip-data="Conduct a xenophily lesson for <<$slave_name>>" href = "EXEC: msg $no_services_exam & gt $curloc"><<$slave_xenophily[slave["xenophily"]]>>'
		else
			*nl '<a class="tooltip-left" tooltip-data="Conduct a xenophily lesson for <<$slave_name>>" href = "EXEC: menu_form = 135 & $place = ''home_lux'' & gt ''menu_form''"><<$slave_xenophily[slave["xenophily"]]>>'
		end
	*p '
'
else
	*p '
'
		*nl '
SKILLS
'
			*p  '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''service'']>> rating"><<$slave_service[slave["service"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''cook'']>> rating"><<$slave_cook[slave["cook"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''secretary'']>> rating"><<$slave_secretary[slave["secretary"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''expression'']>> rating"><<$slave_expression[slave["expression"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''nurse'']>> rating"><<$slave_nurse[slave["nurse"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''alchemy'']>> rating"><<$slave_alchemy[slave["alchemy"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''enchanter'']>> rating"><<$slave_enchanter[slave["enchanter"]]>>
'
			*nl '
<<$gym_lesson[slave["stamina"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''gladiatrix'']>> rating"><<$slave_gladiatrix[slave["gladiatrix"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''calisthenics'']>> rating"><<$slave_calisthenics[slave["calisthenics"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''music'']>> rating"><<$slave_music[slave["music"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''art'']>> rating"><<$slave_art[slave["art"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''pet'']>> rating"><<$slave_pet[slave["pet"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''dressage'']>> rating"><<$slave_dressage[slave["dressage"]]>>
'
			*nl '<div style="display:inline-block;position:relative;" class="tooltip-left" tooltip-data="<<$atr_name[''cowSK'']>> rating"><<$slave_cowSK[slave["cowSK"]]>>
'
		*p '
SEX TECHNIQUES
'
		*p  '
<<$slave_petting[slave["petting"]]>>
'
		*nl '
<<$slave_oral[slave["oral"]]>>
'
		*nl '
<<$slave_penetration[slave["penetration"]]>>
'
		*nl '
<<$slave_orgy[slave["orgy"]]>>
'
		*nl '
<<$slave_roleplay[slave["roleplay"]]>>
'
		*nl '
<<$slave_fetishism[slave["fetishism"]]>>
'
		*nl '
<<$slave_xenophily[slave["xenophily"]]>>
'
	*p '
'
end

*p '
<<$info_text>>
'

!Used for debugging variables I need to track - crushboss

!dynamic $msg, 'Cooking: <<$cooking[slave_type]>>
Slave Type: <<slave_type>>
'
!dynamic $msg, 'Ovulation: <<slave["ovulation"]>>
Menstruation: <<slave["menstruation"]>>
Pregnant: <<slave["pregnant"]>>
Fertility: <<slave["fertility"]>>
Vaginal Modification: <<slave["vaginal_modification"]>>
'
!dynamic $msg, '<<модификатор_колющий>>
'
!dynamic $msg, '<<slave_rate["rational"]>>'
!dynamic $msg, '<<$slave[''ava'']>>.png'
!dynamic $msg, 'Charm: <<charm>>'
!if slave_stat_screen = 1:
	!dynamic $msg, 'Obedience: <<slave["obedience"]>>
Fear: <<slave["fear"]>>
Fear Rate: <<slave_rate["fear"]>>
Despair-Angst: <<slave["angst"]>>
Despair-Angst Rate: <<slave_rate["angst"]>>
Spoil: <<slave["spoil"]>>
Spoil Rate: <<slave_rate["spoil"]>>
Mood: <<slave["mood"]>>
Arousal: <<slave["arousal"]>>
Arousal Rate: <<slave_rate["arousal"]>>
'
!end
--- slave_stat ---------------------------------


code:
# slave_to_assistant
!move slave to assistant or vice versa (to be called with 'gt')

if assistant_state > CONST_INT['no_slave'] and slave_state > CONST_INT['no_slave']:
	! make overlapping rules mutually exclusive, and keep them with the assistant role if a new assistant (current slave) is taking over
	if assistant['cleans_rule'] = 1: slave['cleans_rule'] = 1 & assistant['cleans_rule'] = 0
	if assistant['cooks_rule'] = 1: slave['cooks_rule'] = 1 & assistant['cooks_rule'] = 0
	if assistant['washes_master_rule'] = 1: slave['washes_master_rule'] = 1 & assistant['washes_master_rule'] = 0
	if assistant['tentacle_rule'] = 1: slave['tentacle_rule'] = 1 & assistant['tentacle_rule'] = 0
	if assistant['alchemist_rule'] = 1: slave['alchemist_rule'] = 1 & assistant['alchemist_rule'] = 0

	! accounting responsibility can be shared
	!if assistant['account_rule'] = 1: slave['account_rule'] = 1 & assistant['account_rule'] = 0

	! copy assistant-exclusive duties to new assistant
	slave['supervise_rule'] = assistant['supervise_rule']
	slave['washes_slave_rule'] = assistant['washes_slave_rule']

	slave['buy_alcohol'] = assistant['buy_alcohol']
	slave['buy_cheese'] = assistant['buy_cheese']
	slave['buy_flour'] = assistant['buy_flour']
	slave['buy_spice'] = assistant['buy_spice']
	slave['buy_vegetables'] = assistant['buy_vegetables']

	slave['buy_cream'] = assistant['buy_cream']
	slave['buy_eggs'] = assistant['buy_eggs']
	slave['buy_milk'] = assistant['buy_milk']

	slave['buy_mince'] = assistant['buy_mince']
	slave['buy_meat'] = assistant['buy_meat']
end

! reset assistant appearance
!$assistant['fullimage'] = $fullimage[assistant_type] & assistant['image_mode'] = 0

dynamic $swap_slave_instances, 'slave', 'assistant'

if get_initial_slave = 1 and assistant_state = CONST_INT['slave_exist']:
	!Reset get initial slave variable to prevent loop
	get_initial_slave = 0
elseif sound_on = 1:
	play 'content/snd/slave_to_assistant.wav', sound_volume
end

if $return_lock = 'menu_form': menu_form = 0 & city_form = 0 &! city_form = 0 to bypass menu_form ESC intercept but still play door sound

gt $return_lock

--- slave_to_assistant ---------------------------------


code:
# slave_to_cage
!move slave to prisoner

dynamic $swap_slave_instances, 'slave', 'prisoner'

if prisoner_state = CONST_INT['slave_exist']:
	if hunting_prize = 1:
		$prisoner_info_text = '  Your prize is a <<$slave_beauty1_txt[prisoner["beauty"]]>> <<$slave_noun3[prisoner["age"]]>>. You lock her in the cell until you can deal with her.'
		hunting_prize = 0
	else
		dynamic $replace("$prisoner_info_text = '<<$psy_status[$prisoner_psy_status]>>'", 'dyn'+'slave', 'prisoner') &! evaluate delayed sub-expressions with substitution
	end
elseif prisoner_state = CONST_INT['slave_faint']:
	if hunting_prize = 1:
		$prisoner_info_text = '  Your prize is a <<$slave_beauty1_txt[prisoner["beauty"]]>> <<$slave_noun3[prisoner["age"]]>>. She is exhausted and moans quietly. She is clearly in a very bad condition but she probably will be okay if you leave her in the cell until you can deal with her.'
		hunting_prize = 0
	else
		$prisoner_info_text = '  <<$prisoner_name>> is exhausted and moans quietly. She is clearly in a very bad condition. You have to give her a rest or even medical assistance.'
	end
end

prisoner_fattening = 0
prisoner['orig_fat'] = prisoner['fat']

gt $return_lock

--- slave_to_cage ---------------------------------


code:
# slave_to_cow
!move slave to cow (to be called with 'gs')
!can be called directly from cow lessons, which is why cow_lesson_in_progress = 0 resets are needed here - ImperatorAugustus

if slave_state = CONST_INT['slave_exist'] and slave['cowSK_affinity'] < 1:
	if (slave['obedience'] + slave['fear'] < 0) or _
	(slave['neg_barn'] > 0 and slave['obedience'] + slave['fear'] < 4) or _
	(slave['neg_barn_plus'] > 0 and slave['obedience'] + slave['fear'] < 6):
		cow_lesson_in_progress = 0
		interaction = menu_deny_barn
		gt 'interaction'
	end
end

dynamic $swap_slave_instances, 'slave', 'cow'

if interaction = menu_cow_impregnate or interaction = menu_C_milking: gt 'interaction'

--- slave_to_cow ---------------------------------


code:
# slave_to_harpy
!move slave to harpy (to be called with 'gs')

if slave_state = CONST_INT['slave_exist']:
	if slave['obedience'] + slave['fear'] < 0:
		interaction = menu_deny_barn & gt 'interaction'
	elseif slave['neg_barn'] > 0 and slave['obedience'] + slave['fear'] < 4:
		interaction = menu_deny_barn & gt 'interaction'
	elseif slave['neg_barn_plus'] > 0 and slave['obedience'] + slave['fear'] < 6:
		interaction = menu_deny_barn & gt 'interaction'
	end
end

harpy['half_action'] += 1
dynamic $swap_slave_instances, 'slave', 'harpy'

--- slave_to_harpy ---------------------------------


code:
# slave_to_iced
!move slave to a cryo cell with replacement (call with gosub, not goto)

dynamic $swap_slave_instances, 'slave', 'iced_<<args[0]>>'

--- slave_to_iced ---------------------------------


code:
# slave_to_train
!Осмотр рабыни на обучение по контракту
gs '_layout'

:loop
gs 'generate_stock'
!if slave_base_price < contractor_demand['base_price']: jump 'loop'
if stock['age'] = contractor_demand['refuse_age']: jump 'loop'
if contractor_demand['agree_age'] ! 0 and stock['age'] ! contractor_demand['agree_age']: jump 'loop'
if stock['stamina'] < contractor_demand['min_stamina']: jump 'loop'
if stock['sensitivity'] < contractor_demand['min_sensitivity']: jump 'loop'
if stock['temper'] < contractor_demand['min_temper']: jump 'loop'
if stock['beauty'] < contractor_demand['min_beauty']: jump 'loop'
if stock['virginity'] > 1 and contractor_demand['virginity'] = 1: jump 'loop'
if stock['temper'] > contractor_demand['max_temper']: jump 'loop'

killvar 'contractor_demand'
contractor_demand['refuse_age'] = 99
contractor_demand['max_temper'] = 99

*p '

'
*p '
<img src="content\pic\<<$stock[''fullimage'']>>.png">
'
*p '
    Вместе со своим потенциальным работодателем вы отправляетесь в центр передержки гильдии, чтобы осмотреть предмет контракта. После тщательной оценки рабыни, вы готовы принять решение о том браться ли за контракт или отказаться от него как от бесперспективного.
'

gs '$addon', 'info_box'

*p '
'
*nl 'Name: <<$stock_name>>'
*nl 'Age:  <<$slave_age_name[stock["age"]]>>'
if $master_head_gear = 'raven_crown':
	*nl 'Attributes Rating:  <<$rating[rating]>>
'
else
	*nl
end
*nl 'ATTRIBUTES'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'beauty', stock['beauty'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $красота_справка & dynamic $msg, $красота_справка_2"><<$beauty[stock["beauty"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'stamina', stock['stamina'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $здоровье_справка & dynamic $msg, $здоровье_справка_2"><<$stamina[stock["stamina"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'sensitivity', stock['sensitivity'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $чувствительность_справка & dynamic $msg, $чувствительность_справка_2"><<$sensitivity[stock["sensitivity"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'temper', stock['temper'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $темперамент_справка & dynamic $msg, $темперамент_справка_2"><<$temper[stock["temper"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'intellect', stock['intellect'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $ум_справка & dynamic $msg, $ум_справка_2"><<$intellect[stock["intellect"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'ego', stock['ego'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $характер_справка & dynamic $msg, $характер_справка_2"><<$ego[stock["ego"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'pride', -1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $гордыня_справка & dynamic $msg, $гордыня_справка_2"><<$pride[stock["pride"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'exotic', stock['exotic'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $экзотичность_справка & dynamic $msg, $экзотичность_справка_2"><<$exotic[stock["exotic"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'fat', IIF(stock['fat'] = 1 or stock['fat'] = 5, 1, 6 - stock['fat']))
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $жыр_справка & dynamic $msg, $жыр_справка_2"><<$fat[stock["fat"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'style', stock['style'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $стиль_справка & dynamic $msg, $стиль_справка_2"><<$style[stock["style"]]>>'
$tooltip_text = func('$addon', 'no_rate_stat_tooltip_text', 'fame', stock['fame'], 1)
*nl '<a class="tooltip-right" tooltip-data="<<$tooltip_text>>" href="EXEC: dynamic $msg, $слава_справка & dynamic $msg, $слава_справка_2"><<$girl_fame[stock["fame"]]>>'
*nl
*nl 'TRAITS'
*nl '<<$stock_features_list>>
'

*p '

'
*p '

'

--- slave_to_train ---------------------------------


code:
# slave_to_train_get
!Забираем рабыню по контракту
train_slave_count[$npc_id] = 0

contract['time'] = npc_contract_time[$npc_id]
contract['salary'] = npc_reward[$npc_id]
sparks += npc_advance[$npc_id]
$stock['contractor'] = $npc_id
stock["brand"] = 4

city_form = 1
$return_lock = 'city_menu_form'
gs 'stock_to_slave'

--- slave_to_train_get ---------------------------------


code:
# slavebase_test
!debug location for slave database
gs '_layout'

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

if txt = 0:
 	slave_type = input ('Input a slave num')
end

$text[0] = 'fullimage'
$text[1] = 'fullmade'
$text[2] = 'fullmistress'
$text[3] = 'fullsecretary'
$text[4] = 'bathing_alone'
$text[5] = 'percussion'
$text[6] = 'cleaning'
$text[7] = 'cooking'
$text[8] = 'dance'
$text[9] = 'desertag'
$text[10] = 'enchanting'
$text[11] = 'fighting'
$text[12] = 'woodwind'
$text[13] = 'strings'
$text[14] = 'gymnastics'
$text[15] = 'lesbo_bath'
$text[16] = 'nurse'
$text[17] = 'piano'
$text[18] = 'rest'
$text[19] = 'secretary'
$text[20] = 'student'
$text[21] = 'painting'
$text[22] = 'singing'
$text[23] = 'washing'
$text[24] = 'analfisting'
$text[25] = 'analsex'
$text[26] = 'bondage'
$text[27] = 'bdsm'
$text[28] = 'bj'
$text[29] = 'bukkake'
$text[30] = 'disgrace'
$text[31] = 'defloration'
$text[32] = 'deprivation_suit'
$text[33] = 'dog_sex'
$text[34] = 'dildo'
$text[35] = 'dt'
$text[36] = 'enema'
$text[37] = 'exhibit'
$text[38] = 'fisting'
$text[39] = 'fj'
$text[40] = 'gangbang'
$text[41] = 'hj'
$text[42] = 'horse_sex'
$text[43] = 'hug'
$text[44] = 'kiss'
$text[45] = 'scat'
$text[46] = 'cunnilingus'
$text[47] = 'lesbian'
$text[48] = 'masturbation'
$text[49] = 'paizuri'
$text[50] = 'petplay'
$text[51] = 'petting'
$text[52] = 'pig_sex'
$text[53] = 'ponyplay'
$text[54] = 'rimming'
$text[55] = 'seduce'
$text[56] = 'sex_vaginal'
$text[57] = 'spider'
$text[58] = 'tongue'
$text[59] = 'tentacles'
$text[60] = 'urine_drink'
$text[61] = 'branding'
$text[62] = 'cane'
$text[63] = 'ear_grab'
$text[64] = 'ironmaiden'
$text[65] = 'fireswing'
$text[66] = 'fist_hit'
$text[67] = 'leash'
$text[68] = 'needle'
$text[69] = 'pins'
$text[70] = 'slap'
$text[71] = 'spank'
$text[72] = 'strappado'
$text[73] = 'verminpit'
$text[74] = 'water'
$text[75] = 'wax'
$text[76] = 'woodenhorse'
$text[77] = 'whip'
$text[78] = 'cowSK'

if txt = 0: *p '
<img src="content\pic\<<$fullimage[slave_type]>>.png">
'
if txt = 1: *p '
<img src="content\pic\<<$fullmade[slave_type]>>.png">
'
if txt = 2: *p '
<img src="content\pic\<<$fullmistress[slave_type]>>.png">
'
if txt = 3: *p '
<img src="content\pic\<<$fullsecretary[slave_type]>>.png">
'
if txt = 4: *p '
<img src="content\pic\<<$bathing_alone[slave_type]>>.png">
'
if txt = 5: *p '
<img src="content\pic\<<$percussion[slave_type]>>.png">
'
if txt = 6: *p '
<img src="content\pic\<<$cleaning[slave_type]>>.png">
'
if txt = 7: *p '
<img src="content\pic\<<$cooking[slave_type]>>.png">
'
if txt = 8: *p '
<img src="content\pic\<<$dance[slave_type]>>.png">
'
if txt = 9: *p '
<img src="content\pic\<<$desertag[slave_type]>>.png">
'
if txt = 10: *p '
<img src="content\pic\<<$enchanting[slave_type]>>.png">
'
if txt = 11: *p '
<img src="content\pic\<<$fighting[slave_type]>>.png">
'
if txt = 12: *p '
<img src="content\pic\<<$woodwind[slave_type]>>.png">
'
if txt = 13: *p '
<img src="content\pic\<<$strings[slave_type]>>.png">
'
if txt = 14: *p '
<img src="content\pic\<<$gymnastics[slave_type]>>.png">
'
if txt = 15: *p '
<img src="content\pic\<<$lesbo_bath[slave_type]>>.png">
'
if txt = 16: *p '
<img src="content\pic\<<$nurse[slave_type]>>.png">
'
if txt = 17: *p '
<img src="content\pic\<<$piano[slave_type]>>.png">
'
if txt = 18: *p '
<img src="content\pic\<<$rest[slave_type]>>.png">
'
if txt = 19: *p '
<img src="content\pic\<<$secretary[slave_type]>>.png">
'
if txt = 20: *p '
<img src="content\pic\<<$student[slave_type]>>.png">
'
if txt = 21: *p '
<img src="content\pic\<<$painting[slave_type]>>.png">
'
if txt = 22: *p '
<img src="content\pic\<<$singing[slave_type]>>.png">
'
if txt = 23: *p '
<img src="content\pic\<<$washing[slave_type]>>.png">
'
if txt = 24: *p '
<img src="content\pic\<<$analfisting[slave_type]>>.png">
'
if txt = 25: *p '
<img src="content\pic\<<$analsex[slave_type]>>.png">
'
if txt = 26: *p '
<img src="content\pic\<<$bondage[slave_type]>>.png">
'
if txt = 27: *p '
<img src="content\pic\<<$bdsm[slave_type]>>.png">
'
if txt = 28: *p '
<img src="content\pic\<<$bj[slave_type]>>.png">
'
if txt = 29: *p '
<img src="content\pic\<<$bukkake[slave_type]>>.png">
'
if txt = 30: *p '
<img src="content\pic\<<$disgrace[slave_type]>>.png">
'
if txt = 31: *p '
<img src="content\pic\<<$defloration[slave_type]>>.png">
'
if txt = 32: *p '
<img src="content\pic\<<$deprivation_suit[slave_type]>>.png">
'
if txt = 33: *p '
<img src="content\pic\<<$dog_sex[slave_type]>>.png">
'
if txt = 34: *p '
<img src="content\pic\<<$dildo[slave_type]>>.png">
'
if txt = 35: *p '
<img src="content\pic\<<$dt[slave_type]>>.png">
'
if txt = 36: *p '
<img src="content\pic\<<$enema[slave_type]>>.png">
'
if txt = 37: *p '
<img src="content\pic\<<$exhibit[slave_type]>>.png">
'
if txt = 38: *p '
<img src="content\pic\<<$fisting[slave_type]>>.png">
'
if txt = 39: *p '
<img src="content\pic\<<$fj[slave_type]>>.png">
'
if txt = 40: *p '
<img src="content\pic\<<$gangbang[slave_type]>>.png">
'
if txt = 41: *p '
<img src="content\pic\<<$hj[slave_type]>>.png">
'
if txt = 42: *p '
<img src="content\pic\<<$horse_sex[slave_type]>>.png">
'
if txt = 43: *p '
<img src="content\pic\<<$hug[slave_type]>>.png">
'
if txt = 44: *p '
<img src="content\pic\<<$kiss[slave_type]>>.png">
'
if txt = 45: *p '
<img src="content\pic\<<$kopro[slave_type]>>.png">
'
if txt = 46: *p '
<img src="content\pic\<<$kuni[slave_type]>>.png">
'
if txt = 47: *p '
<img src="content\pic\<<$lesbian[slave_type]>>.png">
'
if txt = 48: *p '
<img src="content\pic\<<$masturbation[slave_type]>>.png">
'
if txt = 49: *p '
<img src="content\pic\<<$paizuri[slave_type]>>.png">
'
if txt = 50: *p '
<img src="content\pic\<<$petplay[slave_type]>>.png">
'
if txt = 51: *p '
<img src="content\pic\<<$petting[slave_type]>>.png">
'
if txt = 52: *p '
<img src="content\pic\<<$pig_sex[slave_type]>>.png">
'
if txt = 53: *p '
<img src="content\pic\<<$ponyplay[slave_type]>>.png">
'
if txt = 54: *p '
<img src="content\pic\<<$rimming[slave_type]>>.png">
'
if txt = 55: *p '
<img src="content\pic\<<$seduce[slave_type]>>.png">
'
if txt = 56: *p '
<img src="content\pic\<<$sex_vaginal[slave_type]>>.png">
'
if txt = 57: *p '
<img src="content\pic\<<$spider[slave_type]>>.png">
'
if txt = 58: *p '
<img src="content\pic\<<$tongue[slave_type]>>.png">
'
if txt = 59: *p '
<img src="content\pic\<<$tentacles[slave_type]>>.png">
'
if txt = 60: *p '
<img src="content\pic\<<$urine_drink[slave_type]>>.png">
'
if txt = 61: *p '
<img src="content\pic\<<$branding[slave_type]>>.png">
'
if txt = 62: *p '
<img src="content\pic\<<$cane[slave_type]>>.png">
'
if txt = 63: *p '
<img src="content\pic\<<$ear_grab[slave_type]>>.png">
'
if txt = 64: *p '
<img src="content\pic\<<$ironmaiden[slave_type]>>.png">
'
if txt = 65: *p '
<img src="content\pic\<<$fireswing[slave_type]>>.png">
'
if txt = 66: *p '
<img src="content\pic\<<$fist_hit[slave_type]>>.png">
'
if txt = 67: *p '
<img src="content\pic\<<$leash[slave_type]>>.png">
'
if txt = 68: *p '
<img src="content\pic\<<$needle[slave_type]>>.png">
'
if txt = 69: *p '
<img src="content\pic\<<$pins[slave_type]>>.png">
'
if txt = 70: *p '
<img src="content\pic\<<$slap[slave_type]>>.png">
'
if txt = 71: *p '
<img src="content\pic\<<$spank[slave_type]>>.png">
'
if txt = 72: *p '
<img src="content\pic\<<$strappado[slave_type]>>.png">
'
if txt = 73: *p '
<img src="content\pic\<<$verminpit[slave_type]>>.png">
'
if txt = 74: *p '
<img src="content\pic\<<$water[slave_type]>>.png">
'
if txt = 75: *p '
<img src="content\pic\<<$wax[slave_type]>>.png">
'
if txt = 76: *p '
<img src="content\pic\<<$woodenhorse[slave_type]>>.png">
'
if txt = 77: *p '
<img src="content\pic\<<$whip[slave_type]>>.png">
'
if txt = 78: *p '
<img src="content\pic\<<$cowSK[slave_type]>>.png">
'
if txt = 79: gt 'Start'

if txt > 0:
 	addobj ''
else
 	addobj ''
end
addobj ''

*p '

<<slave_type>>
'
*nl '<img src = "<<$seed_ava[slave_type]>>.png">'
*nl '<img src = "<<$seed_ava_gray[slave_type]>>.png">'
*nl '<img src = "<<$seed_ava_clear[slave_type]>>.png">'
*nl '<img width = "220px" src = "content\pic\girls\body\<<$seed_boobs_img[slave_type]>>.png"><img width = "220px" src = "content\pic\girls\body\<<$seed_pussy_img[slave_type]>>.png">'
*nl '<<$slave_boobs[seed_boobs[slave_type]]>>
'
--- slavebase_test ---------------------------------


code:
# special_screen
!Special Screen
!Created by crushboss

killvar '$special_image'
killvar '$special_image_full'
killvar '$special_action'

gs '_layout'

if $special_action[txt] ! '':
	dynamic $special_action[txt]
end

npc = 0
menu_form = 0
$return_lock = 'menu_form' & city_form = 0 &! city_form = 0 to bypass menu_form ESC intercept but still play door sound

if trophy_fire_staff = 0 and посох_огня = 0:
	$place = 'edge_patrol'
	copyarr '$text', '$fire_staff_reward_special'
	$special_action[1] = {
		npc = 0
		$place = 'edge_patrol'
	}
	$special_action[2] = {
		npc = 0
	}
	$special_action[3] = {
		npc = 0
	}
	$special_action[4] = {
		npc = 0
	}
	$special_action[5] = {
		npc = 0
	}
	$special_action[6] = {
		npc = 0
	}
	!Reset and set vars - crushboss
	gs '$combat_variable_reset'
	gs '$newloc'
	get_girl = 0
	fog_battle = 0
	trophy_fire_staff = 1
	посох_огня = 1
end

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

*p '

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

!$info_bar = ''
!*p '
<<$info_bar>>
'

if $special_image_full[txt] ! '':
	if nsfw = 0: *p '
<img src="<<$special_image_full[txt]>>">
'
elseif $special_image[txt] ! '':
	if nsfw = 0: *p '
<img src="content\pic\<<$special_image[txt]>>">
'
end

if sound_on = 1 and $play_sound[txt] ! '': play 'content\snd\<<$play_sound[txt]>>.wav', sound_volume
if $play_sound[txt] ! '': $play_sound[txt] = ''

if txt > 1:
	addobj ''
else
	addobj ''
end
addobj ''

--- special_screen ---------------------------------


code:
# start_demo_game
!Start Tutorial Game

bath = 1
kitchen = 1
barn = 0 &! disable barn for tutorial
dungeon = 0
lab = 0

gs 'demo_estate'

$place = 'dungeon'

day = 1
decade = 0
decadecount = 1
ride_count = 1
auction_count = 10
gladi_count = 4

cooked_food = -1
sparks = 800
demo_game = 1

ui_style = 1
gs '_layout'

if master_str = 1: master_str_rate = 15
if master_str = 2: master_str_rate = 30
if master_str = 3: master_str_rate = 60
if master_str = 4: master_str_rate = 100
if master_str = 5: master_str_rate = 180

if master_cha = 1: master_cha_rate = 15
if master_cha = 2: master_cha_rate = 30
if master_cha = 3: master_cha_rate = 60
if master_cha = 4: master_cha_rate = 100
if master_cha = 5: master_cha_rate = 180

trainer_slave_training_count['mistress_angelika'] = -1
trainer_slave_training_count['goji'] = -1
trainer_slave_training_count['avgia'] = -1
trainer_slave_training_count['marivana'] = -1
trainer_slave_training_count['jeevs'] = -1
trainer_slave_training_count['master_s'] = -1
trainer_slave_training_count['morrigan'] = -1
trainer_slave_training_count['ippolita'] = -1
trainer_slave_training_count['von_valtz'] = -1
trainer_slave_training_count['geralt'] = -1
trainer_slave_training_count['yodson'] = -1
trainer_slave_training_count['applejack'] = -1
trainer_slave_training_count['giess'] = -1
trainer_slave_training_count['ling'] = -1
trainer_slave_training_count['minosia'] = -1
trainer_slave_training_count['rabban'] = -1
trainer_slave_training_count['sheepherd'] = -1

$choose = 'choose_slave'
txt = 1

gs 'init_demo_game'
gs '$newloc'
gt 'choose_the_girl'

--- start_demo_game ---------------------------------


code:
# start_game
!additional options after starting the game
!if $master_name = 'Старый Охотник': $master_name = 'Грязный Читер'
wizard_mode = IIF($master_name = 'Old Huntsman', 1, 0)
if $master_name = 'Old Huntsman': $master_name = 'Dirty Cheater'
$place = 'study'

if $estate = 'slum_house': $interior = 'slum_house'
if $estate = 'kamira_house': $interior = 'basic'
if $estate = 'serpis_house': $interior = 'econom'
if $estate = 'taurus_house': $interior = 'fort'
if $estate = 'korvus_house': $interior = 'gothic'
if $estate = 'white_house': $interior = 'elite'

gs 'new_estate'

day = 1
decade = 0
decadecount = 1
ride_count = 1
auction_count = 10
gladi_count = 4

active[$quest[0]] = 1

!declare variables
contractor_demand['refuse_age'] = 99
contractor_demand['max_temper'] = 99
train_slave_count['madame_jofre'] = 0

trainer_slave_training_count['mistress_angelika'] = -1
trainer_slave_training_count['goji'] = -1
trainer_slave_training_count['avgia'] = -1
trainer_slave_training_count['marivana'] = -1
trainer_slave_training_count['jeevs'] = -1
trainer_slave_training_count['master_s'] = -1
trainer_slave_training_count['morrigan'] = -1
trainer_slave_training_count['ippolita'] = -1
trainer_slave_training_count['von_valtz'] = -1
trainer_slave_training_count['geralt'] = -1
trainer_slave_training_count['yodson'] = -1
trainer_slave_training_count['applejack'] = -1
trainer_slave_training_count['giess'] = -1
trainer_slave_training_count['ling'] = -1
trainer_slave_training_count['minosia'] = -1
trainer_slave_training_count['rabban'] = -1
trainer_slave_training_count['sheepherd'] = -1

if master_str = 1 and master_str_rate < 15: master_str_rate = 15
if master_str = 2 and master_str_rate < 30: master_str_rate = 30
if master_str = 3 and master_str_rate < 60: master_str_rate = 60
if master_str = 4 and master_str_rate < 100: master_str_rate = 100
if master_str = 5 and master_str_rate < 180: master_str_rate = 180

if master_cha = 1 and master_cha_rate < 10: master_cha_rate = 10
if master_cha = 2 and master_cha_rate < 20: master_cha_rate = 20
if master_cha = 3 and master_cha_rate < 40: master_cha_rate = 40
if master_cha = 4 and master_cha_rate < 80: master_cha_rate = 80
if master_cha = 5 and master_cha_rate < 120: master_cha_rate = 120

if master_libido = 1 and master_libido_rate < 15: master_libido_rate = 15
if master_libido = 2 and master_libido_rate < 30: master_libido_rate = 30
if master_libido = 3 and master_libido_rate < 60: master_libido_rate = 60
if master_libido = 4 and master_libido_rate < 100: master_libido_rate = 100
if master_libido = 5 and master_libido_rate < 180: master_libido_rate = 180

if hero_choice = 9 and no_loli ! 1 and game_difficulty ! 0:
	is_perv = 3 &! impotence challenge for Uncle Tom if lolis are enabled and not Easy game difficulty
	master_libido = 0
	master_libido_rate = 2
	master_excitement = -4
	master_excitement_rate = -140
end
is_kid = 0
is_master_virgin = 0
if hero_choice = 10:
	is_kid = 1
	is_master_virgin = 1
	master_libido = 5
	master_libido_rate = 180
	master_excitement = 5
	master_excitement_rate = 180
end
hero_select = hero_choice
is_gangbang = 1

!Creating a route to the next race
$trace[1] = 'ride_start'
i = 1
:loop
	i += 1
	a = rand(1,12)
	$trace[i] = $trace_type[a]
	if i < 11: jump 'loop'

$trace[12] = 'ride_finish'

ui_style = 2

gs '#npc_base'
gs '_layout'

txt = 0
gs '$newloc'
gs 'npc_progress'

is_home = 1
gt 'menu_form'

--- start_game ---------------------------------


code:
# start_refresh
!Start Refresh - fixes several bugs when the game reload the main Start menu
!Created by crushboss
!Overhauled by ImperatorAugustus

killall &! THIS DELETES EVERY VARIABLE IN THE GAME (the engine has been updated to reload json files afterwards)
warning_pass = 1 &! only display warning the first time main menu is displayed

usehtml = 1
debug = 0
sound_on = 1
music_volume = 100
sound_volume = 100

SHOWOBJS 0
SHOWACTS 0
SHOWINPUT 0
SHOWSTAT 0

INTEGRATED_ACTIONS = 1
HIDE_SCROLL_ARROWS = 1
DISABLESCROLL = 1

$FNAME = 'Consolas'

$counter = '$counter' &! realtime update handler
$onobjsel = '$objsel' &! object selector handler
$ongload = '$ongload' &! after load game handler

!Game Option Variables
nsfw = 0
no_loli = 1
no_milf = 0
no_mindbreak = 0
no_guro = 0

!Initialize Cheat Variables - crushboss
cheat_show = 0
cheat_inf_en = 0
cheat_easy_as = 0
cheat_easy_race = 0
cheat_fight_dif = 1
skill_adv_mul = 1
cheat_a = 0
cheat_b = 0
cheat_c = 0
cheat_d = 0
cheat_e = 0
cheat_f = 0
cheat_g = 0
cheat_h = 0
cheat_i = 0
cheat_j = 0
cheat_k = 0
cheat_l = 0
cheat_all_basic = 0
cheat_all_low = 0
cheat_all = 0
cheat_all_max = 0
extended_rental_cheat = 0
difficulty_setting = 0
assistant['nude'] = 0

!Initialize Variables - crushboss
gs '$end_day_variable_reset'
gs '$combat_variable_reset'

ui_style = 2

decadecount = 1
ride_count = 1
auction_count = 10
gladi_count = 4
cooked_food = -1
gladiatrix_contest_count = 1

$music['ride'] = 'content\snd\race_master.wav'
$music['arena'] = 'content\snd\fight_arena.wav'
$music['girl'] = 'content\snd\fight_girl.wav'
$music['fight'] = 'content\snd\fight_master.wav'
$music['home'] = 'content\snd\home.wav'
$music['city'] = 'content\snd\city.wav'
$music['mainscreen'] = 'content\snd\mainscreen.wav'

--- start_refresh ---------------------------------


code:
# stasis_cell

$stasis_cell = {
	$place = "stasis_cell"
	gs '_layout'

	if dynslave_state = CONST_INT['no_slave']:
		$text = '<<$cell_empty>>'
	else
		$text = '  <<$dynslave_name>> is resting in a stasis state. She can stay like that for an unlimited time, or as long as you spend sparks to maintain the operation of the apparatus.'
	end

	if nsfw = 1:
		*p '

'
	else
		*p '
<img src="content\pic\bg\<<$bg[$place]>>.png">
'
	end

	if dynslave_state ! CONST_INT['no_slave']: if nsfw = 0: *p '
<img src="content\pic\<<$dynslave["fullimage"]>>.png">
'
	*p '
<<$text>>
'

	if dynslave_state ! CONST_INT['no_slave'] and slave_state = CONST_INT['no_slave']:
		*p '
<a href = "EXEC: gs ''slave_to_iced'', <<cryo_cell_selected>> & gt $curloc">
'
	end

	if dynslave_state = CONST_INT['no_slave'] and slave_state ! CONST_INT['no_slave']:
		*p '
<a href = "EXEC: gs ''slave_to_iced'', <<cryo_cell_selected>> & gt $curloc">
'
	end

	if dynslave_state ! CONST_INT['no_slave'] and slave_state ! CONST_INT['no_slave']:
		*p '
<a href = "EXEC: gs ''slave_to_iced'', <<cryo_cell_selected>> & gt $curloc">
'
	end

	if dynslave_state > CONST_INT['no_slave']:
		$info_bar = '

' + _
		'ATTRIBUTES
' + _
		'<<$beauty[dynslave["beauty"]]>>
' + _
		'<<$stamina[dynslave["stamina"]]>>
' + _
		'<<$sensitivity[dynslave["sensitivity"]]>>
' + _
		'<<$temper[dynslave["temper"]]>>
' + _
		'<<$intellect[dynslave["intellect"]]>>
' + _
		'<<$ego[dynslave["ego"]]>>
' + _
		'<<$pride[dynslave["pride"]]>>
' + _
		'<<$exotic[dynslave["exotic"]]>>
' + _
		'<<$fat[dynslave["fat"]]>>
' + _
		'<<$style[dynslave["style"]]>>

' + _
		'TRAITS
' + _
		'<<$dynslave_features_list>>'
	else
		$info_bar = ''
		*p '

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

	*p '
<<$info_bar>>
'
	*p '

'
}

dynamic $replace($stasis_cell, 'dyn'+'slave', 'iced_<<cryo_cell_selected>>')

--- stasis_cell_1 ---------------------------------


code:
# stats_layout
!layout for a stats screen
INTEGRATED_ACTIONS = 0
if ui_style = 1:$backimage = 'content/pic/ui/old/bg_stat_old.png'
if ui_style = 2:$backimage = 'content/pic/ui/grimdark/bg_stat.png'
if ui_style = 0:$backimage = 'content/pic/ui/classic/bg_stat.png'

SHOWOBJS 0
SHOWSTAT 0
SHOWACTS 0

!$onnewloc = '$newloc'

LCOLOR = rgb(0,0,255)
FCOLOR = rgb(0,0,0)

$MAINDESC_BACKIMAGE = ''
! removed non-existent path 'content/.png' -ImperatorAugustus
MAINDESC_X = 1
MAINDESC_Y = 1
MAINDESC_W = 1280
MAINDESC_H = 800

$STATDESC_BACKIMAGE = ''
! removed non-existent path 'content/.png' -ImperatorAugustus
STATDESC_X = 810
STATDESC_Y = 1
STATDESC_W = 450
STATDESC_H = 800
--- stats_layout ---------------------------------


code:
# stock_to_expert
!expert stashes a matched slave for a master

dynamic $swap_slave_instances, 'stock', 'selected'

--- stock_to_expert ---------------------------------


code:
# stock_to_slave
!move stock slave to master and change location after

gs 'stock_to_slave_nogt'

if hunting_prize = 0 and farid_potential_debt <= 0: gt 'hard_return'
! hard_return handles get_initial_slave for starting with an assistant on easy game difficulty, and either way ends with gt $return_lock

--- stock_to_slave ---------------------------------


code:
# stock_to_slave_nogt
!move stock slave to master without changing location (to be called with 'gs')

!Slave Rules
stock['diet_portion'] = 2
! stable weight diet by default, not nutritionist -ImperatorAugustus

!Loli aged stocks are not old enough to have acquired these traits - crushboss
if stock['age'] = CONST_INT['loli_age'] and cheat_h ! 1 and cheat_j ! 1 and cheat_k ! 1 and cheat_l ! 1:
	stock['custom'] = 0
	stock_rate['custom'] = 0
	stock['moral'] = 0
	stock_rate['moral'] = 0
	stock['rational'] = 0
	stock_rate['rational'] = 0
	stock['instinct'] = 0
	stock_rate['instinct'] = 0
end

!Ensure the stock starts out with empty arena variables - crushboss
stock['has_ride_win'] = 0
stock['arena_level'] = 0
stock['c1done'] = 0
stock['c2done'] = 0
stock['c3done'] = 0
stock['c4done'] = 0
$stock['trademark_style'] = ''
!$g_type = '' - gladiatrix type is a 'local' variable of the combat code, the trademark_style stores it - ImperatorAugustus
!superviser_message = 0 - this variable is used only for arena announcements, it is not relevant here -ImperatorAugustus
challenge_type = 0

!Adjustments for loli aged stocks and virgin stocks - improved - crushboss
if stock['virginity'] <= 0:
	stock['ill'] = 0
	stock['parasite'] = 0
	stock['pregnant'] = 0
	stock['sub_vaginal'] = 0
	stock['sub_vaginal_xp'] = 0
	stock['sub_fisting'] = 0
	stock['sub_fisting_xp'] = 0
	stock['sub_threesome'] = 0
	stock['sub_threesome_xp'] = 0
	stock['sub_dp'] = 0
	stock['sub_dp_xp'] = 0
	stock['sub_tp'] = 0
	stock['sub_tp_xp'] = 0
	stock['sub_gangbang'] = 0
	stock['sub_gangbang_xp'] = 0
	stock['sub_bukkake'] = 0
	stock['sub_bukkake_xp'] = 0
	stock['sub_anal'] = 0
	stock['sub_anal_xp'] = 0
	stock['anal_stretch'] = 0
	stock['sub_zoosex'] = 0
	stock['sub_zoosex_xp'] = 0
	stock['sub_bestiality'] = 0
	stock['sub_bestiality_xp'] = 0
	stock['sub_horse'] = 0
	stock['sub_horse_xp'] = 0
	stock['sub_tentacles'] = 0
	stock['sub_tentacles_xp'] = 0
	stock['sub_arachnidspider'] = 0
	stock['sub_arachnidspider_xp'] = 0
	stock['sub_polypusvermin'] = 0
	stock['sub_polypusvermin_xp'] = 0
end

if stock['energy'] > stock['stamina']: stock['energy'] = stock['stamina']
stock['base_exotic'] = stock['exotic']
stock_rate['stamina'] = 0
if stock['age'] = CONST_INT['loli_age']: stock['fertility_revealed'] = 1

stock['calories'] = stock['stamina']

if stock_state ! CONST_INT['slave_exist']: msg 'ERROR: stock_to_slave_nogt state unexpected, please report what you did just before you saw this message'
dynamic $swap_slave_instances, 'slave', 'stock'
master_moodlet['pos_new_stock'] = 6 - brand_reputation

!Testing Code - crushboss
if (cheat_h = 1 or cheat_j = 1) and get_girl = 0: gs 'stock_to_slave_testing'
if cheat_k = 1 and get_girl = 0: gs 'stock_to_slave_testing2'
!End of Testing Code

--- stock_to_slave_nogt ---------------------------------


code:
# stock_to_slave_testing
!Stock to Slave Testing Cheat for cheat_h and cheat_j
!Created by crushboss

!Slave Equipped Armor, Weapons, and Cloth
$slave['wpn'] = 'катана'
$slave['scnd'] = ''
$slave['armor'] = 'плейт'
$slave['right_wpn'] = 'катана'
$slave['left_wpn'] = 'кинжал'
if slave_type ! 2572: $slave['back_wpn'] = 'фламберг'
$slave['cloth'] = 'sun_dress'

!Slave Misc Attributes
if slave['age'] ! CONST_INT['loli_age']: slave['fertility'] = -1
slave['fertility_revealed'] = 1
!if slave['arena_level'] < 4: slave['arena_level'] = 4
!if race_win_ratio < 4: race_win_ratio = 4
!slave['pos_slave_winner'] = slave['sensitivity']
!if slave['has_ride_win'] < 1: slave['has_ride_win'] = 1
slave_rate['fame'] += 15
if cheat_j = 1: slave_rate['fame'] += 25
slave['energy'] = 5
slave['metabolism'] = 5
slave['arousal'] = 5
!slave_rate['arousal'] = 200
!if slave['brand'] ! 4: slave['brand'] = 3

!Slave Conditions
!slave['ill'] = 0
slave['fertility'] = 0
!slave['pregnant'] = 0
!slave['parasite'] = 0
!slave['wounds'] = 0
!slave['bruises'] = 0
!slave['scars'] = 0
!slave['issues'] = 0
!slave['fear'] = 0
!slave['angst'] = 0
!slave['spoil'] = 0
!slave['moral'] = 5
!slave['virginity'] = 2
slave['pet'] = 5
slave['dressage'] = 5

a = rand(1,10)
if a < 6 and slave['age'] ! CONST_INT['loli_age']: slave['gladiatrix_affinity'] = 1
if a > 5 and slave['age'] = CONST_INT['loli_age']: slave['dressage_affinity'] = 1
a = 0

--- stock_to_slave_testing ---------------------------------


code:
# stock_to_slave_testing2
!Stock to Slave Testing Cheat2 - cheat_k - equip new slave with full piercings, tattoos, clothes, armor, weapons, and accessories
!Created by crushboss

!Slave Piercings
slave['nipple_piercing'] = 1
slave['clit_piercing'] = 1
slave['ear_piercing'] = 1
slave['tongue_piercing'] = 1
slave['belly_piercing'] = 1
slave['nostril_piercing'] = 1
slave['nose_piercing'] = 1
slave['tongue_split'] = 1
slave['scarification'] = 1
slave['full_piercing'] = 1
slave['piercings'] = 9
slave['piercing_count'] = 5

!Slave Clothing Inventory
slave_inventory['maid_dress'] = 1
slave_inventory['apron'] = 1
slave_inventory['nurse_dress'] = 1
slave_inventory['sailor_foku'] = 1
slave_inventory['leotard'] = 1
slave_inventory['chainmail_bikini'] = 1
slave_inventory['sun_dress'] = 1
slave_inventory['leather_corset'] = 1
slave_inventory['fluffy_stepins'] = 1
slave_inventory['high_boots'] = 1
slave_inventory['sneakers'] = 1
slave_inventory['tabi'] = 1
slave_inventory['glasses'] = 1
slave_inventory['nekomimi'] = 1
slave_inventory['leather_gloves'] = 1
slave_inventory['fluffy_gloves'] = 1
slave_inventory['rubber_gloves'] = 1
slave_inventory['plain_headband'] = 1
slave_inventory['golden_collar'] = 1
slave_inventory['leather_collar'] = 1
slave_inventory['spiked_collar'] = 1
slave_inventory['common_apron'] = 1
slave_inventory['enchanter_robe'] = 1
slave_inventory['laced_underwear'] = 1
slave_inventory['bellydance'] = 1
slave_inventory['anal_tail'] = 1
slave_inventory['exotic_wig'] = 1
slave_inventory['pony_plume'] = 1
slave_inventory['incrusted_earrings'] = 4
slave_inventory['ponygirl_harness'] = 1
slave_inventory['cow_gear'] = 1
slave_inventory['nipple_chain'] = 1
slave_inventory['high_heels'] = 1
slave_inventory['high_boots'] = 1
slave_inventory['hoofed_boots'] = 1
slave_inventory['incrusted_ring'] = 4
slave_inventory['heavy_gauge_rings'] = 1
slave_inventory['barbells'] = 1

!Slave Makeup and Tattoos
if slave['age'] ! CONST_INT['loli_age']:
	slave['makeup'] = 3
	slave['fiend_tattoo'] = 1
	slave['tattoo'] = 5
end
slave['manicure'] = 5
slave['perfume'] = 1
slave['hygiene'] = 0
slave_rate['hygiene'] = 0
slave['epilation'] = 12
slave['hairstyle'] = 7
slave['pos_gentle'] = 2
slave['pos_slave_clean'] = 2

!Slave Equipped Armor, Weapons, and Cloth
$slave['wpn'] = 'катана'
$slave['scnd'] = ''
$slave['armor'] = 'плейт'
$slave['right_wpn'] = 'катана'
$slave['left_wpn'] = 'кинжал'
if slave_type ! 2572: $slave['back_wpn'] = 'фламберг'
$slave['cloth'] = 'sun_dress'

!Slave Equipped Gear
$slave['earrings'] = 'incrusted_earrings'
$slave['collar'] = 'golden_collar'
$slave['headband'] = 'exotic_wig'
$slave['gloves'] = 'laced_gloves'
$slave['nipplerings'] = 'nipple_chain'
$slave['clitring'] = 'incrusted_earrings'
$slave['boots'] = 'high_boots'
$slave['ring_left'] = 'incrusted_ring'
$slave['ring_right'] = 'incrusted_ring'
$slave['navel'] = 'heavy_gauge_rings'
$slave['tongue'] = 'barbells'

!Slave Misc Attributes
if slave['age'] ! CONST_INT['loli_age']: slave['fertility'] = -1
slave['fertility_revealed'] = 1
!if slave['brand'] ! 4: slave['brand'] = 3

--- stock_to_slave_testing2 ---------------------------------