code:
# interaction
gs '#var_base'
gs '#txt'
gs '#txt_2'

!resetting vars - improved - crushboss
killvar '$orgasm_text'
killvar '$special_image'
killvar '$special_image_full'
killvar '$special_action'
killvar '$bg_path'

:debug_interactions_loop

!per-interaction flags to be set as appropriate (used only by interaction_result and #dynamic functions called from there)
comforting = 0
sweet = 0
luxury = 0
flattering = 0
everlasting = 0
stimulating = 0 &! added this flag, which was being used only by sex_interaction location, but is useful here also to identify interactions that affect arousal - ImperatorAugustus
impotent = 0 &! added this flag, which indicates that a stimulating interaction does not require the master to achieve an erection - ImperatorAugustus
orgastic = 0
lesbian = 0
shameful = 0
painful = 0
disgusting = 0
darkness = 0
bloody = 0
fire_based = 0
water_based = 0
vermin_based = 0
deprivation = 0
abuse = 0
compassion = 0
bruising = 0 &! controls whether damage can bruise
scarification = 0 &! controls whether damage can scar
futile_threat = 0
interaction_no_auto_energy_drop = 0 &! controls whether interaction_result will call energy drop for master and the slave involved in the interaction (no effect for interactions with multiple slaves)
easy_for_master = 0 &! controls whether the master energy drop (if not disabled by the preceding flag) will be full energy or half energy

!per-interaction torture setup values
torture_intensity = 0
torturer_skill = 0
sensitivity_threshold = 6 &! used by $dyn_torture_result

!per-interaction damage amount (usually should be in $special_part to ensure the interaction succeeds before applying the damage)
damage = 0

! reset per-interaction calculated values (moved to instance-specific array to allow consolidation of code and simultaneous interactions with multiple slaves - ImperatorAugustus)
if first_visit['interaction'] = 0:
	first_visit['interaction'] = 1 &! do-once

	$reset_interaction_variables = {
		! thresholds to be set for each interaction below, taking into account relevant stats and skills
		interaction_dynslave['repulse'] = -100 &! opposes obedience together with sex_acceptance (which can be positive or negative), defaults to -100 (no chance of refusal)
		interaction_dynslave['motivation_repulse'] = 1 &! opposes diligence, capped within [0,5] range, defaults to 1

		! value to be set in $special_part for sexual interactions (causes arousal gain - and possibly orgasm if orgastic flag is enabled - after $special_part)
		interaction_dynslave['erotic_stimulation'] = 0

		! outcome values calculated in interaction_result
		interaction_dynslave['sex_acceptance'] = 0
		interaction_dynslave['res'] = 0
		interaction_dynslave['phobia'] = 0
		interaction_dynslave['diligence'] = 0
		interaction_dynslave['final_stimulation'] = 0

		! virginity status before interaction for use in delayed sub-expressions
		interaction_dynslave['virginity'] = dynslave['virginity']
	}
end

dynamic $do_for_each_slave_in_list, '$reset_interaction_variables', '$main_screen_slave_characters' &! every slave instance that can be 'interacted' with (slave, assistant, prisoner, cow) - ImperatorAugustus

if interaction < 2: msg 'Developer warning: interaction id <<interaction>> is reserved' &! 0 is used for obedience refusals in interaction_result and 1 is used to track over-exercise

! reset per-interaction calculated values
ejaculation_intensity = 0
slave_skill = 0
rape_fear = 0
sex_ability = 0
sex_quality = 0
torture_skill = 0
gift_from_invent = 0

! reset per-reward explicit and derived values
interaction_reward_level = 0
interaction_reward_potence = 0
interaction_reward_cost = 0
interaction_date_success = 0

! reset per-interaction modifiers
$coach_skill = '0' &! used for both sexual and non-sexual skills training in interaction_result with dyneval('result = <<$coach_skill>>') so '0' is intentional - ImperatorAugustus

!non-sexual skills training
$target_skill = '' &! expected to be empty string if not set by the interaction
$target_affinity = '' &! expected to be empty string if not set by the interaction
tutor_modifier = 0 &! used for non-sexual skills

!sexual skills training
$subskill = '' &! expected to be empty string if not set by the interaction
$subskill_xp = '' &! expected to be empty string if not set by the interaction
$subskill_two = '' &! expected to be empty string if not set by the interaction
$subskill_two_xp = '' &! expected to be empty string if not set by the interaction
rise_mod = 0 &! used for sex skills training
rise_difficulty = 0 &! used for sex skills training
success = 0 &! used for sex skills training

! flags for interaction_screen
show_slave_fullimage = 0
show_assistant_fullimage = 0
show_prisoner_fullimage = 0
show_cow_fullimage = 0
show_pig_fullimage = 0
show_harpy_fullimage = 0
show_farmhand_fullimage = 0

! reset other variables
$interaction_type = ''
$special_part = ''
$refuse_txt = ''
$bg_path = ''
$picture_type = ''
npc = 0

!extra text in sex lessons for dirty old man
perv_rating = 0
$perv_act1 = 'watching'
$perv_act2 = ''

a = 0
b = 0
c = 0
g = 0
s = 0

!currently unused
!needle_progression = 0
!if master_torture = 1: needle_progression = 2
!if master_torture = 2: needle_progression = 5
!if master_torture = 3: needle_progression = 10
!if master_torture = 4: needle_progression = 20
!if master_torture = 5: needle_progression = 40

menu_form = 0 &! after the interaction ends, if we return to menu_form, close any menus that were open and reset $place

killvar '$text'
txt = 1
$msg_txt = ''
killvar 'play_sound'

$place = 'study'
$interaction_type = 'basic'

!majjick
!Auspex (once/day; available at F- magic skill but ineffective until D- magic skill; does not contribute progress to magic skill beyond D- because effect does not scale)
if interaction = 61:
	$interaction_type = 'spell_cast'
	interaction_slave['repulse'] = -100
	$special_part = {
		sparks -= 2
		if master_mage = 0:
			$text[1] = $fail_spell[interaction]
		else
			$play_sound[1] = 'auspex'
			auspex = 1
		end
		if (master_mage - boost_up['master_mage']) = 0: master_mage_rate += (skill_adv_mul * 1)
	}
end

!Magna Magnifika (once/day; available at D- magic skill, or F- with wizard robe; contributes progress to magic skill up to S+)
if interaction = 65:
	$interaction_type = 'spell_cast'
	interaction_slave['repulse'] = -100
	$special_part = {
		sparks -= 5
		$play_sound[1] = 'magna_magnifika'
		magna_magnifika = max(1, master_mage - boost_up['master_mage']) * 2 &! effect scales with un-assisted mage level (no need to put on different clothes before casting)
		master_mage_rate += (skill_adv_mul * 1)
	}
end

!Sententia Veritas (once/slave/day; available at C- magic skill, or D- with wizard robe; contributes progress to magic skill up to S+)
if interaction = 64:
	$interaction_type = 'spell_cast'
	interaction_slave['repulse'] = -100
	$special_part = {
		sparks -= 5
		$play_sound[1] = 'sententia_veritas'
		show_slave_fullimage = 1
		if spell_effectiveness < 1:
			$text[2] = $spell_fail
			slave['pos_spellguarded'] += 1
			if slave_already_done_today[$str(interaction)] = 0:
				slave_rate['angst'] -= slave['temper']
				slave_rate['fear'] -= slave['temper']
				slave_rate['pride'] += slave['ego']
			end
		else
			slave['sententia_veritas'] = max(1, master_mage - boost_up['master_mage']) &! +5 at S+ or higher mage skill, +4 at A+, +3 at B+, +2 at C-, +1 at D- (effect scales with un-assisted mage level)
			slave_rate['rational'] -= slave['intellect'] &! drains awareness proportional to intellect
			if slave_already_done_today[$str(interaction)] = 0: slave_rate['instinct'] += 1 + (master_mage - boost_up['master_mage'])/2 &! effect scales with un-assisted mage level (no need to put on different clothes before casting)
			master_mage_rate += (skill_adv_mul * 1)
		end
	}
end

!Tremendio (once/slave/day; available at B+ magic skill, or C- with wizard robe; contributes progress to magic skill up to A+)
if interaction = 66:
	$interaction_type = 'spell_cast'
	interaction_slave['repulse'] = -100
	$special_part = {
		sparks -= 5
		$play_sound[1] = 'tremendio'
		show_slave_fullimage = 1
		if spell_effectiveness < 1:
			$text[2] = $spell_fail
			slave['pos_spellguarded'] += 1
			if slave_already_done_today[$str(interaction)] = 0:
				slave_rate['angst'] -= slave['temper']
				slave_rate['fear'] -= slave['temper']
				slave_rate['pride'] += slave['ego']
			end
		else
			if slave['courage_revealed'] = 0: slave['courage_revealed'] = 1
			if slave['courage'] ! 2:
				slave_rate['fear'] += (master_mage - boost_up['master_mage']) * 2
				slave_rate['angst'] += (1 + slave['fear'] + slave['temper'] + slave['ego'] + slave['intellect'])
			end
			slave['neg_spellbound'] += 1
			if (master_mage - boost_up['master_mage']) < 4: master_mage_rate += (skill_adv_mul * 1)
		end
	}
end

!Cruciato (unlimited/day; requires 5 guilt; available at A+ magic skill, or B+ with wizard robe; contributes progress to magic skill up to S+)
if interaction = 62:
	$interaction_type = 'spell_cast'
	interaction_slave['repulse'] = -100
	torture_intensity = slave['sin']
	painful = 1
	$special_part = {
		sparks -= 5
		$play_sound[1] = 'cruciato'
		show_slave_fullimage = 1
		torturer_skill = spell_effectiveness + slave_already_done_total[$str(interaction)] &! effectiveness does not decrease with repetition
		dynamic $replace($dyn_torture_result, 'dyn'+'slave', 'slave')
		if spell_effectiveness < 1 or torture_succeeded <= 0:
			$text[2] = $spell_fail
			slave['pos_spellguarded'] += 1
			if slave_already_done_today[$str(interaction)] = 0:
				slave_rate['angst'] -= slave['temper']
				slave_rate['fear'] -= slave['temper']
				slave_rate['pride'] += slave['ego']
			end
		else
			slave['neg_spellbound'] += 1
			master_mage_rate += (skill_adv_mul * 1)
		end
	}
end

!Delikacia (unlimited/day; requires 5 merit; available at A+ magic skill, or B+ with wizard robe; contributes progress to magic skill up to S+)
if interaction = 63:
	$interaction_type = 'spell_cast'
	interaction_slave['repulse'] = -100
	orgastic = 1
	$special_part = {
		sparks -= 5
		$play_sound[1] = 'delikacia'
		show_slave_fullimage = 1
		if spell_effectiveness < 1:
			$text[2] = $spell_fail
			slave['pos_spellguarded'] += 1
			if slave_already_done_today[$str(interaction)] = 0:
				slave_rate['angst'] -= slave['temper']
				slave_rate['fear'] -= slave['temper']
				slave_rate['pride'] += slave['ego']
			end
		else
			slave['daily_reward_count'] += 1 &! this counts towards daily reward limit to avoid spoiling - ImperatorAugustus
			slave['arousal'] = min(5, max(slave['arousal'], master_mage - boost_up['master_mage'])) &! temporary arousal (will be reset because unsupported by arousal rate) to trigger multiple orgasms
			interaction_slave['erotic_stimulation'] = 220 &! number of orgasms will be at least equal to unassisted mage level, even for slaves who are rebellious
			if slave['virtue'] > 0:
				slave_rate['mood'] += master_mage - boost_up['master_mage'] &! effect scales with un-assisted mage level (no need to put on different clothes before casting)
				slave['virtue'] = 0
				slave['promise_reward'] = 0 &! promise fulfilled
				if slave_already_done_today[$str(interaction)] = 0: slave_rate['moral'] += (master_mage - boost_up['master_mage'])/2 &! +1 at B+ with robe, +2 at A+ or higher (equivalent devotion boost to tier 3+ erotic rewards without energy cost if master has the bull ring) - ImperatorAugustus
				slave_rate['intellect'] -= slave['intellect'] &! magically compelled ahegao hinders deep thought -ImperatorAugustus
				if slave_already_done_today[$str(interaction)] = 0:
					slave_rate['rational'] += slave['intellect']
				else
					slave_rate['rational'] += 1
				end
			end
			master_mage_rate += (skill_adv_mul * 1)
		end
	}
end

!Domini dictum (once/slave/day; available at A+ magic skill, or B+ with wizard robe; contributes progress to magic skill up to S+)
if interaction = 67:
	$interaction_type = 'spell_cast'
	interaction_slave['repulse'] = -100
	$special_part = {
		sparks -= 5
		$play_sound[1] = 'domini_dictum'
		show_slave_fullimage = 1
		if master_mage <= slave['ego']:
			$text[2] = $spell_fail
			slave['pos_spellguarded'] += 1
			if slave_already_done_today[$str(interaction)] = 0:
				slave_rate['angst'] -= slave['temper']
				slave_rate['fear'] -= slave['temper']
				slave_rate['pride'] += slave['ego']
			end
		else
			slave['domini_dictum'] = 1
			slave['neg_spellbound'] += 1
			slave_rate['angst'] += min(slave['temper'], slave['sensitivity']) - slave['moral'] - max(0, slave['deprivation_attitude']*5) &! inured to helplessness = 1, loves helplessness = 2
			if slave['deprivation_attitude'] = 2: slave_rate['mood'] += slave['temper'] &! loves helplessness trait = mood bonus
			master_mage_rate += (skill_adv_mul * 1)
		end
	}
end

!Adverto Servili (once/slave; available at S+ magic skill, or A+ with wizard robe; contributes progress to magic skill up to S+)
if interaction = 68:
	$interaction_type = 'spell_cast'
	interaction_slave['repulse'] = -100
	$special_part = {
		sparks -= 25
		$play_sound[1] = 'adverto_servili'
		show_slave_fullimage = 1
		if spell_effectiveness < 1:
			$text[2] = $spell_fail
			slave['pos_spellguarded'] += 1
			if slave_already_done_today[$str(interaction)] = 0:
				slave_rate['angst'] -= slave['temper']
				slave_rate['fear'] -= slave['temper']
				slave_rate['pride'] += slave['ego']
			end
		else
			slave['brand'] = 3
			slave['ill'] = 0
			slave['parasite'] = 0
			if slave['issues'] > 0: slave['issues'] -= 1
			slave_rate['moral'] += 3 + master_mage/2 &! +6 at S++, +5 at S+/A+ (20 pts to 1 devotion, 6 + 14/2 [per delikacia] = 6 days, 60$; or 12/3 [per golden cage] + 1 delikacia = 5 days)
			slave_rate['mood'] += (slave['ego'] + slave['temper'] + slave['sensitivity'])
			slave_rate['arousal'] += skill_adv_mul * master_mage * 5
			slave_rate['stamina'] += skill_adv_mul * master_mage
			slave['half_action'] -= slave['stamina']*2
			slave['neg_spellbound'] += 1
			!Easter Egg feature - crushboss (effect can apply to fainted slaves but not dead ones, simplified conditions [no reputation check is the only visible difference] -ImperatorAugustus)
			if slave['virginity'] > 0 and master_supermacy > 2 and pet_tentacle > 0 and dungeon > 0 and slave['ill'] = 0 and slave['pregnant'] = 0 and slave['issues'] = 0 and $master_head_gear = 'raven_crown' and $master_earring = 'chimera_earring' and $master_amulet = 'snake_amulet' and $master_ring = 'bull_ring':
				interaction = 1395
				$return_lock = 'interaction' &! chain interaction 1395 after this (interaction_result -> interaction_screen -> interaction)
			end
			master_mage_rate += (skill_adv_mul * 1)
		end
	}
end

!spellbook
if interaction = menu_spellbook:
	npc = 0
	copyarr '$display_options', '$spell_book'
	if debug_interactions ! 2: gt 'shop_general'
end

if interaction = 71:
	$return_lock = 'shop_general'
	copyarr '$text', '$spell_help'
end

if interaction = 72:
	$return_lock = 'shop_general'
	copyarr '$text', '$auspex_help'
end

if interaction = 73:
	$return_lock = 'shop_general'
	copyarr '$text', '$cruciato_help'
end

if interaction = 74:
	$return_lock = 'shop_general'
	copyarr '$text', '$delikacia_help'
end

if interaction = 75:
	$return_lock = 'shop_general'
	copyarr '$text', '$sententia_help'
end

if interaction = 76:
	$return_lock = 'shop_general'
	copyarr '$text', '$magna_help'
end

if interaction = 77:
	$return_lock = 'shop_general'
	copyarr '$text', '$tremendio_help'
end

if interaction = 78:
	$return_lock = 'shop_general'
	copyarr '$text', '$domini_help'
end

if interaction = 79:
	$return_lock = 'shop_general'
	copyarr '$text', '$adverto_help'
end

!SPEAKING
!Tell me about your past
if interaction = 1111:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = 3 + slave['pride'] &! most difficult of the talk repulse values
	$special_part = {
		$text[1] = '  <<$slave_world_description>>'
		$text[2] = '  <<$slave_family_description>>'
		if slave['age'] ! CONST_INT['loli_age']:
			$text[3] = '  <<$slave_occupation_description>>'
		end
	}
end

!What do you think about me?
if interaction = 1112:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = -10 &! rarely refused, but gives potentially inaccurate answers at lower obedience levels
	$special_part = {
		obed = 0
		if slave['obedience'] > 0: obed = 1
		if slave['obedience'] > 10: obed = 2
		if slave['obedience'] > 20: obed = 3
		if slave['obedience'] > 30: obed = 4
		if slave['obedience'] > 40: obed = 5
		$text[1] = $slave_relation_description[$slave_psy_status]
		if obed = 0 and slave['obedience'] >= -5 + iif(slave['stamina'] < 3, 1, -1) + iif(slave['intellect'] > 2, 1, -1) + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3) + _
																			iif(slave['pride'] > 2, -2, 0) + iif(slave['ego'] < 3, 1, 0) + iif(slave['intellect'] < 3, 1, 0):
			$text[2] = $slave_obed_description[1] &! slave will obey maid rule, according to the text
		else
			$text[2] = $slave_obed_description[obed]
		end
		if rebell[$slave_psy_status] > 0: obed = 0
		if $slave_psy_status ! 'broken':
			if obed > 0 and slave['sex_sum'] > 0: $text[] = $slave_urge_description[min(obed, slave['arousal'])] &! only comment on arousal if obed > 0 and slave has some sex experience
			$text[] = $slave_fear_description[max(slave['fear'] ! 0, slave['fear'] - slave['moral']/2)] &! fear level is offset by devotion, but always show at least [1] if any fear (fear ! 0)
			$text[] = $slave_ratio_description[min(obed + (slave['daily_reward_count'] ! 0)*2, slave['rational'])] &! gates the [3] answer until obed > 0 ([0], [1] and [2] can be seen before obed > 0, but only [0] will be seen before a reward has been given that day)
			$text[] = $slave_instinct_description[min(obed + 2, slave['instinct'])] &! min obed + 2 gates the [3] answer until obed > 0 ([1] and [2] can be seen before obed > 0)
			$text[] = $slave_custom_description[min(obed + 2, slave['custom'])] &! min obed + 2 gates the [3] answer until obed > 0 ([1] and [2] can be seen before obed > 0)
			if obed > 0: $text[] = $slave_spoil_description[slave['spoil']] &! only comment on spoil if obed > 0, no min for spoil because higher is "worse"
			if obed > 0: $text[] = $slave_moral_description[min(obed, slave['moral'])] &! only comment on devotion if obed > 0, limited by overall obedience so it tracks (or lags) slave_obed_description
		end
	}
end

!Do you have any requests for me?
if interaction = 1113:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = -3 &! easiest talk to get a useful response; does not have "disobedient" variant texts (only "not want to talk about that" refusal)
	$special_part = {
		gs 'chose_answer'
	}
end

!What do you want to do?
if interaction = 1114:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = -3 + slave['pride'] &! more personal than requests and does not have "disobedient" variant texts (only "not want to talk about that" refusal)
	$special_part = {
		gs 'chose_answer'
	}
end

!Are there things that are unpleasant for you?
if interaction = 1115:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = -4 &! intellect - temperament for useful answer (threshold is implemented in chose_answer), more personal (and revealing vulnerabilities that can be used against her) therefore higher worst-case repulse than "what do you want to do?" - high temperament is prone to emotionality and hence irrationality and therefore may reveal things that are not in her best interest
	$special_part = {
		gs 'chose_answer'
	}
end

!How are you feeling?
if interaction = 1116:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = 0 - slave['intellect'] &! easier with higher intellect, as she realizes that if she communicates how she feels there is more chance for the slaver to accommodate her
	$special_part = {
		copyarr '$text', '$slave_mood_list'
	}
end

!Explain her position - improved and fixed - crushboss
if interaction = 1121:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = -100
	$special_part = {
		if slave_already_done_total[$str(interaction)] < 3:
			reasoning_effect = (((master_domination + master_str + master_cha)/2) + slave['intellect']) - (rebell[$slave_psy_status] + slave['pride'] + slave_already_done_total[$str(interaction)])
			if reasoning_effect >= 4:
				reasoning_rate = 2
			elseif reasoning_effect > 0:
				reasoning_rate = 1
			else
				reasoning_rate = 0
			end
			if slave['obedience'] > 4: reasoning_rate = 3
			if slave_already_done_today[$str(interaction)] > 0: reasoning_rate = 3
			$text[1] = $reasoning_one[slave_already_done_total[$str(interaction)]]
			$text[2] = $reasoning_two[slave_already_done_total[$str(interaction)]]
			$text[3] = $reasoning_three[slave_already_done_total[$str(interaction)]]
			$text[4] = $reasoning_rate[reasoning_rate]
			if reasoning_rate < 3:
				if slave_rate['rational'] < 0: slave_rate['rational'] = 0
				if reasoning_effect < 2: reasoning_effect = 2
				slave_rate['rational'] += reasoning_effect
				slave_rate['fear'] += (reasoning_effect * slave['sensitivity'])
				if reasoning_rate >= master_cha: master_cha_rate += (skill_adv_mul * 2) &! up to A+
			end
		else
			$text[1] = $no_more_reason
		end
	}
end

!Encourage
if interaction = 1122:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = -100
	$special_part = {
		cheer_effect = 2 + max(-1, master_supermacy) + slave['passion_fame']*5 + slave['moral'] - slave_already_done_total[$str(interaction)]
		if slave_already_done_today[$str(interaction)] > 0: cheer_effect = 0
		if cheer_effect >= 5: cheer_rate = 3
		if cheer_effect < 5: cheer_rate = 2
		if cheer_effect < 2: cheer_rate = 1
		if cheer_effect < 1: cheer_rate = 0
		if cheer_effect < 0: cheer_effect = 0
		$text[1] = $cheer_up
		$text[2] = $cheer_up_result[cheer_rate]
		slave_rate['mood'] += cheer_effect
		if cheer_rate > 0:
			slave['neg_no_praise'] = 0
			slave['pos_praise'] += cheer_rate
			if cheer_rate >= master_cha: master_cha_rate += (skill_adv_mul * 2) &! up to A+
			gs '$mood_rise', 'slave', cheer_rate
		end
	}
end

!Threaten - improved - crushboss
if interaction = 1123:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = -100
	$special_part = {
		threat_effect = min(slave['rational'], slave['intellect']) - slave['abuse_attitude']*5 + max(-1, master_supermacy) - rebell[$slave_psy_status] - slave_already_done_recent[$str(interaction)]
		if slave_already_done_today[$str(interaction)] > 0 or slave['courage'] = 2: threat_effect = 0
		if threat_effect > 0 and slave['rational'] < 1: threat_effect = 1
		if threat_effect < 0: threat_effect = 0
		if threat_effect >= 5: threat_rate = 3
		if threat_effect < 5: threat_rate = 2
		if threat_effect < 2: threat_rate = 1
		if threat_effect <= 0: threat_rate = 0
		$text[1] = $threatening
		$text[2] = $threatening_result[threat_rate]
		if threat_effect > 0:
			slave_rate['mood'] -= threat_effect
			slave_rate['angst'] += threat_effect
			if threat_effect > slave['fear'] and master_domination >= slave['fear']: slave_rate['fear'] += threat_effect
			if threat_effect > slave['pride']: slave_rate['instinct'] += 2
			if slave['ego'] >= master_domination: master_domination_rate += (skill_adv_mul * 2)
		else
			slave_rate['pride'] += (slave['spoil'] * slave['ego'])
		end
	}
end

!Put in place - improved - crushboss
if interaction = 1124:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = -100
	$special_part = {
		threat_effect = slave['fear'] + min(slave['rational'], slave['intellect']) + max(-1, master_supermacy) - slave['spoil'] - rebell[$slave_psy_status] - slave_already_done_total[$str(interaction)]
		if slave_already_done_today[$str(interaction)] > 0 or slave['courage'] = 2 or slave['max_guilt'] < 2: threat_effect = 0
		if threat_effect > 0 and slave['obedience'] < 0: threat_effect = 1
		if threat_effect < 0: threat_effect = 0
		if threat_effect >= 5: threat_rate = 3
		if threat_effect < 5: threat_rate = 2
		if threat_effect < 2: threat_rate = 1
		if threat_effect <= 0: threat_rate = 0
		$text[1] = $straining
		$text[2] = $straining_result[threat_rate]
		if threat_effect > 0:
			slave_rate['spoil'] -= (threat_effect + slave['spoil'] + slave['sensitivity']/2)
			if slave['ego'] >= master_domination: master_domination_rate += (skill_adv_mul * 2)
		else
			slave_rate['pride'] += (slave['spoil'] * slave['ego'])
		end
	}
end

!Give a new name
if interaction = 1125:
	$interaction_type = 'talk'
	interaction_slave['repulse'] = -100
	$special_part = {
		$given_name = input ('Choose a new name for your slave. Try to avoid excessively long names.')
		if $given_name ! '':
			$slave_name = $given_name
			gs '#var_base'
			gs '#txt'
			gs '#txt_2'
			if slave['moral'] < 5: slave_rate['mood'] -= 3*(slave['ego'] + slave['pride']) &! tripled effect - TODO: add a long-duration moodlet for this - ImperatorAugustus
			$text[1] = '  You tell your slave that her new name is <<$slave_name>>. She is your property and you may name her as you wish.'
		else
			$text[1] = '  You tell your slave that you are still thinking of a new name for her. Still, it is important that she understands that she is your property and you can name her as you wish.'
		end
	}
end

!lab
if interaction = 21:
	$place = 'lab'
	$return_lock = 'menu_form'
	if assistant['alchemist_rule'] = 1 and assistant_state = CONST_INT['slave_exist']:
		copyarr '$sp_text', '$assistant_alchemist'
	else
		copyarr '$sp_text', '$slave_alchemist'
	end
	copyarr '$display_options', '$lab_options'
	if debug_interactions ! 2: gt 'shop_general'
end

$interaction_brew_potion = {
	npc = 0
	$place = 'lab'
	$return_lock = 'menu_form'
	$get_pot = 'самогон'
	brewing_skill = min(dynslave['alchemy'], dynslave['enchanter'])
	if put_kanabis = 0:
		if min(lab_store['koffe'], lab_store['meth'], lab_store['opium']) = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
		if $potion_base = 'water' and brewing_skill > 0: $get_pot = 'вакхический_нектар'
		if $potion_base = 'spirit':
			if fridge['alcohol'] = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
			if brewing_skill > 1: $get_pot = 'тонизируюзщий_эликсир'
		end
		if $potion_base = 'slime':
			if lab_store['slime'] = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
			if brewing_skill > 2: $get_pot = 'целительный_бальзам'
		end
	end
	if put_koffe = 0:
		if min(lab_store['kanabis'], lab_store['meth'], lab_store['opium']) = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
		if $potion_base = 'slime':
			if lab_store['slime'] = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
			if brewing_skill > 4: $get_pot = 'приворотное_зелье'
		end
	end
	if put_meth = 0:
		if min(lab_store['kanabis'], lab_store['koffe'], lab_store['opium']) = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
		if $potion_base = 'water' and brewing_skill > 4: $get_pot = 'вода_леты'
		if $potion_base = 'spirit':
			if fridge['alcohol'] = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
			if brewing_skill > 3: $get_pot = 'вода_леты'
		end
		if $potion_base = 'slime':
			if lab_store['slime'] = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
			if brewing_skill > 2: $get_pot = 'вода_леты'
		end
	end
	if put_opium = 0:
		if min(lab_store['kanabis'], lab_store['koffe'], lab_store['meth']) = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
		if $potion_base = 'spirit':
			if fridge['alcohol'] = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
			if brewing_skill > 1: $get_pot = 'афродизиак'
		end
		if $potion_base = 'slime':
			if lab_store['slime'] = 0: interaction = 23 & gt 'interaction' &! insufficient ingredients
			if brewing_skill > 2: $get_pot = 'мощный_афодизиак'
		end
	end
	! deduct ingredients from storage
	if $potion_base = 'spirit': fridge['alcohol'] -= 1
	if $potion_base = 'slime': lab_store['slime'] -= 1
	if put_kanabis > 0: lab_store['kanabis'] -= 1
	if put_koffe > 0: lab_store['koffe'] -= 1
	if put_meth > 0: lab_store['meth'] -= 1
	if put_opium > 0: lab_store['opium'] -= 1
	$special_action[1] = { $return_lock = 'interaction' & interaction = 21 & sp_txt = 0 }
	$text[1] = '  When all components are properly mixed, it’s time for the most critical process. You need to refine and distill the mix using alchemical equipment, and then saturate the potion with the power of sparks, so that the magic gains strength.'
	$text[2] = $get_pot_description[$get_pot]
	if $get_pot = 'самогон':
		fridge['alcohol'] += 1
	else
		dynamic "<<$get_pot>> += 1"
		sparks -= 1
	end
	dynslave['half_action'] += 1
	dynslave_rate['hygiene'] += 5
	if sound_on = 1: play 'content\snd\bulk.wav', sound_volume
}

if interaction = 22:
	if assistant['alchemist_rule'] = 1 and assistant_state = CONST_INT['slave_exist']:
		dynamic $replace($interaction_brew_potion, 'dynslave', 'assistant')
	else
		dynamic $replace($interaction_brew_potion, 'dynslave', 'slave')
	end
end

if interaction = 23:
	! was assistant variant of brew potion interaction, now repurposed for "insufficient ingredients" screen
	$place = 'lab'
	$return_lock = 'menu_form'
	$text[1] = '  As you go to prepare the recipe, you realize that you do not have all of the required ingredients. This is the fault of your slave, is it not?'
	if assistant['alchemist_rule'] = 1 and assistant_state = CONST_INT['slave_exist']:
		show_assistant_fullimage = 1
		dynamic $sin_gained_now, 'assistant'
	else
		show_slave_fullimage = 1
		dynamic $sin_gained_now, 'slave'
	end
end

!slave sleeping condition
if interaction = 321:
	slave['sleep_condition'] = -2
	$place = 'dungeon'
	$text[1] = $slave_sleep_condition[1]
end
if interaction = 322:
	slave['sleep_condition'] = -1
	!$bg_path = $bare_floor
	$text[1] = $slave_sleep_condition[2]
end
if interaction = 323:
	slave['sleep_condition'] = 0
	!$bg_path = $sleeping_mat
	$text[1] = $slave_sleep_condition[3]
end
if interaction = 324:
	slave['sleep_condition'] = 1
	$place = 'bedroom'
	$text[1] = $slave_sleep_condition[4]
end
if interaction = 325:
	slave['sleep_condition'] = 2
	$place = 'boudoir'
	$text[1] = $slave_sleep_condition[5]
end

!slave food ration
!currently these interactions are unused (not accessible by the player) - ImperatorAugustus
if interaction = 331:
	slave_ration = -3
	$text[1] = $slave_ration[1]
end
if interaction = 332:
	slave_ration = -2
	!$bg_path = $bread_and_water
	$text[1] = $slave_ration[2]
end
if interaction = 333:
	slave_ration = -1
	!$bg_path = $diet
	$text[1] = $slave_ration[3]
end
if interaction = 334:
	slave_ration = 0
	!$bg_path = $caned_food
	$text[1] = $slave_ration[4]
end
if interaction = 335:
	slave_ration = 1
	!$bg_path = $double_ration
	$text[1] = $slave_ration[5]
end
if interaction = 336:
	slave_ration = 2
	!$bg_path = $cooked_food
	$text[1] = $slave_ration[6]
end
if interaction = 337:
	enable_dessert = 1
	!$bg_path = $dessert
	$text[1] = $slave_ration[7]
end
if interaction = 338:
	enable_dessert = 0
	$text[1] = $slave_ration[8]
end

!masters interaction
!master washes himself - no bath rule - menu_take_bath
if interaction = 34:
	$interaction_type = 'special_png'
	$bg_path = 'scene\master_bathing'
	g = rand(1, picMax['master_bathing'])
	if g > 1: $bg_path += '_' + $str(g)
	$text[1] = $bathing_master_alone
	if bull_ring_on = 0: master_half_action += 1 &! no more infinite bathing - taking a bath consumes a half action - ImperatorAugustus
	if felicity = 1 and $quest12 ! 'fail' and active[$quest[12]] = 1: $quest12 = 'fail' & $quest12_failreason = 'It seems you forgot that she’s your washmaid.'
	master_hygiene_rate = 0
	master_hygiene = 0
	master_moodlet['pos_self_clean'] = 1
	house_mess_rate += 1
	$place = 'bathroom'
end

!master cooks
if interaction = menu_prepare_meal:
	$interaction_type = 'special'
	$bg_path = 'scene/master_cooking'
	g = rand(1, picMax['master_cooking'])
	if g > 1: $bg_path += '_' + $str(g)
	gs '$food_choice', master_butler &! consume ingredients, update last_cooked_food, cooked_food and $cooked_meal - lack of ingredients or skill limits meal quality - will only replace a lower quality meal
	$text[1] = $master_cook_description[last_cooked_food] &! description based on meal quality
	if last_cooked_food >= master_butler - boost_up['master_butler']: master_butler_rate += (skill_adv_mul * 1)
	if last_cooked_food = 0: easy_for_master = 1 &! preparing canned food is easy - ImperatorAugustus
	dynamic $master_energy_drop
	master_moodlet['neg_cook'] = max(0, 3 + master_cha - master_butler)
	master_hygiene_rate += 5
	house_mess_rate += 5
	$place = 'kitchen'
end

!master cleans the house
if interaction = 36:
	$interaction_type = 'special'
	$bg_path = 'scene/master_clean'
	g = rand(1, picMax['master_clean'])
	if g > 1: $bg_path += '_' + $str(g)
	$text[1] = $master_clean_description[master_butler]
	dynamic $master_energy_drop
	master_hygiene_rate += house_mess + 2
	if house_mess_rate > 80: house_mess_rate = 80
	house_mess_rate -= max(8,master_butler*16) &! D- is twice as effective as F- (previously, F- was completely ineffective) - ImperatorAugustus
	dynamic $house_cleaning
	if master_butler < 3 and house_mess = 0: house_mess_rate = 10 &! B+ skill or better is needed to reach perfect cleanliness
	master_moodlet['neg_cleaning'] = 1 + master_cha
	master_butler_rate += (skill_adv_mul * 1)
	$place = 'study'
end

!Assistant assignments
!Assistant clean the house
!assistant cooks
!assistant washes master

!assistant washes slave
if interaction = menu_assistant_washes_slave:
	$interaction_type = 'make_assistant_do'
	interaction_no_auto_energy_drop = 1
	$refuse_txt = '  <<$assistant_name>> refuses to wash <<$slave_name>>. Looks like she needs to be taught a lesson of obedience.'
	$special_part = {
		$bg_path = func('display_pic', 'slave, assistant', 'lesbath', 'girls/normal_scenes/')
		$text[1] = $assistant_washes_slave
		oral_wash = min (interaction_assistant['diligence'], assistant['oral'])
		slave_rate['mood'] += assistant['petting'] + oral_wash &! max effect of +1 mood
		slave['pos_gentle'] = max(slave['pos_gentle'], min(interaction_assistant['diligence'], assistant['petting']))
		dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'slave')
		dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'assistant')
		!no energy drop for slave is a benefit of being washed
		assistant['half_action'] += 1 &! no more infinite bathing - taking a bath consumes a half action - ImperatorAugustus
	}
	$place = 'bathroom'
end

!active sex with assistant
!relaxed vaginal sex with assistant - fixed and improved - crushboss, improved by i107760
!relaxed anal sex with assistant - fixed and improved - crushboss, improved by i107760
!relaxed oral with assistant - fixed and improved - crushboss, improved by i107760
!Assistant doing massage - crushboss

!Assistant entertains master - crushboss
!concert - assistant
!acrobatic - assistant - crushboss
!striptease - assistant - crushboss
!erotic show - assistant - crushboss
!lesbian show - assistant - crushboss

!Drugs - assistant

!Drink Kamra - assistant - crushboss
if interaction = 5506:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		lab_store['koffe'] -= 1
		assistant['neg_slave_koffe'] = 0
		if assistant['koffed'] = 0:
			assistant['half_action'] -= 2
			assistant['koffed'] = 1
			assistant['pos_slave_koffe'] = 1
		end
	}
end

!Blaze it - Datura - assistant - crushboss
if interaction = 5507:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		lab_store['kanabis'] -= 1
		assistant['pos_slave_kannabis'] = 1
		if assistant['kannabis_pressure'] > rand(1,100): assistant_rate['intellect'] -= 1
		assistant['kannabis_pressure'] += 1
	}
end

!Chug - Alcohol - assistant - crushboss
if interaction = 5508:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		fridge['alcohol'] -= 1
		assistant['neg_slave_alco'] = 0
		if assistant['on_alco'] = 0:
			assistant['on_alco'] = 1
			assistant['pos_slave_alco'] = 1
			gs '$mood_rise', 'assistant', 1
		else
			msg "Pretty drunk, your assistant falls to the floor unconscious."
			assistant_state = CONST_INT['slave_faint']
			assistant['exhaustion_fainted'] = 1
			assistant['energy'] = -4
			dynamic $assistant_energy_drop
		end
	}
end

!Smell Pollen - assistant - crushboss
if interaction = 5509:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		lab_store['meth'] -= 1
		assistant['neg_slave_meth'] = 0
		if assistant['on_meth'] = 0:
			assistant['half_action'] -= 10
			assistant['on_meth'] = 1
			!assistant['pos_slave_meth'] = 1 &! non-existent moodlet
		else
			msg "You decide to give your assistant another dose on the same day. Breathing the dust, your assistant suddenly starts shaking in a fit and falls to the floor unconscious. It seems her nose is bleeding."
			assistant_state = CONST_INT['slave_faint']
			assistant['stamina_fainted'] = 1
			assistant_rate['stamina'] = 4
			assistant['stamina'] = 0
		end
	}
end

!Your dose of happiness - Oblivion - assistant - crushboss
if interaction = 5510:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		lab_store['opium'] -= 1
		assistant['neg_slave_opium'] = 0
		if assistant['on_opium'] = 0:
			assistant['on_opium'] = 1
			assistant['pos_slave_opium'] = 1
			gs '$mood_rise', 'assistant', 3
		else
			msg "You decide to give your assistant another dose on the same day. After applying, your assistant rolled her eyes and goes on with a silly smile on her face for a while, ignoring your commands. Then she falls to the floor, her mouth fills with foam mixed with blood."
			assistant_state = CONST_INT['slave_faint']
			assistant['stamina_fainted'] = 1
			assistant_rate['stamina'] = 4
			assistant['stamina'] = 0
		end
	}
end

!Potions, Tonics, and Elixirs - assistant

!Bacchic Nectar - alcohol - assistant - crushboss
if interaction = 5511:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		вакхический_нектар -= 1
		assistant_rate['arousal'] += iif(assistant['nymphomania'] < 0, 5, 25)
		gs '$mood_rise', 'assistant', 2
	}
end

!Tonic Elixir - assistant - crushboss
if interaction = 5512:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		тонизируюзщий_эликсир -= 1
		assistant['half_action'] -= 2
		assistant_rate['stamina'] -= assistant['energised']
		assistant['energised'] += 1
	}
end

!Miracle Balm - healing - assistant - crushboss
if interaction = 5513:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		целительный_бальзам -= 1
		if assistant_rate['wounds'] > 0: assistant_rate['wounds'] -= 25
	}
end

!Aphrodisiac - assistant - crushboss
if interaction = 5514:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		афродизиак -= 1
		if assistant['arousal'] < 5: assistant_rate['arousal'] += iif(assistant['nymphomania'] < 0, 10, 50)
	}
end

!Powerful Aphrodisiac - assistant - crushboss
if interaction = 5515:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		мощный_афодизиак -= 1
		assistant['arousal'] = 5
		assistant_rate['arousal'] = 200
	}
end

!Philtre potion - Love Potion - assistant - crushboss
if interaction = 5516:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		приворотное_зелье -= 1
		if assistant['on_love_drug'] = 0:
			assistant['on_love_drug'] = 1
			assistant['pos_slave_love'] = 50
			assistant_rate['moral'] += 50
		else
			msg "You give your assistant the philtre, but it does not work a second time. At least you do not see any effect."
		end
	}
end

!Water of Lethe - assistant - crushboss (reverted mostly to 1.2.1 effects - ImperatorAugustus)
if interaction = 5517:
	$interaction_type = 'get_drug_assistant'
	$special_part = {
		вода_леты -= 1
		!reset aura stats
		assistant['arousal'] = 0    & assistant_rate['arousal'] = 0
		assistant['fear'] = 0       & assistant_rate['fear'] = 0
		assistant['angst'] = 0      & assistant_rate['angst'] = 0
		assistant['rational'] = 0   & assistant_rate['rational'] = 0
		assistant['instinct'] = 0   & assistant_rate['instinct'] = 0
		assistant['custom'] = 0     & assistant_rate['custom'] = 0
		assistant['spoil'] = 0      & assistant_rate['spoil'] = 0
		assistant['moral'] = 0      & assistant_rate['moral'] = 0
		!clear guilt and merit
		assistant['sin'] = 0
		assistant['virtue'] = 0
		!reset mood
		assistant['mood'] = 0 & assistant_rate['mood'] = 0
		gs '$mood_rise', 'assistant', 100
		gs '$mood_drop', 'assistant', 100
		!reset relaxation counter
		assistant['well_rested'] = 0
		!reset daily rewards counter
		assistant['daily_reward_count'] = 0
		assistant['daily_punishment_count'] = 0
		!drain intellect stat
		assistant_rate['intellect'] -= 40
		menu_form = 0
		gt 'menu_form'
	}
end

!Slave assignments
!Slave clean the house
if code_defined['interaction_serve_clean_house'] = 0:
	code_defined['interaction_serve_clean_house'] = 1 &! do-once

	$interaction_serve_clean_house = {
		$interaction_type = 'make_dynslave_do'
		interaction_dynslave['repulse'] = -5 + iif(slave['stamina'] < 3, 1, -1) + iif(slave['intellect'] > 2, 1, -1) + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3)
		interaction_dynslave['repulse'] += iif(slave['pride'] > 2, -2, 0) + iif(slave['ego'] < 3, 1, 0) + iif(slave['intellect'] < 3, 1, 0) &! Maid lesson repulse (above) as baseline, offset by -2 for high pride (pride prefers less interaction with slaver) and +1 each for low intellect, low nature due to discomfort with lack of guidance
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['service'] &! training improves diligence: at B+ skill, aura stats 3+ contribute; at A+ skill, aura stats 2+ contribute
		$refuse_txt = '  <<$slave_name>> refuses to clean the house. Looks like she needs to be taught a lesson of obedience.'
		$misc_bonus = 'learn_bonus["service"]'
		$target_skill = 'service'
		$target_affinity = 'service_affinity'
		$special_part = {
			slave_skill = min(interaction_dynslave['diligence'], max(1, dynslave['service']))
			$bg_path = func('display_pic', 'dynslave', 'clean', 'girls/normal_scenes/')
			$text[1] = $slave_cleans_description[slave_skill] &! uses delayed sub-expressions
			dynslave_rate['hygiene'] += house_mess + 2 &! increase slave hygiene before house_mess is reduced
			house_mess_rate -= slave_skill*16 &! zero effect is possible with zero diligence
			dynamic $house_cleaning
			if slave_skill < 3 and house_mess = 0: house_mess_rate = 10 &! B+ skill or better is needed to reach perfect cleanliness
		}
	}
end

if interaction = menu_Tidy_S: dynamic $replace($interaction_serve_clean_house, 'dyn'+'slave', 'slave')
if interaction = menu_Tidy_A: dynamic $replace($interaction_serve_clean_house, 'dyn'+'slave', 'assistant')

if code_defined['interaction_serve_prepare_meal'] = 0:
	code_defined['interaction_serve_prepare_meal'] = 1 &! do-once

	$interaction_serve_prepare_meal = {
		$interaction_type = 'make_dynslave_do'
		interaction_dynslave['repulse'] = -6 + iif(slave['pride'] > 2, -2, 0) + iif(slave['ego'] < 3, 1, 0) + iif(slave['intellect'] < 3, 1, 0) &! Cooking lesson repulse (-6) as baseline, offset by -2 for high pride (pride prefers less interaction with slaver) and +1 each for low intellect, low nature due to discomfort with lack of guidance
		interaction_dynslave['motivation_repulse'] = 5 - max(0, slave['cook'], slave['starvation']) &! training or starvation improve diligence: at B+ skill, aura stats 3+ contribute; at A+ skill, aura stats 2+ contribute
		$refuse_txt = '  <<$dynslave_name>> refuses to cook. Looks like she needs to be taught a lesson of obedience.'
		$misc_bonus = 'learn_bonus["cook"]'
		$target_skill = 'cook'
		$target_affinity = 'cook_affinity'
		$special_part = {
			slave_skill = min(interaction_dynslave['diligence'], max(1, dynslave['cook']))
			$bg_path = func('display_pic', 'dynslave', 'cook', 'girls/normal_scenes/')
			gs '$food_choice', slave_skill &! consume ingredients, update last_cooked_food, cooked_food and $cooked_meal - lack of ingredients or skill limits meal quality - will only replace a lower quality meal
			$text[1] = $slave_cook_description[min(last_cooked_food, slave_skill)] &! description based on lesser of meal quality or skill
			if last_cooked_food < slave_skill: tutor_modifier -= 5 &! sub-par diligence or using cheap ingredients for home cooking slows progress - ImperatorAugustus
			house_mess_rate += 5
			dynslave_rate['hygiene'] += 5
		}
		$place = 'kitchen'
	}
end

if interaction = menu_dinner_S: dynamic $replace($interaction_serve_prepare_meal, 'dyn'+'slave', 'slave')
if interaction = menu_dinner_A: dynamic $replace($interaction_serve_prepare_meal, 'dyn'+'slave', 'assistant')

!Slave doing gymnastics
if interaction = menu_gymnastics_S:
	$interaction_type = 'make_slave_do'
	interaction_slave['repulse'] = -5 + iif(slave['stamina'] > 2, 2 - slave['stamina'], 3 - slave['stamina']) + iif(slave['pride'] > 2, 1, 0)
	interaction_slave['repulse'] += iif(slave['pride'] > 2, -2, 0) + iif(slave['ego'] < 3, 1, 0) + iif(slave['intellect'] < 3, 1, 0) &! Athletics lesson repulse (above) as baseline, offset by -2 for high pride (pride prefers less interaction with slaver) and +1 each for low intellect, low nature due to discomfort with lack of guidance
	interaction_slave['motivation_repulse'] = 5 - slave['stamina'] &! B+ endurance gains diligence at 3+ aura stats; A+ endurance at 2+ aura stats; S+ endurance at 1+ aura stats
	$refuse_txt = '  <<$slave_name>> refuses to do gymnastics. Looks like she needs to be taught a lesson of obedience.'
	$misc_bonus = 'learn_bonus["stamina"]'
	$target_skill = 'stamina'
	$target_affinity = 'sport_affinity'
	$special_part = {
		if interaction_slave['diligence'] > 0:
			$bg_path = func('display_pic', 'slave', 'gym', 'girls/normal_scenes/')
			$text[1] = $work_out_description[slave["stamina"]]
			if slave['stamina'] > 0 and is_perv ! 0 and no_loli ! 1:
				if slave['age'] = CONST_INT['loli_age']:
					master_excitement_rate += slave['beauty']
					master_perv_rate += 5 - slave['fat'] + slave['beauty']
						$text[1] += ' It’s a pleasure watching her<<$little_txt>> body in motion.'
				else
					master_excitement_rate -= slave['boobs'] / 3
					if slave['boobs'] > 2: $text[1] += ' Her <<$boobs_size1_txt[slave["boobs"]]>> breasts make her less graceful.'
				end
			end
			slave['calories'] -= 2 &! stamina increase is handled by $dyn_skill_rise in interaction_result
		else
			show_slave_fullimage = 1
			$text[1] = '  The slave’s actions clearly show that <<$slave_noun8[slave["age"]]>> doesn’t try at all. A short set of mild stretches hardly qualifies as gymnastics.'
			if slave['energy'] <= 0: $text[1] += ' She looks exhausted' + iif(slave['mood'] < 0, ' and miserable.', '.') &! condition is <= because energy drop happens before $special_part
		end
		if slave['stamina'] = 4 and slave['fat'] > 3: $text[1] += ' Still, she needs to shed some weight in order to improve her endurance further.'
		slave_rate['hygiene'] += 20
		house_mess_rate += 3
	}
	if hall = 1: $place = 'hall'
end

!slave washes herself - no bath rule
if interaction = menu_bath_S:
	$interaction_type = 'special'
	interaction_no_auto_energy_drop = 1
	$bg_path = func('display_pic', 'slave', 'bath', 'girls/normal_scenes/')
	dynamic $replace("$text[1] = '<<$bathing_slave_alone[$slave_psy_status]>>'", 'dyn'+'slave', 'slave') &! evaluate delayed sub-expressions with substitution
	dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'slave')
	slave['half_action'] += 1 &! no more infinite bathing - taking a bath consumes a half action - ImperatorAugustus
	$place = 'bathroom'
end

if code_defined['interaction_serve_wash_master'] = 0:
	code_defined['interaction_serve_wash_master'] = 1 &! do-once

	$interaction_serve_wash_master = {
		$interaction_type = 'make_dynslave_do'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 0 &! same tier as seduction, masturbation lessons
		interaction_dynslave['motivation_repulse'] = 2 + master_hygiene - dynslave['dexterity']*2 &! the dirtier the master, the higher the aura stats needed to improve diligence (3+ or more) [1+ with Dexterous trait]
		if dynslave['moral'] < 1: shameful = 1 &! interacts with slave exhibitionism trait when non-devoted slave is exposed to master
		interaction_no_auto_energy_drop = 1 &! half action for slave in $special_part
		$refuse_txt = '  <<$dynslave_name>> refuses to wash you. Looks like she needs to be taught a lesson of obedience.'
		$special_part = {
			main_wash = min(interaction_dynslave['diligence'], 1 + dynslave['petting'])
			oral_wash = min(interaction_dynslave['diligence'], 1 + dynslave['oral'])
			$bg_path = func('display_pic', 'dynslave', 'wash', 'girls/normal_scenes/')
			$text[1] = $washing_description[main_wash]
			$text[2] = $oral_wash_description[oral_wash]
			if felicity = 1 and $quest12 ! 'fail' and active[$quest[12]] = 1 and dynslave_type ! 2572: $quest12 = 'fail' & $quest12_failreason = 'It seems you forgot that she’s your washmaid.'
			master_hygiene_rate = 0
			master_mood_rate += main_wash + oral_wash
			master_moodlet['pos_self_clean'] = 1
			if min(main_wash, oral_wash) >= master_cha: master_moodlet['pos_massage'] = 1
			interaction_dynslave['erotic_stimulation'] = master_libido
			dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'dynslave')
			if is_perv ! 0 and no_loli ! 1 and dynslave['age'] = CONST_INT['loli_age']:
				master_excitement_rate += dynslave['beauty']
				master_perv_rate += dynslave['beauty']/2
			end
			dynslave['half_action'] += 1 &! no more infinite bathing - taking a bath consumes a half action - ImperatorAugustus
			!if bull_ring_on = 0: master_half_action += 1 &! no more infinite bathing - taking a bath consumes a half action - ImperatorAugustus
		}
		$place = 'bathroom'
	}
end

if interaction = 5411: dynamic $replace($interaction_serve_wash_master, 'dyn'+'slave', 'slave')
if interaction = 5519: dynamic $replace($interaction_serve_wash_master, 'dyn'+'slave', 'assistant')

if code_defined['interaction_serve_massage'] = 0:
	code_defined['interaction_serve_massage'] = 1 &! do-once

	$interaction_serve_massage = {
		$interaction_type = 'make_dynslave_do'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 3 &! same tier as rubbing lesson
		interaction_dynslave['motivation_repulse'] = 3 + master_hygiene - dynslave['dexterity']*2 &! the dirtier the master, the higher the aura stats needed to improve diligence (4+ or more) [2+ with Dexterous trait]
		$refuse_txt = '  <<$dynslave_name>> refuses to give you a massage. Looks like she needs to be taught a lesson of obedience.'
		$special_part = {
			massage_quality = min(interaction_dynslave['diligence'], 1 + dynslave['petting'])
			$bg_path = func('display_pic', 'dynslave', 'massage', 'girls/normal_scenes/')
			$text[1] = $slave_massages_master[massage_quality] &! uses delayed sub-expressions
			master_mood_rate += massage_quality*2
			if massage_quality > 2 and master_massaged = 0:
				master_massaged = 1
				master_libido_rate += massage_quality*3
				master_half_action -= 2
				if massage_quality >= master_cha: master_moodlet['pos_massage'] = 1
			elseif master_hygiene > 2:
				$text[1] += ' Perhaps a bath before your next massage would be a good idea.'
			end
			interaction_dynslave['erotic_stimulation'] = min(massage_quality, dynslave['sensitivity'], dynslave['temper'], master_style)*4 &! low master allure inhibits arousal - ImperatorAugustus
			house_mess_rate += 5
			master_hygiene_rate += 2
			dynslave_rate['hygiene'] += 5
			if is_perv ! 0 and no_loli ! 1 and dynslave['age'] = CONST_INT['loli_age']: master_perv_rate += 3
		}
		$place = 'bedroom'
	}
end

if interaction = 5412: dynamic $replace($interaction_serve_massage, 'dyn'+'slave', 'slave')
if interaction = 5501: dynamic $replace($interaction_serve_massage, 'dyn'+'slave', 'assistant')

if code_defined['interaction_entertain_concert'] = 0:
	code_defined['interaction_entertain_concert'] = 1 &! do-once

	$interaction_entertain_concert = {
		$interaction_type = 'make_dynslave_do'
		interaction_dynslave['repulse'] = 0 - dynslave['music'] &! higher music skill lowers repulse
		interaction_dynslave['motivation_repulse'] = 6 - dynslave['intellect'] - dynslave['dexterity']*2 &! a slave with B+ intellect gains diligence at 4+ aura stats; A+ at 3+; S+ at 2+ [B+ with Dexterous trait]
		$refuse_txt = '  <<$dynslave_name>> refuses to entertain you with a music performance. Looks like she needs to be taught a lesson of obedience… or music.'
		$target_skill = 'music'
		$target_affinity = 'music_affinity'
		$misc_bonus = 'learn_bonus["music"]'
		$special_part = {
			slave_skill = min(interaction_dynslave['diligence'], dynslave['music'])
			$bg_path = func('display_pic', 'dynslave', 'music', 'girls/normal_scenes/')
			$text[1] = $slave_concert[slave_skill] &! uses delayed sub-expressions
			master_mood_rate += slave_skill*3
			if slave_skill > 0:
				master_moodlet['pos_show'] = max(master_moodlet['pos_show'], 1 + slave_skill - master_cha)
				if dynslave_already_done_today[$str(interaction)] = 0 and interaction_dynslave['diligence'] > 0 and dynslave['pride'] < 4:
					dynslave_rate['intellect'] += 1
					dynslave_rate['temper'] += 1
				end
			elseif dynslave['intellect'] < 3:
				$text[1] += ' It does not help that she is not exactly the sharpest knife in the drawer.'
			end
			house_mess_rate += 2
			dynslave_rate['hygiene'] += 2
			if is_perv ! 0 and no_loli ! 1 and dynslave['age'] = CONST_INT['loli_age']: master_perv_rate += dynslave['beauty'] /2
			if is_perv ! 0 and no_loli ! 1 and dynslave['age'] = CONST_INT['loli_age']:
				master_perv_rate += dynslave['beauty']/2
				master_excitement_rate += (master_libido * dynslave['beauty'])/3
			end
		}
		if hall = 1: $place = 'hall'
	}
end

if interaction = 54131: dynamic $replace($interaction_entertain_concert, 'dyn'+'slave', 'slave')
if interaction = 5502: dynamic $replace($interaction_entertain_concert, 'dyn'+'slave', 'assistant')

if code_defined['interaction_entertain_acrobatics'] = 0:
	code_defined['interaction_entertain_acrobatics'] = 1 &! do-once

	$interaction_entertain_acrobatics = {
		$interaction_type = 'make_dynslave_do'
		interaction_dynslave['repulse'] = -1 &! easier than striptease, which is at zero (seduction/masturbation tier), albeit modified by sex acceptance
		interaction_dynslave['motivation_repulse'] = iif(dynslave['stamina'] > 2, 1, 4) &! diligence will improve with 2+ aura stats if stamina above B+, otherwise with maxed aura stats - ImperatorAugustus
		$refuse_txt = '  <<$dynslave_name>> refuses to entertain you with acrobatics. Looks like she needs to be taught a lesson of obedience.'
		$target_skill = 'stamina' &! exercise builds stamina - ImperatorAugustus
		$target_affinity = 'grace'
		$misc_bonus = 'learn_bonus["stamina"]'
		$special_part = {
			slave_skill = min(interaction_dynslave['diligence'], 1 + (1 + dynslave['stamina'] + dynslave['calisthenics'])/2)
			$bg_path = func('display_pic', 'dynslave', 'dance', 'girls/normal_scenes/')
			$text[1] = $slave_acrobatic_stunt[slave_skill] &! uses delayed sub-expressions
			master_mood_rate += slave_skill*3
			if slave_skill > 0:
				master_moodlet['pos_show'] = max(master_moodlet['pos_show'], 1 + slave_skill - master_cha)
				if dynslave_already_done_today[$str(interaction)] = 0 and interaction_dynslave['diligence'] > 0 and dynslave['pride'] < 4:
					dynslave_rate['temper'] += 1
				end
				dynslave['calories'] -= 2 &! stamina increase is handled by $dyn_skill_rise in interaction_result
			elseif dynslave['stamina'] < 3:
				$text[1] += ' It does not help that her stamina is so low.'
			end
			if is_perv ! 0 and no_loli ! 1:
				if dynslave['age'] = CONST_INT['loli_age']:
					master_perv_rate += dynslave['beauty']
					master_excitement_rate += (master_libido * dynslave['beauty'])/2
					$text[1] += ' It’s a pleasure watching her<<$little_txt>> body in motion.'
				else
					master_excitement_rate -= dynslave['boobs'] / 3
					if dynslave['boobs'] > 2: $text[1] += ' Her <<$boobs_size1_txt[dynslave["boobs"]]>> breasts make her less graceful.'
				end
			end
			if dynslave['stamina'] = 4 and dynslave['fat'] > 3: $text[1] += ' Still, she needs to shed some weight in order to improve her endurance further.'
			house_mess_rate += 5
			dynslave_rate['hygiene'] += 20
		}
		if hall = 1: $place = 'hall'
	}
end

if interaction = 54132: dynamic $replace($interaction_entertain_acrobatics, 'dyn'+'slave', 'slave')
if interaction = 5503: dynamic $replace($interaction_entertain_acrobatics, 'dyn'+'slave', 'assistant')

if code_defined['interaction_entertain_striptease'] = 0:
	code_defined['interaction_entertain_striptease'] = 1 &! do-once

	$interaction_entertain_striptease = {
		$interaction_type = 'make_dynslave_do'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = 0 &! same tier as seduction, masturbation lessons
		interaction_dynslave['motivation_repulse'] = 6 - master_style &! diligence will improve with 2+ aura stats, low master allure impedes diligence in this task - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		shameful = 1
		$refuse_txt = '  <<$dynslave_name>> refuses to entertain you with a striptease. Looks like she needs to be taught a lesson of obedience.'
		$target_skill = 'calisthenics'
		$target_affinity = 'exhibitionism'
		$misc_bonus = 'learn_bonus["calisthenics"]'
		$subskill = 'slave["sub_seduce"]'
		$subskill_xp = 'slave["sub_seduce_xp"]'
		$subskill_two = 'slave["sub_exhibit"]'
		$subskill_two_xp = 'slave["sub_exhibit_xp"]'
		$special_part = {
			slave_skill = min(interaction_dynslave['diligence'], 1 + (1 + dynslave['roleplay'] + dynslave['calisthenics'])/2)
			$bg_path = func('display_pic', 'dynslave', 'seduce', 'girls/sex_scenes/')
			$text[1] = $slave_strip[slave_skill] &! uses delayed sub-expressions
			interaction_dynslave['erotic_stimulation'] = master_style*2
			master_mood_rate += slave_skill*3
			if slave_skill > 0:
				master_moodlet['pos_show'] = max(master_moodlet['pos_show'], 1 + slave_skill - master_cha)
				if master_libido > 0 and slave_skill >= master_excitement: master_excitement_rate += slave_skill*10
				if slave_skill >= master_libido: master_libido_rate += slave_skill*3
				if dynslave_already_done_today[$str(interaction)] = 0 and interaction_dynslave['diligence'] > 0 and dynslave['pride'] < 4:
					dynslave_rate['temper'] += 1
				end
				dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			elseif master_style < 5:
				$text[1] += ' Perhaps attending to your own appearance would elicit a better performance.'
			end
			if is_perv ! 0 and no_loli ! 1:
				if dynslave['age'] = CONST_INT['loli_age']:
					master_perv_rate += 2 + dynslave['beauty']
					master_excitement_rate += (master_libido * dynslave['beauty'])/2
					if no_loli = 2: $text[1] += ' You are struck by the beauty of her young body.'
				elseif dynslave['age'] = CONST_INT['milf_age']:
					$text[1] += ' You<<iif(dynslave["age"] + dynslave["boobs"] > 5, "<i> really</i>", "")>> wish her body was more lithe.'
				end
			end
			house_mess_rate += 3
			dynslave_rate['hygiene'] += 10
		}
		if hall = 1: $place = 'hall'
	}
end

if interaction = 54133: dynamic $replace($interaction_entertain_striptease, 'dyn'+'slave', 'slave')
if interaction = 5504: dynamic $replace($interaction_entertain_striptease, 'dyn'+'slave', 'assistant')

if code_defined['interaction_entertain_erotic_show'] = 0:
	code_defined['interaction_entertain_erotic_show'] = 1 &! do-once

	$interaction_entertain_erotic_show = {
		$interaction_type = 'make_dynslave_do'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 1 &! same tier as dildo lesson
		interaction_dynslave['motivation_repulse'] = 7 - master_style &! diligence will improve with 3+ aura stats, low master allure impedes diligence in this task - ImperatorAugustus
		shameful = 1
		$refuse_txt = '  <<$dynslave_name>> refuses to entertain you with an erotic show. Looks like she needs to be taught a lesson of obedience.'
		$subskill = 'slave["sub_seduce"]'
		$subskill_xp = 'slave["sub_seduce_xp"]'
		$target_affinity = 'exhibitionism'
		$special_part = {
			slave_skill = min(interaction_dynslave['diligence'], 1 + (1 + dynslave['roleplay'] + dynslave['expression'])/2)
			$bg_path = func('display_pic', 'dynslave', 'masturbation', 'girls/sex_scenes/')
			$text[1] = $slave_ero_show[slave_skill] &! uses delayed sub-expressions
			interaction_dynslave['erotic_stimulation'] = master_style*2
			master_mood_rate += slave_skill*3
			if slave_skill > 0:
				master_moodlet['pos_show'] = max(master_moodlet['pos_show'], 1 + slave_skill - master_cha)
				if master_libido > 0 and slave_skill >= master_excitement: master_excitement_rate += slave_skill*10
				if slave_skill >= master_libido: master_libido_rate += slave_skill*3
				if dynslave_already_done_today[$str(interaction)] = 0 and interaction_dynslave['diligence'] > 0 and dynslave['pride'] < 4:
					dynslave_rate['temper'] += 1
				end
				dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			elseif master_style < 5:
				$text[1] += ' Perhaps attending to your own appearance would elicit a better performance.'
			end
			if is_perv ! 0 and no_loli ! 1:
				if dynslave['age'] = CONST_INT['loli_age']:
					master_perv_rate += dynslave['beauty']
					master_excitement_rate += (master_libido * dynslave['beauty'])/2
					if no_loli = 2: $text[1] += ' So delightful watching a young girl do nasty things to herself.'
				elseif dynslave['age'] = CONST_INT['milf_age']:
					master_excitement_rate -= (6 - slave_skill) * dynslave['boobs']
					$text[1] += ' Of course, it would be more arousing if <<$dynslave_name>> were not so old.'
				else
					master_excitement_rate -= slave_skill * dynslave['boobs']
				end
			end
			house_mess_rate += 3
			dynslave_rate['hygiene'] += 10
		}
		if hall = 1: $place = 'hall'
	}
end

if interaction = 54134: dynamic $replace($interaction_entertain_erotic_show, 'dyn'+'slave', 'slave')
if interaction = 5505: dynamic $replace($interaction_entertain_erotic_show, 'dyn'+'slave', 'assistant')

if code_defined['interaction_entertain_lesbian_show'] = 0:
	code_defined['interaction_entertain_lesbian_show'] = 1 &! do-once

	$interaction_entertain_lesbian_show = {
		killvar '$return_lock' &! prevent infinite loop from threesome redirect
		$interaction_type = 'make_slave_assistant_do'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 5 &! same tier as licking lesson
		interaction_dynslave['motivation_repulse'] = 8 - master_style &! diligence will improve with 4+ aura stats, low master allure impedes diligence in this task - ImperatorAugustus
		lesbian = 1
		shameful = 1
		$subskill = 'slave["sub_seduce"]'
		$subskill_xp = 'slave["sub_seduce_xp"]'
		$target_affinity = 'homosexualism'
		$refuse_txt = '  <<$dynslave_name>> refuses to entertain you with a lesbian show. Looks like she needs to be taught a lesson of obedience.'
		$special_part = {
			slave_skill = min( (interaction_slave['diligence'] + interaction_assistant['diligence'])/3, (1 + slave['roleplay'] + assistant['roleplay'])/3 ) &! zero causes guilt - ImperatorAugustus
			$bg_path = func('display_pic', 'slave, assistant', 'lesbo', 'girls/sex_scenes/')
			$text[1] = $slave_lesbo_show[slave_skill]
			interaction_slave['erotic_stimulation'] = master_style
			interaction_assistant['erotic_stimulation'] = master_style
			if slave_skill > 0:
				master_moodlet['pos_show'] = max(master_moodlet['pos_show'], 2 + slave_skill - master_cha)
				if master_libido > 0 and slave_skill >= master_excitement: master_excitement_rate += slave_skill*10
				if slave_skill >= master_libido: master_libido_rate += slave_skill*3
				!added slave impacts, removed extraneous sin checks - ImperatorAugustus
				if slave_already_done_today[$str(interaction)] = 0 and interaction_slave['diligence'] > 0 and slave['pride'] < 4:
					slave_rate['temper'] += 1
				end
				if assistant_already_done_today[$str(interaction)] = 0 and interaction_assistant['diligence'] > 0 and assistant['pride'] < 4:
					assistant_rate['temper'] += 1
				end
				slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
				assistant['calories'] -= 1 & assistant_rate['stamina'] += min(interaction_assistant['diligence'], 1)
			elseif master_style < 5:
				$text[1] += ' Perhaps attending to your own appearance would elicit a better performance.'
			end
			if is_perv ! 0 and no_loli ! 1:
				if assistant['age'] = CONST_INT['loli_age'] and slave['age'] = CONST_INT['loli_age']:
					if slave_skill >= master_libido: master_perv_rate += slave['beauty'] + assistant['beauty']
					if slave_skill >= master_excitement: master_excitement_rate += slave_skill * (slave['beauty'] + assistant['beauty'])
					if no_loli = 2: $text[1] += ' So delightful watching young girls at play.'
				else
					master_excitement_rate -= slave_skill * (assistant['boobs'] + slave['boobs'])
					if assistant['boobs'] > 2 and slave['boobs'] > 2: $text[1] += ' Of course, you do wish their boobs were smaller.'
				end
			end
			! energy drops are done by interaction_result
			house_mess_rate += 5
			slave_rate['hygiene'] += 10
			assistant_rate['hygiene'] += 10
		}
		if hall = 1: $place = 'hall'
	}
end

if interaction = menu_lesbianshow or interaction = menu_lesbianshow_assistant: dynamic $replace($interaction_entertain_lesbian_show, 'dyn'+'slave', 'slave') &! always use slave as primary even if initiated from assistant menu

!dog show
if interaction = 54136:
	$interaction_type = 'make_slave_do'
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
	interaction_slave['repulse'] = iif(dynslave['virginity'] < 1, 20, 19) &! same as dog mating lesson
	interaction_slave['motivation_repulse'] = 4 &! diligence will improve with maxed aura stats - ImperatorAugustus
	disgusting = 1
	shameful = 1
	slave_skill = (slave['roleplay'] + 5 - slave['pride'] + slave['sub_zoosex'] + 1)/3
	if slave_skill > 2: orgastic = 1
	$refuse_txt = '  <<$slave_name>> refuses to entertain you with a bestiality show. Looks like she needs to be taught a lesson in obedience.'
	$subskill = 'slave["sub_zoosex"]'
	$subskill_xp = 'slave["sub_zoosex_xp"]'
	sex_quality = 2 &! for perv_rate in interaction_result
	$special_part = {
		slave_skill = min(slave_skill, interaction_slave['diligence'])
		$bg_path = func('display_pic', 'slave', 'dog', 'girls/sex_scenes/')
		$play_sound[2] = $fuck_sound[slave['age']]
		$text[1] = $slave_dog_show[slave_skill] &! uses delayed sub-expressions
		interaction_slave['erotic_stimulation'] = slave_skill
		ejaculation_intensity = 0 &! master is not involved
		if slave['sub_zoosex'] > 1:
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
			slave['cum_load'] += rand((slave['sub_zoosex']+slave['sub_vaginal'])/4, (slave['sub_zoosex']+slave['sub_vaginal'])/2) &! for cow (a more skilled slave can extract more semen)
		end
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		if slave_skill > 0:
			master_moodlet['pos_show'] = max(master_moodlet['pos_show'], 2 + slave_skill - master_cha)
			if master_libido > 0 and slave_skill >= master_excitement: master_excitement_rate += slave_skill*10
			if slave_skill >= master_libido: master_libido_rate += slave_skill*3
			if slave_already_done_today[$str(interaction)] = 0 and interaction_slave['diligence'] > 0 and slave['pride'] < 4:
				slave_rate['temper'] += 1
			end
		end
		slave_rate['pride'] -= 2
		house_mess_rate += 20
		slave_rate['hygiene'] += 40
	}
	if hall = 1: $place = 'hall'
end

if code_defined['interaction_relaxed_vaginal'] = 0:
	code_defined['interaction_relaxed_vaginal'] = 1 &! do-once

	$interaction_relaxed_vaginal = {
		$interaction_type = 'make_dynslave_do'
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 8, 4) &! same as vaginal sex lesson
		interaction_dynslave['motivation_repulse'] = 7 - master_style &! diligence will improve with 3+ aura stats, low master allure impedes diligence in this task - ImperatorAugustus
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		if master_penetration > 2: orgastic = 1
		if dynslave['moral'] < 1: shameful = 1 &! interacts with slave exhibitionism trait when non-devoted slave is exposed to master - ImperatorAugustus
		$refuse_txt = '  <<$dynslave_name>> refuses to have sex with you. Well, if she prefers rape - it is easy to arrange…'
		$subskill = 'slave["sub_vaginal"]'
		$subskill_xp = 'slave["sub_vaginal_xp"]'
		sex_ability = (1 + dynslave['roleplay'] + dynslave['oral'] + dynslave['sub_vaginal']*2)/4
		sex_quality = min(5, max(1, sex_ability))
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'sex', 'girls/sex_scenes/')
			if dynslave['virginity'] < 2: $bg_path = func('display_pic', 'dynslave', 'defloration', 'girls/sex_scenes/')
			$play_sound[1] = $fuck_sound[dynslave['age']]
			if rebell[$dynslave_psy_status] < 0:
				if interaction_dynslave['diligence'] > 0: interaction_dynslave['diligence'] = 1
				$text[1] = $slave_seduction[0] &! uses delayed sub-expressions
				$text[2] = $slave_foreplay[0] &! uses delayed sub-expressions
				$text[3] = $slave_fuck[0] &! uses delayed sub-expressions
			else
				$text[1] = $slave_seduction[min(interaction_dynslave['diligence'], 1 + dynslave['roleplay'])] &! uses delayed sub-expressions
				$text[2] = $slave_foreplay[min(interaction_dynslave['diligence'], 1 + dynslave['oral'])] &! uses delayed sub-expressions
				$text[3] = $slave_fuck[min(interaction_dynslave['diligence'], 1 + dynslave['sub_vaginal'])] &! uses delayed sub-expressions
			end
			interaction_dynslave['erotic_stimulation'] = master_penetration + 1
			ejaculation_intensity = sex_quality
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate
			dynslave['pos_gentle'] = max(dynslave['pos_gentle'], 2)
			dynamic $master_energy_drop &! slave energy drop is handled in interaction_result
			dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
			house_mess_rate += 10
			master_hygiene_rate += 15
			dynslave_rate['hygiene'] += 15
		}
		$place = 'bedroom'
	}
end

if interaction = 5414: dynamic $replace($interaction_relaxed_vaginal, 'dyn'+'slave', 'slave')
if interaction = 441: dynamic $replace($interaction_relaxed_vaginal, 'dyn'+'slave', 'assistant')

if code_defined['interaction_relaxed_anal'] = 0:
	code_defined['interaction_relaxed_anal'] = 1 &! do-once

	$interaction_relaxed_anal = {
		$interaction_type = 'make_dynslave_do'
		interaction_dynslave['repulse'] = 11 &! same as anal sex lesson
		interaction_dynslave['motivation_repulse'] = 8 - master_style &! diligence will improve with 4+ aura stats, low master allure impedes diligence in this task - ImperatorAugustus
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		if dynslave['sub_anal'] <= 2: painful = 1
		if dynslave['sub_anal'] > 2 and master_penetration > 2: orgastic = 1
		if dynslave['moral'] < 1: shameful = 1 &! interacts with slave exhibitionism trait when non-devoted slave is exposed to master - ImperatorAugustus
		$refuse_txt = '  <<$dynslave_name>> refuses to have sex with you. Well, if she prefers rape - it is easy to arrange…'
		$subskill = 'slave["sub_anal"]'
		$subskill_xp = 'slave["sub_anal_xp"]'
		sex_ability = (1 + dynslave['roleplay'] + dynslave['sub_anal']*2)/3
		sex_quality = min(5, max(1, sex_ability))
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'analsex', 'girls/sex_scenes/')
			$play_sound[1] = $assfuck_sound[dynslave['age']]
			if rebell[$dynslave_psy_status] < 0:
				if interaction_dynslave['diligence'] > 0: interaction_dynslave['diligence'] = 1
				$text[1] = $slave_seduction_anal[0] &! uses delayed sub-expressions
				$text[2] = $slave_foreplay_anal[0] &! uses delayed sub-expressions
				$text[3] = $slave_fuck_anal[0] &! uses delayed sub-expressions
			else
				$text[1] = $slave_seduction_anal[min(interaction_dynslave['diligence'], 1 + dynslave['roleplay'])] &! uses delayed sub-expressions
				$text[2] = $slave_foreplay_anal[min(interaction_dynslave['diligence'], 1 + dynslave['sub_anal'])] &! uses delayed sub-expressions
				!text2 was based on oral, but the text does not have that much to do with oral and you get weird continuity issues - on knees then on back
				$text[3] = $slave_fuck_anal[min(interaction_dynslave['diligence'], 1 + dynslave['sub_anal'])] &! uses delayed sub-expressions
			end
			interaction_dynslave['erotic_stimulation'] = master_penetration
			ejaculation_intensity = sex_quality
			if ejaculation_intensity > 0:
				master_penetration_rate += (skill_adv_mul * 2)
				dynamic $master_ejaculate
			end
			if dynslave['ill'] > 0 and master_ill = 0 and rand(1,6) > master_str: master_ill = 1
			if dynslave['ill'] = 0 and master_ill > 0 and rand(1,6) > dynslave['stamina']: dynslave['ill'] = 1
			dynslave['pos_gentle'] = max(dynslave['pos_gentle'], 2)
			dynslave_rate['pride'] -= 1
			dynamic $master_energy_drop &! slave energy drop is handled in interaction_result
			dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
			house_mess_rate += 10
			master_hygiene_rate += 20
			dynslave_rate['hygiene'] += 20
		}
		$place = 'bedroom'
	}
end

if interaction = 54141: dynamic $replace($interaction_relaxed_anal, 'dyn'+'slave', 'slave')
if interaction = 4411: dynamic $replace($interaction_relaxed_anal, 'dyn'+'slave', 'assistant')

if code_defined['interaction_relaxed_oral'] = 0:
	code_defined['interaction_relaxed_oral'] = 1 &! do-once

	$interaction_relaxed_oral = {
		$interaction_type = 'make_dynslave_do'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = 6 &! same as blowjob lesson
		interaction_dynslave['motivation_repulse'] = 6 - master_style &! diligence will improve with 2+ aura stats, low master allure impedes diligence in this task - ImperatorAugustus
		easy_for_master = 1 &! lower energy consumption for master makes this more competitive with vaginal and anal - ImperatorAugustus
		if dynslave['oral'] > 3: orgastic = 1
		$refuse_txt = '  <<$dynslave_name>> refuses to have sex with you. Well, if she prefers rape - it is easy to arrange…'
		$subskill = 'slave["sub_bj"]'
		$subskill_xp = 'slave["sub_bj_xp"]'
		sex_ability = (1 + dynslave['roleplay'] + dynslave['oral']*2)/3
		sex_quality = min(5, max(1, sex_ability))
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'bj', 'girls/sex_scenes/')
			$play_sound[1] = $bj_sound[dynslave['age']]
			if rebell[$dynslave_psy_status] < 0:
				if interaction_dynslave['diligence'] > 0: interaction_dynslave['diligence'] = 1
				$text[1] = $slave_seduction_oral[0] &! uses delayed sub-expressions
				$text[2] = $slave_foreplay_oral[0] &! uses delayed sub-expressions
				$text[3] = $slave_fuck_oral[0] &! uses delayed sub-expressions
				if dynslave['oral'] > 0: interaction_dynslave['erotic_stimulation'] = master_excitement
			else
				$text[1] = $slave_seduction_oral[min(interaction_dynslave['diligence'], 1 + dynslave['roleplay'])] &! uses delayed sub-expressions
				$text[2] = $slave_foreplay_oral[min(interaction_dynslave['diligence'], 1 + dynslave['oral'])] &! uses delayed sub-expressions
				$text[3] = $slave_fuck_oral[min(interaction_dynslave['diligence'], 1 + dynslave['oral'])] &! uses delayed sub-expressions
				if dynslave['oral'] > 0: interaction_dynslave['erotic_stimulation'] = max(master_style - 1, master_excitement)
			end
			ejaculation_intensity = sex_quality
			if ejaculation_intensity > 0:
				master_penetration_rate += (skill_adv_mul * 2)
				dynamic $master_ejaculate
			end
			if rand(1,12) = 1 and dynslave['ill'] = 0 and master_ill > 0 and rand(1,6) > dynslave['stamina']: dynslave['ill'] = 1 &! disease transmission only from master to slave
			dynslave['pos_gentle'] = max(dynslave['pos_gentle'], 2)
			dynamic $master_energy_drop &! slave energy drop is handled in interaction_result
			house_mess_rate += 3
			master_hygiene_rate += 5
			dynslave_rate['hygiene'] += 10
		}
		$place = 'bedroom'
	}
end

if interaction = 54142: dynamic $replace($interaction_relaxed_oral, 'dyn'+'slave', 'slave')
if interaction = 4412: dynamic $replace($interaction_relaxed_oral, 'dyn'+'slave', 'assistant')

if code_defined['interaction_active_sex'] = 0:
	code_defined['interaction_active_sex'] = 1 &! do-once

	$interaction_active_sex = {
		$interaction_type = 'special'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = -10 &! obedience is also checked inside the mini-game - ImperatorAugustus
		dynamic $replace($dyn_sex_acceptance, 'dyn'+'slave', 'dynslave')
		dynamic $replace($dyn_repulse_check, 'dyn'+'slave', 'dynslave')
		$place = 'bedroom'
		if interaction_dynslave['res'] < 0:
			show_dynslave_fullimage = 1
			$text[1] = '  <<$dynslave_name>> refuses to have sex with you. Well, if she prefers rape - it is easy to arrange…'
			dynamic $sin_gained_now, 'dynslave'
		else
			!TODO: why were we incrementing these here instead of at the end? - ImperatorAugustus
			!master_penetration_rate += (skill_adv_mul * 3)
			!master_oral_rate += (skill_adv_mul * 3)
			!master_petting_rate += (skill_adv_mul * 3)
			!master_fetish_rate += (skill_adv_mul * 2)
			!if dynslave['ego'] >= master_domination: master_domination_rate += (skill_adv_mul * 1)
			!if is_perv ! 0 and dynslave['age'] = CONST_INT['loli_age'] and dynslave['ego'] >= master_domination: master_domination_rate += (skill_adv_mul * 3)
			!dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			if debug_interactions ! 2: gt 'sex_initiate'
		end
	}
end

if interaction = 5415: $sex_partner = '' & dynamic $replace($interaction_active_sex, 'dyn'+'slave', 'slave')
if interaction = 44: $sex_partner = 'assistant' & dynamic $replace($interaction_active_sex, 'dyn'+'slave', 'assistant')

!Threesome - non-lesson type - with assistant - similar to relaxed vaginal, anal, and oral sex - improved and fixed - crushboss
if interaction = menu_threesome:
	$interaction_type = 'make_slave_assistant_do'
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	interaction_slave['repulse'] = iif(slave['virginity'] < 1, 9, 8) &! same as threesome lesson
	interaction_slave['motivation_repulse'] = 5 - (slave['oral'] + slave['sub_vaginal'])/2
	lesbian = 1
	orgastic = 1
	$subskill = 'slave["sub_threesome"]'
	$subskill_xp = 'slave["sub_threesome_xp"]'
	$target_affinity = 'homosexualism'
	DISABLESUBEX=1
	$refuse_txt = '  <<$dynslave_name>> refuses to have sex with a woman. Looks like she needs to be taught a lesson in obedience.'
	DISABLESUBEX=0
	sex_ability = (assistant['roleplay'] + assistant['oral'] + assistant['penetration'] + slave['roleplay'] + slave['oral'] + slave['penetration'])/6
	sex_quality = min(5, max(1, sex_ability * 2))
	$special_part = {
		if master_excitement < 0:
			$bg_path = 'scene/flaccid'
			g = rand(1, picMax["flaccid"])
			if g > 1: $bg_path += '_' + $str(g)
			$text[1] = '  Unfortunately, you are unable to rise to the occasion, so it becomes a lesbian show instead of the threesome you intended.'
			$special_action[1] = { $return_lock = 'interaction' & interaction = menu_lesbianshow }
			$interaction_type = 'special' &! skip interaction_result - ImperatorAugustus
		else
			slave_skill = 1 &! TODO: currently always successful because $trio_sex_description currently has no failure variant - ImperatorAugustus
			$bg_path = func('display_pic', 'slave, assistant', 'threesome', 'girls/sex_scenes/')
			if slave['virginity'] < 2: $bg_path = func('display_pic', 'slave', 'defloration', 'girls/sex_scenes/')
			$play_sound[1] = $slopy[0]
			$text[1] = $trio_sex_description[rand(1,5)]
			slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
			assistant['calories'] -= 1 & assistant_rate['stamina'] += min(interaction_assistant['diligence'], 1)
			interaction_slave['erotic_stimulation'] = master_fetish
			interaction_assistant['erotic_stimulation'] = master_fetish
			ejaculation_intensity = max(2, sex_quality)
			if is_perv ! 0 and no_loli ! 1:
				if slave['age'] = CONST_INT['loli_age'] and assistant['age'] = CONST_INT['loli_age']:
					master_perv_rate += slave['beauty']
					master_perv_rate += assistant['beauty']
				elseif slave['age'] = CONST_INT['loli_age']:
					master_perv_rate += slave['beauty']
					if assistant['boobs'] > 2:
						$text[1] += ' Of course, you do wish <<$assistant_name>> did not have udders like a cow.'
						master_excitement_rate -= sex_quality * assistant['boobs']
					end
				elseif assistant['age'] = CONST_INT['loli_age']:
					master_perv_rate += assistant['beauty']
					if slave['boobs'] > 2:
						$text[1] += ' Of course, you do wish <<$slave_name>> did not have udders like a cow.'
						master_excitement_rate -= sex_quality * slave['boobs']
					end
				elseif assistant['boobs'] > 2 and slave['boobs'] > 2:
					$text[1] += ' Of course, you do wish they did not have udders like cows.'
					master_excitement_rate -= sex_quality * (assistant['boobs'] + slave['boobs'])
				end
			end
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'assistant') &! includes $master_ejaculate
			dynamic $master_energy_drop &! slave and assistant are handled by interaction_result
			house_mess_rate += 15
			master_hygiene_rate += 15
			slave_rate['hygiene'] += 15
			assistant_rate['hygiene'] += 15
		end
	}
	$place = 'bedroom'
end

!Threesome - non-lesson type - no assistant required - similar to relaxed vaginal, anal, and oral sex - option added by crushboss
if interaction = menu_threesome_noassistant:
	$interaction_type = 'make_slave_do'
	interaction_slave['repulse'] = iif(slave['virginity'] < 1, 9, 8) &! same as threesome lesson
	interaction_slave['motivation_repulse'] = 5 - (slave['oral'] + slave['sub_vaginal'])/2
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	lesbian = 1
	orgastic = 1
	$subskill = 'slave["sub_threesome"]'
	$subskill_xp = 'slave["sub_threesome_xp"]'
	$target_affinity = 'homosexualism'
	$refuse_txt = '  <<$slave_name>> refuses to have sex with a woman. Looks like she needs to be taught a lesson in obedience.'
	sex_ability = (slave['roleplay'] + slave['oral'] + slave['penetration'] + 9)/6 &! equivalent to a B+ skilled assistant
	sex_quality = min(5, max(1, sex_ability * 2))
	$special_part = {
		if master_excitement < 0:
			$bg_path = 'scene/flaccid'
			g = rand(1, picMax["flaccid"])
			if g > 1: $bg_path += '_' + $str(g)
			$text[1] = '  Unfortunately, you are unable to rise to the occasion, so it becomes a lesbian show instead of the threesome you intended.'
			$special_action[1] = { $return_lock = 'interaction' & interaction = menu_lesbianshow }
			$interaction_type = 'special' &! skip interaction_result - ImperatorAugustus
		else
			sparks -= 1 &! cost of hiring a whore
			$bg_path = func('display_pic', 'slave, <<$slave_les_txt5>>', 'threesome', 'girls/sex_scenes/') &! slave, general because no assistant
			if slave['virginity'] < 2: $bg_path = func('display_pic', 'slave', 'defloration', 'girls/sex_scenes/')
			$play_sound[1] = $slopy[0]
			$text[1] = $threesome_noassistant_description[slave['sub_threesome']] &! TODO - adapt $trio_sex_description[rand(1,5)] for non-assistant
			slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
			interaction_slave['erotic_stimulation'] = master_fetish
			ejaculation_intensity = max(2, sex_quality)
			if is_perv ! 0 and no_loli ! 1:
				if slave['age'] = CONST_INT['loli_age']:
					master_perv_rate += slave['beauty']
				elseif slave['boobs'] > 2:
					$text[1] += ' Of course, you do wish <<$slave_name>> did not have udders like a cow.'
					master_excitement_rate -= sex_quality * slave['boobs']
				end
			end
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate
			house_mess_rate += 15
			master_hygiene_rate += 15
			slave_rate['hygiene'] += 15
		end
	}
	$place = 'bedroom'
end

!rape
if interaction = 161:
	$interaction_type = 'rape'
	! rape interactions do not use repulse, they calculate a will to resist and have a chance to fight back based on that and relative strength - ImperatorAugustus
	stimulating = 1 &! although non-consensual, still stimulates and can trigger orgasms
	orgastic = 1
	painful = 1
	$subskill = 'slave["sub_vaginal"]'
	$subskill_xp = 'slave["sub_vaginal_xp"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'rape', 'girls/torture_scenes/rape/')
		if slave['virginity'] < 2: $bg_path = func('display_pic', 'slave', 'defloration', 'girls/sex_scenes/')
		$play_sound[1] = $fuck_sound[slave['age']]
		$text[1] = $rape_description
		$text[2] = $rape_reaction[$slave_psy_status]
		if $slave_psy_status = 'broken':
			$text[3] = $rape_conclusion[1]
		else
			$text[3] = $rape_conclusion[max(slave['virginity'] - 1, min(slave['arousal'], slave['moral'], slave['sub_vaginal']))]
		end
		interaction_slave['erotic_stimulation'] = master_penetration
		ejaculation_intensity = max(1, slave['beauty'])
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate and raises master_penetration_rate
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
		house_mess_rate += 15
		master_hygiene_rate += 20
		slave_rate['hygiene'] += 20
	}
	$place = 'bedroom'
end

!oral rape
if interaction = 162:
	$interaction_type = 'rape'
	! rape interactions do not use repulse, they calculate a will to resist and have a chance to fight back based on that and relative strength - ImperatorAugustus
	stimulating = 1 &! although non-consensual, still stimulates and can trigger orgasms
	disgusting = 1
	painful = 1
	$subskill = 'slave["sub_dt"]'
	$subskill_xp = 'slave["sub_dt_xp"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'dt', 'girls/sex_scenes/')
		$play_sound[1] = $throatfuck_sound[slave['age']]
		$text[1] = $oral_rape_description
		$text[2] = $rape_reaction[$slave_psy_status]
		$text[3] = $oral_rape_conclusion[slave['sub_dt']]
		interaction_slave['erotic_stimulation'] = 1
		ejaculation_intensity = max(1, slave['beauty'])
		dynamic $master_ejaculate
		master_penetration_rate += (skill_adv_mul * 1)
		if rand(1,12) = 1 and dynslave['ill'] = 0 and master_ill > 0 and rand(1,6) > dynslave['stamina']: dynslave['ill'] = 1 &! disease transmission only from master to slave
		master_str_rate += iif(master_str < 4, 1, 0) &! master does the work so it qualifies as exercise - ImperatorAugustus
		house_mess_rate += 10
		master_hygiene_rate += 10
		slave_rate['hygiene'] += 15
	}
	$place = 'bedroom'
end

!anal rape
if interaction = 163:
	$interaction_type = 'rape'
	! rape interactions do not use repulse, they calculate a will to resist and have a chance to fight back based on that and relative strength - ImperatorAugustus
	stimulating = 1 &! although non-consensual, still stimulates and can trigger orgasms
	painful = 1
	disgusting = 1
	$subskill = 'slave["sub_anal"]'
	$subskill_xp = 'slave["sub_anal_xp"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'analsex', 'girls/sex_scenes/')
		$play_sound[1] = $fuck_sound[slave['age']]
		$text[1] = $anal_rape_description
		$text[2] = $rape_reaction[$slave_psy_status]
		$text[3] = $anal_rape_conclusion[slave['sub_anal']]
		interaction_slave['erotic_stimulation'] = master_penetration
		ejaculation_intensity = max(1, slave['beauty'])
		dynamic $master_ejaculate
		master_penetration_rate += (skill_adv_mul * 1)
		if master_ill = 0 and slave['ill'] > 0 and rand(1,6) > master_str and rand(1,3) = 1: master_ill = 1
		if master_ill > 0 and slave['ill'] = 0 and rand(1,6) > slave['stamina'] and rand(1,3) = 1: slave['ill'] = 1
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
		house_mess_rate += 30
		master_hygiene_rate += 30
		slave_rate['hygiene'] += 30
	}
	$place = 'bedroom'
end

!unconscious rape
if interaction = 171:
	$interaction_type = 'rape'
	! rape interactions do not use repulse, they calculate a will to resist and have a chance to fight back based on that and relative strength - but unconscious slaves cannot resist - ImperatorAugustus
	stimulating = 1 &! although unconscious, still arouses and can trigger orgasms
	orgastic = 1
	bruising = 1
	$special_part = {
		damage = rand(5,10)
		if slave['age'] = CONST_INT['loli_age']: damage *= 2
		damage -= master_penetration
		dynamic $replace($dyn_slave_damaged, 'dyn'+'slave', 'slave')

		interaction_slave['erotic_stimulation'] = min(1, master_excitement)
		ejaculation_intensity = max(1, slave['beauty'])
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate and raises master_penetration_rate
		if is_perv ! 0 and no_loli ! 1 and slave['age'] = CONST_INT['loli_age']: master_perv_rate += 4
		master_str_rate += iif(master_str < 4, 1, 0) &! master does the work so it qualifies as exercise - ImperatorAugustus

		$bg_path = 'girls\torture_scenes\nonrandom\rape_sleep_v<<slave["age"]>>'
		if slave['stamina'] < 1 and slave_rate['wounds'] > 63 and slave_already_done_today[$str(interaction)] > 0:
			$text[1] = $rape_unconscious_died
			dynamic $clear_slave_instance, 'slave'
		else
			$text[1] = $rape_unconscious
			slave_rate['hygiene'] += 20
			slave_rate['stamina'] -= 1
		end
		house_mess_rate += 15
		master_hygiene_rate += 20
	}
	$place = 'bedroom'
end

!unconscious oral rape
if interaction = 172:
	$interaction_type = 'rape'
	! rape interactions do not use repulse, they calculate a will to resist and have a chance to fight back based on that and relative strength - but unconscious slaves cannot resist - ImperatorAugustus
	stimulating = 1 &! although unconscious, still arouses and can trigger orgasms
	orgastic = 0
	bruising = 1
	$special_part = {
		damage = rand(1,4)
		if slave['age'] ! CONST_INT['loli_age']: damage -= 2
		damage -= master_penetration
		dynamic $replace($dyn_slave_damaged, 'dyn'+'slave', 'slave')

		interaction_slave['erotic_stimulation'] = min(1, master_excitement)
		ejaculation_intensity = max(1, slave['beauty'])
		dynamic $master_ejaculate
		master_penetration_rate += (skill_adv_mul * 1)
		if is_perv ! 0 and no_loli ! 1 and slave['age'] = CONST_INT['loli_age']: master_perv_rate += 4
		if rand(1,12) = 1 and dynslave['ill'] = 0 and master_ill > 0 and rand(1,6) > dynslave['stamina']: dynslave['ill'] = 1 &! disease transmission only from master to slave
		master_str_rate += iif(master_str < 4, 1, 0) &! master does the work so it qualifies as exercise - ImperatorAugustus

		$bg_path = 'girls\torture_scenes\nonrandom\rape_sleep_o<<slave["age"]>>'
		if damage > 1 and slave_already_done_today[$str(interaction)] > 0:
			$text[1] = $rape_unconscious_oral_died
			dynamic $clear_slave_instance, 'slave'
		else
			$text[1] = $rape_unconscious_oral
			slave_rate['hygiene'] += 20
			slave_rate['stamina'] -= 1
		end
		house_mess_rate += 10
		master_hygiene_rate += 10
	}
	$place = 'bedroom'
end

!unconscious anal rape
if interaction = 173:
	$interaction_type = 'rape'
	! rape interactions do not use repulse, they calculate a will to resist and have a chance to fight back based on that and relative strength - but unconscious slaves cannot resist - ImperatorAugustus
	stimulating = 1 &! although unconscious, still arouses and can trigger orgasms
	if slave['sub_anal'] > 2: orgastic = 1
	painful = 1
	bruising = 1
	$special_part = {
		damage = rand(7,12)
		if slave['age'] = CONST_INT['loli_age']: damage *= 2
		damage -= master_penetration
		dynamic $replace($dyn_slave_damaged, 'dyn'+'slave', 'slave')

		interaction_slave['erotic_stimulation'] = min(1, master_excitement)
		ejaculation_intensity = max(1, slave['beauty'])
		dynamic $master_ejaculate
		master_penetration_rate += (skill_adv_mul * 1)
		if is_perv ! 0 and no_loli ! 1 and slave['age'] = CONST_INT['loli_age']: master_perv_rate += 4
		if master_ill = 0 and slave['ill'] > 0 and rand(1,6) > master_str and rand(1,3) = 1: master_ill = 1
		if master_ill > 0 and slave['ill'] = 0 and rand(1,6) > slave['stamina'] and rand(1,3) = 1: slave['ill'] = 1
		master_str_rate += iif(master_str < 4, 1, 0) &! master does the work so it qualifies as exercise - ImperatorAugustus

		$bg_path = 'girls\torture_scenes\nonrandom\rape_sleep_a<<slave["age"]>>'
		if slave['stamina'] < 1 and slave_rate['wounds'] > 63 and slave_already_done_today[$str(interaction)] > 0:
			$text[1] = $rape_unconscious_anal_died
			dynamic $clear_slave_instance, 'slave'
		else
			$text[1] = $rape_unconscious_anal
			slave_rate['hygiene'] += 30
			slave_rate['stamina'] -= 1
		end
		house_mess_rate += 30
		master_hygiene_rate += 30
	}
	$place = 'bedroom'
end

!Beat (unconscious)
if interaction = 174:
	$interaction_type = 'torture'
	torture_intensity = 5
	painful = 1
	bruising = 1
	sensitivity_threshold = 0
	torturer_skill = (1 + master_str + master_fighter)/2 &! average rounded up
	interaction_no_auto_energy_drop = 1
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'beat_sleep', 'girls/torture_scenes/battering/', 'any_age')
		$text[1] = $unconscious_beat
		$play_sound[1] = $fist_hit_sound[slave['age']]
		damage = master_str + master_fighter
		dynamic $replace($dyn_slave_damaged, 'dyn'+'slave', 'slave')
		dynamic $master_energy_drop
		slave_rate['hygiene'] += 20
		master_hygiene_rate += 10
		house_mess_rate += 15
		!master domination skill will be increased automatically
		master_str_rate += iif(master_str < 4, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Out with the trash
if interaction = 175:
	$place = 'study'
	npc = 0 & $picture_type = 'slave_picture'
	if slave_already_done_total[$str(interaction)] = 0: slave['threat_abandon'] = 0
	tmp_clothes = 0
	tmp_jewelry = 0
	if $item_name[$slave['cloth']] ! ''       and $item_name[$slave['cloth']] ! '-' and $item_name[$slave['cloth']] ! 'Naked': tmp_clothes = 1
	if $item_name[$slave['ring_left']] ! ''   and $item_name[$slave['ring_left']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['ring_right']] ! ''  and $item_name[$slave['ring_right']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['earrings']] ! ''    and $item_name[$slave['earrings']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['tongue']] ! ''      and $item_name[$slave['tongue']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['nipplerings']] ! '' and $item_name[$slave['nipplerings']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['navel']] ! ''       and $item_name[$slave['navel']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['clitring']] ! ''    and $item_name[$slave['clitring']] ! '-': tmp_jewelry = 1
	$text[1] = '  <<$slave_name>> is useless to you unconscious and <<$slave_girls4_txt[slave["age"]]>> are so cheap here that you might as well throw this one out and buy a new one. '
	if tmp_clothes + tmp_jewelry ! 0:
		$text[1] += 'Unfortunately, her '
		if tmp_clothes + tmp_jewelry = 2:
			$text[1]+= 'clothing and jewelry are '
		elseif tmp_clothes = 1:
			$text[1]+= 'clothing is '
		else
			$text[1]+= 'jewelry is '
		end
		$text[1]+= 'worthless to keep, being bound to her. As '
	else
		$text[1] += 'Being '
	end
	$text[1] += 'a conscientious citizen, you will of course tie the <<$slave_noun5[slave["age"]]>> hand and foot before putting her out so she will be less trouble for whoever finds her.<br><br>' + _
				'  Leave her at the curb with the rest of the household waste?'
	$yes = {
		dynamic $clear_slave_instance, 'slave'
		gt 'menu_form'
	}
	$no = {
		gt 'menu_form'
	}
	menu_form = 0
	if debug_interactions ! 2: gt 'choice_screen'
end

!!!!MAID LESSONS!!!!

!Personal lesson on housekeeping
if interaction = 1211:
	if house_mess < 1:
		$info_text = 'Now the house is clean and tidy. In order to conduct an effective practice session for cleaning - you need at least a minimal mess. You know that it will inevitably appear. Soon.'
		if debug_interactions ! 2: gt 'slave_stat'
	end
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -5 + iif(slave['stamina'] < 3, 1, -1) + iif(slave['intellect'] > 2, 1, -1) + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3) &! Maid lesson: (+1 if Endurance is C- or below, +1 if Intellect is B+ or above | vice versa) (+1 per level of Pride B+ or above | vice versa [was -1 if Pride C- or below]) - harder with low endurance, harder with high intellect, harder with high pride, easier with high endurance, easier with low intellect, easier with low pride
	interaction_slave['motivation_repulse'] = 3
	$coach_skill = 'master_butler'
	$target_skill = 'service'
	$target_affinity = 'service_affinity'
	$misc_bonus = 'learn_bonus["service"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'clean', 'girls/normal_scenes/')
		$text[1] = $service_lesson_description[slave['service']] &! uses delayed sub-expressions
		house_mess_rate -= max(8, slave['service']*16)
		dynamic $house_cleaning
		if slave['service'] < 3 and house_mess = 0: house_mess_rate = 10 &! B+ skill or better is needed to reach perfect cleanliness
		if slave['pride'] > 2: slave_rate['pride'] -= 1
		master_hygiene_rate += 5
		slave_rate['hygiene'] += house_mess + 5
	}
end
!Lesson on housekeeping (assistant)
if interaction = 4111:
	if house_mess < 1:
		$info_text = 'Now the house is clean and tidy. In order to conduct an effective practice session for cleaning - you need at least a minimal mess. You know that it will inevitably appear. Soon.'
		if debug_interactions ! 2: gt 'assistant_stat'
	end
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -5 + iif(slave['stamina'] < 3, 1, -1) + iif(slave['intellect'] > 2, 1, -1) + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3)
	interaction_slave['motivation_repulse'] = 3
	$coach_skill = 'assistant["service"]'
	$target_skill = 'service'
	$target_affinity = 'service_affinity'
	$misc_bonus = 'learn_bonus["service"]'
	$special_part = {
		house_mess_rate -= max(8, assistant['service']*16)
		dynamic $house_cleaning
		if assistant['service'] < 3 and house_mess = 0: house_mess_rate = 10 &! B+ skill or better is needed to reach perfect cleanliness
		if slave['pride'] > 2: slave_rate['pride'] -= 1
		assistant_rate['hygiene'] += 5
		slave_rate['hygiene'] += house_mess + 5
	}
end
!Lesson on housekeeping (tutor)
if interaction = 1711:
	if house_mess < 1:
		$info_text = 'Now the house is clean and tidy. In order to conduct an effective practice session for cleaning - you need at least a minimal mess. You know that it will inevitably appear. Soon.'
		if debug_interactions ! 2: gt 'slave_stat'
	end
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -5 + iif(slave['stamina'] < 3, 1, -1) + iif(slave['intellect'] > 2, 1, -1) + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3)
	interaction_slave['motivation_repulse'] = 3
	$target_skill = 'service'
	$target_affinity = 'service_affinity'
	$misc_bonus = 'learn_bonus["service"]'
	$coach = 'jeeves'
	$bg_path = 'characters\master_jeeves'
	$special_part = {
		$text[1] = $service_coach
		sparks -= coach_price[slave['service']]
		house_mess_rate -= max(8, slave['service']*16)
		dynamic $house_cleaning
		if slave['service'] < 3 and house_mess = 0: house_mess_rate = 10 &! B+ skill or better is needed to reach perfect cleanliness
		if slave['pride'] > 2: slave_rate['pride'] -= 1
		slave_rate['hygiene'] += 5
	}
end
!Lesson on housekeeping (school)
if interaction = 561:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -5 + iif(slave['stamina'] < 3, 1, -1) + iif(slave['intellect'] > 2, 1, -1) + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3)
	interaction_slave['motivation_repulse'] = 3
	$target_skill = 'service'
	$target_affinity = 'service_affinity'
	$misc_bonus = 'learn_bonus["service"]'
	$special_part = {
		sparks -= school_price[slave['service']]
		if slave['pride'] > 2: slave_rate['pride'] -= 1
		slave_rate['hygiene'] += 5
	}
	$place = 'class_common'
end

!!!!COOKING LESSONS!!!!

!Personal lesson on cooking
if interaction = 1212:
	if kitchen < 1:
		$info_text = '  You do not have your own kitchen, so you cannot conduct cooking lessons at home.'
		if debug_interactions ! 2: gt 'slave_stat'
	end
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -6
	interaction_slave['motivation_repulse'] = 3
	$coach_skill = 'master_butler'
	$target_skill = 'cook'
	$target_affinity = 'cook_affinity'
	$misc_bonus = 'learn_bonus["cook"]'
	$special_part = {
		slave_skill = min(interaction_slave['diligence'], max(1, slave['cook']))
		$bg_path = func('display_pic', 'slave', 'cook', 'girls/normal_scenes/')
		$text[1] = $cook_lesson_description[slave_skill] &! uses delayed sub-expressions
		gs '$food_choice', slave_skill &! consume ingredients, update last_cooked_food, cooked_food and $cooked_meal - lack of ingredients or skill limits meal quality - will only replace a lower quality meal
		if last_cooked_food < slave_skill: tutor_modifier -= 5 &! sub-par diligence or using cheap ingredients for home cooking slows progress - ImperatorAugustus
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		master_hygiene_rate += house_mess + 4
		slave_rate['hygiene'] += house_mess + 4
		house_mess_rate += 5
	}
	$place = 'kitchen'
end
!Lesson on cooking (assistant)
if interaction = 4112:
	if kitchen < 1:
		$info_text = '  You do not have your own kitchen, so you cannot conduct cooking lessons at home.'
		if debug_interactions ! 2: gt 'assistant_stat'
	end
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -6
	interaction_slave['motivation_repulse'] = 3
	$coach_skill = 'assistant["cook"]'
	$target_skill = 'cook'
	$target_affinity = 'cook_affinity'
	$misc_bonus = 'learn_bonus["cook"]'
	$special_part = {
		slave_skill = min(interaction_slave['diligence'], max(1, slave['cook']))
		gs '$food_choice', slave_skill &! consume ingredients, update last_cooked_food, cooked_food and $cooked_meal - lack of ingredients or skill limits meal quality - will only replace a lower quality meal
		if last_cooked_food < slave_skill: tutor_modifier -= 5 &! sub-par diligence or using cheap ingredients for home cooking 3slows progress - ImperatorAugustus
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		assistant_rate['hygiene'] += house_mess + 4
		slave_rate['hygiene'] += house_mess + 4
		house_mess_rate += 5
	}
end
!Lesson on cooking (tutor)
if interaction = 1712:
	if kitchen < 1:
		$info_text = '  You do not have your own kitchen, so you cannot conduct cooking lessons at home.'
		if debug_interactions ! 2: gt 'slave_stat'
	end
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -6
	interaction_slave['motivation_repulse'] = 3
	$target_skill = 'cook'
	$target_affinity = 'cook_affinity'
	$misc_bonus = 'learn_bonus["cook"]'
	$coach = 'jeeves'
	$bg_path = 'characters\master_jeeves'
	$special_part = {
		$text[1] = $cook_coach
		sparks -= coach_price[slave['cook']]
		slave_skill = min(interaction_slave['diligence'], max(1, slave['cook']))
		gs '$food_choice', slave_skill &! consume ingredients, update last_cooked_food, cooked_food and $cooked_meal - lack of ingredients or skill limits meal quality - will only replace a lower quality meal
		if last_cooked_food < slave_skill: tutor_modifier -= 5 &! sub-par diligence or using cheap ingredients for home cooking slows progress - ImperatorAugustus
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		slave_rate['hygiene'] += house_mess + 4
		house_mess_rate += 5
	}
end
!Lesson on cooking (school)
if interaction = 562:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -6
	interaction_slave['motivation_repulse'] = 3
	$target_skill = 'cook'
	$target_affinity = 'cook_affinity'
	$misc_bonus = 'learn_bonus["cook"]'
	$special_part = {
		sparks -= school_price[slave['cook']]
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		slave_rate['hygiene'] += 4
	}
	$place = 'class_common'
end

!!!!NURSE LESSONS!!!!

!Personal lesson on medicine
!добавлен код прокачки интеллекта для медицины, делопроизводства и алхимии, if diligence > 2 - старание выше двух, т.е. как минимум на троечку, slave['nurse'] < 5 - добавлена для всего на всякий случай, для школы обязательно, т.к. была возможность послать еще раз и получить рейт интеллекта на халяву.
if interaction = 1213:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0) &! Nursing lesson: -5 + (+1 per level of Intellect at C- or less | vice versa) (-1 if Endurance is C- or below | but not vice versa) - harder with low intellect, easier with high intellect, easier with low endurance
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'master_medic'
	$target_skill = 'nurse'
	$target_affinity = 'nurse_affinity'
	$misc_bonus = 'learn_bonus["nurse"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'nurse', 'girls/normal_scenes/')
		$text[1] = $nurse_lesson_description[slave['nurse']] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['intellect'] < 3: $text[2] += ' It does not help that she is not exactly the sharpest knife in the drawer.'
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		master_hygiene_rate += 1 + slave['nurse']
		slave_rate['hygiene'] += 1 + slave['nurse']
		house_mess_rate += 1 + slave['nurse']
	}
	$place = 'bedroom'
end
!Lesson on medicine (assistant)
if interaction = 4113:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'assistant["nurse"]'
	$target_skill = 'nurse'
	$target_affinity = 'nurse_affinity'
	$misc_bonus = 'learn_bonus["nurse"]'
	$special_part = {
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		assistant_rate['hygiene'] += 1 + slave['nurse']
		slave_rate['hygiene'] += 1 + slave['nurse']
		house_mess_rate += 1 + slave['nurse']
	}
end
!Lesson on medicine (tutor)
if interaction = 1713:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'nurse'
	$target_affinity = 'nurse_affinity'
	$misc_bonus = 'learn_bonus["nurse"]'
	$coach = 'marivanna'
	$bg_path = 'characters\mistress_marivanna'
	$special_part = {
		$text[1] = $nurse_coach
		sparks -= coach_price[slave['nurse']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		slave_rate['hygiene'] += 2
		house_mess_rate += 3
	}
end
!Lesson on medicine (school)
if interaction = 563:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'nurse'
	$target_affinity = 'nurse_affinity'
	$misc_bonus = 'learn_bonus["nurse"]'
	$special_part = {
		sparks -= school_price[slave['nurse']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		slave_rate['hygiene'] += 2
	}
	$place = 'class_common'
end

!!!!SECRETARY LESSONS!!!!

!Personal lesson on paperwork
if interaction = 1214:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0) &! Secretary lesson: -5 + (+1 per level of Intellect at C- or less | vice versa) (-1 if Endurance is C- or below | but not vice versa) - harder with low intellect, easier with high intellect, easier with low endurance
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'master_butler'
	$target_skill = 'secretary'
	$target_affinity = 'secretary_affinity'
	$misc_bonus = 'learn_bonus["secretary"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'documents', 'girls/normal_scenes/')
		$text[1] = $secretary_lesson_description[slave['secretary']] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['intellect'] < 3: $text[2] += ' It does not help that she is not exactly the sharpest knife in the drawer.'
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		master_hygiene_rate += 2
		slave_rate['hygiene'] += 2
		house_mess_rate += 2
	}
end
!Lesson on paperwork (assistant)
if interaction = 4114:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'assistant["secretary"]'
	$target_skill = 'secretary'
	$target_affinity = 'secretary_affinity'
	$misc_bonus = 'learn_bonus["secretary"]'
	$special_part = {
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		master_hygiene_rate += 2
		slave_rate['hygiene'] += 2
		house_mess_rate += 2
	}
end
!Lesson on paperwork (tutor)
if interaction = 1714:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'secretary'
	$target_affinity = 'secretary_affinity'
	$misc_bonus = 'learn_bonus["secretary"]'
	$coach = 'marivanna'
	$bg_path = 'characters\mistress_marivanna'
	$special_part = {
		$text[1] = $secretary_coach
		$text[2] = $coach_teaches
		sparks -= coach_price[slave['secretary']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		slave_rate['hygiene'] += 2
		house_mess_rate += 2
	}
end
!Lesson on paperwork (school)
if interaction = 564:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'secretary'
	$target_affinity = 'secretary_affinity'
	$misc_bonus = 'learn_bonus["secretary"]'
	$special_part = {
		sparks -= school_price[slave['secretary']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		slave_rate['hygiene'] += 2
	}
	$place = 'class_common'
end

!!!!FITNESS / GYMNASTICS / SPORTS / ENDURANCE / STAMINA LESSONS!!!!

!Personal lesson on gymnastics and sports and fitness
if interaction = 1221:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -5 + iif(slave['stamina'] > 2, 2 - slave['stamina'], 3 - slave['stamina']) + iif(slave['pride'] > 2, 1, 0) &! Athletics lesson: (-1 per level of Endurance at B+ or more | vice versa) (+1 if Pride is B+ or above | not vice versa) - easier with high endurance, harder with low endurance, harder with high pride, not easier with low pride
	interaction_slave['motivation_repulse'] = 5 - slave['stamina'] &! B+ endurance gains diligence at 3+ aura stats; A+ endurance at 2+ aura stats; S+ endurance at 1+ aura stats
	$coach_skill = 'master_str'
	$target_skill = 'stamina'
	$misc_bonus = 'learn_bonus["stamina"]'
	$target_affinity = 'sport_affinity'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'gym', 'girls/normal_scenes/')
		$text[1] = $gym_lesson_description[slave['stamina']] &! uses delayed sub-expressions
		tutor_modifier += slave['energy'] &! stamina is easier to improve with high energy and much harder to improve with low energy - ImperatorAugustus
		slave['calories'] -= 2 &! stamina increase is handled by $dyn_skill_rise in interaction_result
		if slave['stamina'] = 4 and slave['fat'] > 3: $text[1] += ' Still, she needs to shed some weight in order to improve her endurance further.'
		master_hygiene_rate += 10
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
		if is_perv ! 0 and no_loli ! 1 and slave['age'] = CONST_INT['loli_age']: master_excitement_rate += 3
	}
	if hall = 1: $place = 'hall'
end
!Lesson on gymnastics and sports and fitness (assistant)
if interaction = 4121:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -5 + iif(slave['stamina'] > 2, 2 - slave['stamina'], 3 - slave['stamina']) + iif(slave['pride'] > 2, 1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['stamina']
	$target_skill = 'stamina'
	$target_affinity = 'sport_affinity'
	$misc_bonus = 'learn_bonus["stamina"]'
	$special_part = {
		tutor_modifier += slave['energy'] &! stamina is easier to improve with high energy and much harder to improve with low energy - ImperatorAugustus
		slave['calories'] -= 2 &! stamina increase is handled by $dyn_skill_rise in interaction_result
		assistant['calories'] -= 2 &! stamina increase is handled by $dyn_skill_rise in interaction_result
		if slave['stamina'] = 4 and slave['fat'] > 3: $text[2] += ' She will need to shed some weight in order to improve her endurance further.'
		assistant_rate['hygiene'] += 10
		slave_rate['hygiene'] += 10
		house_mess_rate += 3
	}
end
!Lesson on gymnastics and sports and fitness (tutor)
if interaction = 1721:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -5 + iif(slave['stamina'] > 2, 2 - slave['stamina'], 3 - slave['stamina']) + iif(slave['pride'] > 2, 1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['stamina']
	$target_skill = 'stamina'
	$target_affinity = 'sport_affinity'
	$misc_bonus = 'learn_bonus["stamina"]'
	$coach = 'geralt'
	$bg_path = 'characters\master_geralt'
	$special_part = {
		$text[1] = $stamina_coach
		$text[2] = $coach_teaches
		sparks -= coach_price[slave['stamina']]
		tutor_modifier += slave['energy'] &! stamina is easier to improve with high energy and much harder to improve with low energy - ImperatorAugustus
		slave['calories'] -= 2 &! stamina increase is handled by $dyn_skill_rise in interaction_result
		if slave['stamina'] = 4 and slave['fat'] > 3: $text[1] += ' First, she needs to shed some weight.'
		slave_rate['hygiene'] += 10
		house_mess_rate += 3
	}
end
!Lesson on gymnastics and sports and fitness (school)
if interaction = 565:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -5 + iif(slave['stamina'] > 2, 2 - slave['stamina'], 3 - slave['stamina']) + iif(slave['pride'] > 2, 1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['stamina']
	$target_skill = 'stamina'
	$misc_bonus = 'learn_bonus["stamina"]'
	$target_affinity = 'sport_affinity'
	$special_part = {
		sparks -= school_price[slave['stamina']]
		tutor_modifier = slave['energy'] &! stamina training is easier with high energy and harder with low energy
		slave['calories'] -= 2 &! stamina increase is handled by $dyn_skill_rise in interaction_result
		slave_rate['hygiene'] += 10
		house_mess_rate += 3
	}
	$place = 'class_sport'
end

!!!!DANCE LESSONS!!!!

!Personal lesson on dance
if interaction = 1222:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3) + iif(slave['stamina'] < 3, 3 - slave['stamina'], 2 - slave['stamina']) &! Dance lesson: -5 + (+1 per level of pride at B+ or more, +1 per level of endurance if endurance is C- or less | vice versa) - harder with high pride, easier with low pride, harder with low endurance, easier with high endurance
	interaction_slave['motivation_repulse'] = 6 - slave['temper'] &! B+ temperament gains diligence at 4+ aura stats; A+ temperament at 3+ aura stats; S+ temperament at 2+ aura stats
	$coach_skill = 'master_artdirector'
	$target_skill = 'calisthenics'
	$target_affinity = 'calisthenics_affinity'
	$misc_bonus = 'learn_bonus["calisthenics"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'dance', 'girls/normal_scenes/')
		$text[1] = $dance_lesson_description[slave['calisthenics']] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['stamina'] < 3: $text[2] += ' Her lack of endurance is hardly helping here.'
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		master_hygiene_rate += 5
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
		if is_perv ! 0 and no_loli ! 1 and slave['age'] = CONST_INT['loli_age']: master_excitement_rate += 3
	}
	if hall = 1: $place = 'hall'
end
!Lesson on dance (assistant)
if interaction = 4122:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3) + iif(slave['stamina'] < 3, 3 - slave['stamina'], 2 - slave['stamina'])
	interaction_slave['motivation_repulse'] = 6 - slave['temper']
	$coach_skill = 'assistant["calisthenics"]'
	$target_skill = 'calisthenics'
	$target_affinity = 'calisthenics_affinity'
	$misc_bonus = 'learn_bonus["calisthenics"]'
	$special_part = {
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		assistant['calories'] -= 1 & assistant_rate['stamina'] += min(interaction_assistant['diligence'], 1)
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		assistant_rate['hygiene'] += 5
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
	}
end
!Lesson on dance (tutor)
if interaction = 1722:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3) + iif(slave['stamina'] < 3, 3 - slave['stamina'], 2 - slave['stamina'])
	interaction_slave['motivation_repulse'] = 6 - slave['temper']
	$target_skill = 'calisthenics'
	$target_affinity = 'calisthenics_affinity'
	$misc_bonus = 'learn_bonus["calisthenics"]'
	$coach = 'avgia'
	$bg_path = 'characters\mistress_avgia'
	$special_part = {
		$text[1] = $dance_coach
		$text[2] = $coach_teaches
		sparks -= coach_price[slave['calisthenics']]
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
	}
end
!Lesson on dance (school)
if interaction = 566:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -4 + iif(slave['pride'] > 2, slave['pride'] - 2, slave['pride'] - 3) + iif(slave['stamina'] < 3, 3 - slave['stamina'], 2 - slave['stamina'])
	interaction_slave['motivation_repulse'] = 6 - slave['temper']
	$target_skill = 'calisthenics'
	$target_affinity = 'calisthenics_affinity'
	$misc_bonus = 'learn_bonus["calisthenics"]'
	$special_part = {
		sparks -= school_price[slave['calisthenics']]
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		slave_rate['hygiene'] += 10
	}
	$place = 'class_music'
end

!!!!GLADIATRIX LESSONS!!!!

!Personal lesson on martial arts
if interaction = 1223:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['stamina'] > 2, 2 - slave['stamina'], 3 - slave['stamina']) + iif(slave['ego'] > 2, 2 - slave['ego'], 3 - slave['ego']) + iif(slave['sensitivity'] > 2, slave['sensitivity'] - 2, slave['sensitivity'] - 3) &! -5 + (-1 per level of Endurance at B+ or more, +1 per level of Empathy at B+ or more, -1 per level of Nature at B+ or more | and vice versa) - easier with high endurance and nature, harder with high empathy, and vice versa
	interaction_slave['motivation_repulse'] = 3 + slave['dressage'] &! opposed skill
	$coach_skill = 'master_fighter'
	$target_skill = 'gladiatrix'
	$target_affinity = 'gladiatrix_affinity'
	$misc_bonus = 'learn_bonus["gladiatrix"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'fight', 'girls/normal_scenes/')
		$text[1] = $martial_lesson_description[slave['gladiatrix']] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['dressage'] > 0: $text[2] += ' She seems to have trouble putting aside her training as a horse.'
		if interaction_slave['diligence'] > 2: slave_rate['ego'] += 1
		dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'slave'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		master_hygiene_rate += 10
		slave_rate['hygiene'] += 10
		house_mess_rate += 10
		master_str_rate += (skill_adv_mul * 1)
	}
	if hall = 1: $place = 'hall'
end
!Lesson on martial arts (assistant)
if interaction = 4123:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['stamina'] > 2, 2 - slave['stamina'], 3 - slave['stamina']) + iif(slave['ego'] > 2, 2 - slave['ego'], 3 - slave['ego']) + iif(slave['sensitivity'] > 2, slave['sensitivity'] - 2, slave['sensitivity'] - 3)
	interaction_slave['motivation_repulse'] = 3 + slave['dressage'] &! opposed skill
	$coach_skill = 'assistant["gladiatrix"]'
	$target_skill = 'gladiatrix'
	$target_affinity = 'gladiatrix_affinity'
	$misc_bonus = 'learn_bonus["gladiatrix"]'
	$special_part = {
		if interaction_slave['diligence'] > 2: slave_rate['ego'] += 1
		dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'slave'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'assistant'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		assistant_rate['hygiene'] += 10
		slave_rate['hygiene'] += 10
		house_mess_rate += 10
	}
end
!Lesson on martial arts (tutor)
if interaction = 1723:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['stamina'] > 2, 2 - slave['stamina'], 3 - slave['stamina']) + iif(slave['ego'] > 2, 2 - slave['ego'], 3 - slave['ego']) + iif(slave['sensitivity'] > 2, slave['sensitivity'] - 2, slave['sensitivity'] - 3)
	interaction_slave['motivation_repulse'] = 3 + slave['dressage'] &! opposed skill
	$target_skill = 'gladiatrix'
	$target_affinity = 'gladiatrix_affinity'
	$misc_bonus = 'learn_bonus["gladiatrix"]'
	$coach = 'geralt'
	$bg_path = 'characters\master_geralt'
	$special_part = {
		$text[1] = $gladiatrix_coach
		$text[2] = $coach_teaches
		sparks -= coach_price[slave['gladiatrix']]
		dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'slave'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		if interaction_slave['diligence'] > 2: slave_rate['ego'] += 1
		slave_rate['hygiene'] += 10
		house_mess_rate += 10
	}
end
!Lesson on martial arts (school)
if interaction = 567:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -4 + iif(slave['stamina'] > 2, 2 - slave['stamina'], 3 - slave['stamina']) + iif(slave['ego'] > 2, 2 - slave['ego'], 3 - slave['ego']) + iif(slave['sensitivity'] > 2, slave['sensitivity'] - 2, slave['sensitivity'] - 3)
	interaction_slave['motivation_repulse'] = 3 + slave['dressage'] &! opposed skill
	$target_skill = 'gladiatrix'
	$target_affinity = 'gladiatrix_affinity'
	$misc_bonus = 'learn_bonus["gladiatrix"]'
	$special_part = {
		sparks -= school_price[slave['gladiatrix']]
		dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'slave'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		if interaction_slave['diligence'] > 2: slave_rate['ego'] += 1
		slave_rate['hygiene'] += 10
	}
	$place = 'class_sport'
end

!!!!PONY RACING LESSONS!!!!

!Personal lesson on dressage (lesson variant - currently the only variant accessible, randomly selecting lesson texts from both variants)
if interaction = 1224:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = 1
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix'] &! opposed skill
	$coach_skill = 'master_flagelation'
	$target_skill = 'dressage'
	$target_affinity = 'dressage_affinity'
	$misc_bonus = 'learn_bonus["dressage"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'ponyplay', 'girls/sex_scenes/')
		if rand(1,100) < 50:
			$text[1] = $dressage_lesson_description[slave['dressage']] &! uses delayed sub-expressions
		else
			$text[1] = $draft_lesson_description[slave['dressage']] &! uses delayed sub-expressions
		end
		if interaction_slave['diligence'] = 0 and slave['gladiatrix'] > 0: $text[2] += ' She seems to have trouble putting aside her training as a gladiatrix.'
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		if slave['pride'] > 2: slave_rate['pride'] -= 1
		if slave[$target_skill] > 2:
			dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'slave'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		else
			slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		end
		master_hygiene_rate += 2
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
	}
	if hall = 1: $place = 'hall'
end
!Personal lesson on chariots (lesson variant - currently inaccessible)
if interaction = 1225:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = 1
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix'] &! opposed skill
	$coach_skill = 'master_flagelation'
	$target_skill = 'dressage'
	$target_affinity = 'dressage_affinity'
	$misc_bonus = 'learn_bonus["dressage"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'ponyplay', 'girls/sex_scenes/')
		$text[1] = $draft_lesson_description[slave['dressage']] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['gladiatrix'] > 0: $text[2] += ' She seems to have trouble putting aside her training as a gladiatrix.'
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		if slave['pride'] > 2: slave_rate['pride'] -= 1
		if slave[$target_skill] > 2:
			dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'slave'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		else
			slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		end
		master_hygiene_rate += 2
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
	}
	if hall = 1: $place = 'hall'
end
!Lesson on dressage (assistant)
if interaction = 4143:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = 1
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix']
	$coach_skill = 'assistant["dressage"]'
	$target_skill = 'dressage'
	$target_affinity = 'dressage_affinity'
	$misc_bonus = 'learn_bonus["dressage"]'
	$special_part = {
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		if slave['pride'] > 2: slave_rate['pride'] -= 1
		if slave[$target_skill] > 2:
			dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'slave'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		else
			slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		end
		assistant_rate['hygiene'] += 2
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
	}
end
!Lesson on dressage (tutor)
if interaction = 1724:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = 1
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix'] &! opposed skill
	$target_skill = 'dressage'
	$target_affinity = 'dressage_affinity'
	$misc_bonus = 'learn_bonus["dressage"]'
	$coach = 'avgia'
	$bg_path = 'characters\mistress_avgia'
	$special_part = {
		$text[1] = $dance_coach
		$text[2] = $coach_teaches
		sparks -= coach_price[slave['dressage']]
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		if slave['pride'] > 2: slave_rate['pride'] -= 1
		if slave[$target_skill] > 2:
			dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'slave'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		else
			slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		end
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
	}
end
!Lesson on dressage (school)
if interaction = 568:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = 1
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix'] &! opposed skill
	$target_skill = 'dressage'
	$target_affinity = 'dressage_affinity'
	$misc_bonus = 'learn_bonus["dressage"]'
	$special_part = {
		sparks -= school_price[slave['dressage']]
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1
		if slave['pride'] > 2: slave_rate['pride'] -= 1
		if slave[$target_skill] > 2:
			dynamic $replace($dyn_stamina_rise, 'dyn'+'slave', 'slave'), 2, 2 &! deducts 2 calories, increases or decreases endurance by 2
		else
			slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		end
		slave_rate['hygiene'] += 10
	}
	$place = 'class_sport'
end

!!!!ELOCUTION LESSONS!!!!

!Personal lesson - etiquette and rhetoric
if interaction = 1231:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0) &! Elocution lesson: -5 (+1 per level of Intellect at C- or less | vice versa) (-1 if Endurance is C- or below | but not vice versa) - harder with low intellect, easier with high intellect, easier with low endurance
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'master_artdirector'
	$target_skill = 'expression'
	$target_affinity = 'expression_affinity'
	$misc_bonus = 'learn_bonus["expression"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'study', 'girls/normal_scenes/')
		$text[1] = $oratory_lesson_description[slave['expression']] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['intellect'] < 3: $text[2] += ' It does not help that she is not exactly the sharpest knife in the drawer.'
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		if interaction_slave['diligence'] > 0 and slave['pride'] < 4: slave_rate['temper'] += 1
		master_hygiene_rate += 1
		slave_rate['hygiene'] += 1
		house_mess_rate += 1
	}
end
!Lesson on rhetoric (assistant)
if interaction = 4131:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'assistant["expression"]'
	$target_skill = 'expression'
	$target_affinity = 'expression_affinity'
	$misc_bonus = 'learn_bonus["expression"]'
	$special_part = {
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		if interaction_slave['diligence'] > 0 and slave['pride'] < 4: slave_rate['temper'] += 1
		assistant_rate['hygiene'] += 1
		slave_rate['hygiene'] += 1
		house_mess_rate += 1
	}
end
!Lesson on rhetoric (tutor)
if interaction = 1731:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'expression'
	$target_affinity = 'expression_affinity'
	$misc_bonus = 'learn_bonus["expression"]'
	$coach = 'marivanna'
	$bg_path = 'characters\mistress_marivanna'
	$special_part = {
		$text[1] = $expression_coach
		sparks -= coach_price[slave['expression']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		if interaction_slave['diligence'] > 0 and slave['pride'] < 4: slave_rate['temper'] += 1
		slave_rate['hygiene'] += 1
		house_mess_rate += 1
	}
end
!Lesson on rhetoric (school)
if interaction = 5610:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] < 3, 3 - slave['intellect'], 2 - slave['intellect']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'expression'
	$target_affinity = 'expression_affinity'
	$misc_bonus = 'learn_bonus["expression"]'
	$special_part = {
		sparks -= school_price[slave['expression']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		if interaction_slave['diligence'] > 0 and slave['pride'] < 4: slave_rate['temper'] += 1
		slave_rate['hygiene'] += 1
	}
	$place = 'class_common'
end

!!!!PAINTING LESSONS!!!!

!Personal lesson on painting
if interaction = 1234:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0) &! Painting lesson: -6 + (+1 per level of Temperament at C- or less | vice versa) + (-1 if Endurance is C- or below | Not vice versa) - harder with low temperament, easier with high temperament, easier with low endurance
	interaction_slave['motivation_repulse'] = 5 - slave['intellect'] - slave['dexterity']*5
	$coach_skill = 'master_artdirector'
	$target_skill = 'art'
	$target_affinity = 'art_affinity'
	$misc_bonus = 'learn_bonus["art"]'
	$special_part = {
		slave_skill = slave['art']
		$bg_path = func('display_pic', 'slave', 'painting', 'girls/normal_scenes/')
		$text[1] = $art_lesson_description[slave_skill] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['intellect'] < 3: $text[2] += ' It does not help that she is not exactly the sharpest knife in the drawer.'
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		house_mess_rate += 1
		master_hygiene_rate += 1
		slave_rate['hygiene'] += 1
	}
end
!Lesson on painting (assistant)
if interaction = 4133:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect'] - slave['dexterity']*5
	$coach_skill = 'assistant["art"]'
	$target_skill = 'art'
	$target_affinity = 'art_affinity'
	$misc_bonus = 'learn_bonus["art"]'
	$special_part = {
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		assistant_rate['hygiene'] += 1
		slave_rate['hygiene'] += 1
		house_mess_rate += 1
	}
end
!Lesson on painting (tutor)
if interaction = 1733:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect'] - slave['dexterity']*5
	$target_skill = 'art'
	$target_affinity = 'art_affinity'
	$misc_bonus = 'learn_bonus["art"]'
	$coach = 'walz'
	$bg_path = 'characters\master_von_walz'
	$special_part = {
		$text[1] = $art_coach
		sparks -= coach_price[slave['art']]
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		house_mess_rate += 1
		slave_rate['hygiene'] += 2
	}
end
!Lesson on painting (school)
if interaction = 5612:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 5 - slave['intellect'] - slave['dexterity']*5
	$target_skill = 'art'
	$target_affinity = 'art_affinity'
	$misc_bonus = 'learn_bonus["art"]'
	$special_part = {
		sparks -= school_price[slave['art']]
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		slave_rate['hygiene'] += 2
	}
	$place = 'class_music'
end

!!!!COW LESSONS!!!!

if code_defined['interaction_cow_setup'] = 0:
	code_defined['interaction_cow_setup'] = 1 &! do-once

	$interaction_cow_setup = {
		if cow_locked = 1: deprivation = 1

		interaction_slave['repulse'] = 0
		if slave['brand'] = 1: interaction_slave['repulse'] -= 1 &! being branded by hot iron reduces resistance to cow training

		interaction_slave['motivation_repulse'] = slave['intellect'] + slave['pride'] + slave['ego']
		if $slave['cloth'] = 'cow_gear': interaction_slave['motivation_repulse'] -= 1
		if slave['nose_piercing'] = 1: interaction_slave['motivation_repulse'] -= 1
		if slave['lactation'] > 0: interaction_slave['motivation_repulse'] -= 1

		$target_skill = 'cowSK'
		$target_affinity = 'cowSK_affinity'
		$misc_bonus = 'learn_bonus["cowSK"]'
	}
end

!Personal lesson on cow skill - Pianocat
if interaction = 1226:
	if slave['cowSK'] > 2 and (slave['lactation'] = 0 or $slave['cloth'] ! 'cow_gear' or barn = 0):
		$interaction_type = 'special' &! bypass interaction_result, skip to interaction_screen
		show_slave_fullimage = 1
		$text[1] = '  <<$slave_name>> is perfectly able to mimic a cow. To improve her skill any further, and make her a genuine milk cow, you need to have performed augmentation surgery on her for lactation, have equipped her with cow gear from the Animal Farm of the Outcasts, and rented a barn in which to train her.'
	else
		$interaction_type = 'master_teaches_slave'
		dynamic $interaction_cow_setup
		$coach_skill = 'master_domination'
		$special_part = {
			slave_skill = slave['cowSK']
			$bg_path = func('display_pic', 'slave', 'cow', 'girls/normal_scenes/')
			$text[1] = $cowSK_lesson_description[slave_skill] &! uses delayed sub-expressions
			$coach_skill = '0' &! this is to prevent master domination skill rising (uncapped) from the "lesson" part of the training, while still using domination to limit the skill level that the master can teach; domination can increase (capped) if the training segues to "impregnate" - ImperatorAugustus
			if slave['cowSK'] < 1:
				if slave['pride'] > 2: slave_rate['pride'] -= 1
				slave_rate['temper'] += 1
			elseif slave['cowSK'] < 3:
				slave_rate['ego'] -= 2
				if slave['pride'] > 2: slave_rate['pride'] -= 1
				slave_rate['temper'] -= 2
			else
				slave_rate['ego'] -= 3
				if slave['pride'] > 1: slave_rate['pride'] -= 1
				slave_rate['temper'] -= 3
				$text[3] = '…'
				$special_action[3] = { cow_lesson_in_progress = 1 & interaction = iif(slave['cowSK'] > 3 and slave['milk_summ'] > 10, menu_C_milking, menu_cow_impregnate) & gs 'slave_to_cow' } &! segue into "impregnate cow" or milking interaction in barn
			end
			house_mess_rate += 3
			master_hygiene_rate += 4
			slave_rate['hygiene'] += 10
		}
	end
	if barn = 1: $place = 'barn'
end
!Lesson on cow skill (assistant)
if interaction = 4134:
	if slave['cowSK'] > 2 and (slave['lactation'] = 0 or $slave['cloth'] ! 'cow_gear' or barn = 0):
		$interaction_type = 'special' &! bypass interaction_result, skip to interaction_screen
		show_slave_fullimage = 1
		$text[1] = '  <<$slave_name>> is perfectly able to mimic a cow. To improve her skill any further, and make her a genuine milk cow, she needs to be lactating, equipped with cow gear from the Animal Farm of the Outcasts, and trained by you personally in a barn.'
	else
		$interaction_type = 'assistant_teaches_slave'
		dynamic $interaction_cow_setup
		$coach_skill = 'assistant["pet"]'
		$special_part = {
			if slave['cowSK'] < 1:
				if slave['pride'] > 2: slave_rate['pride'] -= 1
				slave_rate['temper'] += 1
			elseif slave['cowSK'] < 3:
				slave_rate['ego'] -= 2
				if slave['pride'] > 2: slave_rate['pride'] -= 1
				slave_rate['temper'] -= 2
			end
			house_mess_rate += 3
			assistant_rate['hygiene'] += 4
			slave_rate['hygiene'] += 10
		}
	end
end
!Lesson on cow skill (tutor)
if interaction = 1726:
	if slave['cowSK'] > 2 and (slave['lactation'] = 0 or $slave['cloth'] ! 'cow_gear' or barn = 0):
		$interaction_type = 'special' &! bypass interaction_result, skip to interaction_screen
		show_slave_fullimage = 1
		$text[1] = '  <<$slave_name>> is perfectly able to mimic a cow. To improve her skill any further, and make her a genuine milk cow, she needs to be lactating, equipped with cow gear from the Animal Farm of the Outcasts, and trained by you personally in a barn.'
	else
		$interaction_type = 'coach_teaches_slave'
		dynamic $interaction_cow_setup
		$coach = 'avgia'
		$bg_path = 'characters\mistress_avgia'
		$special_part = {
			$text[1] = $cow_coach
			$text[2] = $coach_teaches
			sparks -= coach_price[slave['cowSK']]
			if slave['cowSK'] < 1:
				if slave['pride'] > 2: slave_rate['pride'] -= 1
				slave_rate['temper'] += 1
			elseif slave['cowSK'] < 3:
				slave_rate['ego'] -= 2
				if slave['pride'] > 2: slave_rate['pride'] -= 1
				slave_rate['temper'] -= 2
			end
			house_mess_rate += 3
			slave_rate['hygiene'] += 10
		}
	end
end
!Lesson on cow skill (school)
if interaction = 570:
	if slave['cowSK'] > 2:
		$interaction_type = 'special' &! bypass interaction_result, skip to interaction_screen
		show_slave_fullimage = 1
		$text[1] = '  <<$slave_name>> is perfectly able to mimic a cow. To improve her skill any further, and make her a genuine milk cow, she needs to be lactating, equipped with cow gear from the Animal Farm of the Outcasts, and trained by you personally in a barn.'
	else
		$interaction_type = 'school_class'
		dynamic $interaction_cow_setup
		$special_part = {
			sparks -= school_price[slave['cowSK']]
			if slave['cowSK'] < 1:
				if slave['pride'] > 2: slave_rate['pride'] -= 1
				slave_rate['temper'] += 1
			elseif slave['cowSK'] < 3:
				slave_rate['ego'] -= 2
				if slave['pride'] > 2: slave_rate['pride'] -= 1
				slave_rate['temper'] -= 2
			end
			slave_rate['hygiene'] += 10
		}
		$place = 'class_sport'
	end
end

!!!!PET LESSONS!!!!

!Personal lesson on domestication (petplay cat variant - accessible in tutorial or in normal game via central menu, slave stat screen and teach screen)
if interaction = 1241:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = 0
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix'] &! opposed skill
	$coach_skill = 'master_artdirector'
	$target_skill = 'pet'
	$target_affinity = 'pet_affinity'
	$misc_bonus = 'learn_bonus["pet"]'
	$special_part = {
		slave_skill = slave['pet']
		$bg_path = func('display_pic', 'slave', 'petplay', 'girls/normal_scenes/')
		$text[1] = $catplay_lesson_description[slave_skill] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['gladiatrix'] > 0: $text[2] += ' She seems to have trouble putting aside her training as a gladiatrix.'
		if interaction_slave['diligence'] > 2:
			if slave['pride'] > 2: slave_rate['pride'] -= 1
			slave_rate['temper'] += 1
		end
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		master_hygiene_rate += 1
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
		if is_perv ! 0 and no_loli ! 1 and slave['age'] = CONST_INT['loli_age']: master_excitement_rate += 3
	}
end
!Personal lesson on taming (petplay dog variant - accessible in tutorial or in normal game via central menu and teach screen)
if interaction = 1242:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = 0
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix'] &! opposed skill
	$coach_skill = 'master_artdirector'
	$target_skill = 'pet'
	$target_affinity = 'pet_affinity'
	$misc_bonus = 'learn_bonus["pet"]'
	$special_part = {
		slave_skill = slave['pet']
		$bg_path = func('display_pic', 'slave', 'petplay', 'girls/normal_scenes/')
		$text[1] = $dogplay_lesson_description[slave_skill] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['gladiatrix'] > 0: $text[2] += ' She seems to have trouble putting aside her training as a gladiatrix.'
		if interaction_slave['diligence'] > 2:
			if slave['pride'] > 2: slave_rate['pride'] -= 1
			slave_rate['temper'] += 1
		end
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		slave_rate['hygiene'] += 20
		master_hygiene_rate += 5
		house_mess_rate += 3
	}
end
!Lesson on petplay (assistant)
if interaction = 4141:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = 0
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix'] &! opposed skill
	$coach_skill = 'assistant["pet"]'
	$target_skill = 'pet'
	$target_affinity = 'pet_affinity'
	$misc_bonus = 'learn_bonus["pet"]'
	$special_part = {
		if interaction_slave['diligence'] > 2:
			if slave['pride'] > 2: slave_rate['pride'] -= 1
			slave_rate['temper'] += 1
		end
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		assistant_rate['hygiene'] += 1
		slave_rate['hygiene'] += 10
		house_mess_rate += 5
	}
end
!Lesson on petplay (tutor)
if interaction = 1725:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = 0
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix'] &! opposed skill
	$target_skill = 'pet'
	$target_affinity = 'pet_affinity'
	$misc_bonus = 'learn_bonus["pet"]'
	$coach = 'avgia'
	$bg_path = 'characters\mistress_avgia'
	$special_part = {
		$text[1] = $pet_coach
		$text[2] = $coach_teaches
		sparks -= coach_price[slave['pet']]
		if interaction_slave['diligence'] > 2:
			if slave['pride'] > 2: slave_rate['pride'] -= 1
			slave_rate['temper'] += 1
		end
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		slave_rate['hygiene'] += 5
		house_mess_rate += 2
	}
end
!Lesson on petplay (school)
if interaction = 569:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = 0
	interaction_slave['motivation_repulse'] = 3 + slave['gladiatrix'] &! opposed skill
	$target_skill = 'pet'
	$target_affinity = 'pet_affinity'
	$misc_bonus = 'learn_bonus["pet"]'
	$special_part = {
		sparks -= school_price[slave['pet']]
		if interaction_slave['diligence'] > 2:
			if slave['pride'] > 2: slave_rate['pride'] -= 1
			slave_rate['temper'] += 1
		end
		slave['calories'] -= 1 & slave_rate['stamina'] += min(interaction_slave['diligence'], 1)
		slave_rate['hygiene'] += 5
	}
	$place = 'class_sport'
end

!!!!ALCHEMY LESSONS!!!!

!Personal lesson on alchemy
if interaction = 1243:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] > 2, 2 - slave['intellect'], 3 - slave['intellect']) &! Alchemy lesson: -4 + (-1 per level of Intellect at B+ or more | vice versa) - easier with high intellect, harder with low intellect
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'master_mage'
	$target_skill = 'alchemy'
	$target_affinity = 'enchanter_affinity' &! shared affinity for alchemy and enchanting
	$misc_bonus = 'learn_bonus["alchemy"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'alchemy', 'girls/normal_scenes/')
		$text[1] = $alchemy_lesson_description[slave['alchemy']] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['intellect'] < 3: $text[2] += ' It does not help that she is not exactly the sharpest knife in the drawer.'
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		house_mess_rate += 20
		master_hygiene_rate += 5
		slave_rate['hygiene'] += 10
	}
	$place = 'lab'
end
!Lesson on alchemy (assistant)
if interaction = 4142:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] > 2, 2 - slave['intellect'], 3 - slave['intellect'])
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'assistant["alchemy"]'
	$target_skill = 'alchemy'
	$target_affinity = 'enchanter_affinity' &! shared affinity for alchemy and enchanting
	$misc_bonus = 'learn_bonus["alchemy"]'
	$special_part = {
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		house_mess_rate += 20
		assistant_rate['hygiene'] += 5
		slave_rate['hygiene'] += 10
	}
end
!Lesson on alchemy (tutor)
if interaction = 1734:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] > 2, 2 - slave['intellect'], 3 - slave['intellect'])
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'alchemy'
	$target_affinity = 'enchanter_affinity' &! shared affinity for alchemy and enchanting
	$misc_bonus = 'learn_bonus["alchemy"]'
	$coach = 'S'
	$bg_path = 'characters\master_S'
	$special_part = {
		$text[1] = $magic_coach
		sparks -= coach_price[slave['alchemy']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		house_mess_rate += 20
		slave_rate['hygiene'] += 10
	}
end
!Lesson on alchemy (school)
if interaction = 5613:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] > 2, 2 - slave['intellect'], 3 - slave['intellect'])
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'alchemy'
	$target_affinity = 'enchanter_affinity' &! shared affinity for alchemy and enchanting
	$misc_bonus = 'learn_bonus["alchemy"]'
	$special_part = {
		sparks -= school_price[slave['alchemy']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		slave_rate['hygiene'] += 10
	}
	$place = 'class_magic'
end

!!!!WITCHCRAFT LESSONS!!!!

!Personal lesson on witchcraft
if interaction = 1244:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] > 2, 2 - slave['intellect'], 3 - slave['intellect']) &! Witchcraft lesson: -4 + (-1 per level of Intellect at B+ or more | vice versa) - easier with high intellect, harder with low intellect
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'master_mage'
	$target_skill = 'enchanter'
	$target_affinity = 'enchanter_affinity' &! shared affinity for alchemy and enchanting
	$misc_bonus = 'learn_bonus["enchanter"]'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'enchant', 'girls/normal_scenes/')
		$text[1] = $enchanting_lesson_description[slave['enchanter']] &! uses delayed sub-expressions
		if interaction_slave['diligence'] = 0 and slave['intellect'] < 3: $text[2] += ' It does not help that she is not exactly the sharpest knife in the drawer.'
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		house_mess_rate += 20
		master_hygiene_rate += 5
		slave_rate['hygiene'] += 10
	}
	$place = 'study'
end
!Lesson on witchcraft (assistant)
if interaction = 41421:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] > 2, 2 - slave['intellect'], 3 - slave['intellect'])
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$coach_skill = 'assistant["enchanter"]'
	$target_skill = 'enchanter'
	$target_affinity = 'enchanter_affinity' &! shared affinity for alchemy and witchcraft
	$misc_bonus = 'learn_bonus["enchanter"]'
	$special_part = {
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		house_mess_rate += 20
		assistant_rate['hygiene'] += 5
		slave_rate['hygiene'] += 10
	}
end
!Lesson on witchcraft (tutor)
if interaction = 17341:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] > 2, 2 - slave['intellect'], 3 - slave['intellect'])
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'enchanter'
	$target_affinity = 'enchanter_affinity' &! shared affinity for alchemy and witchcraft
	$misc_bonus = 'learn_bonus["enchanter"]'
	$coach = 'S'
	$bg_path = 'characters\master_S'
	$special_part = {
		$text[1] = $magic_coach
		sparks -= coach_price[slave['enchanter']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		house_mess_rate += 20
		slave_rate['hygiene'] += 10
	}
end
!Lesson on witchcraft (school)
if interaction = 56131:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -4 + iif(slave['intellect'] > 2, 2 - slave['intellect'], 3 - slave['intellect'])
	interaction_slave['motivation_repulse'] = 5 - slave['intellect']
	$target_skill = 'enchanter'
	$target_affinity = 'enchanter_affinity' &! shared affinity for alchemy and witchcraft
	$misc_bonus = 'learn_bonus["enchanter"]'
	$special_part = {
		sparks -= school_price[slave['enchanter']]
		if interaction_slave['diligence'] > 2: slave_rate['intellect'] += 2
		slave_rate['hygiene'] += 10
	}
	$place = 'class_magic'
end

!!!!MUSIC LESSONS!!!!

if interaction = 1233 and debug_interactions = 2:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0) &! keep these formulas in sync with the lesson formula below
	interaction_slave['motivation_repulse'] = 3 - slave['dexterity']*5
end

!Personal lesson on percussion
if interaction = 112331:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0) &! Music lesson: -6 + (+1 per level of Temperament at C- or less | vice versa) (-1 if Endurance is C- or below | Not vice versa) - harder with low temperament, easier with high temperament, easier with low endurance
	interaction_slave['motivation_repulse'] = 3 - slave['dexterity']*5
	$coach_skill = 'master_artdirector'
	$target_skill = 'music'
	$target_affinity = 'music_affinity'
	$misc_bonus = 'learn_bonus["music"]'
	$special_part = {
		slave_skill = slave['music']
		$bg_path = func('display_pic', 'slave', 'percussion', 'girls/normal_scenes/')
		$text[1] = $music_lesson_description[slave_skill] &! uses delayed sub-expressions
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		master_hygiene_rate += 1
		slave_rate['hygiene'] += 1
		house_mess_rate += 1
	}
end
!Personal lesson on singing
if interaction = 112332:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 3 + slave['pride'] - slave['expression_affinity']*2
	$coach_skill = 'master_artdirector'
	$target_skill = 'music'
	$target_affinity = 'music_affinity'
	$misc_bonus = 'learn_bonus["music"]'
	$special_part = {
		slave_skill = slave['music']
		$bg_path = func('display_pic', 'slave', 'singing', 'girls/normal_scenes/', slave['special_singing_lesson'])
		$text[1] = $music_lesson_description[slave_skill] &! uses delayed sub-expressions
		if instr($bg_path, 'white_short_young_2') ! 0:
			! easter egg lesson variation involving unplanned bukkake and humiliation (walking home partially naked and covered in cum)
			slave['special_singing_lesson'] = 2 &! do not reuse the same image/trigger the same event again
			$place = 'tavern'
			copyarr '$text', '$music_lesson_special_tavern_bukkake' &! this intentionally overwrites diligence text
			$special_action[1] = { $bg_path = $bg[$place] }
			$special_action[2] = { $bg_path = 'girls/normal_scenes/singing_white_short_young_2' }
			if slave['sub_bukkake'] < 2: slave_rate['angst'] += 10 &! traumatic experience if she is below C- skill (F- bukkake lessons are no-touching, D- bukkake lessons involve hands and mouth)
			slave_rate['pride'] -= 10 &! being used and then walking home partially naked covered with cum is a blow to pride
			slave_rate['fame'] += 10 &! the event is memorable, gaining her some notoriety
			if slave['meekness'] ! 0 and slave['meekness_revealed'] = 0: slave['meekness_revealed'] = 1
			$subskill = 'slave["sub_bukkake"]' &! being used for oral sex by a crowd will level Bukkake from F- to D- (N.B. blowjob skill automatically rises with Bukkake skill)
			$subskill_xp = 'slave["sub_bukkake_xp"]' &! provide some progress towards next level of Bukkake (whether D- or higher)
			$subskill_two = 'slave["sub_humiliation"]' &! being used in public and walking home partially naked and covered with cum will level Humiliation from F- to D-
			$subskill_two_xp = 'slave["sub_humiliation_xp"]' &! provide some progress towards next level of Humiliation (whether D- or higher)
			sex_quality = 1 &! determines the amount of xp advancement for above subskills
			interaction_slave['erotic_stimulation'] = slave['sub_bukkake'] &! if she has experience, she will gain some arousal (we do not set stimulating flag because it is a surprise event)
			if rand(1,12) = 1 and rand(1,6) > slave['stamina'] and slave['ill'] = 0: slave['ill'] = 1 &! small illness chance from oral exposure
			slave_rate['hygiene'] += 30
		end
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		house_mess_rate += 1
		master_hygiene_rate += 1
		slave_rate['hygiene'] += 1
	}
end
!Personal lesson on woodwind
if interaction = 112333:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 3 - slave['dexterity']*5
	$coach_skill = 'master_artdirector'
	$target_skill = 'music'
	$target_affinity = 'music_affinity'
	$misc_bonus = 'learn_bonus["music"]'
	$special_part = {
		slave_skill = slave['music']
		$bg_path = func('display_pic', 'slave', 'woodwind', 'girls/normal_scenes/')
		$text[1] = $music_lesson_description[slave_skill] &! uses delayed sub-expressions
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		house_mess_rate += 1
		master_hygiene_rate += 1
		slave_rate['hygiene'] += 1
	}
end
!Personal lesson on piano
if interaction = 112334:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 3 - slave['dexterity']*5
	$coach_skill = 'master_artdirector'
	$target_skill = 'music'
	$target_affinity = 'music_affinity'
	$misc_bonus = 'learn_bonus["music"]'
	$special_part = {
		slave_skill = slave['music']
		$bg_path = func('display_pic', 'slave', 'piano', 'girls/normal_scenes/')
		$text[1] = $music_lesson_description[slave_skill] &! uses delayed sub-expressions
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		house_mess_rate += 1
		master_hygiene_rate += 1
		slave_rate['hygiene'] += 1
		if is_perv ! 0 and no_loli ! 1 and slave['age'] = CONST_INT['loli_age']: master_excitement_rate += 3
	}
end
!Personal lesson on strings
if interaction = 112335:
	$interaction_type = 'master_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 3 - slave['dexterity']*5
	$coach_skill = 'master_artdirector'
	$target_skill = 'music'
	$target_affinity = 'music_affinity'
	$misc_bonus = 'learn_bonus["music"]'
	$special_part = {
		slave_skill = slave['music']
		$bg_path = func('display_pic', 'slave', 'strings', 'girls/normal_scenes/')
		$text[1] = $music_lesson_description[slave_skill] &! uses delayed sub-expressions
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		house_mess_rate += 1
		master_hygiene_rate += 1
		slave_rate['hygiene'] += 1
	}
end
!Lesson on music (assistant)
if interaction = 4132:
	$interaction_type = 'assistant_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 3 - slave['dexterity']*5
	$coach_skill = 'assistant["music"]'
	$target_skill = 'music'
	$target_affinity = 'music_affinity'
	$misc_bonus = 'learn_bonus["music"]'
	$special_part = {
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		house_mess_rate += 3
		assistant_rate['hygiene'] += 1
		slave_rate['hygiene'] += 2
	}
end
!Lesson on music (tutor)
if interaction = 1732:
	$interaction_type = 'coach_teaches_slave'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 3 - slave['dexterity']*5
	$target_skill = 'music'
	$target_affinity = 'music_affinity'
	$misc_bonus = 'learn_bonus["music"]'
	$coach = 'walz'
	$bg_path = 'characters\master_von_walz'
	$special_part = {
		$text[1] = $music_coach
		sparks -= coach_price[slave['music']]
		house_mess_rate += 1
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		slave_rate['hygiene'] += 1
	}
end
!Lesson on music (school)
if interaction = 5611:
	$interaction_type = 'school_class'
	interaction_slave['repulse'] = -6 + iif(slave['temper'] < 3, 3 - slave['temper'], 2 - slave['temper']) + iif(slave['stamina'] < 3, -1, 0)
	interaction_slave['motivation_repulse'] = 3 - slave['dexterity']*5
	$target_skill = 'music'
	$target_affinity = 'music_affinity'
	$misc_bonus = 'learn_bonus["music"]'
	$special_part = {
		sparks -= school_price[slave['music']]
		if interaction_slave['diligence'] > 2: slave_rate['temper'] += 1 & slave_rate['intellect'] += 1
		slave_rate['hygiene'] += 2
	}
	$place = 'class_music'
end

!Personal lesson on threesome
if code_defined['interaction_lesson_threesome'] = 0:
	code_defined['interaction_lesson_threesome'] = 1 &! do-once

	$interaction_lesson_threesome = {
		if dynslave['virginity'] < 1 and dynslave['sub_threesome'] >= 3 and confirmed_threesome_defloration = 0:
			$place = 'study'
			$picture_type = 'dynslave_picture'
			$text[1] = '  <<$dynslave_name>> will no longer be a virgin after this lesson. Proceed anyway?'
			$yes = {
				confirmed_threesome_defloration = 1
				gt 'interaction'
			}
			$no = {
				killvar 'confirmed_threesome_defloration'
				menu_form = 0
				gt 'menu_form'
			}
			if debug_interactions ! 2: gt 'choice_screen'
		elseif otherslave['virginity'] < 1 and dynslave['sub_threesome'] >= 2 and confirmed_threesome_defloration = 0:
			$place = 'study'
			$picture_type = 'otherslave_picture'
			$text[1] = '  <<$otherslave_name>> will no longer be a virgin after this lesson. Proceed anyway?'
			$yes = {
				confirmed_threesome_defloration = 1
				gt 'interaction'
			}
			$no = {
				killvar 'confirmed_threesome_defloration'
				menu_form = 0
				gt 'menu_form'
			}
			if debug_interactions ! 2: gt 'choice_screen'
		end
		killvar 'confirmed_threesome_defloration'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_slave['repulse'] = iif(slave['virginity'] < 1, 9, 8) &! intentionally not using dynslave here (assistant has default repulse)
		interaction_slave['motivation_repulse'] = 5 - (slave['oral'] + slave['sub_vaginal'])/2 &! intentionally not using dynslave here (assistant has default motivation_repulse)
		lesbian = 1
		orgastic = 1
		$subskill = 'slave["sub_threesome"]' &! intentionally not using dynslave here
		$subskill_xp = 'slave["sub_threesome_xp"]' &! intentionally not using dynslave here
		rise_difficulty = 7 + dynslave['sub_threesome'] * 7
		$coach_skill = '(1 + master_penetration + master_artdirector)/2'
		sex_ability = (1 + dynslave['sub_threesome']*2 + dynslave['sub_tongue'] + dynslave['roleplay'] + dynslave['beauty'] + otherslave['sub_threesome']*2 + otherslave['sub_tongue'] + otherslave['roleplay'] + otherslave['beauty'])/8
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_threesome'] > 5: $interaction_type = 'completed'
		$special_part = {
			if interaction = 7014 and interaction_slave['res'] < 0: interaction = 1380 & gt 'interaction' &! redirect to slave refusal
			if dynslave['virginity'] < 2: $bg_path = func('display_pic', 'dynslave', 'defloration', 'girls/sex_scenes/')
			$play_sound[2] = $fuck_sound[dynslave['age']]
			$text[1] = $threesome_lesson_description[dynslave['sub_threesome']]
			if dynslave['sub_threesome'] >= 2:
				! not a lesbian show, otherslave gets penetrated
				$bg_path = func('display_pic', 'dynslave, otherslave', 'threesome', 'girls/sex_scenes/')
				interaction_otherslave['erotic_stimulation'] = (dynslave['oral'] + dynslave['petting'])/2
				ejaculation_intensity = sex_quality
				dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'otherslave') &! includes $master_ejaculate
				if dynslave['sub_threesome'] >= 3:
					! dynslave gets penetrated too starting at B+
					interaction_dynslave['erotic_stimulation'] += master_penetration/2
					ejaculation_intensity = sex_quality &! second time
					dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate
				end
			else
				! lesbian show (F- or D-)
				$bg_path = func('display_pic', 'dynslave, otherslave', 'lesbo', 'girls/sex_scenes/')
				interaction_dynslave['erotic_stimulation'] = (otherslave['oral'] + otherslave['petting'])/2
				interaction_otherslave['erotic_stimulation'] = (dynslave['oral'] + dynslave['petting'])/2
			end
			dynamic $replace($dyn_erotic_stimulation, 'dyn'+'slave', 'otherslave')
			dynamic $replace($dyn_advance_sex_skills_nolesson, 'dyn'+'slave', 'otherslave'), 'noreset'
			master_str_rate += iif(master_str < 4, 1, 0)
			dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			otherslave['calories'] -= 1 & otherslave_rate['stamina'] += min(interaction_otherslave['diligence'], 1)
			dynamic $otherslave_energy_drop &! master and dynslave are handled in interaction_result
			house_mess_rate += 6
			master_hygiene_rate += 8
			dynslave_rate['hygiene'] += 8
			otherslave_rate['hygiene'] += 8
			! update master skill because the $coach_skill line is complex so it will not be done automatically
			master_artdirector_rate += (skill_adv_mul * 1)
		}
		$place = 'bedroom'
	}
end

if interaction = 1380: $interaction_type = 'self_sex_lesson' & dynamic $replace($replace($interaction_lesson_threesome, 'dyn'+'slave', 'slave'), 'otherslave', 'assistant')
if interaction = 7014: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($replace($interaction_lesson_threesome, 'dyn'+'slave', 'assistant'), 'otherslave', 'slave')

!Personal lesson on threesome - no assistant - option added - crushboss
if code_defined['interaction_lesson_threesome_noassist'] = 0:
	code_defined['interaction_lesson_threesome_noassist'] = 1 &! do-once

	$interaction_lesson_threesome_noassist = {
		if dynslave['virginity'] < 1 and dynslave['sub_threesome'] >= 3 and confirmed_threesome_defloration = 0:
			$place = 'study'
			$picture_type = 'dynslave_picture'
			$text[1] = '  <<$dynslave_name>> will no longer be a virgin after this lesson. Proceed anyway?'
			$yes = {
				confirmed_threesome_defloration = 1
				gt 'interaction'
			}
			$no = {
				killvar 'confirmed_threesome_defloration'
				menu_form = 0
				gt 'menu_form'
			}
			if debug_interactions ! 2: gt 'choice_screen'
		end
		killvar 'confirmed_threesome_defloration'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 9, 8)
		interaction_dynslave['motivation_repulse'] = 5 - (dynslave['oral'] + dynslave['sub_vaginal'])/2
		lesbian = 1
		orgastic = 1
		$subskill = 'slave["sub_threesome"]'
		$subskill_xp = 'slave["sub_threesome_xp"]'
		rise_difficulty = 7 + dynslave['sub_threesome'] * 7
		$coach_skill = '(1 + master_penetration + master_artdirector)/2'
		sex_ability = (16 + dynslave['sub_threesome']*2 + dynslave['sub_tongue'] + dynslave['roleplay'] + dynslave['beauty'])/8
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_threesome'] > 5: $interaction_type = 'completed'
		$special_part = {
			sparks -= 1 &! cost of hiring a whore
			$bg_path = func('display_pic', 'dynslave, <<$dynslave_les_txt5>>', 'threesome', 'girls/sex_scenes/')
			$play_sound[2] = $fuck_sound[dynslave['age']]
			$text[1] = $threesome_noassistant_description[dynslave['sub_threesome']]
			if dynslave['sub_threesome'] >= 2:
				! not a lesbian show, whore gets penetrated
				$bg_path = func('display_pic', 'dynslave, <<$dynslave_les_txt5>>', 'threesome', 'girls/sex_scenes/')
				ejaculation_intensity = sex_quality
				dynamic $master_ejaculate &! with the "visiting" whore
				if dynslave['sub_threesome'] >= 3:
					! dynslave gets penetrated too starting at B+
					interaction_dynslave['erotic_stimulation'] += master_penetration/2
					ejaculation_intensity = sex_quality &! second time
					dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate
				end
			else
				! lesbian show (F- or D-)
				$bg_path = func('display_pic', 'dynslave, <<$dynslave_les_txt5>>', 'lesbo', 'girls/sex_scenes/')
				interaction_dynslave['erotic_stimulation'] = 5 &! equivalent to threesome with slave who has maxed oral and petting skill
			end
			master_str_rate += iif(master_str < 4, 1, 0)
			dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			house_mess_rate += 6
			master_hygiene_rate += 8
			dynslave_rate['hygiene'] += 8
			! update master skill because the $coach_skill line is complex so it will not be done automatically
			master_artdirector_rate += (skill_adv_mul * 1)
		}
		$place = 'bedroom'
	}
end

if interaction = 1382: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_threesome_noassist, 'dyn'+'slave', 'slave')
if interaction = 6999: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_threesome_noassist, 'dyn'+'slave', 'assistant')

!handjob
if code_defined['interaction_lesson_hj'] = 0:
	code_defined['interaction_lesson_hj'] = 1 &! do-once

	$interaction_lesson_hj = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = 1
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['petting']
		$subskill = 'slave["sub_hj"]'
		$subskill_xp = 'slave["sub_hj_xp"]'
		rise_difficulty = 5 + dynslave['sub_hj'] * 5
		$coach_skill = 'master_petting'
		sex_ability = (1 + dynslave['sub_hj']*2 + dynslave['petting'] + dynslave['sub_tongue'] + dynslave['roleplay'] + dynslave['beauty'])/6 &! non-penetrative sex is less satisfying for the master
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_hj'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'hj', 'girls/sex_scenes/')
			$play_sound[2] = $slopy[dynslave['age']]
			$text[1] = $hj_lesson_description[dynslave['sub_hj']] &! TODO
			ejaculation_intensity = sex_quality
			if ejaculation_intensity > 0: dynamic $master_ejaculate
			house_mess_rate += 5
			master_hygiene_rate += 3
			dynslave_rate['hygiene'] += 10
		}
		$place = 'bedroom'
	}
end

if interaction = 1311: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_hj, 'dyn'+'slave', 'slave')
if interaction = 7001: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_hj, 'dyn'+'slave', 'assistant')

!footjob
if code_defined['interaction_lesson_fj'] = 0:
	code_defined['interaction_lesson_fj'] = 1 &! do-once

	$interaction_lesson_fj = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = 1
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['petting']
		$subskill = 'slave["sub_fj"]'
		$subskill_xp = 'slave["sub_fj_xp"]'
		rise_difficulty = 5 + dynslave['sub_fj'] * 5
		$coach_skill = 'master_petting'
		sex_ability = (1 + dynslave['sub_fj']*2 + dynslave['petting'] + dynslave['sub_tongue'] + dynslave['roleplay'] + dynslave['beauty'])/6 &! non-penetrative sex is less satisfying for the master
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_fj'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'fj', 'girls/sex_scenes/')
			$play_sound[2] = $slopy[dynslave['age']]
			$text[1] = $fj_lesson_description[dynslave['sub_fj']] &! TODO
			ejaculation_intensity = sex_quality
			if ejaculation_intensity > 0: dynamic $master_ejaculate
			house_mess_rate += 5
			master_hygiene_rate += 4
			dynslave_rate['hygiene'] += 10
		}
		$place = 'bedroom'
	}
end

if interaction = 1312: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_fj, 'dyn'+'slave', 'slave')
if interaction = 7002: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_fj, 'dyn'+'slave', 'assistant')

!hugs
if code_defined['interaction_lesson_hug'] = 0:
	code_defined['interaction_lesson_hug'] = 1 &! do-once

	$interaction_lesson_hug = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = 3
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['petting']
		$subskill = 'slave["sub_hug"]'
		$subskill_xp = 'slave["sub_hug_xp"]'
		rise_difficulty = 5 + dynslave['sub_hug'] * 5
		$coach_skill = 'master_petting'
		perv_rating = 1
		$perv_act1 = 'hugging'
		sex_ability = (1 + dynslave['sub_hug']*2 + dynslave['petting'] + dynslave['sub_tongue'] + dynslave['roleplay'] + dynslave['beauty'])/6 &! non-penetrative sex is less satisfying for the master
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_hug'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'rubbing', 'girls/sex_scenes/')
			$play_sound[2] = $petting_sound[dynslave['age']]
			$text[1] = $hug_lesson_description[dynslave['sub_hug']] &! TODO
			ejaculation_intensity = sex_quality
			if ejaculation_intensity > 0: dynamic $master_ejaculate
			house_mess_rate += 4
			master_hygiene_rate += 5
			dynslave_rate['hygiene'] += 5
		}
		$place = 'bedroom'
	}
end

if interaction = 1313: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_hug, 'dyn'+'slave', 'slave')
if interaction = 7003: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_hug, 'dyn'+'slave', 'assistant')

!paizuri
if code_defined['interaction_lesson_paizuri'] = 0:
	code_defined['interaction_lesson_paizuri'] = 1 &! do-once

	$interaction_lesson_paizuri = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = 3
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['petting']
		$subskill = 'slave["sub_paizuri"]'
		$subskill_xp = 'slave["sub_paizuri_xp"]'
		rise_difficulty = 5 + dynslave['sub_paizuri'] * 5
		$coach_skill = 'master_petting'
		perv_rating = 1
		$perv_act1 = 'rubbing your cock against'
		sex_ability = (1 + dynslave['sub_paizuri']*2 + dynslave['sub_hug'] + dynslave['sub_tongue'] + dynslave['roleplay'] + dynslave['beauty'])/6 &! non-penetrative sex is less satisfying for the master
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_paizuri'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'paizuri', 'girls/sex_scenes/')
			$play_sound[2] = $petting_sound[dynslave['age']]
			$text[1] = $paizuri_lesson_description[dynslave['sub_paizuri']] &! TODO
			interaction_dynslave['erotic_stimulation'] = master_petting
			ejaculation_intensity = sex_quality
			if ejaculation_intensity > 0: dynamic $master_ejaculate
			house_mess_rate += 4
			master_hygiene_rate += 3
			dynslave_rate['hygiene'] += 5
		}
		$place = 'bedroom'
	}
end

if interaction = 1314: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_paizuri, 'dyn'+'slave', 'slave')
if interaction = 7004: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_paizuri, 'dyn'+'slave', 'assistant')

!kiss
if code_defined['interaction_lesson_kiss'] = 0:
	code_defined['interaction_lesson_kiss'] = 1 &! do-once

	$interaction_lesson_kiss = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 0
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['oral']
		$subskill = 'slave["sub_kiss"]'
		$subskill_xp = 'slave["sub_kiss_xp"]'
		rise_difficulty = 5 + dynslave['sub_kiss'] * 5
		$coach_skill = 'master_oral'
		perv_rating = 2
		$perv_act1 = 'making out with'
		$perv_act2 = ', shoving your tongue into her precious<<$little_txt>> mouth and swapping spit with her'
		if dynslave['sub_kiss'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'kiss', 'girls/sex_scenes/')
			$play_sound[2] = $kiss_sound[dynslave['age']]
			$text[1] = $kiss_lesson_description[dynslave['sub_kiss']] &! TODO
			interaction_dynslave['erotic_stimulation'] = master_petting
			ejaculation_intensity = 0
			house_mess_rate += 1
			master_hygiene_rate += 1
			dynslave_rate['hygiene'] += 1
		}
		$place = 'bedroom'
	}
end

if interaction = 1321: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_kiss, 'dyn'+'slave', 'slave')
if interaction = 7005: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_kiss, 'dyn'+'slave', 'assistant')

!oral massage
if code_defined['interaction_lesson_tongue'] = 0:
	code_defined['interaction_lesson_tongue'] = 1 &! do-once

	$interaction_lesson_tongue = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 5
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['oral']
		$subskill = 'slave["sub_tongue"]'
		$subskill_xp = 'slave["sub_tongue_xp"]'
		rise_difficulty = 7 + dynslave['sub_tongue'] * 7
		$coach_skill = 'master_oral'
		$perv_act1 = 'licking'
		$perv_act2 = ' adorable<<$little_txt>> body'
		if dynslave['sub_tongue'] > 5: $interaction_type = 'completed'
		$special_part = {
			if dynslave['sub_tongue'] = 0: $bg_path = func('display_pic', 'dynslave', 'kuni', 'girls/sex_scenes/')
			if dynslave['sub_tongue'] > 0: $bg_path = func('display_pic', 'dynslave', 'oral', 'girls/sex_scenes/')
			$play_sound[2] = $kiss_sound[dynslave['age']]
			$text[1] = $licking_lesson_description[dynslave['sub_tongue']] &! uses delayed sub-expressions
			interaction_dynslave['erotic_stimulation'] = master_petting
			ejaculation_intensity = 0
			house_mess_rate += 2
			master_hygiene_rate += 1
			dynslave_rate['hygiene'] += 3
		}
		$place = 'bedroom'
	}
end

if interaction = 1322: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_tongue, 'dyn'+'slave', 'slave')
if interaction = 7006: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_tongue, 'dyn'+'slave', 'assistant')

!blowjob
if code_defined['interaction_lesson_bj'] = 0:
	code_defined['interaction_lesson_bj'] = 1 &! do-once

	$interaction_lesson_bj = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = 6
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['oral']
		$subskill = 'slave["sub_bj"]'
		$subskill_xp = 'slave["sub_bj_xp"]'
		rise_difficulty = 7 + dynslave['sub_bj'] * 7
		$coach_skill = 'master_oral'
		perv_rating = 2
		$perv_act1 = 'making'
		$perv_act2 = ' suck your cock'
		sex_ability = (1 + dynslave['sub_bj']*2 + dynslave['sub_dt'] + dynslave['sub_tongue'] + dynslave['sub_hj'] + dynslave['roleplay'] + dynslave['beauty'])/6
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_bj'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'bj', 'girls/sex_scenes/')
			$play_sound[3] = $bj_sound[dynslave['age']]
			$text[1] = $bj_lesson_description[dynslave['sub_bj']] &! TODO
			interaction_dynslave['erotic_stimulation'] = 1
			ejaculation_intensity = sex_quality
			if ejaculation_intensity > 0: dynamic $master_ejaculate
			dynslave_rate['pride'] -= 1
			house_mess_rate += 3
			master_hygiene_rate += -1
			dynslave_rate['hygiene'] += 5
		}
		$place = 'bedroom'
	}
end

if interaction = 1323: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_bj, 'dyn'+'slave', 'slave')
if interaction = 7007: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_bj, 'dyn'+'slave', 'assistant')

!deepthroat
if code_defined['interaction_lesson_dt'] = 0:
	code_defined['interaction_lesson_dt'] = 1 &! do-once

	$interaction_lesson_dt = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = 7
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['oral']
		if dynslave['sub_dt'] < 2: painful = 1
		$subskill = 'slave["sub_dt"]'
		$subskill_xp = 'slave["sub_dt_xp"]'
		rise_difficulty = 7 + dynslave['sub_dt'] * 7
		$coach_skill = 'master_oral'
		perv_rating = 3
		$perv_act1 = 'making'
		$perv_act2 = ' choke on your cock'
		sex_ability = (1 + dynslave['sub_dt']*2 + dynslave['sub_bj'] + dynslave['sub_tongue'] + dynslave['roleplay'] + dynslave['beauty'])/5
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_dt'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'dt', 'girls/sex_scenes/')
			$play_sound[2] = $throatfuck_sound[dynslave['age']]
			$text[1] = $throatfuck_lesson_description[dynslave['sub_dt']] &! TODO
			interaction_dynslave['erotic_stimulation'] = (master_excitement + master_style - 4)/2
			ejaculation_intensity = sex_quality
			if ejaculation_intensity > 0: dynamic $master_ejaculate
			dynslave_rate['pride'] -= dynslave['sub_dt'] + 1
			house_mess_rate += 10
			master_hygiene_rate += 5
			dynslave_rate['hygiene'] += 10
		}
		$place = 'bedroom'
	}
end

if interaction = 1324: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_dt, 'dyn'+'slave', 'slave')
if interaction = 7008: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_dt, 'dyn'+'slave', 'assistant')

!rimming
if code_defined['interaction_lesson_asslik'] = 0:
	code_defined['interaction_lesson_asslik'] = 1 &! do-once

	$interaction_lesson_asslik = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(master_hygiene > 3, 21, iif(master_hygiene > 2, 11, 9))
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['oral']
		disgusting = 1
		$subskill = 'slave["sub_asslik"]'
		$subskill_xp = 'slave["sub_asslik_xp"]'
		rise_difficulty = 7 + dynslave['sub_asslik'] * 7
		$coach_skill = 'master_oral'
		perv_rating = 3
		$perv_act1 = 'having'
		$perv_act2 = ' lick your asshole'
		if dynslave['sub_asslik'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'rimming', 'girls/sex_scenes/')
			$play_sound[2] = $kiss_sound[dynslave['age']]
			$text[1] = $rimming_lesson_description[dynslave['sub_asslik']]
			interaction_dynslave['erotic_stimulation'] = 1
			ejaculation_intensity = 0
			dynslave_rate['pride'] -= dynslave['sub_asslik'] + 2
			house_mess_rate += 10
			master_hygiene_rate += -5
			dynslave_rate['hygiene'] += 10
		}
		$place = 'bedroom'
	}
end

if interaction = 1325: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_asslik, 'dyn'+'slave', 'slave')
if interaction = 7009: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_asslik, 'dyn'+'slave', 'assistant')

!vaginal sex
if code_defined['interaction_lesson_vaginal'] = 0:
	code_defined['interaction_lesson_vaginal'] = 1 &! do-once

	$interaction_lesson_vaginal = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 8, 4) &! virgins are reluctant - ImperatorAugustus
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['penetration']
		orgastic = 1
		$subskill = 'slave["sub_vaginal"]'
		$subskill_xp = 'slave["sub_vaginal_xp"]'
		rise_difficulty = 5 + dynslave['sub_vaginal'] * 5
		$coach_skill = 'master_penetration'
		perv_rating = 2
		$perv_act1 = 'shoving your cock into'
		sex_ability = (1 + dynslave['sub_vaginal']*2 + dynslave['sub_kiss'] + dynslave['sub_hug'] + dynslave['roleplay'] + dynslave['beauty'])/5
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_vaginal'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'sex', 'girls/sex_scenes/')
			if dynslave['virginity'] < 2: $bg_path = func('display_pic', 'dynslave', 'defloration', 'girls/sex_scenes/')
			$play_sound[2] = $fuck_sound[dynslave['age']]
			$text[1] = $vaginalsex_lesson_description[dynslave['sub_vaginal']] &! TODO
			interaction_dynslave['erotic_stimulation'] = master_penetration
			ejaculation_intensity = sex_quality
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate
			dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
			house_mess_rate += 5
			master_hygiene_rate += 6
			dynslave_rate['hygiene'] += 6
		}
		$place = 'bedroom'
	}
end

if interaction = 1331: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_vaginal, 'dyn'+'slave', 'slave')
if interaction = 7010: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_vaginal, 'dyn'+'slave', 'assistant')

!anal sex
if code_defined['interaction_lesson_anal'] = 0:
	code_defined['interaction_lesson_anal'] = 1 &! do-once

	$interaction_lesson_anal = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = 11
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['penetration']
		if dynslave['sub_anal'] >= 2: orgastic = 1
		if dynslave['sub_anal'] <= 2: painful = 1
		$subskill = 'slave["sub_anal"]'
		$subskill_xp = 'slave["sub_anal_xp"]'
		rise_difficulty = 7 + dynslave['sub_anal'] * 7
		$coach_skill = 'master_penetration'
		perv_rating = 3
		$perv_act1 = 'fucking'
		$perv_act2 = ' in her<<$little_txt>> asshole'
		sex_ability = (1 + dynslave['sub_anal']*2 + dynslave['roleplay'] + dynslave['beauty'])/3
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_anal'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'analsex', 'girls/sex_scenes/')
			$play_sound[2] = $assfuck_sound[dynslave['age']]
			$text[1] = $analsex_lesson_description[dynslave['sub_anal']]
			interaction_dynslave['erotic_stimulation'] = master_penetration
			ejaculation_intensity = sex_quality
			if ejaculation_intensity > 0: dynamic $master_ejaculate
			if dynslave['ill'] > 0 and master_ill = 0 and rand(1,6) > master_str: master_ill = 1
			if dynslave['ill'] = 0 and master_ill > 0 and rand(1,6) > dynslave['stamina']: dynslave['ill'] = 1
			dynslave_rate['pride'] -= 1
			dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
			house_mess_rate += 10
			master_hygiene_rate += 10
			dynslave_rate['hygiene'] += 12
		}
		$place = 'bedroom'
	}
end

if interaction = 1332: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_anal, 'dyn'+'slave', 'slave')
if interaction = 7011: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_anal, 'dyn'+'slave', 'assistant')

!vaginal fisting
if code_defined['interaction_lesson_fisting'] = 0:
	code_defined['interaction_lesson_fisting'] = 1 &! do-once

	$interaction_lesson_fisting = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 10, 9)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['penetration']
		if dynslave['sub_fisting'] > 1: orgastic = 1
		$subskill = 'slave["sub_fisting"]'
		$subskill_xp = 'slave["sub_fisting_xp"]'
		rise_difficulty = 7 + dynslave['sub_fisting'] * 7
		$coach_skill = 'master_penetration'
		if dynslave['sub_fisting'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'fisting', 'girls/sex_scenes/')
			$play_sound[2] = $fisting_sound[dynslave['age']]
			$text[1] = $fisting_lesson_description[dynslave['sub_fisting']] &! TODO
			interaction_dynslave['erotic_stimulation'] = master_petting
			ejaculation_intensity = 0
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
			house_mess_rate += 10
			master_hygiene_rate += 10
			dynslave_rate['hygiene'] += 12
		}
		$place = 'bedroom'
	}
end

if interaction = 1333: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_fisting, 'dyn'+'slave', 'slave')
if interaction = 7012: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_fisting, 'dyn'+'slave', 'assistant')

!anal fisting
if code_defined['interaction_lesson_anal_stretch'] = 0:
	code_defined['interaction_lesson_anal_stretch'] = 1 &! do-once

	$interaction_lesson_anal_stretch = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 14
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['penetration']
		if dynslave['anal_stretch'] > 3: orgastic = 1
		if dynslave['anal_stretch'] <= 3: painful = 1
		$subskill = 'slave["anal_stretch"]'
		$subskill_xp = 'slave["anal_stretch_xp"]'
		rise_difficulty = 9 + dynslave['anal_stretch'] * 9
		$coach_skill = 'master_penetration'
		if dynslave['anal_stretch'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'analfisting', 'girls/sex_scenes/')
			$play_sound[2] = $fisting_sound[dynslave['age']]
			$text[1] = $analfisting_lesson_description[dynslave['anal_stretch']]
			interaction_dynslave['erotic_stimulation'] = master_petting
			ejaculation_intensity = 0
			dynslave_rate['pride'] -= 1
			house_mess_rate += 12
			master_hygiene_rate += 15
			dynslave_rate['hygiene'] += 12
		}
		$place = 'bedroom'
	}
end

if interaction = 1334: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_anal_stretch, 'dyn'+'slave', 'slave')
if interaction = 7013: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_anal_stretch, 'dyn'+'slave', 'assistant')

!Personal lesson on double penetration
if code_defined['interaction_lesson_dp'] = 0:
	code_defined['interaction_lesson_dp'] = 1 &! do-once

	$interaction_lesson_dp = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 15, 12)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['orgy']
		if dynslave['sub_dp'] > 0: orgastic = 1
		shameful = 1
		$subskill = 'slave["sub_dp"]'
		$subskill_xp = 'slave["sub_dp_xp"]'
		rise_difficulty = 7 + dynslave['sub_dp'] * 7
		$coach_skill = 'master_penetration'
		sex_ability = (1 + dynslave['sub_dp']*2 + dynslave['penetration'] + dynslave['oral'] + dynslave['roleplay'] + dynslave['beauty'])/6 &! sharing the slave two ways is less satisfying
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_dp'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'gangbang', 'girls/sex_scenes/') &! TODO: dp-specific images
			if dynslave['virginity'] < 2: $bg_path = func('display_pic', 'dynslave', 'defloration', 'girls/sex_scenes/')
			$play_sound[2] = $fuck_sound[dynslave['age']]
			$text[1] = $dp_lesson_description[dynslave['sub_dp']] &! TODO
			interaction_dynslave['erotic_stimulation'] = master_penetration + 2
			ejaculation_intensity = sex_quality
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate
			if rand(1,6) = 1 and rand(1,6) > dynslave['stamina'] and dynslave['ill'] = 0: dynslave['ill'] = 1 &! additional illness chance from other partner
			dynslave_rate['pride'] -= 1
			dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
			house_mess_rate += 6
			master_hygiene_rate += 8
			dynslave_rate['hygiene'] += 8
		}
		$place = 'guild'
	}
end

if interaction = 1342: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_dp, 'dyn'+'slave', 'slave')
if interaction = 7015: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_dp, 'dyn'+'slave', 'assistant')

!Personal lesson on triple penetration
if code_defined['interaction_lesson_tp'] = 0:
	code_defined['interaction_lesson_tp'] = 1 &! do-once

	$interaction_lesson_tp = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 16, 13)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['orgy']
		if dynslave['sub_tp'] > 0: orgastic = 1
		shameful = 1
		$subskill = 'slave["sub_tp"]'
		$subskill_xp = 'slave["sub_tp_xp"]'
		rise_difficulty = 9 + dynslave['sub_tp'] * 9
		$coach_skill = 'master_penetration'
		sex_ability = (1 + dynslave['sub_tp']*2 + dynslave['penetration'] + dynslave['oral'] + dynslave['roleplay'] + dynslave['beauty'])/7 &! sharing the slave three ways is even less satisfying
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_tp'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'gangbang', 'girls/sex_scenes/') &! TODO: tp-specific images
			if dynslave['virginity'] < 2: $bg_path = func('display_pic', 'dynslave', 'defloration', 'girls/sex_scenes/')
			$play_sound[2] = $fuck_sound[dynslave['age']]
			$text[1] = $tp_lesson_description[dynslave['sub_tp']] &! TODO
			interaction_dynslave['erotic_stimulation'] = master_penetration + 4
			ejaculation_intensity = sex_quality
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate
			if rand(1,5) = 1 and rand(1,6) > dynslave['stamina'] and dynslave['ill'] = 0: dynslave['ill'] = 1 &! additional illness chance from other partners
			dynslave_rate['pride'] -= 2
			dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
			house_mess_rate += 12
			master_hygiene_rate += 8
			dynslave_rate['hygiene'] += 20
		}
		$place = 'guild'
	}
end

if interaction = 1343: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_tp, 'dyn'+'slave', 'slave')
if interaction = 7016: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_tp, 'dyn'+'slave', 'assistant')

!Personal lesson on gangbang
if code_defined['interaction_lesson_gangbang'] = 0:
	code_defined['interaction_lesson_gangbang'] = 1 &! do-once

	$interaction_lesson_gangbang = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to participate - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 17, 16)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['orgy']
		if dynslave['sub_gangbang'] > 0: orgastic = 1
		shameful = 1
		disgusting = 1 &! added disgusting flag (rimming, gangbang) - ImperatorAugustus
		$subskill = 'slave["sub_gangbang"]'
		$subskill_xp = 'slave["sub_gangbang_xp"]'
		rise_difficulty = 9 + dynslave['sub_gangbang'] * 9
		$coach_skill = 'master_penetration'
		perv_rating = 3
		$perv_act1 = 'making'
		$perv_act2 = ' whore herself to a roomful of grown men'
		sex_ability = (1 + dynslave['sub_gangbang']*2 + dynslave['penetration'] + dynslave['petting'] + dynslave['oral'] + dynslave['roleplay'] + dynslave['beauty'])/9 &! sharing the slave with many is even less satisfying
		sex_quality = min(5, max(1, sex_ability))
		if dynslave['sub_gangbang'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'gangbang', 'girls/sex_scenes/')
			if dynslave['virginity'] < 2: $bg_path = func('display_pic', 'dynslave', 'defloration', 'girls/sex_scenes/')
			$play_sound[2] = $fuck_sound[dynslave['age']]
			$text[1] = $gangbang_lesson_description[dynslave['sub_gangbang']] &! TODO
			! moved skillups into $special_part so they do not occur if the slave refuses - ImperatorAugustus
			if dynslave['sub_gangbang'] >= 4:
				if dynslave['sub_asslik'] < 2: dynslave['sub_asslik'] += 1 & dynslave['sub_asslik_xp'] = 0
				if dynslave['sub_dt'] < 2: dynslave['sub_dt'] += 1 & dynslave['sub_dt_xp'] = 0
				if dynslave['sub_tongue'] < 2: dynslave['sub_tongue'] += 1 & dynslave['sub_tongue_xp'] = 0
				if dynslave['sub_kiss'] < 2: dynslave['sub_kiss'] += 1 & dynslave['sub_kiss_xp'] = 0
				if dynslave['sub_paizuri'] < 2:  dynslave['sub_paizuri'] += 1 & dynslave['sub_paizuri_xp'] = 0
				if dynslave['sub_hug'] < 2: dynslave['sub_hug'] += 1 & dynslave['sub_hug_xp'] = 0
				if dynslave['sub_fj'] < 2: dynslave['sub_fj'] += 1 & dynslave['sub_fj_xp'] = 0
				if dynslave['sub_hj'] < 3: dynslave['sub_hj'] += 1 & dynslave['sub_hj_xp'] = 0
				if dynslave['sub_seduce'] < 1: dynslave['sub_seduce'] += 1 & dynslave['sub_seduce_xp'] = 0
				if dynslave['sub_exhibit'] < 2: dynslave['sub_exhibit'] += 1 & dynslave['sub_exhibit_xp'] = 0
				if dynslave['sub_humiliation'] < 1: dynslave['sub_humiliation'] += 1 & dynslave['sub_humiliation_xp'] = 0
				if dynslave['sub_mazo'] < 1: dynslave['sub_mazo'] += 1 & dynslave['sub_mazo_xp'] = 0
			end
			if master_excitement < -2 or dynslave['sub_gangbang'] = 3 or dynslave['sub_gangbang'] = 4:
				interaction_dynslave['erotic_stimulation'] = 8
				ejaculation_intensity = 0 &! master is not participating
				dynslave['cum_load'] += rand(10,15) &! needed because ejaculation_intensity = 0 (represents other participants, 40 less than barn group insemination [all vaginal, costs 30$, no disease risk])
			else
				interaction_dynslave['erotic_stimulation'] = master_penetration + 8
				ejaculation_intensity = sex_quality
			end
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
			if rand(1,4) = 1 and rand(1,6) > dynslave['stamina'] and dynslave['ill'] = 0: dynslave['ill'] = 1 &! additional illness chance from other partners
			dynslave_rate['pride'] -= 3
			dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1) & master_str_rate += iif(master_str < 4, 1, 0)
			house_mess_rate += 15
			master_hygiene_rate += 8
			dynslave_rate['hygiene'] += 25
		}
		$place = 'guild'
	}
end

if interaction = 1344: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_gangbang, 'dyn'+'slave', 'slave')
if interaction = 7017: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_gangbang, 'dyn'+'slave', 'assistant')

!Personal lesson on bukkake
if code_defined['interaction_lesson_bukkake'] = 0:
	code_defined['interaction_lesson_bukkake'] = 1 &! do-once

	$interaction_lesson_bukkake = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 10
		interaction_dynslave['motivation_repulse'] = 5 - (dynslave['petting'] + dynslave['oral'])/2
		orgastic = 0
		shameful = 1
		disgusting = 1
		$subskill = 'slave["sub_bukkake"]'
		$subskill_xp = 'slave["sub_bukkake_xp"]'
		rise_difficulty = 7 + dynslave['sub_bukkake'] * 7
		$coach_skill = 'master_fetish'
		if dynslave['sub_bukkake'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'bukkake', 'girls/sex_scenes/')
			$play_sound[2] = $bj_sound[dynslave['age']]
			$text[1] = $bukkake_lesson_description[dynslave['sub_bukkake']] &! TODO
			interaction_dynslave['erotic_stimulation'] = dynslave['sub_bukkake']
			if rand(1,12) = 1 and rand(1,6) > dynslave['stamina'] and dynslave['ill'] = 0: dynslave['ill'] = 1 &! small illness chance from oral exposure
			dynslave_rate['pride'] -= 1
			house_mess_rate += 20
			master_hygiene_rate += 10
			dynslave_rate['hygiene'] += 30
		}
		$place = 'guild'
	}
end

if interaction = 1345: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_bukkake, 'dyn'+'slave', 'slave')
if interaction = 7018: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_bukkake, 'dyn'+'slave', 'assistant')

!Personal lesson on sex with dog
if code_defined['interaction_lesson_zoosex'] = 0:
	code_defined['interaction_lesson_zoosex'] = 1 &! do-once

	$interaction_lesson_zoosex = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 20, 19)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['xenophily']
		if dynslave['sub_zoosex'] > 0: orgastic = 1
		disgusting = 1
		$subskill = 'slave["sub_zoosex"]'
		$subskill_xp = 'slave["sub_zoosex_xp"]'
		rise_difficulty = 11 + dynslave['sub_zoosex'] * 11
		$coach_skill = 'master_fetish'
		perv_rating = 3
		$perv_act1 = 'the fact that she is'
		if dynslave['sub_zoosex'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'dog', 'girls/sex_scenes/')
			$play_sound[2] = $fuck_sound[dynslave['age']]
			$text[1] = $dogsex_lesson_description[dynslave['sub_zoosex']] &! uses delayed sub-expressions
			interaction_dynslave['erotic_stimulation'] = dynslave['sub_zoosex']
			ejaculation_intensity = 0 &! master is not involved
			if dynslave['sub_zoosex'] > 0 and dynslave['sub_zoosex'] ! 2:
				if dynslave['sub_zoosex'] ! 3:
					dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
					dynslave['cum_load'] += rand((dynslave['sub_zoosex']+dynslave['sub_vaginal'])/4, (dynslave['sub_zoosex']+dynslave['sub_vaginal'])/2) &! for cow (a more skilled slave can extract more semen)
				end
				dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			end
			dynslave_rate['pride'] -= 2
			house_mess_rate += 12
			master_hygiene_rate += 1
			dynslave_rate['hygiene'] += 15
		}
		if barn > 0:
			$place = 'barn'
		elseif kitchen > 0:
			$place = 'kitchen'
		else
			$place = 'bedroom'
		end
	}
end

if interaction = 1351: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_zoosex, 'dyn'+'slave', 'slave')
if interaction = 7019: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_zoosex, 'dyn'+'slave', 'assistant')

!Personal lesson on sex with pig
if code_defined['interaction_lesson_pigsex'] = 0:
	code_defined['interaction_lesson_pigsex'] = 1 &! do-once

	$interaction_lesson_pigsex = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 21, 20)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['xenophily']
		if dynslave['sub_bestiality'] > 0: orgastic = 1
		disgusting = 1
		painful = 1
		$subskill = 'slave["sub_bestiality"]'
		$subskill_xp = 'slave["sub_bestiality_xp"]'
		rise_difficulty = 11 + dynslave['sub_bestiality'] * 11
		$coach_skill = 'master_fetish'
		if dynslave['sub_bestiality'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'pig', 'girls/sex_scenes/')
			$play_sound[2] = $fuck_sound[dynslave['age']]
			$text[1] = $pigsex_lesson_description[dynslave['sub_bestiality']] &! TODO
			interaction_dynslave['erotic_stimulation'] = dynslave['sub_bestiality']
			ejaculation_intensity = 0 &! master is not involved
			if dynslave['sub_bestiality'] > 0 and dynslave['sub_bestiality'] ! 3:
				dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
				dynslave['cum_load'] += rand((dynslave['sub_bestiality']+dynslave['sub_vaginal'])/4, (dynslave['sub_bestiality']+dynslave['sub_vaginal'])/2) &! for cow (a more skilled slave can extract more semen)
				dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			end
			dynslave_rate['pride'] -= 2
			house_mess_rate += 5
			master_hygiene_rate += 1
			dynslave_rate['hygiene'] += 25
		}
		$place = 'farm'
	}
end

if interaction = 1352: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_pigsex, 'dyn'+'slave', 'slave')
if interaction = 7020: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_pigsex, 'dyn'+'slave', 'assistant')

!Personal lesson on sex with horse
if code_defined['interaction_lesson_horsesex'] = 0:
	code_defined['interaction_lesson_horsesex'] = 1 &! do-once

	$interaction_lesson_horsesex = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 23, 22)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['sub_fisting']/2
		if dynslave['sub_horse'] > 1: orgastic = 1
		disgusting = 1
		painful = 1
		$subskill = 'slave["sub_horse"]'
		$subskill_xp = 'slave["sub_horse_xp"]'
		rise_difficulty = 11 + dynslave['sub_horse'] * 11
		$coach_skill = 'master_fetish'
		if dynslave['sub_horse'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'horse', 'girls/sex_scenes/')
			$text[1] = $horsesex_lesson_description[dynslave['sub_horse']] &! TODO
			$play_sound[2] = $assfuck_sound[dynslave['age']]
			interaction_dynslave['erotic_stimulation'] = dynslave['sub_horse']
			if dynslave['sub_horse'] > 1:
				damage = 8 - dynslave['sub_horse'] - dynslave['sub_fisting']/5
				dynslave_rate['sensitivity'] -= damage
				ejaculation_intensity = 0 &! master is not involved
				dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
				dynslave['cum_load'] += rand((dynslave['sub_horse']+dynslave['sub_vaginal'])/2, (dynslave['sub_horse']+dynslave['sub_vaginal']) - (dynslave['sub_horse']+dynslave['sub_vaginal'])/2) &! for cow (a more skilled slave can extract more semen; horses are more potent than pigs or dogs)
				dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			end
			if dynslave['sub_horse'] = 4 and dynslave['virginity'] = 2: dynslave['virginity'] = 3
			dynslave_rate['pride'] -= 2
			house_mess_rate += 5
			master_hygiene_rate += 1
			dynslave_rate['hygiene'] += 15
		}
		$place = 'farm'
	}
end

if interaction = 1353: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_horsesex, 'dyn'+'slave', 'slave')
if interaction = 7021: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_horsesex, 'dyn'+'slave', 'assistant')

!Personal lesson on milking/being raped by a Tentacle Fiend
if code_defined['interaction_lesson_tentacles'] = 0:
	code_defined['interaction_lesson_tentacles'] = 1 &! do-once

	$interaction_lesson_tentacles = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 25, 24)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['xenophily']
		orgastic = 1
		disgusting = 1
		bruising = 1
		$subskill = 'slave["sub_tentacles"]'
		$subskill_xp = 'slave["sub_tentacles_xp"]'
		rise_difficulty = 12 + dynslave['sub_tentacles'] * 12
		if dynslave['sub_tentacles'] > tentacle_size: rise_difficulty += 999 &! very slow to level up if practicing on a fiend size below the current skill level
		$coach_skill = 'master_fetish'
		if dynslave['sub_tentacles'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'tentacles', 'girls/sex_scenes/')
			$play_sound[2] = $bj_sound[dynslave['age']]
			if dynslave['sub_tentacles'] = 5:
				$text[1] = $tentacle_lesson_description[5] &! text 5 is mastery, applicable for any tentacle size
			elseif dynslave['sub_tentacles'] = 0:
				$text[1] = $tentacle_lesson_description[0] &! introductory lesson is text 0, size independent
			elseif tentacle_size > 2:
				$text[1] = $tentacle_lesson_description[4] &! tentacle sizes 3 and 4 share lesson text 4
				if dynslave['sub_tentacles'] > tentacle_size: $text[1] += ' Of course, there is little more she can learn with a fiend of this size, but frequent visits may encourage its growth.'
			else
				$text[1] = $tentacle_lesson_description[tentacle_size + 1] &! tentacles sizes 0 through 2 align with lesson texts 1 through 3
				if dynslave['sub_tentacles'] > tentacle_size: $text[1] += ' Of course, there is little more she can learn with a fiend of this size, but frequent visits may encourage its growth.'
			end
			interaction_dynslave['erotic_stimulation'] = 2 + tentacle_size*5 &! may trigger multiple orgasms depending on arousal level
			ejaculation_intensity = 0 &! master is not involved
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
			dynslave['cum_load'] += rand((tentacle_size*2)/dynslave['virginity'], (tentacle_size*3)/dynslave['virginity']) &! for cow (amount depends on fiend size and how tight the slave is)
			if dynslave['fertility'] = 0 and dynslave['pregnant'] < 1 and dynslave['parasite'] < 1 and dynslave['fiend_tattoo'] = 0: dynslave['parasite'] = 1
			if dynslave['parasite'] < 1: dynslave_rate['arousal'] -= (dynslave['arousal'] + dynslave['sensitivity'])
			tentacle_hp += 1
			if dynslave['sub_tentacles'] > tentacle_size:
				tentacle_hp += 2
				spawn_semen += semen_gain[max(0, tentacle_size - spawn_milked)]
			end
			spawn_milked += dynslave['sub_tentacles']
			if felicity = 1 and $quest12 ! 'fail' and active[$quest[12]] = 1 and dynslave_type ! 2572: $quest12 = 'fail' & $quest12_failreason = 'It seems you haven’t been making her care for your fiend, slaver.'
			dynslave_rate['pride'] -= 2
			damage = 4 - dynslave['sub_tentacles']
			dynslave_rate['sensitivity'] -= damage
			dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1) &! no extra calorie drop due to fiend cum swallowed
			house_mess_rate += 10
			master_hygiene_rate += 1
			dynslave_rate['hygiene'] += 30
		}
		$place = 'pen'
	}
end

if interaction = 1354: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_tentacles, 'dyn'+'slave', 'slave')
if interaction = 7022: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_tentacles, 'dyn'+'slave', 'assistant')

!Personal lesson on sex with Arachnid Spider
if code_defined['interaction_lesson_arachnidSpider'] = 0:
	code_defined['interaction_lesson_arachnidSpider'] = 1 &! do-once

	$interaction_lesson_arachnidSpider = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 24, 23)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['xenophily']
		if dynslave['sub_arachnidSpider'] > 3: orgastic = 1
		disgusting = 1
		painful = 1
		vermin_based = 1
		$subskill = 'slave["sub_arachnidSpider"]'
		$subskill_xp = 'slave["sub_arachnidSpider_xp"]'
		rise_difficulty = 11 + dynslave['sub_arachnidSpider'] * 11
		$coach_skill = 'master_fetish'
		if dynslave['sub_arachnidSpider'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'spider', 'girls/sex_scenes/')
			$play_sound[2] = $assfuck_sound[dynslave['age']]
			if dynslave['domini_dictum'] = 1:
				$text[1] = $arachnid_dominidictum_lesson_description[dynslave['sub_arachnidSpider']]
			else
				$text[1] = $arachnid_lesson_description[dynslave['sub_arachnidSpider']]
			end
			if dynslave['sub_arachnidSpider'] > 2:
				interaction_dynslave['erotic_stimulation'] = dynslave['sub_arachnidSpider']
				ejaculation_intensity = 0 &! master is not involved
				dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
				damage = 8 - dynslave['sub_arachnidSpider']
				dynslave_rate['sensitivity'] -= damage
				dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			elseif dynslave['domini_dictum'] = 0:
				if dynslave['sub_arachnidSpider'] < 2:
					interaction_dynslave['diligence'] = 0 &! suppress intimate reaction text, trigger guilt, minimal progress until C- to match lesson descriptions - ImperatorAugustus
				elseif dynslave['sub_arachnidSpider'] = 2:
					interaction_dynslave['diligence'] /= 2 &! more appropriate text selection, possible guilt, slower progress C- to B+ to match lesson descriptions - ImperatorAugustus
				end
			end
			dynslave_rate['pride'] -= 2
			house_mess_rate += 8
			master_hygiene_rate += 1
			dynslave_rate['hygiene'] += 15
		}
		$place = 'dungeon'
	}
end

if interaction = 1355: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_arachnidSpider, 'dyn'+'slave', 'slave')
if interaction = 7023: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_arachnidSpider, 'dyn'+'slave', 'assistant')

!Personal lesson on sex with Sea Tentacle
if code_defined['interaction_lesson_polypusvermin'] = 0:
	code_defined['interaction_lesson_polypusvermin'] = 1 &! do-once

	$interaction_lesson_polypusvermin = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1, 25, 24)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['xenophily']
		if dynslave['sub_polypusvermin'] > 2: orgastic = 1
		disgusting = 1
		painful = 1
		bruising = 1
		$subskill = 'slave["sub_polypusvermin"]'
		$subskill_xp = 'slave["sub_polypusvermin_xp"]'
		rise_difficulty = 11 + dynslave['sub_polypusvermin'] * 11
		$coach_skill = 'master_fetish'
		if dynslave['sub_polypusvermin'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'tentacles', 'girls/sex_scenes/')
			$play_sound[2] = $assfuck_sound[dynslave['age']]
			$text[1] = $polypus_lesson_description[dynslave['sub_polypusvermin']] &! TODO
			if dynslave['sub_polypusvermin'] > 1:
				interaction_dynslave['erotic_stimulation'] = 7 + dynslave['sub_polypusvermin']*3 &! may trigger multiple orgasms depending on arousal level
				ejaculation_intensity = 0 &! master is not involved
				dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
				! no cum_load for these tentacles
				damage = 4 - dynslave['sub_polypusvermin']
				dynslave_rate['sensitivity'] -= damage
				dynslave['calories'] -= 1 & dynslave_rate['stamina'] += min(interaction_dynslave['diligence'], 1)
			elseif interaction_dynslave['diligence'] > 0:
				interaction_dynslave['diligence'] = 0 &! suppress intimate reaction text, trigger guilt, minimal progress until C- to match lesson descriptions (linked training from fiend milking provides a shortcut) - ImperatorAugustus
			end
			dynslave_rate['pride'] -= 2
			house_mess_rate += 8
			master_hygiene_rate += 1
			dynslave_rate['hygiene'] += 15
		}
		$place = 'dungeon'
	}
end

if interaction = 1356: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_polypusvermin, 'dyn'+'slave', 'slave')
if interaction = 7024: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_polypusvermin, 'dyn'+'slave', 'assistant')

!masochism
if code_defined['interaction_lesson_masochism'] = 0:
	code_defined['interaction_lesson_masochism'] = 1 &! do-once

	$interaction_lesson_masochism = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 12
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['fetishism']
		painful = 1
		bruising = 1
		$subskill = 'slave["sub_mazo"]'
		$subskill_xp = 'slave["sub_mazo_xp"]'
		rise_difficulty = 7 + dynslave['sub_mazo'] * 7
		$coach_skill = 'master_fetish'
		perv_rating = (1 + dynslave['sub_mazo'])/2
		$perv_act1 = 'hurting'
		if dynslave['sub_mazo'] > 5: $interaction_type = 'completed'
		$special_part = {
			interaction_lesson_masochism_chance = rand(1,12)
			if dynslave['sub_mazo'] = 0 or (interaction_lesson_masochism_chance = 1 and dynslave['sub_mazo'] = 5):
				! flagellation/slipper
				$bg_path = func('display_pic', 'slave', 'slipper', 'girls/torture_scenes/flagellation/')
				$play_sound[2] = $spank_sound
			elseif dynslave['sub_mazo'] = 1 or (interaction_lesson_masochism_chance = 2 and dynslave['sub_mazo'] = 5):
				! wax
				$bg_path = func('display_pic', 'slave', 'wax', 'girls/torture_scenes/torture_instruments/')
				$play_sound[2] = $pain[dynslave['age']]
			elseif dynslave['sub_mazo'] = 2 or (interaction_lesson_masochism_chance = 3 and dynslave['sub_mazo'] = 5):
				! bondage/bondage_breast or bondage/corner or torture_instruments/clamps
				if interaction_lesson_masochism_chance <= 4:
					if master_bondage + ( dynslave['age'] / 2 ) + dynslave['boobs'] >= 8:
						$bg_path = $pain_bondage_bg
						if dynslave['lactation'] > 0: dynslave['milk_summ'] = 0
					else
						$bg_path = func('display_pic', 'slave', 'painful', 'girls/torture_scenes/bondage/')
					end
					$play_sound[2] = $cry[dynslave['age']]
				elseif interaction_lesson_masochism_chance <= 8:
					$bg_path = func('display_pic', 'slave', 'corner', 'girls/torture_scenes/bondage/')
					$play_sound[2] = $cry[dynslave['age']]
				else
					$bg_path = func('display_pic', 'slave', 'clamps', 'girls/torture_scenes/torture_instruments/')
					$play_sound[2] = $pain[dynslave['age']]
				end
			elseif dynslave['sub_mazo'] = 3 or (interaction_lesson_masochism_chance = 4 and dynslave['sub_mazo'] = 5):
				! bondage/erotic or bondage/painful or bondage/rope
				if interaction_lesson_masochism_chance <= 4:
					$bg_path = func('display_pic', 'slave', 'erotic', 'girls/torture_scenes/bondage/')
					$play_sound[2] = $soft_pain[dynslave['age']] &! intentionally not using orgasm sound here - ImperatorAugustus
				elseif interaction_lesson_masochism_chance <= 8:
					$bg_path = func('display_pic', 'slave', 'painful', 'girls/torture_scenes/bondage/')
					$play_sound[2] = $cry[dynslave['age']]
				else
					$bg_path = func('display_pic', 'slave', 'rope_saddle', 'girls/torture_scenes/bondage/')
					$play_sound[2] = $cry[dynslave['age']]
				end
			elseif dynslave['sub_mazo'] = 4 or (interaction_lesson_masochism_chance <= 6 and dynslave['sub_mazo'] = 5):
				! multiple_categories/water or flagellation/lash
				if interaction_lesson_masochism_chance <= 5:
					$bg_path = func('display_pic', 'slave', 'water', 'girls/torture_scenes/multiple_categories/')
					$play_sound[2] = $drowning[dynslave['age']]
				else
					$bg_path = func('display_pic', 'slave', 'lash', 'girls/torture_scenes/flagellation/')
					$play_sound[2] = $whip_sound
				end
			elseif interaction_lesson_masochism_chance = 7:
				$bg_path = func('display_pic', 'slave', 'spank', 'girls/torture_scenes/battering/')
				$play_sound[2] = $spank_sound
			elseif interaction_lesson_masochism_chance = 8:
				$bg_path = func('display_pic', 'slave', 'belt', 'girls/torture_scenes/flagellation/')
				$play_sound[2] = $pain[dynslave['age']]
			elseif interaction_lesson_masochism_chance = 9:
				$bg_path = func('display_pic', 'slave', 'needle', 'girls/torture_scenes/torture_instruments/')
				$play_sound[2] = $severe_pain[dynslave['age']]
			elseif interaction_lesson_masochism_chance = 10:
				$bg_path = func('display_pic', 'slave', 'burning_ointment', 'girls/torture_scenes/torture_instruments/', 'any_age')
				$play_sound[2] = $pain[dynslave['age']]
			elseif interaction_lesson_masochism_chance = 11:
				$bg_path = func('display_pic', 'slave', 'acetic_infusion', 'girls/torture_scenes/torture_instruments/')
				$play_sound[2] = $pain[dynslave['age']]
			else
				$bg_path = func('display_pic', 'slave', 'hang_legs', 'girls/torture_scenes/bondage/')
				$play_sound[2] = $cry[dynslave['age']]
			end
			killvar 'interaction_lesson_masochism_chance'
			$text[1] = $mazo_lesson_description[dynslave['sub_mazo']] &! uses delayed sub-expressions
			damage = dynslave['stamina'] &! damage exceeding stamina causes wounds
			interaction_dynslave['erotic_stimulation'] = 1 + (master_domination + master_str + master_flagelation + master_bondage)/3
			if dynslave['sub_mazo'] = 2 or dynslave['sub_mazo'] = 4: master_bondage_rate += 1
			house_mess_rate += 10
			master_hygiene_rate += 5
			dynslave_rate['hygiene'] += 10
		}
		$place = 'bedroom'
	}
end

if interaction = 1361: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_masochism, 'dyn'+'slave', 'slave')
if interaction = 7026: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_masochism, 'dyn'+'slave', 'assistant')

!self-harm
if code_defined['interaction_lesson_selfpain'] = 0:
	code_defined['interaction_lesson_selfpain'] = 1 &! do-once

	$interaction_lesson_selfpain = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 17
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['fetishism']
		painful = 1
		scarification = 1
		$subskill = 'slave["sub_selfpain"]'
		$subskill_xp = 'slave["sub_selfpain_xp"]'
		rise_difficulty = 11 + dynslave['sub_selfpain'] * 11
		$coach_skill = 'master_fetish'
		if dynslave['sub_selfpain'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'selfpain', 'girls/sex_scenes/')
			$play_sound[2] = $soft_pain[dynslave['age']]
			$text[1] = $selfpain_lesson_description[dynslave['sub_selfpain']] &! uses delayed sub-expressions
			damage = 3 + dynslave['sub_selfpain'] &! damage exceeding stamina causes wounds
			interaction_dynslave['erotic_stimulation'] = 1 + dynslave['sub_masturbation']
			dynslave_rate['pride'] -= 1
			house_mess_rate += 5
			master_hygiene_rate += 1
			dynslave_rate['hygiene'] += 10
		}
		$place = 'bedroom'
	}
end

if interaction = 1362: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_selfpain, 'dyn'+'slave', 'slave')
if interaction = 7027: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_selfpain, 'dyn'+'slave', 'assistant')

!golden shower
if code_defined['interaction_lesson_piss'] = 0:
	code_defined['interaction_lesson_piss'] = 1 &! do-once

	$interaction_lesson_piss = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 18
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['fetishism']
		disgusting = 1
		$subskill = 'slave["sub_piss"]'
		$subskill_xp = 'slave["sub_piss_xp"]'
		rise_difficulty = 11 + dynslave['sub_piss'] * 11
		$coach_skill = 'master_fetish'
		perv_rating = 3
		$perv_act1 = 'degrading'
		if dynslave['sub_piss'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'urine', 'girls/sex_scenes/')
			$play_sound[2] = $urine[dynslave['age']]
			$text[1] = $pissing_lesson_description[dynslave['sub_piss']] &! TODO
			dynslave_rate['pride'] -= dynslave['sub_piss'] + 1
			house_mess_rate += 25
			master_hygiene_rate += 3
			dynslave_rate['hygiene'] += 20
		}
		$place = 'bathroom'
	}
end

if interaction = 1363: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_piss, 'dyn'+'slave', 'slave')
if interaction = 7028: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_piss, 'dyn'+'slave', 'assistant')

!scat
if code_defined['interaction_lesson_scat'] = 0:
	code_defined['interaction_lesson_scat'] = 1 &! do-once

	$interaction_lesson_scat = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 26
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['fetishism']
		disgusting = 1
		$subskill = 'slave["sub_kopro"]'
		$subskill_xp = 'slave["sub_kopro_xp"]'
		rise_difficulty = 12 + dynslave['sub_kopro'] * 12
		$coach_skill = 'master_fetish'
		perv_rating = 3
		$perv_act1 = 'doing this to'
		if dynslave['sub_kopro'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'oralfetish', 'girls/sex_scenes/')
			$play_sound[2] = $kopro_sound[dynslave['age']]
			$text[1] = $kopro_lesson_description[dynslave['sub_kopro']] &! TODO
			if rand(1,5) = 1: dynslave['ill'] += 1 &! added 20% chance to become ill (consuming faeces bacteria orally is a vector of infection) - ImperatorAugustus
			dynslave_rate['pride'] -= dynslave['sub_kopro'] + 4
			house_mess_rate += 30
			master_hygiene_rate += 5
			dynslave_rate['hygiene'] += 40
		}
		$place = 'bathroom'
	}
end

if interaction = 1364: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_scat, 'dyn'+'slave', 'slave')
if interaction = 7029: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_scat, 'dyn'+'slave', 'assistant')

!enema
if code_defined['interaction_lesson_enema'] = 0:
	code_defined['interaction_lesson_enema'] = 1 &! do-once

	$interaction_lesson_enema = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 9
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['fetishism']
		shameful = 1
		$subskill = 'slave["sub_enema"]'
		$subskill_xp = 'slave["sub_enema_xp"]'
		rise_difficulty = 7 + dynslave['sub_enema'] * 7
		$coach_skill = 'master_fetish'
		perv_rating = 1
		$perv_act1 = 'doing this to'
		if dynslave['sub_enema'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'enema', 'girls/sex_scenes/')
			$play_sound[2] = $soft_pain[dynslave['age']]
			$text[1] = $enema_lesson_description[dynslave['sub_enema']] &! TODO
			interaction_dynslave['erotic_stimulation'] = 1 + dynslave['sub_anal'] + dynslave['anal_stretch']
			if dynslave['stamina'] < 3: dynslave_rate['stamina'] += 1 &! removed skill_adv_mul, this is healing not training - ImperatorAugustus
			dynslave_rate['pride'] -= dynslave['pride']
			house_mess_rate += 20
			master_hygiene_rate += 10
			dynslave_rate['hygiene'] += -5
			!update additional master skill other than $coach_skill
			if master_medic < 1: master_medic_rate += (skill_adv_mul * 1) &! progression stops at D- (provides skill unlock without medical gown)
		}
		$place = 'bathroom'
	}
end

if interaction = 1365: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_enema, 'dyn'+'slave', 'slave')
if interaction = 7025: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_enema, 'dyn'+'slave', 'assistant')

!seduction
if code_defined['interaction_lesson_seduction'] = 0:
	code_defined['interaction_lesson_seduction'] = 1 &! do-once

	$interaction_lesson_seduction = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 0
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['roleplay']
		$subskill = 'slave["sub_seduce"]'
		$subskill_xp = 'slave["sub_seduce_xp"]'
		rise_difficulty = 5 + dynslave['sub_seduce'] * 5
		$coach_skill = 'master_artdirector'
		perv_rating = (1 + dynslave['sub_seduce'])/2
		$perv_act2 = ' acting like such a slut'
		if dynslave['sub_seduce'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'seduce', 'girls/sex_scenes/')
			$play_sound[2] = $seduce_sound[dynslave['age']]
			$text[1] = $seduction_lesson_description[dynslave['sub_seduce']] &! TODO
			interaction_dynslave['erotic_stimulation'] = 1 + dynslave['roleplay'] + master_style
			rise_up = min(master_artdirector, dynslave['roleplay'])
			dynslave_rate['expression'] += rise_up
			dynslave_rate['calisthenics'] += rise_up
			house_mess_rate += 2
			master_hygiene_rate += 2
			dynslave_rate['hygiene'] += 3
		}
		$place = 'bedroom'
	}
end

if interaction = 1371: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_seduction, 'dyn'+'slave', 'slave')
if interaction = 7030: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_seduction, 'dyn'+'slave', 'assistant')

!masturbation
if code_defined['interaction_lesson_masturbation'] = 0:
	code_defined['interaction_lesson_masturbation'] = 1 &! do-once

	$interaction_lesson_masturbation = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 0
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['roleplay']
		orgastic = 1
		shameful = 1
		$subskill = 'slave["sub_masturbation"]'
		$subskill_xp = 'slave["sub_masturbation_xp"]'
		rise_difficulty = 5 + dynslave['sub_masturbation'] * 5
		$coach_skill = 'master_artdirector'
		perv_rating = (1 + dynslave['sub_masturbation'])/2
		$perv_act2 = ' play with herself'
		if dynslave['sub_masturbation'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'masturbation', 'girls/sex_scenes/')
			$play_sound[2] = $masturbate_sound[dynslave['age']]
			$text[1] = $masturbation_lesson_description[dynslave['sub_masturbation']] &! TODO
			interaction_dynslave['erotic_stimulation'] = dynslave['sub_masturbation'] + master_style
			house_mess_rate += 5
			master_hygiene_rate += 2
			dynslave_rate['hygiene'] += 5
		}
		$place = 'bedroom'
	}
end

if interaction = 1372: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_masturbation, 'dyn'+'slave', 'slave')
if interaction = 7031: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_masturbation, 'dyn'+'slave', 'assistant')

!dildo
if code_defined['interaction_lesson_dildo'] = 0:
	code_defined['interaction_lesson_dildo'] = 1 &! do-once

	$interaction_lesson_dildo = {
		if dynslave['virginity'] < 1 and dynslave['sub_dildo'] > 0 and confirmed_dildo_defloration = 0:
			$place = 'study'
			$picture_type = 'dynslave_picture'
			$text[1] = '  <<$dynslave_name>> will no longer be a virgin after this lesson. Proceed anyway?'
			$yes = {
				confirmed_dildo_defloration = 1
				gt 'interaction'
			}
			$no = {
				killvar 'confirmed_dildo_defloration'
				menu_form = 0
				gt 'menu_form'
			}
			if debug_interactions ! 2: gt 'choice_screen'
		end
		killvar 'confirmed_dildo_defloration'
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = iif(dynslave['virginity'] < 1 and dynslave['sub_dildo'] > 0, 7, 1)
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['roleplay']
		if dynslave['sub_dildo'] > 2: orgastic = 1
		shameful = 1
		$subskill = 'slave["sub_dildo"]'
		$subskill_xp = 'slave["sub_dildo_xp"]'
		rise_difficulty = 5 + dynslave['sub_dildo'] * 5
		$coach_skill = 'master_artdirector'
		perv_rating = (1 + dynslave['sub_dildo'])/2
		$perv_act2 = ' shoving things inside of herself'
		if dynslave['sub_dildo'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'dildo', 'girls/sex_scenes/')
			$play_sound[2] = $masturbate_sound[dynslave['age']]
			$text[1] = $dildo_lesson_description[dynslave['sub_dildo']] &! TODO
			interaction_dynslave['erotic_stimulation'] = dynslave['sub_dildo'] + master_style
			ejaculation_intensity = 0 &! master is not involved
			if dynslave['sub_dildo'] > 0: dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'dynslave') &! includes $master_ejaculate (but ejaculation_intensity = 0 disables it)
			house_mess_rate += 5
			master_hygiene_rate += 2
			dynslave_rate['hygiene'] += 5
		}
		$place = 'bedroom'
	}
end

if interaction = 1373: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_dildo, 'dyn'+'slave', 'slave')
if interaction = 7032: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_dildo, 'dyn'+'slave', 'assistant')

!Exhibitionism
if code_defined['interaction_lesson_exhibitionism'] = 0:
	code_defined['interaction_lesson_exhibitionism'] = 1 &! do-once

	$interaction_lesson_exhibitionism = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 3
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['roleplay']
		shameful = 1
		$subskill = 'slave["sub_exhibit"]'
		$subskill_xp = 'slave["sub_exhibit_xp"]'
		rise_difficulty = 5 + dynslave['sub_exhibit'] * 5
		$coach_skill = 'master_artdirector'
		perv_rating = (1 + dynslave['sub_exhibit'])/2
		$perv_act1 = 'watching'
		$perv_act2 = ' perform'
		if dynslave['sub_exhibit'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'exhibit', 'girls/sex_scenes/')
			$play_sound[2] = $seduce_sound[dynslave['age']]
			$text[1] = $exhibit_lesson_description[dynslave['sub_exhibit']] &! uses delayed sub-expressions
			interaction_dynslave['erotic_stimulation'] = dynslave['sub_seduce'] + master_style
			house_mess_rate += 2
			master_hygiene_rate += 2
			dynslave_rate['hygiene'] += 1 + dynslave['sub_exhibit']
		}
		$place = 'bedroom'
	}
end

if interaction = 1374: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_exhibitionism, 'dyn'+'slave', 'slave')
if interaction = 7033: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_exhibitionism, 'dyn'+'slave', 'assistant')

!humiliation
if code_defined['interaction_lesson_humiliation'] = 0:
	code_defined['interaction_lesson_humiliation'] = 1 &! do-once

	$interaction_lesson_humiliation = {
		stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
		impotent = 1 &! does not require the master to achieve an erection - ImperatorAugustus
		interaction_dynslave['repulse'] = 2
		interaction_dynslave['motivation_repulse'] = 5 - dynslave['roleplay']
		shameful = 1
		abuse = 1
		$subskill = 'slave["sub_humiliation"]'
		$subskill_xp = 'slave["sub_humiliation_xp"]'
		rise_difficulty = 5 + dynslave['sub_humiliation'] * 5
		$coach_skill = 'master_artdirector'
		perv_rating = (1 + dynslave['sub_humiliation'])/2
		$perv_act1 = 'humiliating'
		if dynslave['sub_humiliation'] > 5: $interaction_type = 'completed'
		$special_part = {
			$bg_path = func('display_pic', 'dynslave', 'humiliation', 'girls/sex_scenes/')
			$play_sound[2] = $moan[dynslave['age']]
			$text[1] = $disgrace_lesson_description[dynslave['sub_humiliation']] &! uses delayed sub-expressions
			interaction_dynslave['erotic_stimulation'] = dynslave['sub_seduce'] + dynslave['sub_exhibit'] + master_cha + master_domination
			dynslave_rate['pride'] -= dynslave['sub_humiliation'] + 1
			if dynslave['meekness'] ! 0 and dynslave['meekness_revealed'] = 0: dynslave['meekness_revealed'] = 1
			house_mess_rate += 2
			master_hygiene_rate += 2
			dynslave_rate['hygiene'] += 2
		}
		$place = 'bedroom'
	}
end

if interaction = 1375: $interaction_type = 'self_sex_lesson' & dynamic $replace($interaction_lesson_humiliation, 'dyn'+'slave', 'slave')
if interaction = 7034: $interaction_type = 'self_sex_lesson_assistant' & dynamic $replace($interaction_lesson_humiliation, 'dyn'+'slave', 'assistant')

!sex - special - Easter Egg feature - crushboss
if interaction = 1395:
	$return_lock = 'menu_form'
	$interaction_type = 'self_sex_lesson_special'
	$place = 'study'
	painful = 0
	orgastic = 1
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	house_mess_rate += 20
	master_hygiene_rate += 15
	slave_rate['hygiene'] += 20
	copyarr '$text', '$sex_special'
end

!REWARDS
!Stroll on the roof
if interaction = 1511:
	$interaction_type = 'praise_date'
	interaction_reward_level = 1
	interaction_reward_cost = 0
	interaction_no_auto_energy_drop = 1 &! no energy cost
	interaction_reward_potence = 1 + (slave['moral']*2 + slave['rational'] + slave['instinct'] + slave['spoil'])/2 - slave['fear'] - slave_already_done_total[$str(interaction)]
	if interaction_reward_potence <= 0: interaction_reward_potence = 1
	if slave['deprivation_attitude'] = -1: interaction_reward_potence *= 2
	$special_part = {
		master_hygiene_rate += 1
		slave_rate['hygiene'] += 1
		house_mess_rate += 1
	}
	$place = 'high_view'
end

!Walk around the city
if interaction = 1512:
	$interaction_type = 'praise_date'
	interaction_reward_level = 2
	interaction_reward_cost = 0
	interaction_reward_potence = (slave['ego'] + slave['temper'])/2 + (slave['moral']*2 + slave['rational'] + slave['instinct'] + slave['spoil'])*1 - slave['fear'] - slave_already_done_total[$str(interaction)]
	easy_for_master = 1 &! half energy for travel only
	easy_for_slave = 1 &! half energy for travel only
	if slave['passion_fame'] = -1: interaction_reward_potence /= 2
	if interaction_reward_potence <= 0: interaction_reward_potence = 1
	$special_part = {
		if $estate = 'white_house': interaction_no_auto_energy_drop = 1 &! waive energy costs entirely when living in White Town - ImperatorAugustus
		if slave['passion_fame'] ! 0 and slave['passion_fame_revealed'] = 0: slave['passion_fame_revealed'] = 1
		house_mess_rate += 1
		master_hygiene_rate += 4
		slave_rate['hygiene'] += 4
	}
	$place = 'white_street_rental'
end

!Go to the beach
if interaction = 1513:
	$interaction_type = 'praise_date'
	interaction_reward_level = 3
	interaction_reward_cost = 2
	interaction_reward_potence = slave['stamina'] + slave['temper'] + (slave['moral']*2 + slave['rational'] + slave['instinct'] + slave['spoil'])*2 - slave['fear'] - slave_already_done_total[$str(interaction)]
	if slave['passion_fame'] = -1: interaction_reward_potence /= 2
	if slave['water_attitude'] = -1: interaction_reward_potence = 0
	if interaction_reward_potence <= 0: interaction_reward_potence = 1
	if slave['passion_fame'] > 0: interaction_reward_potence *= 2
	if slave['water_attitude'] = 2: interaction_reward_potence *= 2
	$special_part = {
		if $estate = 'serpis_house': easy_for_master = 1 & easy_for_slave = 1 &! waive travel cost if the beach is in the same district - ImperatorAugustus
		if slave['passion_fame'] ! 0 and slave['passion_fame_revealed'] = 0: slave['passion_fame_revealed'] = 1
		if slave['water_attitude'] ! 0 and slave['water_attitude_revealed'] = 0: slave['water_attitude_revealed'] = 1
		master_hygiene_rate = 1
		dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'slave')
		house_mess_rate += 2
	}
	$place = 'beach'
end

!Go to the theater
if interaction = 1514:
	$interaction_type = 'praise_date'
	interaction_reward_level = 4
	interaction_reward_cost = iif(custom_game = 0 and hero_choice = 6, 0, 4) &! Maestro gets free theater tickets in story mode - ImperatorAugustus
	interaction_reward_potence = 5 + (slave['moral']*2 + slave['rational'] + slave['instinct'] + slave['spoil'])*3  - slave['fear'] - slave_already_done_total[$str(interaction)]
	if slave['passion_fame'] = -1: interaction_reward_potence /= 2
	if interaction_reward_potence <= 0: interaction_reward_potence = 1
	if slave['passion_fame'] > 0: interaction_reward_potence *= 2
	$special_part = {
		if $estate = 'korvus_house': easy_for_master = 1 & easy_for_slave = 1 &! waive travel cost if theater is in the same district - ImperatorAugustus
		if slave['passion_fame'] ! 0 and slave['passion_fame_revealed'] = 0: slave['passion_fame_revealed'] = 1
		master_moodlet['pos_show'] = max(master_moodlet['pos_show'], 4)
		house_mess_rate += 1
		master_hygiene_rate += 2
		slave_rate['hygiene'] += 2
	}
	$place = 'theater'
end

!Go to a restaurant
if interaction = 1515:
	$interaction_type = 'praise_date'
	interaction_reward_level = 5
	interaction_reward_cost = 8
	interaction_reward_potence = 4 + (slave['moral']*2 + slave['rational'] + slave['instinct'] + slave['spoil'] - slave['fear'])*4 - slave_already_done_total[$str(interaction)]
	if slave['passion_fame'] = -1: interaction_reward_potence /= 2
	if slave['passion_sweets'] < 0: interaction_reward_potence -= 4
	if interaction_reward_potence <= 0: interaction_reward_potence = 1
	if slave['passion_sweets'] > 0: interaction_reward_potence *= 2
	$special_part = {
		if $estate = 'kamira_house': easy_for_master = 1 & easy_for_slave = 1 &! waive travel cost if restaurant is in the same district - ImperatorAugustus
		if slave['passion_fame'] ! 0 and slave['passion_fame_revealed'] = 0: slave['passion_fame_revealed'] = 1
		if slave['passion_sweets'] ! 0 and slave['passion_sweets_revealed'] = 0: slave['passion_sweets_revealed'] = 1
		slave['pos_cookie'] += 3
		!removed special_food = 1, added above line instead (relocated from next_day) - ImperatorAugustus
		master_moodlet['pos_self_food'] = 1
		master_half_action -= 2 &! negative values add energy; mirrors fresh food energy bonus for slaves (full star for S+ meal) - ImperatorAugustus
		slave['half_action'] -= 2 &! negative values add energy; mirrors fresh food energy bonus for slaves (full star for S+ meal) - ImperatorAugustus
		house_mess_rate += 1
		master_hygiene_rate += 3
		slave_rate['hygiene'] += 3
		if ate_already < 4 and master_str < 4: master_str_rate += 1 &! eating good food at restaurants can raise health/strength to A+ and maintain S+ strength
		ate_already = 5 &! also set by meals at the club or the pub (meal quality is one level higher than the strength level at which it stops increasing)
		if slave['stamina'] < 4 and slave_already_done_today[$str(interaction)] = 0: slave_rate['stamina'] += 3 &! similar benefit for slave
		slave['calories'] += 1 &! counters the calorie consumption of the energy drop so this interaction does not cause a slave at -500 calories to incongruously starve - ImperatorAugustus
		!calorie increase for slave is handled in next_day (treated as equivalent to having set slave diet to weight gain / eat as much as she wants)
	}
	$place = 'restaurant'
end

!An hour of rest
if interaction = 1521:
	$interaction_type = 'rest'
	interaction_reward_level = 1
	interaction_reward_potence = (1 + slave['sensitivity'] + slave['ego'] + slave['temper'] + slave['spoil']) &! becomes temporary mood or spoil increase (average +10, maximum +21)
	free_time = 1
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'rest', 'girls/normal_scenes/')
		$text[1] = $slave_rest
		slave_rate['bruises'] -= slave['stamina']
		slave_rate['hygiene'] += 1
		house_mess_rate += 2
	}
	$place = 'bedroom'
end

!An hour of fun
if interaction = 1522:
	$interaction_type = 'rest'
	interaction_reward_level = 1
	interaction_reward_potence = (1 + slave['sensitivity'] + slave['ego'] + slave['temper'] + slave['spoil'] + boardgames) &! becomes temporary mood or spoil increase (average +10, maximum +21, plus one moodlet)
	free_time = 0
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'fun', 'girls/normal_scenes/')
		$text[1] = $boardgames
		slave['pos_games'] = max(slave['pos_games'], 2)
		slave_rate['angst'] -= slave['temper']
		slave_rate['hygiene'] += 2
		house_mess_rate += 5
		dynamic $slave_energy_drop &! needed here because free_time is zero - ImperatorAugustus
	}
	$place = 'study'
end

!Rest till evening
if interaction = 1523:
	$interaction_type = 'rest'
	interaction_reward_level = 2
	interaction_reward_potence = (1 + slave['sensitivity'] + slave['ego'] + slave['temper'] + slave['spoil'])*2 &! becomes temporary mood or spoil increase (average +20, maximum +42)
	free_time = slave['energy']
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'rest', 'girls/normal_scenes/')
		$text[1] = $slave_rest
		slave_rate['bruises'] -= slave['stamina']*free_time
		slave_rate['hygiene'] += 5
		house_mess_rate += 10
	}
	$place = 'bedroom'
end

!Fun till evening
if interaction = 1524:
	$interaction_type = 'rest'
	interaction_reward_level = 2
	interaction_reward_potence = (1 + slave['sensitivity'] + slave['ego'] + slave['temper'] + slave['spoil'] + boardgames)*2 &! becomes temporary mood or spoil increase (average +20, maximum +42, plus one moodlet)
	free_time = 0
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'fun', 'girls/normal_scenes/')
		$text[1] = $boardgames
		slave['pos_games'] = max(slave['pos_games'], slave['energy'])
		slave_rate['angst'] -= slave['temper']*2
		slave_rate['hygiene'] += 5
		house_mess_rate += 10
		slave['energy'] = 0 &! needed here because free_time is zero - ImperatorAugustus
	}
	$place = 'study'
end

!Hot springs
if interaction = 1526:
	$interaction_type = 'rest'
	water_based = 1
	interaction_reward_level = 3
	interaction_reward_potence = (1 + slave['sensitivity'] + slave['ego'] + slave['temper'] + slave['spoil']) &! becomes temporary mood or spoil increase (average +10, maximum +21, plus two moodlets)
	free_time = 0
	$special_part = {
		slave['pos_games'] = max(slave['pos_games'], 2)
		slave_rate['sensitivity'] += 1
		slave_rate['angst'] -= slave['temper']
		if slave_already_done_today[$str(interaction)] = 0 and slave['ego'] < 4: slave_rate['ego'] += 1
		dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'slave')
		if assistant_state = CONST_INT['slave_exist'] and assistant['supervise_rule'] = 1:
			assistant['half_action'] += 1
			$text[1] = $outdoor_rest_assistant[2]
			dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'assistant')
			!half action because escorting is not hard work - ImperatorAugustus
		else
			!fainted or dead assistant cannot escort - ImperatorAugustus
			$text[1] = $outdoor_rest[2]
			if bull_ring_on = 0: master_half_action += 1
			master_hygiene_rate = 0
			master_hygiene = 0
			master_moodlet['pos_self_clean'] = 1
		end
		sparks -= 2
		dynamic $slave_energy_drop &! needed here because free_time is zero - ImperatorAugustus
	}
	$place = 'onsen'
end

!Garden of Gethsemane
if interaction = 1525:
	$interaction_type = 'rest'
	interaction_reward_level = 4
	interaction_reward_potence = 10 + slave['fear']*5 + slave['angst']*5 &! becomes temporary mood or spoil increase (average +25, maximum +60)
	free_time = 0
	$special_part = {
		slave_rate['fear'] -= slave['fear']*4
		slave_rate['angst'] -= slave['angst']*5
		slave_rate['spoil'] -= slave['spoil']*4
		slave_rate['arousal'] = indep_atr_min_threshold[slave['arousal']] &! lower arousal level by one
		if slave['sensitivity'] < 3: slave_rate['sensitivity'] += 2
		if slave['ego'] < 2: slave_rate['ego'] += 2
		slave_rate['hygiene'] += 10
		if assistant_state = CONST_INT['slave_exist'] and assistant['supervise_rule'] = 1:
			assistant['half_action'] += 1
			$text[1] = $outdoor_rest_assistant[1]
			!half action because escorting is not hard work - ImperatorAugustus
		else
			!fainted or dead assistant cannot escort - ImperatorAugustus
			$text[1] = $outdoor_rest[1]
			if bull_ring_on = 0: master_half_action += 1
		end
		slave['energy'] -= 2 &! needed here because free_time is zero - ImperatorAugustus
	}
	$place = 'garden'
end

!Golden cage
if interaction = 1527:
	$interaction_type = 'rest'
	interaction_reward_level = 5
	interaction_reward_potence = (1 + slave['sensitivity'] + slave['ego'] + slave['temper'] + slave['spoil'] + slave['energy'])*3 &! becomes temporary mood or spoil increase (average +39, maximum +78, plus one moodlet)
	free_time = 0
	$special_part = {
		$text[1] = $outdoor_rest[3]
		slave['pos_games'] = max(slave['pos_games'], slave['temper'] + slave['sensitivity'])
		slave_rate['angst'] -= slave['temper']*3
		slave_rate['spoil'] += slave['temper']
		slave_rate['ego'] += 3
		slave_rate['temper'] += 2
		slave_rate['sensitivity'] += 3
		slave_rate['moral'] += 3
		slave_rate['hygiene'] += 3
		if assistant_state = CONST_INT['slave_exist'] and assistant['supervise_rule'] = 1:
			assistant['half_action'] += 1
			$text[1] = $outdoor_rest_assistant[3]
			!half action because escorting is not hard work - ImperatorAugustus
		else
			!fainted or dead assistant cannot escort - ImperatorAugustus
			$text[1] = $outdoor_rest[3]
			if bull_ring_on = 0: master_half_action += 1
		end
		sparks -= 5
		slave['energy'] -= 2 &! needed here because free_time is zero - ImperatorAugustus
		slave['half_action'] += 1 &! reduced to 2.5 energy instead of 3 - ImperatorAugustus
	}
	$place = 'harem'
end

!Gentle hug
if interaction = 1531:
	$interaction_type = 'praise_erotic'
	interaction_reward_level = 2
	interaction_reward_text = 1
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	orgastic = 0
	interaction_no_auto_energy_drop = 1 &! no energy drop for slave
	if bull_ring_on = 0: master_half_action += 1 &! intentionally done outside $special_part
	! erotic stimulation, bg_path, sound and hygiene intentionally set outside $special_part
	interaction_slave['erotic_stimulation'] = (master_oral + slave['sub_kiss'])/2 + (master_style - 2) &! low master allure inhibits arousal - ImperatorAugustus
	$bg_path = func('display_pic', 'slave', 'hug', 'girls/sex_scenes/')
	$play_sound[2] = $kiss_sound[slave['age']]
	house_mess_rate += 4
	master_hygiene_rate += 2
	slave_rate['hygiene'] += 2
	$special_part = {
		!update master skill because it will not be done automatically
		master_petting_rate += (skill_adv_mul * 1)
	}
	$place = 'bedroom'
end

!Sensual massage - improved - added some healing effects - crushboss
if interaction = 1532:
	$interaction_type = 'praise_erotic'
	interaction_reward_level = 3
	interaction_reward_text = 2
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	orgastic = 0
	interaction_no_auto_energy_drop = 1 &! no energy drop for slave
	dynamic $master_energy_drop &! intentionally done outside $special_part
	! erotic stimulation, bg_path, sound and hygiene intentionally set outside $special_part
	interaction_slave['erotic_stimulation'] = master_petting + (master_style - 2) &! low master allure inhibits arousal - ImperatorAugustus
	$bg_path = func('display_pic', 'slave', 'petting', 'girls/sex_scenes/')
	$play_sound[2] = $petting_sound[slave['age']]
	house_mess_rate += 10
	master_hygiene_rate += 5
	slave_rate['hygiene'] += 5
	$special_part = {
		slave_rate['spoil'] += (master_str + master_petting + master_style)/2
		if master_petting > 2 and slave_already_done_today[$str(interaction)] = 0:
			if slave['massaged'] = 0:
				slave['massaged'] = 1
				slave['half_action'] -= 2
			end
			slave_rate['sensitivity'] += 2
			slave_rate['instinct'] += 1
			if master_medic < 3:
				slave_rate['bruises'] += slave['bruises']*2
			else
				slave_rate['bruises'] -= master_medic
			end
			if slave['stamina'] < 3: slave_rate['stamina'] += 1
			if master_petting > 3 and slave['angst'] < 2: slave['neg_pain'] = 0
			if slave['rehabilitation'] > 0: slave['rehabilitation'] -= 1
		end
		if slave['passion_comfort'] > 0: interaction_reward_potence *= 2 &! see interaction_result and $dyn_reward_potence in #dynamic
		if slave['passion_comfort'] < 0: interaction_reward_potence /= 2 &! see interaction_result and $dyn_reward_potence in #dynamic
		if slave['passion_comfort'] ! 0 and slave['passion_comfort_revealed'] = 0: slave['passion_comfort_revealed'] = 1
		!update master skill because it will not be done automatically
		master_petting_rate += (skill_adv_mul * 2)
	}
	$place = 'bedroom'
end

!Petting
if interaction = 1533:
	$interaction_type = 'praise_erotic'
	interaction_reward_level = 4
	interaction_reward_text = 3
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	orgastic = 1
	interaction_no_auto_energy_drop = 1 &! no energy drop for slave
	dynamic $master_energy_drop &! intentionally done outside $special_part
	! erotic stimulation, bg_path, sound and hygiene intentionally set outside $special_part
	interaction_slave['erotic_stimulation'] = master_petting*2 + (master_style - 2) &! low master allure inhibits arousal - ImperatorAugustus
	$bg_path = func('display_pic', 'slave', 'petting', 'girls/sex_scenes/')
	$play_sound[2] = $petting_sound[slave['age']]
	house_mess_rate += 10
	master_hygiene_rate += 5
	slave_rate['hygiene'] += 5
	$special_part = {
		slave_rate['sensitivity'] += 1
		!update master skill because it will not be done automatically
		master_petting_rate += (skill_adv_mul * 2)
	}
	$place = 'bedroom'
end

!Vibes
if interaction = 1534:
	$interaction_type = 'praise_erotic'
	interaction_reward_level = 4
	interaction_reward_text = 4
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	orgastic = 1
	interaction_no_auto_energy_drop = 1 &! no energy drop for slave
	dynamic $master_energy_drop &! intentionally done outside $special_part
	! erotic stimulation, bg_path, sound and hygiene intentionally set outside $special_part
	interaction_slave['erotic_stimulation'] = master_petting*3 + (master_style - 2) &! low master allure inhibits arousal - ImperatorAugustus
	$bg_path = func('display_pic', 'slave', 'dildo', 'girls/sex_scenes/')
	$play_sound[2] = $orgasm_sound[slave['age']]
	house_mess_rate += 15
	master_hygiene_rate += 10
	slave_rate['hygiene'] += 10
	$special_part = {
		slave_rate['sensitivity'] += 1
		!update master skills because it will not be done automatically
		master_fetish_rate += (skill_adv_mul * 1)
		master_petting_rate += (skill_adv_mul * 1)
	}
	$place = 'bedroom'
end

!Cunnilingus or special reward
if interaction = 1535:
	$interaction_type = 'praise_erotic'
	interaction_reward_level = 5
	interaction_reward_text = 5
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	orgastic = 1
	dynamic $erotic_rwd_interaction_flags &! set additional flags depending which reward variation was randomly chosen
	! erotic stimulation, bg_path, sound and hygiene intentionally set outside $special_part
	if slave['ero_rwd_cnt'] = 1:
		interaction_no_auto_energy_drop = 1 &! no energy drop for slave
		dynamic $master_energy_drop &! intentionally done outside $special_part
		interaction_slave['erotic_stimulation'] = master_petting + master_oral*3 + (master_style - 2) &! low master allure inhibits arousal - ImperatorAugustus
	else
		! standard energy drop for slave, easy_for_master may or may not be set via $erotic_rwd_interaction_flags
		dynamic $replace($dyn_sex_acceptance, 'dyn'+'slave', 'slave')
		interaction_slave['erotic_stimulation'] = interaction_slave['sex_acceptance'] &! value will be in range [-20, +22] - ImperatorAugustus
	end
	if $ero_rwd_img = 'lesbo':
		$bg_path = func('display_pic', 'slave, assistant', 'lesbo', "girls/sex_scenes/")
	else
		$bg_path = func('display_pic', 'slave', $erotic_rwd_img, $erotic_rwd_img_loc)
	end
	$play_sound[2] = $erotic_rwd_snd
	house_mess_rate += 15
	master_hygiene_rate += 10
	slave_rate['hygiene'] += 10
	$special_part = {
		slave_rate['sensitivity'] += 1
		!update master skill because it will not be done automatically
		if slave['ero_rwd_cnt'] = 1:
			master_oral_rate += (skill_adv_mul * 2)
			master_petting_rate += (skill_adv_mul * 1)
		else
			master_fetish_rate += (skill_adv_mul * 2)
		end
	}
	$place = 'bedroom'
end

!GIFTS
!misc
if interaction = 1541:
	$interaction_type = 'present'
	$item_id = 'bouqet'
	interaction_reward_level = 1
	everlasting = 1
	$special_part = {
		slave_inventory['bouqet'] += 1
	}
end

if interaction = 1542:
	$interaction_type = 'present'
	$item_id = 'plaid'
	interaction_reward_level = 2
	$special_part = {
		slave_inventory['plaid'] += 1
	}
end

if interaction = 1543:
	$interaction_type = 'present'
	$item_id = 'stuffed_toy'
	interaction_reward_level = 3
	$special_part = {
		slave_inventory['stuffed_toy'] += 1
	}
end

if interaction = 1544:
	$interaction_type = 'present'
	$item_id = 'perfume'
	interaction_reward_level = 4
	everlasting = 1
	$special_part = {
		slave_inventory['perfume'] += 1
	}
end

if interaction = 1545:
	$interaction_type = 'present'
	$item_id = 'pony'
	interaction_reward_level = 5
	$special_part = {
		slave_inventory['pony'] += 1
	}
end

!Jewelry
if interaction = 15461:
 	$interaction_type = 'present'
	$item_id = 'plain_headband'
	interaction_reward_level = 1
	$special_part = {
		if inventory['plain_headband'] = 0:
			inventory['plain_headband'] += 1
		else
			gift_from_invent = 1
		end
		$new_item = 'plain_headband'
		$return_lock = 'none'
		slot = 25
		gs 'item_change'
	}
end

if interaction = 15462:
	$interaction_type = 'present'
	$item_id = 'plain_ring'
	interaction_reward_level = 2
	$special_part = {
		if inventory['plain_ring'] = 0:
			inventory['plain_ring'] += 1
		else
			gift_from_invent = 1
		end
		$new_item = 'plain_ring'
		if $slave['ring_right'] = '' or $slave['ring_left'] ! '':
		 	$return_lock = 'none'
		 	slot = 33
		 	gs 'item_change'
		else
		 	$return_lock = 'none'
		 	slot = 32
		 	gs 'item_change'
		end
	}
end

if interaction = 15463:
	$interaction_type = 'present'
	$item_id = 'incrusted_earrings'
	interaction_reward_level = 3
	$special_part = {
		if inventory['incrusted_earrings'] < 2:
			inventory['incrusted_earrings'] += 2
		else
			gift_from_invent = 1
		end
		$new_item = 'incrusted_earrings'
		$return_lock = 'none'
		slot = 26
		gs 'item_change', 2
	}
end

if interaction = 15464:
	$interaction_type = 'present'
	$item_id = 'incrusted_necklace'
	interaction_reward_level = 4
	$special_part = {
		if inventory['incrusted_necklace'] = 0:
			inventory['incrusted_necklace'] += 1
		else
			gift_from_invent = 1
		end
		$new_item = 'incrusted_necklace'
		$return_lock = 'none'
		slot = 27
		gs 'item_change'
	}
end

if interaction = 15465:
	$interaction_type = 'present'
	$item_id = 'incrusted_tiara'
	interaction_reward_level = 5
	$special_part = {
		if inventory['incrusted_tiara'] = 0:
			inventory['incrusted_tiara'] += 1
		else
			gift_from_invent = 1
		end
		$new_item = 'incrusted_tiara'
		$return_lock = 'none'
		slot = 25
		gs 'item_change'
	}
end

!Clothes
if interaction = 15471:
	$interaction_type = 'present'
	$item_id = 'fluffy_stepins'
	interaction_reward_level = 1
	$special_part = {
		if inventory['fluffy_stepins'] = 0:
			inventory['fluffy_stepins'] += 1
		else
			gift_from_invent = 1
		end
		$new_item = 'fluffy_stepins'
		$return_lock = 'none'
		slot = 31
		gs 'item_change'
	}
end

if interaction = 15472:
	$interaction_type = 'present'
	$item_id = 'sun_dress'
	interaction_reward_level = 2
	$special_part = {
		if inventory['sun_dress'] = 0:
			inventory['sun_dress'] += 1
		else
			gift_from_invent = 1
		end
		$new_item = 'sun_dress'
		$return_lock = 'none'
		slot = 24
		gs 'item_change'
	}
end

if interaction = 15473:
	$interaction_type = 'present'
	$item_id = 'cocktail_dress'
	interaction_reward_level = 3
	$special_part = {
		if inventory['cocktail_dress'] = 0:
			inventory['cocktail_dress'] += 1
		else
			gift_from_invent = 1
		end
		$new_item = 'cocktail_dress'
		$return_lock = 'none'
		slot = 24
		gs 'item_change'
	}
end

if interaction = 15474:
	$interaction_type = 'present'
	$item_id = 'rich_dress'
	interaction_reward_level = 4
	$special_part = {
		if inventory['rich_dress'] = 0:
			inventory['rich_dress'] += 1
		else
			gift_from_invent = 1
		end
		$new_item = 'rich_dress'
		$return_lock = 'none'
		slot = 24
		gs 'item_change'
	}
end

if interaction = 15475:
	$interaction_type = 'present'
	$item_id = 'wedding_dress'
	interaction_reward_level = 5
	$special_part = {
		if inventory['wedding_dress'] = 0:
			inventory['wedding_dress'] += 1
		else
			gift_from_invent = 1
		end
		$new_item = 'wedding_dress'
		$return_lock = 'none'
		slot = 24
		gs 'item_change'
	}
end

!sweets
if interaction = 1551:
	$interaction_type = 'praise_sweets'
	interaction_reward_level = 1
	interaction_reward_potence = 2
	interaction_reward_cost = 1
	$special_part = {
		$bg_path = 'scene/chokolate'
		g = rand(1, picMax['chokolate'])
		if g > 1: $bg_path += '_' + $str(g)
		$text[1] = $sweets_description[1]
		slave_rate['hygiene'] += 2
		house_mess_rate += 2
	}
	if kitchen > 0:  $place = 'kitchen'
end

if interaction = 1552:
	$interaction_type = 'praise_sweets'
	interaction_reward_level = 2
	interaction_reward_potence = 4
	interaction_reward_cost = 2
	$special_part = {
		$bg_path = 'scene/cake'
		g = rand(1, picMax['cake'])
		if g > 1: $bg_path += '_' + $str(g)
		$text[1] = $sweets_description[2]
		slave_rate['hygiene'] += 2
		house_mess_rate += 2
	}
	if kitchen > 0:  $place = 'kitchen'
end

if interaction = 1553:
	$interaction_type = 'praise_sweets'
	interaction_reward_level = 3
	interaction_reward_potence = 8
	interaction_reward_cost = 4
	$special_part = {
	$bg_path = 'scene/ice_cream'
		g = rand(1, picMax['ice_cream'])
		if g > 1: $bg_path += '_' + $str(g)
		$text[1] = $sweets_description[3]
		slave_rate['hygiene'] += 2
		house_mess_rate += 2
	}
	if kitchen > 0: $place = 'kitchen'
end

if interaction = 1554:
	$interaction_type = 'praise_sweets'
	interaction_reward_level = 4
	interaction_reward_potence = 16
	interaction_reward_cost = 8
	$special_part = {
		$bg_path = 'scene/jelly'
		g = rand(1, picMax['jelly'])
		if g > 1: $bg_path += '_' + $str(g)
		$text[1] = $sweets_description[4]
		slave_rate['hygiene'] += 2
		house_mess_rate += 2
	}
	if kitchen > 0:  $place = 'kitchen'
end

if interaction = 1555:
	$interaction_type = 'praise_sweets'
	interaction_reward_level = 5
	interaction_reward_potence = 32
	interaction_reward_cost = 25
	$special_part = {
		$bg_path = 'scene/ambrosia'
		g = rand(1, picMax['ambrosia'])
		if g > 1: $bg_path += '_' + $str(g)
		$text[1] = $sweets_description[5]
		slave_rate['sensitivity'] += 1
		slave_rate['rational'] += 1
		slave_rate['instinct'] += 1
		slave_rate['custom'] += 1
		slave_rate['moral'] += 1
		slave_rate['ego'] += 1
		slave_rate['temper'] += 1
		slave_rate['stamina'] += 5
		slave_rate['hygiene'] += 1
		slave['meth_addiction'] -= min(slave['meth_addiction'], 2) &! added in 2.3.1 - ImperatorAugustus
		slave['opium_addiction'] -= min(slave['opium_addiction'], 2) &! added in 2.3.1 - ImperatorAugustus
		house_mess_rate += 2
	}
	if kitchen > 0:  $place = 'kitchen'
end

!Moral encouragement
!Sparingly approve
if interaction = 1561:
	$interaction_type = 'compliment'
	interaction_reward_level = 1
	interaction_reward_potence = master_cha
	$special_part = {
		if slave['abuse_attitude'] ! -1 and slave['passion_fame'] ! 1: interaction_reward_potence -= slave_already_done_total[$str(interaction)] - slave['age_count']/4 &! diminishing returns from repetition - ImperatorAugustus
		$text[1] = $compliment_description[1]
	}
end

!Praise
if interaction = 1562:
	$interaction_type = 'compliment'
	interaction_reward_level = 1
	interaction_reward_potence = master_cha * 2
	$special_part = {
		if slave['abuse_attitude'] ! -1 and slave['passion_fame'] ! 1: interaction_reward_potence -= slave_already_done_total[$str(interaction)] - slave['age_count']/8 &! diminishing returns from repetition - ImperatorAugustus
		$text[1] = $compliment_description[2]
	}
end

!Weighty compliment
if interaction = 1563:
	$interaction_type = 'compliment'
	interaction_reward_level = 2
	interaction_reward_potence = master_cha * 3
	$special_part = {
		if slave['abuse_attitude'] ! -1 and slave['passion_fame'] ! 1: interaction_reward_potence -= slave_already_done_total[$str(interaction)] - slave['age_count']/12 &! diminishing returns from repetition - ImperatorAugustus
		$text[1] = $compliment_description[3]
	}
end

!Promise a reward
if interaction = 1564:
	$interaction_type = 'compliment'
	interaction_reward_level = 2
	interaction_reward_potence = master_cha * 4 &! no diminishing returns (providing an incentive to choose these rewards when the others are repeated too often) - ImperatorAugustus
	$special_part = {
		$text[1] = $compliment_description[4]
		if slave['abuse_attitude'] ! -1 and $slave_psy_status ! 'broken':
			if slave['promise_reward'] > 0 or slave['neg_cheap_reward'] > 0:
				interaction_reward_potence = 0 - slave['promise_reward']
				if $slave_psy_status ! 'broken' and slave['neg_cheap_reward'] > 0:
					killvar '$text'
					$text[1] = $compliment_description[4] + $promise_reward_doubt
				else
					$text[2] = $promise_fail
				end
			end
		end
		slave['promise_reward'] += 1
	}
end

!Promise a gift
if interaction = 1565:
	$interaction_type = 'compliment'
	interaction_reward_level = 3
	interaction_reward_potence = master_cha * 5 &! no diminishing returns (providing an incentive to choose these rewards when the others are repeated too often) - ImperatorAugustus
	$special_part = {
		$text[1] = $compliment_description[5]
		if slave['abuse_attitude'] ! -1 and $slave_psy_status ! 'broken':
			if slave['promise_gift'] > 0 or slave['neg_cheap_gift'] > 0:
				interaction_reward_potence = 0 - slave['promise_gift']
				if slave['neg_cheap_gift'] > 0:
					killvar '$text'
					$text[1] = $compliment_description[5] + $promise_gift_doubt
				else
					$text[2] = $promise_fail
				end
			end
		end
		slave['promise_gift'] += 1
	}
end

! PUNISH
!Strictly chastise
if interaction = 1411:
	$interaction_type = 'abuse'
	torture_intensity = 1
	abuse = 1
	sensitivity_threshold = 6
	torturer_skill = master_domination
	$special_part = {
		if slave_already_done_today[$str(interaction)] = 0 and slave['abuse_attitude'] ! 2: $play_sound[1] = $cry[slave['age']]
		$text[1] = $verbal_abuse_description[1]
		!master domination skill will be increased automatically
	}
end

!Roughly scold
if interaction = 1412:
	$interaction_type = 'abuse'
	torture_intensity = 1
	abuse = 1
	sensitivity_threshold = 5
	torturer_skill = master_domination
	$special_part = {
		if slave_already_done_today[$str(interaction)] = 0 and slave['abuse_attitude'] ! 2: $play_sound[1] = $cry[slave['age']]
		$text[1] = $verbal_abuse_description[2]
		!master domination skill will be increased automatically
	}
end

!Threaten with tortures
if interaction = 1413:
	$interaction_type = 'abuse'
	torture_intensity = 2
	abuse = 1
	sensitivity_threshold = 4
	torturer_skill = master_domination
	if slave['threat_pain'] = 0:
		slave['threat_pain'] = 1
	else
		futile_threat = 1
	end
	$special_part = {
		if slave_already_done_today[$str(interaction)] = 0 and futile_threat = 0 and slave['abuse_attitude'] ! 2: $play_sound[1] = $cry[slave['age']]
		$text[1] = $verbal_abuse_description[3]
		!master domination skill will be increased automatically
	}
end

!Threaten with sale
if interaction = 1414:
	$interaction_type = 'abuse'
	torture_intensity = 2
	abuse = 1
	sensitivity_threshold = 4
	torturer_skill = iif(slave_already_done_total[$str(interaction)] < 3, master_domination, -100) &! this threat is effective at most three times per slave
	if slave['threat_abandon'] = 0:
		slave['threat_abandon'] = 1
	else
		futile_threat = 1
	end
	$special_part = {
		if slave_already_done_today[$str(interaction)] = 0 and slave['abuse_attitude'] ! 2: $play_sound[1] = $cry[slave['age']]
		$text[1] = $verbal_abuse_description[4]
		if futile_threat = 0: $text[1] += '<br>  To reinforce the message, you could begin driving her out of the house, and then relent…'
		!master domination skill will be increased automatically
	}
end

!Threaten with death
if interaction = 1415:
	$interaction_type = 'abuse'
	torture_intensity = 3
	abuse = 1
	sensitivity_threshold = 3
	torturer_skill = iif(slave_already_done_total[$str(interaction)] < 3, master_domination*2, -100) &! this threat is effective at most three times per slave
	if slave['threat_death'] = 0:
		slave['threat_death'] = 1
	else
		futile_threat = 1
	end
	$special_part = {
		if slave_already_done_today[$str(interaction)] = 0 and slave['abuse_attitude'] ! 2: $play_sound[1] = $cry[slave['age']]
		$text[1] = $verbal_abuse_description[5]
		if futile_threat = 0: $text[1] += '<br><br>  Perhaps it would be worthwhile to show her how you <i>could</i> get rid of her…'
		!master domination skill will be increased automatically
	}
end

!Paddle
if interaction = 1421:
	$interaction_type = 'torture'
	torture_intensity = 2
	painful = 1
	sensitivity_threshold = 5
	torturer_skill = (1 + master_str*2 + master_domination)/3 &! weighted average in [0,5] range
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'spank', 'girls/torture_scenes/battering/')
		$play_sound[1] = $spank_sound
		$text[1] = $bare_hands_description[1]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		house_mess_rate += 5
		master_hygiene_rate += 4
		slave_rate['hygiene'] += 2
		!master domination skill will be increased automatically
		master_str_rate += iif(master_str < 4, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Slap
if interaction = 1422:
	$interaction_type = 'torture'
	torture_intensity = 2
	painful = 1
	easy_for_master = 1
	sensitivity_threshold = 4
	torturer_skill = (1 + master_str*2 + master_domination)/3 &! weighted average in [0,5] range
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'slap', 'girls/torture_scenes/battering/', 'any_age')
		$play_sound[1] = $slap_sound
		$text[1] = $bare_hands_description[2]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		house_mess_rate += 5
		master_hygiene_rate += 4
		slave_rate['hygiene'] += 2
		!master domination skill will be increased automatically
	}
	if dungeon > 0: $place = 'dungeon'
end

!Pinch nipples
if interaction = 1423:
	$interaction_type = 'torture'
	torture_intensity = 2
	painful = 1
	easy_for_master = 1
	sensitivity_threshold = 3
	torturer_skill = master_str
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'pinch', 'girls/torture_scenes/battering/')
		$play_sound[1] = $pain[slave['age']]
		$text[1] = $bare_hands_description[3]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		damage = 1
		house_mess_rate += 5
		master_hygiene_rate += 4
		slave_rate['hygiene'] += 2
		!master domination skill will be increased automatically
	}
	if dungeon > 0: $place = 'dungeon'
end

!punch
if interaction = 1424:
	$interaction_type = 'torture'
	torture_intensity = 3
	painful = 1
	bruising = 1
	easy_for_master = 1
	sensitivity_threshold = 2
	torturer_skill = (1 + master_str + master_fighter)/2 &! average rounded up
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'slave', 'hit', 'girls/torture_scenes/battering/')
		end
		$play_sound[1] = $fist_hit_sound[slave['age']]
		$text[1] = $bare_hands_description[4]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		damage = master_str - master_fighter/2
		house_mess_rate += 5
		master_hygiene_rate += 5
		slave_rate['hygiene'] += 5
		!master domination skill will be increased automatically
	}
	if dungeon > 0: $place = 'dungeon'
end

!Beat
if interaction = 1425:
	$interaction_type = 'torture'
	torture_intensity = 4
	painful = 1
	bruising = 1
	sensitivity_threshold = 1
	torturer_skill = (1 + master_str + master_fighter)/2 &! average rounded up
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'beat', 'girls/torture_scenes/battering/', 'any_age')
		$play_sound[1] = $fist_hit_sound[slave['age']]
		$text[1] = $bare_hands_description[5]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		damage = master_str*3 - master_fighter
		!master domination skill will be increased automatically
		master_str_rate += iif(master_str < 4, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Spank with slipper
if interaction = 1431:
	$interaction_type = 'torture'
	torture_intensity = 1
	painful = 1
	if master_flagelation > 0: easy_for_master = 1
	sensitivity_threshold = 4
	torturer_skill = master_flagelation
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'slipper', 'girls/torture_scenes/flagellation/')
		$play_sound[1] = $spank_sound
		$text[1] = $flagelation_description[1]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		damage = 1 - master_flagelation
		!update master skill because it will not be done automatically
		if master_flagelation < torture_intensity: master_flagelation_rate += (skill_adv_mul * 1)
		master_str_rate += iif(master_str < 3, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Flog with belt
if interaction = 1432:
	$interaction_type = 'torture'
	torture_intensity = 2
	painful = 1
	bruising = 1
	if master_flagelation > 1: easy_for_master = 1
	sensitivity_threshold = 3
	torturer_skill = master_flagelation
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'belt', 'girls/torture_scenes/flagellation/')
		$play_sound[1] = $spank_sound
		$text[1] = $flagelation_description[2]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		damage = 3 - master_flagelation
		!update master skill because it will not be done automatically
		if master_flagelation < torture_intensity: master_flagelation_rate += (skill_adv_mul * 1)
		master_str_rate += iif(master_str < 4, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Flog with cane
if interaction = 1433:
	$interaction_type = 'torture'
	torture_intensity = 4
	painful = 1
	bruising = 1
	scarification = 1
	if master_flagelation > 3: easy_for_master = 1
	sensitivity_threshold = 1
	torturer_skill = master_flagelation
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'cane', 'girls/torture_scenes/flagellation/')
		$play_sound[1] = $whip_sound
		$text[1] = $flagelation_description[3]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		damage = 5 - master_flagelation
		!update master skill because it will not be done automatically
		if master_flagelation < torture_intensity: master_flagelation_rate += (skill_adv_mul * 2)
		master_str_rate += iif(master_str < 4, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Flog with lash
if interaction = 1434:
	$interaction_type = 'torture'
	torture_intensity = 4
	painful = 1
	scarification = 1
	if master_flagelation < 3: bruising = 1
	if master_flagelation > 3: easy_for_master = 1
	sensitivity_threshold = 2
	torturer_skill = master_flagelation
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'lash', 'girls/torture_scenes/flagellation/')
		$play_sound[1] = $whip_sound
		$text[1] = $flagelation_description[4]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		damage = 10 - master_flagelation*2
		if master_flagelation > 4 and slave['fear'] < 2 and slave['angst'] = 0: slave_rate['moral'] += slave['moral'] &! ANGELIKA: Acknowledged whip masters are able to sharply raise their slave’s morale through catharsis: a special state of enlightenment, the moment of truth, comes in the second of highest pain or pleasure. But this technique is available only for the best. - ImperatorAugustus
		!update master skill because it will not be done automatically
		if master_flagelation < torture_intensity: master_flagelation_rate += (skill_adv_mul * 3)
		master_str_rate += iif(master_str < 4, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Flog with whip
if interaction = 1435:
	$interaction_type = 'torture'
	torture_intensity = 5
	painful = 1
	scarification = 1
	if master_flagelation < 4: bruising = 1
	if master_flagelation > 4: easy_for_master = 1
	sensitivity_threshold = 0
	torturer_skill = master_flagelation
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'slave', 'whip', 'girls/torture_scenes/flagellation/')
		end
		$play_sound[1] = $whip_sound
		$text[1] = $flagelation_description[5]
		$text[2] = $light_torture_reaction[$slave_psy_status]
		damage = 15 - master_flagelation*3
		if master_flagelation > 4 and slave['fear'] < 2 and slave['angst'] = 0: slave_rate['moral'] += slave['moral'] &! ANGELIKA: Acknowledged whip masters are able to sharply raise their slave’s morale through catharsis: a special state of enlightenment, the moment of truth, comes in the second of highest pain or pleasure. But this technique is available only for the best. - ImperatorAugustus
		!update master skill because it will not be done automatically
		if master_flagelation < torture_intensity: master_flagelation_rate += (skill_adv_mul * 3)
		master_str_rate += iif(master_str < 4, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!hot wax
if interaction = 1441:
	$interaction_type = 'torture'
	torture_intensity = 2
	fire_based = 1
	painful = 1
	if master_torture > 0: easy_for_master = 1
	sensitivity_threshold = 4
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'wax', 'girls/torture_scenes/torture_instruments/')
		$play_sound[1] = $pain[slave['age']]
		$text[1] = $wax_torture_description
		$text[2] = $light_torture_reaction[$slave_psy_status]
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity:
			master_torture_rate += (skill_adv_mul * 1)
			master_bondage_rate += (skill_adv_mul * 1)
		end
	}
	if dungeon > 0: $place = 'dungeon'
end

!Burning ointment
if interaction = 1442:
	$interaction_type = 'torture'
	torture_intensity = 3
	painful = 1
	if master_torture > 1: easy_for_master = 1
	sensitivity_threshold = 3
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'burning_ointment', 'girls/torture_scenes/torture_instruments/', 'any_age')
		$play_sound[1] = $pain[slave['age']]
		$text[1] = $gar_torture_description
		$text[2] = $light_torture_reaction[$slave_psy_status]
		house_mess_rate += 5
		master_hygiene_rate += 15
		slave_rate['hygiene'] += 20
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Crocodiles
if interaction = 1443:
	$interaction_type = 'torture'
	torture_intensity = 3
	painful = 1
	scarification = 1
	if master_torture > 2: easy_for_master = 1
	sensitivity_threshold = 2
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'clamps', 'girls/torture_scenes/torture_instruments/')
		$play_sound[1] = $pain[slave['age']]
		$text[1] = $pins_torture_description
		$text[2] = $light_torture_reaction[$slave_psy_status]
		damage = 1 + slave['sensitivity']
		house_mess_rate += 5
		slave_rate['hygiene'] += 3
		master_hygiene_rate += 2
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 2)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Acetic infusion
if interaction = 1444:
	$interaction_type = 'torture'
	torture_intensity = 3
	painful = 1
	shameful = 1
	if master_torture > 3: easy_for_master = 1
	sensitivity_threshold = 1
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'acetic_infusion', 'girls/torture_scenes/torture_instruments/')
		$play_sound[1] = $pain[slave['age']]
		$text[1] = $infusion_torture_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = 10
		house_mess_rate += 10
		master_hygiene_rate += 5
		slave_rate['hygiene'] += 15
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 2)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Finger vices
if interaction = 1445:
	$interaction_type = 'torture'
	torture_intensity = 5
	painful = 1
	scarification = 1
	if master_torture > 4: easy_for_master = 1
	sensitivity_threshold = 0
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'fingergrip', 'girls/torture_scenes/torture_instruments/', 'any_age')
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $gripe_torture_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = 15 - master_torture*2
		house_mess_rate += 10
		master_hygiene_rate += 10
		slave_rate['hygiene'] += 10
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 2)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Pricking
if interaction = 1446:
	$interaction_type = 'torture'
	torture_intensity = 5
	bloody = 1
	painful = 1
	scarification = 1
	if master_torture > 2: easy_for_master = 1
	sensitivity_threshold = 3
	torturer_skill = master_torture
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'slave', 'needle', 'girls/torture_scenes/torture_instruments/')
		end
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $needle_torture_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = max(0, 5 - master_torture*2)
		house_mess_rate += 15
		master_hygiene_rate += 15
		slave_rate['hygiene'] += 20
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 2)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Water torture
if interaction = 1447:
	$interaction_type = 'torture'
	torture_intensity = 5
	water_based = 1
	if master_torture > 2: easy_for_master = 1
	sensitivity_threshold = 0
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'water', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $drowning[slave['age']]
		$text[1] = $water_torture_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = 10 - master_torture*2
		slave_rate['hygiene'] += 0
		master_hygiene_rate += 5
		house_mess_rate += 15
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 2)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Cauterization
if interaction = 1448:
	$interaction_type = 'torture'
	torture_intensity = 5
	fire_based = 1
	scarification = 1
	painful = 1
	if master_torture > 3: easy_for_master = 1
	sensitivity_threshold = 0
	torturer_skill = master_torture
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'slave', 'branding', 'girls/torture_scenes/torture_instruments/')
		end
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $fire_torture_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = 10 - master_torture
		house_mess_rate += 15
		slave_rate['hygiene'] += 15
		master_hygiene_rate += 10
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 2)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Presentation - Wooden horse
if interaction = 14511:
	$interaction_type = 'present_torture'
	torture_intensity = 2
	if master_domination > 0: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_domination
	if slave['woodenhorse_threat'] = 0:
		slave['woodenhorse_threat'] = 1
	else
		futile_threat = 1
	end
	$special_part = {
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $woodenhorse_presentation_description
		$text[2] = $abuse_torture_reaction[$slave_psy_status]
		!master domination skill will be increased automatically
	}
	if dungeon > 0: $place = 'dungeon'
end

!Presentation - Manual rack
if interaction = 14512:
	$interaction_type = 'present_torture'
	torture_intensity = 2
	if master_domination > 0: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_domination
	if slave['strappado_threat'] = 0:
		slave['strappado_threat'] = 1
	else
		futile_threat = 1
	end
	$special_part = {
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $strappado_presentation_description
		$text[2] = $abuse_torture_reaction[$slave_psy_status]
		!master domination skill will be increased automatically
	}
	if dungeon > 0: $place = 'dungeon'
end

!Presentation - Water barrel
if interaction = 14513:
	$interaction_type = 'present_torture'
	torture_intensity = 2
	water_based = 1
	if master_domination > 0: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_domination
	if slave['watertank_threat'] = 0:
		slave['watertank_threat'] = 1
	else
		futile_threat = 1
	end
	$special_part = {
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $watertank_presentation_description
		$text[2] = $abuse_torture_reaction[$slave_psy_status]
		!master domination skill will be increased automatically
	}
	if dungeon > 0: $place = 'dungeon'
end

!Presentation - Molten swing
if interaction = 14514:
	$interaction_type = 'present_torture'
	torture_intensity = 2
	fire_based = 1
	if master_domination > 0: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_domination
	if slave['fireswing_threat'] = 0:
		slave['fireswing_threat'] = 1
	else
		futile_threat = 1
	end
	$special_part = {
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $fireswing_presentation_description
		$text[2] = $abuse_torture_reaction[$slave_psy_status]
		!master domination skill will be increased automatically
	}
	if dungeon > 0: $place = 'dungeon'
end

!Presentation - Iron maiden
if interaction = 14515:
	$interaction_type = 'present_torture'
	torture_intensity = 2
	darkness = 1
	if master_domination > 0: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_domination
	if slave['ironmaiden_threat'] = 0:
		slave['ironmaiden_threat'] = 1
	else
		futile_threat = 1
	end
	$special_part = {
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $ironmaiden_presentation_description
		$text[2] = $abuse_torture_reaction[$slave_psy_status]
		!master domination skill will be increased automatically
	}
	if dungeon > 0: $place = 'dungeon'
end

!Presentation - Infested pit
if interaction = 14516:
	$interaction_type = 'present_torture'
	torture_intensity = 2
	vermin_based = 1
	if master_domination > 0: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_domination
	if slave['verminpit_threat'] = 0:
		slave['verminpit_threat'] = 1
	else
		futile_threat = 1
	end
	$special_part = {
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $verminpit_presentation_description
		$text[2] = $abuse_torture_reaction[$slave_psy_status]
		!master domination skill will be increased automatically
	}
	$place = 'dungeon'
end

!Demonstration - Wooden horse
if interaction = 14521:
	$interaction_type = 'torture'
	torture_intensity = 3
	painful = 1
	scarification = 0
	if master_torture > 0: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'woodhorse', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $woodenhorse_demonstration_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = 1 + slave['sensitivity']
		slave_rate['hygiene'] += 3
		master_hygiene_rate += 4
		house_mess_rate += 5
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Demonstration - Manual rack
if interaction = 14522:
	$interaction_type = 'torture'
	torture_intensity = 3
	painful = 1
	scarification = 0
	if master_torture > 1: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'rack', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $pain[slave['age']]
		$text[1] = $strappado_demonstration_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = 2
		house_mess_rate += 5
		master_hygiene_rate += 4
		slave_rate['hygiene'] += 3
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Demonstration - Water barrel
if interaction = 14523:
	$interaction_type = 'torture'
	torture_intensity = 3
	water_based = 1
	scarification = 0
	if master_torture > 1: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'water', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $drowning[slave['age']]
		$text[1] = $watertank_demonstration_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = 1
		house_mess_rate += 10
		slave_rate['hygiene'] += 0
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Demonstration - Molten swing
if interaction = 14524:
	$interaction_type = 'torture'
	torture_intensity = 3
	fire_based = 1
	scarification = 0
	if master_torture > 1: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'fireswing', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $pain[slave['age']]
		$text[1] = $fireswing_demonstration_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = 5 - slave['stamina']
		house_mess_rate += 15
		slave_rate['hygiene'] += 15
		master_hygiene_rate += 10
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Demonstration - Iron maiden
if interaction = 14525:
	$interaction_type = 'torture'
	torture_intensity = 3
	darkness = 1
	deprivation = 1
	scarification = 0
	if master_torture > 1: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'ironmaiden', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $panik_sound[slave['age']]
		$text[1] = $ironmaiden_demonstration_description
		$text[2] = $torture_reaction[$slave_psy_status]
		damage = 0
		slave['ironmaiden_threat'] = 0
		house_mess_rate += 5
		slave_rate['hygiene'] += 3
		master_hygiene_rate += 4
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Demonstration - Infested pit
if interaction = 14526:
	$interaction_type = 'torture'
	torture_intensity = 3
	vermin_based = 1
	abuse = 1
	scarification = 0
	if master_torture > 1: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'verminpit', 'girls/torture_scenes/torture_units_demonstration/', 'any_age')
		$play_sound[1] = $panik_sound[slave['age']]
		$text[1] = $verminpit_demonstration_description
		$text[2] = $torture_reaction[$slave_psy_status]
		slave['verminpit_threat'] = 0
		damage = 0
		house_mess_rate += 15
		slave_rate['hygiene'] += 15
		master_hygiene_rate += 10
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Application - Wooden horse
if interaction = 14531:
	$interaction_type = 'torture'
	torture_intensity = 5
	painful = 1
	scarification = 0
	if master_torture > 1: easy_for_master = 1
	sensitivity_threshold = 3
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'woodhorse', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $pain[slave['age']]
		$text[1] = $woodenhorse_use_description
		$text[2] = $torture_reaction[$slave_psy_status]
		slave['woodenhorse_threat'] = 0
		damage = 3 + slave['sensitivity']
		house_mess_rate += 5
		slave_rate['hygiene'] += 5
		master_hygiene_rate += 4
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Application - Manual rack
if interaction = 14532:
	$interaction_type = 'torture'
	torture_intensity = 5
	painful = 1
	scarification = 0
	if master_torture > 2: easy_for_master = 1
	sensitivity_threshold = 0
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'rack', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $strappado_use_description
		$text[2] = $torture_reaction[$slave_psy_status]
		slave['strappado_threat'] = 0
		damage = 10 - master_torture
		house_mess_rate += 5
		slave_rate['hygiene'] += 5
		master_hygiene_rate += 4
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Application - Water barrel
if interaction = 14533:
	$interaction_type = 'torture'
	torture_intensity = 5
	water_based = 1
	scarification = 0
	if master_torture > 2: easy_for_master = 1
	sensitivity_threshold = 1
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'water', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $drowning[slave['age']]
		$text[1] = $watertank_use_description
		$text[2] = $torture_reaction[$slave_psy_status]
		slave['watertank_threat'] = 0
		damage = 5 - slave['stamina']
		house_mess_rate += 15
		slave_rate['hygiene'] += 0
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Application - Molten swing
if interaction = 14534:
	$interaction_type = 'torture'
	torture_intensity = 5
	fire_based = 1
	painful = 1
	scarification = 1
	if master_torture > 2: easy_for_master = 1
	sensitivity_threshold = 0
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'fireswing', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $fireswing_use_description
		$text[2] = $torture_reaction[$slave_psy_status]
		slave['fireswing_threat'] = 0
		damage = 5 + slave['sensitivity']
		house_mess_rate += 25
		slave_rate['hygiene'] += 20
		master_hygiene_rate += 15
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Application - Iron maiden
if interaction = 14535:
	$interaction_type = 'torture'
	torture_intensity = 5
	deprivation = 1
	darkness = 1
	painful = 1
	if master_torture > 2: easy_for_master = 1
	sensitivity_threshold = 1
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'ironmaiden', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $panik_sound[slave['age']]
		$text[1] = $ironmaiden_use_description
		$text[2] = $torture_reaction[$slave_psy_status]
		house_mess_rate += 5
		slave_rate['hygiene'] += 15
		master_hygiene_rate += 4
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Application - Infested pit
if interaction = 14536:
	$interaction_type = 'torture'
	torture_intensity = 5
	vermin_based = 1
	deprivation = 1
	painful = 1
	if master_torture > 2: easy_for_master = 1
	sensitivity_threshold = 1
	torturer_skill = master_torture
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'verminpit', 'girls/torture_scenes/torture_units_application/')
		$play_sound[1] = $panik_sound[slave['age']]
		$text[1] = $verminpit_use_description
		$text[2] = $torture_reaction[$slave_psy_status]
		house_mess_rate += 15
		slave_rate['hygiene'] += 15
		master_hygiene_rate += 10
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 1)
	}
	$place = 'dungeon'
end

!Put into a corner
if interaction = 1461:
	$interaction_type = 'torture'
	torture_intensity = 1
	deprivation = 1
	if master_bondage > 0: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = (1 + master_bondage + master_domination)/2 &! average, rounded up
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'corner', 'girls/torture_scenes/bondage/')
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $bondage_description[1]
		$text[2] = $bondage_reaction[$slave_psy_status]
		slave_rate['hygiene'] += 5
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_bondage < torture_intensity: master_bondage_rate += (skill_adv_mul * 1)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Put on peas
if interaction = 1462:
	$interaction_type = 'torture'
	torture_intensity = 2
	deprivation = 1
	painful = 1
	if master_bondage > 1: easy_for_master = 1
	sensitivity_threshold = 5
	torturer_skill = (1 + master_bondage + master_domination)/2 &! average, rounded up
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'peas', 'girls/torture_scenes/bondage/')
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $bondage_description[2]
		$text[2] = $bondage_reaction[$slave_psy_status]
		house_mess_rate += 15
		slave_rate['hygiene'] += 10
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_bondage < torture_intensity: master_bondage_rate += (skill_adv_mul * 1)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Rope saddle
if interaction = 1463:
	$interaction_type = 'torture'
	torture_intensity = 3
	deprivation = 1
	painful = 1
	if master_bondage > 2: easy_for_master = 1
	sensitivity_threshold = 4
	torturer_skill = master_bondage
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'rope_saddle', 'girls/torture_scenes/bondage/')
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $bondage_description[3]
		$text[2] = $bondage_reaction[$slave_psy_status]
		house_mess_rate += 5
		slave_rate['hygiene'] += 10
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_bondage < torture_intensity: master_bondage_rate += (skill_adv_mul * 1)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Hang by the legs
if interaction = 1464:
	$interaction_type = 'torture'
	torture_intensity = 4
	deprivation = 1
	if master_bondage > 3: easy_for_master = 1
	sensitivity_threshold = 3
	torturer_skill = master_bondage
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'hang_legs', 'girls/torture_scenes/bondage/')
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $bondage_description[4]
		$text[2] = $bondage_reaction[$slave_psy_status]
		house_mess_rate += 5
		slave_rate['hygiene'] += 10
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_bondage < torture_intensity: master_bondage_rate += (skill_adv_mul * 2)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Rope rack
if interaction = 1465:
	$interaction_type = 'torture'
	torture_intensity = max(4, min(5, slave['sin'])) &! appropriate for guilt tiers 4 to 5
	deprivation = 1
	painful = 1
	bruising = 1
	if master_bondage > 4: easy_for_master = 1
	sensitivity_threshold = 2
	torturer_skill = master_bondage
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'rope_rack', 'girls/torture_scenes/bondage/')
		$play_sound[1] = $pain[slave['age']]
		$text[1] = $bondage_description[5]
		$text[2] = $bondage_reaction[$slave_psy_status]
		damage = 10 - master_bondage
		house_mess_rate += 5
		slave_rate['hygiene'] += 10
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_bondage < torture_intensity: master_bondage_rate += (skill_adv_mul * 2)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Erotic bondage
if interaction = 1466:
	if slave['virginity'] < 1 and confirmed_erotic_bondage_defloration = 0:
		$place = 'study'
		$picture_type = 'slave_picture'
		$text[1] = '  <<$slave_name>> will no longer be a virgin after this punishment. Proceed anyway?'
		$yes = {
			confirmed_erotic_bondage_defloration = 1
			gt 'interaction'
		}
		$no = {
			killvar 'confirmed_erotic_bondage_defloration'
			menu_form = 0
			gt 'menu_form'
		}
		if debug_interactions ! 2: gt 'choice_screen'
	end
	killvar 'confirmed_erotic_bondage_defloration'
	$interaction_type = 'torture'
	torture_intensity = max(3, min(4, slave['sin'])) &! appropriate for guilt tiers 3 to 4
	stimulating = 1
	orgastic = 1
	shameful = 1
	deprivation = 1
	if dynslave['anal_stretch'] <= 3 or dynslave['virginity'] < 1: painful = 1
	if master_bondage > 1: easy_for_master = 1
	sensitivity_threshold = 6
	torturer_skill = (1 + master_bondage + master_fetish)/2 &! average, rounded up
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'erotic', 'girls/torture_scenes/bondage/')
		$play_sound[1] = $orgasm_sound[slave['age']]
		$text[1] = $ero_bondage_description
		$text[2] = $bondage_reaction[$slave_psy_status]
		interaction_slave['erotic_stimulation'] = (master_bondage + master_fetish)*2
		if slave['virginity'] < 1: dynamic $replace($dyn_rape_effects, 'dyn'+'slave', 'slave') &! apply psychological impacts before vaginal skill rises ($vaginally_penetrated will not call this) - ImperatorAugustus
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate (but ejaculation_intensity is zero, so master is not involved)
		if slave['anal_stretch'] = 0: slave['anal_stretch'] = 1
		house_mess_rate += 5
		slave_rate['hygiene'] += 15
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_bondage < torture_intensity: master_bondage_rate += (skill_adv_mul * 3)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Painful bondage
if interaction = 1467:
	$interaction_type = 'torture'
	torture_intensity = max(3, min(4, slave['sin'])) &! appropriate for guilt tiers 3 to 4
	painful = 1
	deprivation = 1
	bruising = 1
	if master_bondage > 2: easy_for_master = 1
	sensitivity_threshold = 6
	torturer_skill = master_bondage
	$special_part = {
		if master_bondage + ( slave['age'] / 2 ) + slave['boobs'] >= 8:
			$bg_path = $pain_bondage_bg
			if slave['lactation'] > 0: slave['milk_summ'] = 0
		else
			$bg_path = func('display_pic', 'slave', 'painful', 'girls/torture_scenes/bondage/')
		end
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $pain_bondage_description
		$text[2] = $bondage_reaction[$slave_psy_status]
		damage = 10 - (master_bondage*2)
		house_mess_rate += 5
		slave_rate['hygiene'] += 10
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_bondage < torture_intensity: master_bondage_rate += (skill_adv_mul * 3)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Deprivation suit
if interaction = 1468:
	$interaction_type = 'torture'
	torture_intensity = 2
	deprivation = 1
	darkness = 1
	if master_bondage > 1: easy_for_master = 1
	sensitivity_threshold = 6
	torturer_skill = master_bondage
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'dsuit', 'girls/torture_scenes/bondage/')
		$play_sound[1] = $gag_sound[slave['age']]
		$text[1] = $deprivation_bondage_description
		$text[2] = $bondage_reaction[$slave_psy_status]
		house_mess_rate += 10
		slave_rate['hygiene'] += 10
		master_hygiene_rate += 5
		!update master skill because it will not be done automatically
		if master_bondage < torture_intensity: master_bondage_rate += (skill_adv_mul * 1)
	}
	if dungeon > 0: $place = 'dungeon'
end

!SHAMING
!Naked walk
if interaction = 1471:
	$interaction_type = 'torture'
	torture_intensity = 2
	shameful = 1
	sensitivity_threshold = 6
	torturer_skill = master_domination
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'naked_walk', 'girls/torture_scenes/shaming/')
		$text[1] = $exhibition_walk_description
		$text[2] = $shame_torture_reaction[$slave_psy_status]
		if $slave_psy_status = 'frightened' and slave['rational'] < 1: slave_rate['rational'] += indep_atr_max_threshold[slave['rational']] &! raise awareness if the slave is frightened ("promises to be good")
		slave_rate['hygiene'] += 10
		master_hygiene_rate += 10
		!master domination skill will be increased automatically
	}
	$place = 'marketplace'
end

!Shameful podium
if interaction = 1472:
	$interaction_type = 'torture'
	torture_intensity = 1
	shameful = 1
	sensitivity_threshold = 6
	torturer_skill = master_domination
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'podium', 'girls/torture_scenes/shaming/')
		$text[1] = $exhibition_podium_description
		$text[2] = $shame_torture_reaction[$slave_psy_status]
		if $slave_psy_status = 'frightened' and slave['rational'] < 2: slave_rate['rational'] += indep_atr_max_threshold[slave['rational']] &! raise awareness if the slave is frightened ("promises to be good")
		slave_rate['hygiene'] += 20
		master_hygiene_rate += 10
		!master domination skill will be increased automatically
	}
	$place = 'marketplace'
end

!Living canvas
if interaction = 1473:
	$interaction_type = 'torture'
	torture_intensity = 3
	shameful = 1
	abuse = 1
	sensitivity_threshold = 5
	torturer_skill = master_domination
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'canvas', 'girls/torture_scenes/shaming/')
		$text[1] = $body_art_description
		$text[2] = $shame_torture_reaction[$slave_psy_status]
		if $slave_psy_status = 'frightened' and slave['rational'] < 3: slave_rate['rational'] += indep_atr_max_threshold[slave['rational']] &! raise awareness if the slave is frightened ("promises to be good")
		slave_rate['hygiene'] += 40
		master_hygiene_rate += 10
		!master domination skill will be increased automatically
	}
	$place = 'marketplace'
end

!Public use
if interaction = 1474:
	$interaction_type = 'torture'
	torture_intensity = 4
	shameful = 1
	abuse = 1
	sensitivity_threshold = 1
	torturer_skill = master_domination
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'public_use', 'girls/torture_scenes/shaming/')
		$text[1] = $common_use_description
		$text[2] = $shame_torture_reaction[$slave_psy_status]
		dynamic $replace($dyn_rape_effects, 'dyn'+'slave', 'slave') &! apply psychological impacts before vaginal skill rises ($vaginally_penetrated will not call this) - ImperatorAugustus
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate (but ejaculation_intensity is zero, so master is not involved)
		dynamic $inseminate, 'slave' &! sex with strangers (pregnancy chance)
		slave['cum_load'] += rand(10/slave['virginity'], 15/slave['virginity']) &! for cow (additional contribution from strangers, amount is not skill-based because this is a punishment, but is affected by vaginal tightness)
		if rand(3,8) > slave['stamina'] and slave['ill'] = 0: slave['ill'] = 1
		if $slave_psy_status = 'frightened' and slave['rational'] < 4: slave_rate['rational'] += indep_atr_max_threshold[slave['rational']] &! raise awareness if the slave is frightened ("promises to be good")
		if slave['sub_gangbang'] < 1: slave['sub_gangbang'] += 1 & slave['sub_gangbang_xp'] = 0
		slave_rate['hygiene'] += 80
		master_hygiene_rate += 10
		!master domination skill will be increased automatically
	}
	$place = 'marketplace'
end

!Public toilet
!Убрана потеря девственности при наказании общественным туалетом. Скорее всего - это ошибка копипасты наказания сверху.
!Вероятность залететь оставлена - 1/10
if interaction = 1475:
	$interaction_type = 'torture'
	torture_intensity = 5
	shameful = 1
	abuse = 1
	disgusting = 1
	sensitivity_threshold = 1
	torturer_skill = master_domination
	if dogortoilet = 0:
		$special_part = {
			$bg_path = func('display_pic', 'slave', 'public_urinal', 'girls/torture_scenes/shaming/')
			$text[1] = $common_toilet_description
			$text[2] = $shame_torture_reaction[$slave_psy_status]
			dynamic $replace($dyn_rape_effects, 'dyn'+'slave', 'slave') &! apply psychological impacts before vaginal skill rises ($vaginally_penetrated will not call this) - ImperatorAugustus
			$interaction_type = 'special_png' &! change this type only after applying rape effects because 'torture' type suppresses extra call to rape effects from $vaginally_penetrated
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate (but ejaculation_intensity is zero, so master is not involved)
			dynamic $inseminate, 'slave' &! sex with strangers (pregnancy chance)
			slave['cum_load'] += rand(3/slave['virginity'], 9/slave['virginity']) &! for cow (additional contribution from strangers, amount is not skill-based because this is a punishment, but is affected by vaginal tightness)
			if rand(3,8) > slave['stamina'] and slave['ill'] = 0: slave['ill'] = 1
			if $slave_psy_status = 'frightened' and slave['rational'] < 5: slave_rate['rational'] += indep_atr_max_threshold[slave['rational']] &! raise awareness if the slave is frightened ("promises to be good")
			if slave['sub_gangbang'] < 1: slave['sub_gangbang'] += 1 & slave['sub_gangbang_xp'] = 0
			slave_rate['hygiene'] += 100
			master_hygiene_rate += 10
			sparks += 1
			!master domination skill will be increased automatically
		}
	else
		$special_part = {
			$bg_path = func('display_pic', 'slave', 'dog', 'girls/sex_scenes/')
			$text[1] = $common_toilet_description
			$text[2] = $shame_torture_reaction[$slave_psy_status]
			dynamic $replace($dyn_rape_effects, 'dyn'+'slave', 'slave') &! apply psychological impacts before vaginal skill rises ($vaginally_penetrated will not call this) - ImperatorAugustus
			dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate (but ejaculation_intensity is zero, so master is not involved)
			slave['cum_load'] += rand(1,3) &! for cow (amount is not skill-based because this is a punishment)
			if $slave_psy_status = 'frightened' and slave['rational'] < 5: slave_rate['rational'] += indep_atr_max_threshold[slave['rational']] &! raise awareness if the slave is frightened ("promises to be good")
			if slave['sub_zoosex'] < 1: slave['sub_zoosex'] += 1 & slave['sub_zoosex_xp'] = 0
			slave_rate['hygiene'] += 80
			master_hygiene_rate += 10
			!master domination skill will be increased automatically
		}
	end
	$place = 'marketplace'
end

!Example of punishment
!Threaten prisoner
if interaction = 1481:
	$interaction_type = 'prisoner_torture'
	torture_intensity = 1
	easy_for_master = 1
	compassion = 1
	sensitivity_threshold = 6
	torturer_skill = master_domination
	$special_part = {
		show_prisoner_fullimage = 1
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $prisoner_intimidate_description
		$text[2] = $compassion_reaction[$slave_psy_status]
		!master domination skill will be increased automatically
	}
	if dungeon > 0: $place = 'dungeon'
end

!Flog prisoner
if interaction = 1482:
	$interaction_type = 'prisoner_torture'
	torture_intensity = 2
	compassion = 1
	sensitivity_threshold = 6
	torturer_skill = (1 + master_flagelation*2 + master_domination)/3 &! weighted average, rounded up
	$special_part = {
		$bg_path = func('display_pic', 'prisoner', 'cane', 'girls/torture_scenes/flagellation/')
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $prisoner_cane_description
		$text[2] = $compassion_reaction[$slave_psy_status]
		prisoner_rate['scars'] += 5
		prisoner_rate['stamina'] -= 2
		!update master skill because it will not be done automatically
		if master_flagelation < torture_intensity: master_flagelation_rate += (skill_adv_mul * 2)
		master_str_rate += iif(master_str < 4, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Beat prisoner
if interaction = 1483:
	$interaction_type = 'prisoner_torture'
	torture_intensity = 2
	compassion = 1
	sensitivity_threshold = 5
	torturer_skill = (1 + master_fighter*2 + master_domination)/3 &! weighted average, rounded up
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'prisoner', 'beat', 'girls/torture_scenes/battering/', 'any_age')
		end
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $prisoner_hit_description
		$text[2] = $compassion_reaction[$slave_psy_status]
		prisoner_rate['bruises'] += 20
		prisoner_rate['stamina'] -= 5
		!master domination skill will be increased automatically
		master_str_rate += iif(master_str < 4, 1, 0)
	}
	if dungeon > 0: $place = 'dungeon'
end

!Torture prisoner
if interaction = 1484:
	$interaction_type = 'prisoner_torture'
	torture_intensity = 3
	compassion = 1
	sensitivity_threshold = 4
	torturer_skill = (1 + master_torture*2 + master_domination)/3 &! weighted average, rounded up
	$special_part = {
		$bg_path = func('display_pic', 'prisoner', 'clamps', 'girls/torture_scenes/torture_instruments/')
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $prisoner_torture_description
		$text[2] = $compassion_reaction[$slave_psy_status]
		prisoner_rate['scars'] += 10
		prisoner_rate['stamina'] -= 10
		!update master skill because it will not be done automatically
		if master_torture < torture_intensity: master_torture_rate += (skill_adv_mul * 2)
	}
	if dungeon > 0: $place = 'dungeon'
end

if interaction = 1485:
	$place = 'study'
	$picture_type = 'prisoner_picture'
	$text[1] = '  As a result of this action, you will lose this prisoner forever. Execute her?'
	$yes = {
		interaction = 14850
		gt 'interaction'
	}
	$no = {
		gt 'menu_form'
	}
	menu_form = 0
	if debug_interactions ! 2: gt 'choice_screen'
end

if interaction = 14850:
	$interaction_type = 'prisoner_torture'
	torture_intensity = 4
	compassion = 1
	sensitivity_threshold = 3
	torturer_skill = master_torture
	$special_part = {
		$play_sound[1] = $cry[slave['age']]
		$text[1] = $prisoner_hanged_description
		$text[2] = $compassion_reaction[$slave_psy_status]
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'prisoner', 'hanging', 'girls/torture_scenes/get_rid_of/', 'any_age')
		end
		dynamic $clear_slave_instance, 'prisoner' &! PRISONER DEATH
		if slave['threat_death'] > 0:
			! threat fulfilled (slave now believes threat is real)
			slave['threat_death'] = 0
		end
		if slave_already_done_total[$str(interaction)] = 0: slave['instinct'] += 2 &! slave gains two full levels of taming the first time they witness an execution
		if slave['compassion'] > 0:
			! compassionate slave maxes fear, clears all positive moodlets
			slave['fear'] = 5
			gs '$mood_drop', 'slave', 100 &! traumatic
		elseif slave['compassion'] < 0:
			! sadistic slave gains devotion, clears all negative moodlets
			slave_rate['moral'] += slave['ego']*slave['temper']
			gs '$mood_rise', 'slave', 100 &! exciting
		else
			slave['fear'] += 1 &! non-sadist/non-compassionate slave is less affected but still gains a level of fear
		end
	}
	if dungeon > 0: $place = 'dungeon'
end

!Impregnate prisoner
if interaction = 1486:
	$interaction_type = 'rape_prisoner' &! changed from make_prisoner_do interaction type - ImperatorAugustus
	! rape interactions do not use repulse, they calculate a will to resist and have a chance to fight back based on that and relative strength - but prisoners cannot fight back - ImperatorAugustus
	stimulating = 1 &! although non-consensual, still stimulates and can trigger orgasms
	orgastic = 1
	sex_ability = (2 + prisoner['roleplay'] + prisoner['sub_vaginal'])/3
	sex_quality = min(5, max(1, sex_ability))
	$special_part = {
		$play_sound[1] = $fuck_sound[prisoner['age']]
		if rape_fear > 0:
			$bg_path = 'scene\insemination_cell'
			g = rand(1, picMax['insemination_cell'])
			if g > 1: $bg_path += '_' + $str(g)
			$text[1] = '  Your prisoner is restrained by chains, making it easy for you to take advantage of her situation: you grab her hips and insert yourself<<$slave_virgin_txt[interaction_prisoner["virginity"]]>>, then roughly fuck her until your semen flows into her womb. It lacks of eroticism, but at least it’s efficient.'
			interaction_prisoner['erotic_stimulation'] = min(1, master_excitement)
			sex_quality = max(1, prisoner['beauty'])
			! rape impacts are applied in interaction_result
		else
			$bg_path = func('display_pic', 'prisoner', 'impregnation', 'girls/sex_scenes/')
			$text[1] = '  Grabbing <<$prisoner_name>> by her hips, you insert yourself<<$slave_virgin_txt[interaction_prisoner["virginity"]]>>, then thrust into her until you ejaculate and fill her womb. Once you’re done, you pat her head and compliment her for being such a good cum receptacle.'
			if prisoner_state = CONST_INT['slave_faint']: $text[1] += ' Of course, being unconscious, she does not respond…'
			interaction_prisoner['erotic_stimulation'] = master_penetration
			prisoner_rate['custom'] += 1
			prisoner_rate['pride'] -= 1
			prisoner_rate['ego'] -= 1
			prisoner_rate['temper'] -= 1
		end
		ejaculation_intensity = sex_quality + master_excitement
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'prisoner') &! includes $master_ejaculate and raises master_penetration_rate
		if prisoner_state = CONST_INT['slave_exist']: prisoner['calories'] -= 1 & prisoner_rate['stamina'] += 1 &! not unconscious
		master_str_rate += iif(master_str < 4, 1, 0)
		house_mess_rate += 5
		master_hygiene_rate += 15
		prisoner_rate['hygiene'] += 15
	}
	$place = 'dungeon'
	$return_lock = 'prison_cell'
end

!Impregnate cow
if interaction = menu_cow_impregnate:
	$interaction_type = 'impregnate_cow'
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	dynamic $replace($interaction_cow_setup, 'slave', 'cow') &! sets motivation repulse among others (must be called before the next line, which overrides repulse)
	interaction_cow['repulse'] = iif(cow['virginity'] < 1, 8, 4) - cow_locked*100 &! same as vaginal lesson, cow being restrained guarantees success - ImperatorAugustus
	$coach_skill = 'master_penetration'
	orgastic = 1
	$refuse_txt = '  <<$cow_name>> refuses to have sex with you. Looks like she needs to be taught a lesson in obedience.'
	sex_ability = (2 + cow['roleplay'] + cow['sub_vaginal'])/3
	sex_quality = min(5, max(1, sex_ability))
	$special_part = {
		$play_sound[1] = $fuck_sound[cow['age']]
		if rape_fear > 0:
			$bg_path = 'scene\insemination_cell'
			g = rand(1, picMax['insemination_cell'])
			if g > 1: $bg_path += '_' + $str(g)
			$text[1] = '  Your cow is restrained by chains, making it easy for you to take advantage of her situation: you grab her hips and insert yourself<<$slave_virgin_txt[interaction_cow["virginity"]]>>, then roughly fuck her until your semen flows into her womb. It lacks of eroticism, but at least it’s efficient.'
			sex_quality = max(1, cow['beauty'])
			! rape impacts are applied in interaction_result
		else
			$bg_path = func('display_pic', 'cow', 'impregnation', 'girls/sex_scenes/')
			$text[1] = '  Grabbing <<$cow_name>> by her hips, you insert yourself<<$slave_virgin_txt[interaction_cow["virginity"]]>>, then thrust into her until you ejaculate and fill her womb. Once you’re done, you pat her head and compliment her for being such a good cow.'
			if cow_state = CONST_INT['slave_faint']: $text[1] += ' Of course, being unconscious, she does not respond…'
			cow_rate['custom'] += 1
			cow_rate['pride'] -= 1
			cow_rate['ego'] -= 1
			cow_rate['temper'] -= 1
		end
		interaction_cow['erotic_stimulation'] = master_penetration
		ejaculation_intensity = sex_quality + master_excitement
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'cow') &! includes $master_ejaculate and raises master_penetration_rate
		if cow_state = CONST_INT['slave_exist']: cow['calories'] -= 1 & cow_rate['stamina'] += 1 &! not unconscious
		master_str_rate += iif(master_str < 4, 1, 0)
		house_mess_rate += 5
		master_hygiene_rate += 15
		cow_rate['hygiene'] += 15
	}
	$place = 'barn'
	$return_lock = 'barn'
end

!Branding
!branding with iron
if interaction = 1811:
	if dungeon = 0 and debug_interactions ! 2:
		msg '  Of course slaves need to be branded, but you do not have the conditions for branding with an iron - you need to rent a dungeon. However, you can use the services of specialists in the city.'
		gt 'slave_stat'
	end
	$interaction_type = 'branding'
	torture_intensity = 4
	painful = 1
	fire_based = 1
	sensitivity_threshold = 0
	torturer_skill = master_domination
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'slave', 'branding', 'girls/torture_scenes/torture_instruments/')
		end
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $fire_branding
		slave['brand'] = 1
		slave_rate['mood'] -= 40
		house_mess_rate += 5
		master_hygiene_rate += 5
		slave_rate['hygiene'] += 10
	}
	if dungeon > 0: $place = 'dungeon'
end

!GET RID OF SLAVE
!Drive out the house (note: interaction id is used by 'threaten with sale' verbal punishment)
if interaction = 181:
	$place = 'study'
	$picture_type = 'slave_picture'
	if slave_already_done_recent[$str(interaction)] = 0: slave['threat_abandon'] = 0
	$text[1] = '  If you kick the slave out of the house, you are unlikely to see her again. Are you sure you want to get rid of her forever?'
	tmp_armor = 0
	tmp_weapons = 0
	tmp_clothes = 0
	tmp_jewelry = 0
	if $item_name[$slave['armor']] ! ''   and $item_name[$slave['armor']] ! '-' and $item_name[$slave['armor']] ! 'Without armor': tmp_armor = 1
	if $item_name[$slave['back_wpn']] ! '' and $item_name[$slave['back_wpn']] ! '-': tmp_weapons = 1
	if $item_name[$slave['left_wpn']] ! '' and $item_name[$slave['left_wpn']] ! '-' and $item_name[$slave['left_wpn']] ! 'Fist': tmp_weapons = 1
	if $item_name[$slave['right_wpn']] ! '' and $item_name[$slave['right_wpn']] ! '-' and $item_name[$slave['right_wpn']] ! 'Fist': tmp_weapons = 1
	if $item_name[$slave['cloth']] ! ''  and  $item_name[$slave['cloth']] ! '-' and  $item_name[$slave['cloth']] ! 'Naked': tmp_clothes = 1
	if $item_name[$slave['ring_left']] ! ''   and $item_name[$slave['ring_left']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['ring_right']] ! ''  and $item_name[$slave['ring_right']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['earrings']] ! ''  and $item_name[$slave['earrings']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['tongue']] ! ''  and $item_name[$slave['tongue']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['nipplerings']] ! '' and $item_name[$slave['nipplerings']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['navel']] ! ''   and $item_name[$slave['navel']] ! '-': tmp_jewelry = 1
	if $item_name[$slave['clitring']] ! ''  and $item_name[$slave['clitring']] ! '-': tmp_jewelry = 1
	if tmp_armor + tmp_clothes + tmp_jewelry + tmp_weapons = 0:
		$yes = {
			dynamic $clear_slave_instance, 'slave'
			menu_form = 0
			gt 'menu_form'
		}
	else
		$yes = {
			interaction = 1810
			gt 'interaction'
		}
	end
	$no = {
		if slave['sin'] < 4: slave_rate['angst'] += slave['sensitivity']
		if slave_already_done_recent[$str(interaction)] = 0 and slave['sin'] >= slave['rational']: slave['sin'] /= 2 & slave_rate['rational'] += slave['intellect']
		menu_form = 0
		gt 'menu_form'
	}
	if debug_interactions ! 2: gt 'choice_screen'
end

if interaction = 1810:
	$place = 'study'
	$picture_type = 'slave_picture'
	$text[1] = '  <<$slave_name>> is wearing '
	if tmp_armor + tmp_clothes + tmp_jewelry = 0:  $text[1] += 'nothing'
	if tmp_armor + tmp_clothes + tmp_jewelry = 3:
		$text[1] += 'perfectly good armor, as well as aura-bound clothing and jewelry'
	elseif tmp_armor + tmp_clothes + tmp_jewelry = 2:
		if tmp_armor = 1:
			$text[1] += 'perfectly good armor and '
		else
			$text[1] += 'aura-bound clothing and '
		end
		if tmp_jewelry = 1:
			$text[1] += 'aura-bound jewelry'
		else
			$text[1] += 'aura-bound clothing'
		end
	else
		if tmp_armor = 1: $text[1] += 'perfectly good armor'
		if tmp_jewelry = 1: $text[1] += 'aura-bound jewelry'
		if tmp_clothes = 1: $text[1] += 'aura-bound clothing'
	end
	$tmp = ''
	if tmp_weapons ! 0: $text[1] += ', and she is armed'
	if tmp_armor + tmp_weapons = 2:
		$tmp = ' her weapons, armor and'
	elseif tmp_weapons ! 0:
		$tmp = ' her weapons and'
	elseif tmp_armor ! 0:
		$tmp = ' her armor and'
	end
	$text[1] += '. Will you allow her to keep<<$tmp>> '
	if tmp_clothes > 0:
		$text[1] += 'the clothes on her back?'
	else
		$text[1] += 'the trinkets you bought for her?'
	end
	$yes = {
		dynamic $clear_slave_instance, 'slave'
		gt 'menu_form'
	}
	$no = {
		if $slave['armor'] ! 'без_брони': dynamic '<<$slave["armor"]>> += 1'
		if $slave['back_wpn'] ! '': dynamic '<<$slave["back_wpn"]>> += 1'
		if $slave['left_wpn'] ! '': dynamic '<<$slave["left_wpn"]>> += 1'
		if $slave['right_wpn'] ! '': dynamic '<<$slave["right_wpn"]>> += 1'
		!aura-bound items cannot be reused
		!inventory[$slave['cloth']] += 1
		!inventory[$slave['headband']] += 1
		!inventory[$slave['collar']] += 1
		!inventory[$slave['gloves']] += 1
		!inventory[$slave['boots']] += 1
		!inventory[$slave['ring_left']]  += 1
		!inventory[$slave['ring_right']]  += 1
		!inventory[$slave['earrings']] += 2
		!inventory[$slave['tongue']]  += 1
		!inventory[$slave['nipplerings']] += 2
		!inventory[$slave['navel']] += 1
		!inventory[$slave['clitring']] += 1
		dynamic $clear_slave_instance, 'slave'
		gt 'menu_form'
	}
	menu_form = 0
	if debug_interactions ! 2: gt 'choice_screen'
end

!Hang (note: interaction id is used by 'threaten with death' verbal punishment)
if interaction = 182:
	$place = 'study'
	$picture_type = 'slave_picture'
	if slave_already_done_recent[$str(interaction)] = 0: slave['threat_death'] = 0
	$text[1] = $execution_reaction[$slave_psy_status]
	$yes = {
		interaction = 1820
		gt 'interaction'
	}
	$no = {
		if slave['sin'] < 5: slave_rate['angst'] += slave['sensitivity']
		if slave_already_done_recent[$str(interaction)] = 0 and slave['sin'] >= slave['rational']: slave['sin'] /= 2 & slave_rate['rational'] += slave['intellect']
		gt 'menu_form'
	}
	menu_form = 0
	if debug_interactions ! 2: gt 'choice_screen'
end

if interaction = 1820:
	$interaction_type = 'execution'
	painful = 1
	torture_intensity = 6
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'slave', 'hanging', 'girls/torture_scenes/get_rid_of/', 'any_age')
		end
		$text[1] = $hanging_simple
		$play_sound[1] = $severe_pain[slave['age']]
		master_hygiene_rate += 10
	}
	if dungeon > 0: $place = 'dungeon'
end

!Decapitate (note: interaction id is used by 'threaten with death' verbal punishment)
if interaction = 183:
	$place = 'study'
	$picture_type = 'slave_picture'
	if slave_already_done_recent[$str(interaction)] = 0: slave['threat_death'] = 0
	$text[1] = $execution_reaction[$slave_psy_status]
	$yes = {
		interaction = 1830
		gt 'interaction'
	}
	$no = {
		if slave['sin'] < 5: slave_rate['angst'] += slave['sensitivity']
		if slave_already_done_recent[$str(interaction)] = 0 and slave['sin'] >= slave['rational']: slave['sin'] /= 2 & slave_rate['rational'] += slave['intellect']
		gt 'menu_form'
	}
	menu_form = 0
	if debug_interactions ! 2: gt 'choice_screen'
end

if interaction = 1830:
	$interaction_type = 'execution'
	bloody = 1
	torture_intensity = 6
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'slave', 'decapitation', 'girls/torture_scenes/get_rid_of/')
		end
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $decapitation_simple
		master_hygiene_rate += 10
	}
	if dungeon > 0: $place = 'dungeon'
end

!Impale (note: interaction id is used by 'threaten with death' verbal punishment)
if interaction = 184:
	$place = 'study'
	$picture_type = 'slave_picture'
	npc = 0
	if slave_already_done_recent[$str(interaction)] = 0: slave['threat_death'] = 0
	$text[1] = $execution_reaction[$slave_psy_status]
	$yes = {
		interaction = 1840
		gt 'interaction'
	}
	$no = {
		if slave['sin'] < 5: slave_rate['angst'] += slave['sensitivity']
		if slave_already_done_recent[$str(interaction)] = 0 and slave['sin'] >= slave['rational']: slave['sin'] /= 2 & slave_rate['rational'] += slave['intellect']
		gt 'menu_form'
	}
	menu_form = 0
	if debug_interactions ! 2: gt 'choice_screen'
end

if interaction = 1840:
	$interaction_type = 'execution'
	painful = 1
	shameful = 1
	torture_intensity = 6
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'slave', 'impaling', 'girls/torture_scenes/get_rid_of/')
		end
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $impaling_simple
		master_hygiene_rate += 10
	}
	if dungeon > 0: $place = 'dungeon'
end

!added contents to get rid of her - fixed and added images - crushboss
!Drown (note: interaction id is used by 'threaten with death' verbal punishment)
if interaction = 185:
	$place = 'study'
	$picture_type = 'slave_picture'
	npc = 0
	if slave_already_done_recent[$str(interaction)] = 0: slave['threat_death'] = 0
	!fixed typo (was death_treat instead of threat_death as used elsewhere) - ImperatorAugustus
	$text[1] = $execution_reaction[$slave_psy_status]
	$yes = {
		interaction = 1841
		gt 'interaction'
	}
	$no = {
		if slave['sin'] < 5: slave_rate['angst'] += slave['sensitivity']
		if slave_already_done_recent[$str(interaction)] = 0 and slave['sin'] >= slave['rational']: slave['sin'] /= 2 & slave_rate['rational'] += slave['intellect']
		gt 'menu_form'
	}
	menu_form = 0
	if debug_interactions ! 2: gt 'choice_screen'
end

if interaction = 1841:
	$interaction_type = 'execution'
	painful = 1
	shameful = 1
	torture_intensity = 6
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'water', 'girls/torture_scenes/multiple_categories/')
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $drowning_simple
		master_hygiene_rate += 10
	}
	if dungeon > 0: $place = 'dungeon'
end

!Roast alive (note: interaction id is used by 'threaten with death' verbal punishment)
if interaction = 186:
	$place = 'study'
	$picture_type = 'slave_picture'
	npc = 0
	if slave_already_done_recent[$str(interaction)] = 0: slave['threat_death'] = 0
	!fixed typo (was death_treat instead of threat_death as used elsewhere) - ImperatorAugustus
	$text[1] = $execution_reaction[$slave_psy_status]
	$yes = {
		interaction = 1842
		gt 'interaction'
	}
	$no = {
		if slave['sin'] < 5: slave_rate['angst'] += slave['sensitivity']
		if slave_already_done_recent[$str(interaction)] = 0 and slave['sin'] >= slave['rational']: slave['sin'] /= 2 & slave_rate['rational'] += slave['intellect']
		gt 'menu_form'
	}
	menu_form = 0
	if debug_interactions ! 2: gt 'choice_screen'
end

if interaction = 1842:
	$interaction_type = 'execution'
	painful = 1
	shameful = 1
	torture_intensity = 6
	$special_part = {
		if no_guro = 1:
			$bg_path = ''
		else
			$bg_path = func('display_pic', 'slave', 'cooked', 'girls/torture_scenes/get_rid_of/')
		end
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $roasting_simple
		master_hygiene_rate += 10
	}
	if dungeon > 0: $place = 'dungeon'
end

!Give to monster (note: interaction id is used by 'threaten with death' verbal punishment)
if interaction = 187:
	$place = 'study'
	$picture_type = 'slave_picture'
	if slave_already_done_recent[$str(interaction)] = 0: slave['threat_death'] = 0
	!fixed typo (was death_treat instead of threat_death as used elsewhere) - ImperatorAugustus
	$text[1] = $execution_reaction[$slave_psy_status]
	$yes = {
		interaction = 1843
		gt 'interaction'
	}
	$no = {
		if slave['sin'] < 5: slave_rate['angst'] += slave['sensitivity']
		if slave_already_done_recent[$str(interaction)] = 0 and slave['sin'] >= slave['rational']: slave['sin'] /= 2 & slave_rate['rational'] += slave['intellect']
		menu_form = 0
		gt 'menu_form'
	}
	if debug_interactions ! 2: gt 'choice_screen'
end

if interaction = 1843:
	$interaction_type = 'execution'
	painful = 1
	shameful = 1
	torture_intensity = 6
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'monster', 'girls/torture_scenes/get_rid_of/', 'any_age')
		$play_sound[1] = $severe_pain[slave['age']]
		$text[1] = $givemonster_simple
		master_hygiene_rate += 10
	}
	if dungeon > 0: $place = 'dungeon'
end

!STUFF
!было slave_mood для мудлетов, что работает не правильно для рабыни
if interaction = 371:
	lab_store['koffe'] -= 1
	if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
	bulk = 1
	if master_koffed = 0:
		master_half_action -= 2
		master_moodlet['neg_no_koffe'] = 0
		master_koffed = 1
	end
	menu_form = 0
	gs 'main_layout'
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

if interaction = 372:
	lab_store['kanabis'] -= 1
	if sound_on = 1: play 'content\snd\drug_smoke.wav', sound_volume
	bulk = 1
	master_moodlet['pos_kannabis'] = 1
	kannabis_pressure += 1
	if kannabis_pressure > 30: master_cha_rate -= 1
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

if interaction = 373:
	fridge['alcohol'] -= 1
	if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
	bulk = 1
	if master_drunk = 2:
		master_drunk = 3
		if debug_interactions ! 2: is_home = 1 & gt 'next_day' &! is_home = 1 to bypass menu_form ESC intercept
	end
	if master_drunk = 1:
		master_moodlet['pos_drunk'] = 1
		master_drunk = 2
	end
	if master_drunk = 0:
		gs '$mod_master_rise', 1
		master_moodlet['neg_drunk'] = 0
		master_drunk = 1
	end
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

!Smell Pollen - Master
if interaction = 374:
	lab_store['meth'] -= 1
	if sound_on = 1: play 'content\snd\drug_sniff.wav', sound_volume
	bulk = 1
	if master_on_meth = 1:
		dynamic $death, 'You have received an overdose of hard drugs and died from depression of the respiratory center in the brain. No one was able to help you.'
	end
	if master_on_meth = 0:
		master_half_action -= 10
		master_moodlet['neg_no_meth'] = 0
		master_on_meth = 1
		master_str_rate -= 1
		if master_libido > 0:
			master_excitement = 5
			master_excitement_rate = 180
		end
		master_libido_rate -= master_libido*10
	end
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

if interaction = 375:
	lab_store['opium'] -= 1
	if sound_on = 1: play 'content\snd\potion_home.wav', sound_volume
	bulk = 1
	if master_on_opium = 1:
		dynamic $death, 'You have received an overdose of hard drugs and died from depression of the respiratory center in the brain. No one was able to help you.'
	end
	if master_on_opium = 0:
		gs '$mod_master_rise', 3
		master_moodlet['neg_no_opium'] = 0
		master_moodlet['pos_opium'] = 1
		master_on_opium = 1
		master_str_rate -= 1
		master_libido_rate -= master_libido*10
	end
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

!Drink Bacchic Nectar
if interaction = 381:
	вакхический_нектар -= 1
	if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
	bulk = 1
	if master_moodlet['pos_bahus'] = 0: gs '$mod_master_rise', 2
	master_moodlet['pos_bahus'] = 1
	master_libido_rate += 2
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

!Drink Tonic Elixir
if interaction = 382:
	тонизируюзщий_эликсир -= 1
	if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
	bulk = 1
	master_half_action -= 2
	master_str_rate -= master_energised
	master_energised += 1
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

!Apply Healing Balm
if interaction = 383:
	целительный_бальзам -= 1
	if sound_on = 1: play 'content\snd\potion_home.wav', sound_volume
	bulk = 1
	if balm_hint = 0: balm_hint = 1 & msg 'Balm is best applied close to the time when the wound is received, otherwise the efficacy is much lower. Nevertheless, you feel a little better.'
	master_wounds_rate -= 25
	if master_str < 3: master_str_rate += (skill_adv_mul * 2)
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

!Drink Aphrodisiac
if interaction = 384:
	афродизиак -= 1
	if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
	bulk = 1
	if master_excitement < 5: master_excitement_rate += max(20, master_libido*6)
	master_libido_rate += 2
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

!Drink Powerful Aphrodisiac
if interaction = 385:
	мощный_афодизиак -= 1
	if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
	bulk = 1
	master_excitement = 5
	master_excitement_rate = 180
	master_libido_rate += 5
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

!Drink Philtre
if interaction = 386:
	приворотное_зелье -= 1
	if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
	bulk = 1
	master_excitement = 5
	master_excitement_rate = 180
	master_libido_rate += 10
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

!Drink Water of Lethe
if interaction = 387:
	вода_леты -= 1
	if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
	bulk = 1
	gs '$mod_master_rise',100
	gs '$mod_master_drop',100
	menu_form = 0
	if exam_in_progress = 1:
		if debug_interactions ! 2: gt 'demo_menu_form'
	else
		if debug_interactions ! 2: gt 'menu_form'
	end
end

!Drugs - slave

!Drink Kamra - slave
if interaction = 571:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 0 - iif(slave['alchemy'] > 0, 10, 0) - slave['koffe_addiction']*5 &! a D- or better alchemist recognizes this as safe, an addict craves it
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
		lab_store['koffe'] -= 1
		slave['neg_slave_koffe'] = 0
		if slave['koffed'] = 0:
			slave['half_action'] -= 2
			slave['koffed'] = 1
			slave['pos_slave_koffe'] = 1
		end
	}
end

!Blaze it - Datura - slave
if interaction = 572:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = -3 + slave['mood']/2 + iif(slave['alchemy'] > 2, slave['intellect'] - slave['kannabis_pressure']*5, 0) &! a B+ or better alchemist recognizes this as addictive, an unhappy slave is more willing, a smart slave wants to refuse, but an addict craves it
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_smoke.wav', sound_volume
		lab_store['kanabis'] -= 1
		slave['pos_slave_kannabis'] = 1
		if slave['kannabis_pressure'] > rand(1,100): slave_rate['intellect'] -= 1
		slave['kannabis_pressure'] += 1
	}
end

!Chug - Alcohol - slave
if interaction = 573:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = -6 + slave['mood'] - slave['dipsomania'] + slave['pride'] &! an unhappy or alcohol addicted slave is more willing to take alcohol, but a proud slave is less willing
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
		fridge['alcohol'] -= 1
		slave['neg_slave_alco'] = 0
		if slave['on_alco'] = 0:
			slave['on_alco'] = 1
			slave['pos_slave_alco'] = 1
			gs '$mood_rise', 'slave', 1
		else
			msg "Pretty drunk, your slave falls to the floor unconscious."
			slave_state = CONST_INT['slave_faint']
			slave['exhaustion_fainted'] = 1
			slave['energy'] = -4
			dynamic $slave_energy_drop
		end
	}
end

!Smell Pollen - slave
if interaction = 574:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 1 + iif(slave['alchemy'] > 2, slave['intellect'] - slave['meth_addiction']*5, 0) &! a B+ or better alchemist recognizes this as addictive, a smart slave wants to refuse, but an addict craves it
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_sniff.wav', sound_volume
		lab_store['meth'] -= 1
		slave['neg_slave_meth'] = 0
		if slave['on_meth'] = 0:
			slave['half_action'] -= 10
			slave['on_meth'] = 1
			!slave['pos_slave_meth'] = 1 &! non-existent moodlet
		else
			msg "You decide to give your slave another dose on the same day. Breathing the dust, your slave suddenly starts shaking in a fit and falls to the floor unconscious. It seems her nose is bleeding."
			slave_state = CONST_INT['slave_faint']
			slave['stamina_fainted'] = 1
			slave_rate['stamina'] = 4
			slave['stamina'] = 0
		end
	}
end

!Your dose of happiness - Oblivion - slave
if interaction = 575:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 3 + iif(slave['alchemy'] > 2, slave['intellect'] - slave['opium_addiction']*5, 0) &! a B+ or better alchemist recognizes this as addictive, a smart slave wants to refuse, but an addict craves it
	$special_part = {
		if sound_on = 1: play 'content\snd\potion_home.wav', sound_volume
		lab_store['opium'] -= 1
		slave['neg_slave_opium'] = 0
		if slave['on_opium'] = 0:
			slave['on_opium'] = 1
			slave['pos_slave_opium'] = 1
			gs '$mood_rise', 'slave', 3
		else
			msg "You decide to give your slave another dose on the same day. After applying, your slave rolled her eyes and goes on with a silly smile on her face for a while, ignoring your commands. Then she falls to the floor, her mouth fills with foam mixed with blood."
			slave_state = CONST_INT['slave_faint']
			slave['stamina_fainted'] = 1
			slave_rate['stamina'] = 4
			slave['stamina'] = 0
		end
	}
end

!Potions, Tonics, and Elixirs - slave

!Bacchic Nectar - alcohol - slave - crushboss
if interaction = 581:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 1 + iif(slave['alchemy'] > 2, -10, 0) &! a B+ or better alchemist recognizes this as safe
	if exam_in_progress = 1: interaction_slave['repulse'] = -100
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
		вакхический_нектар -= 1
		slave_rate['arousal'] += iif(slave['nymphomania'] < 0, 5, 25)
		gs '$mood_rise', 'slave', 2
	}
end

!Tonic Elixir - slave
if interaction = 582:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 1 + iif(slave['alchemy'] > 2 and slave['energised'] < 10, -10, 0) + min(40, slave['energised']) &! a B+ or better alchemist recognizes this and thinks it is safe, but as slaves notice the side effects, their resistance will grow (repulse is capped at +41, which is achievable with maxed aura stats)
	if exam_in_progress = 1: interaction_slave['repulse'] = -100
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
		тонизируюзщий_эликсир -= 1
		slave['half_action'] -= 2
		slave_rate['stamina'] -= slave['energised']
		slave['energised'] += 1
	}
end

!Miracle Balm - healing - slave
if interaction = 583:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 1 + iif(slave['alchemy'] > 2, -10, 0) &! a B+ or better alchemist recognizes this as safe
	if exam_in_progress = 1: interaction_slave['repulse'] = -100
	$special_part = {
		if sound_on = 1: play 'content\snd\potion_home.wav', sound_volume
		целительный_бальзам -= 1
		if slave_rate['wounds'] > 0: slave_rate['wounds'] -= 25
	}
end

!Aphrodisiac - slave
if interaction = 584:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 1 + iif(slave['alchemy'] > 2, slave['pride'] - slave['moral'], 0) &! a B+ or better alchemist recognizes the effects, after which pride opposes devotion
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
		афродизиак -= 1
		if slave['arousal'] < 5: slave_rate['arousal'] += iif(slave['nymphomania'] < 0, 10, 50)
	}
end

!Powerful Aphrodisiac - slave
if interaction = 585:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 1 + iif(slave['alchemy'] > 2, slave['pride'] - slave['moral'], 0) &! a B+ or better alchemist recognizes the effects, after which pride opposes devotion
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
		мощный_афодизиак -= 1
		slave['arousal'] = 5
		slave_rate['arousal'] = 200
	}
end

!Philtre potion - Love Potion - slave
if interaction = 586:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 1 + iif(slave['alchemy'] > 2, slave['pride'] + slave['intellect'] + slave['ego'] - slave['moral'], 0) &! a B+ or better alchemist recognizes the effects, after which pride, intellect and nature oppose devotion
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
		приворотное_зелье -= 1
		if slave['on_love_drug'] = 0:
			slave['on_love_drug'] = 1
			slave['pos_slave_love'] = 50
			slave_rate['moral'] += 50
		else
			msg "You give your slave the philtre, but it does not work a second time. At least you do not see any effect."
		end
	}
end

!Water of Lethe - slave - overhauled by crushboss (reverted mostly to 1.2.1 effects - ImperatorAugustus)
if interaction = 587:
	$interaction_type = 'get_drug'
	interaction_slave['repulse'] = 1 + iif(slave['alchemy'] > 2, slave['pride']*2 + slave['intellect']*2 + slave['ego']*2 - slave['moral'], 0) &! a B+ or better alchemist recognizes the effects, after which pride, intellect, nature and temperament strongly oppose devotion
	$special_part = {
		if sound_on = 1: play 'content\snd\drug_drink.wav', sound_volume
		вода_леты -= 1
		!reset aura stats
		slave['arousal'] = 0    & slave_rate['arousal'] = 0
		slave['fear'] = 0       & slave_rate['fear'] = 0
		slave['angst'] = 0      & slave_rate['angst'] = 0
		slave['rational'] = 0   & slave_rate['rational'] = 0
		slave['instinct'] = 0   & slave_rate['instinct'] = 0
		slave['custom'] = 0     & slave_rate['custom'] = 0
		slave['spoil'] = 0      & slave_rate['spoil'] = 0
		slave['moral'] = 0      & slave_rate['moral'] = 0
		!clear guilt and merit
		slave['sin'] = 0
		slave['virtue'] = 0
		!reset mood
		slave['mood'] = 0 & slave_rate['mood'] = 0
		gs '$mood_rise', 'slave', 100
		gs '$mood_drop', 'slave', 100
		!reset relaxation counter
		slave['well_rested'] = 0
		!reset daily rewards counter
		slave['daily_reward_count'] = 0
		slave['daily_punishment_count'] = 0
		!drain intellect stat
		slave_rate['intellect'] -= 40
		menu_form = 0
		gt 'menu_form'
	}
end

!Fiend Milking - assistant
if interaction = menu_Milk_A:
	$interaction_type = 'make_assistant_do'
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	disgusting = 1
	orgastic = 1
	bruising = 1
	$refuse_txt = '  <<$assistant_name>> refuses even to go into the pen with the fiend. The mere sight of this monster fills her with fear and loathing. But it does not mean that she can ignore the orders of her master…'
	$special_part = {
		$bg_path = func('display_pic', 'assistant', 'tentacles', 'girls/sex_scenes/')
		interaction_assistant['erotic_stimulation'] = 2 + tentacle_size*5 &! may trigger multiple orgasms depending on arousal level
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'assistant') &! includes $master_ejaculate (but ejaculation_intensity is zero, so master is not involved)
		if assistant['fertility'] >= 0 and assistant['pregnant'] < 1 and assistant['parasite'] < 1 and assistant['fiend_tattoo'] = 0: assistant['parasite'] = 1
		if assistant['parasite'] < 1: assistant_rate['arousal'] -= (assistant['arousal'] + assistant['sensitivity'])
		tentacle_hp += 1
		if assistant['sub_tentacles'] > tentacle_size:
			tentacle_hp += 2
			spawn_semen += semen_gain[max(0, tentacle_size - spawn_milked)]
			$text[1] = '  <<$assistant_name>> takes a bucket-pot and goes to the pen with the fiend in it. Thanks to previous experience, she manages not to lose control. While some insatiable slippery tentacles penetrate all her holes, she grabs the other feelers and milks them directly into the bucket. Fiend Cum Gained: <<semen_gain[max(0, tentacle_size - spawn_milked)]>>'
		else
			$text[1] = '  <<$assistant_name>> takes a bucket-pot and goes to the pen with the fiend in it. Nevertheless, her efforts to milk the thing lead to nothing. Braided with powerful tentacles, your assistant completely loses touch with reality and gets orgasm after orgasm until fiend pumps her holes with seed.'
		end
		spawn_milked += assistant['sub_tentacles']
		if felicity = 1 and $quest12 ! 'fail' and active[$quest[12]] = 1 and assistant_type ! 2572: $quest12 = 'fail' & $quest12_failreason = 'It seems you haven’t been making her care for your fiend, slaver.'
		assistant_rate['pride'] -= 2
		damage = 4 - assistant['sub_tentacles']
		assistant_rate['sensitivity'] -= damage
		assistant_rate['stamina'] += min(interaction_assistant['diligence'], 1) &! no extra calorie drop due to fiend cum swallowed
		assistant_rate['hygiene'] += 30
		house_mess_rate += 10
	}
end

!Fiend Milking - slave
if interaction = menu_Milk_S:
	$interaction_type = 'make_slave_do'
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	interaction_slave['repulse'] = iif(slave['virginity'] < 1, 25, 24) &! same as fiend milking lesson
	interaction_slave['motivation_repulse'] = 5 - slave['sub_tentacles']
	orgastic = 1
	disgusting = 1
	bruising = 1
	$refuse_txt = '  <<$slave_name>> refuses even to go into the pen with the fiend. The mere sight of this monster fills her with fear and loathing. But it does not mean that she can ignore the orders of her master…'
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'tentacles', 'girls/sex_scenes/')
		interaction_slave['erotic_stimulation'] = 2 + tentacle_size*5 &! may trigger multiple orgasms depending on arousal level
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'slave') &! includes $master_ejaculate (but ejaculation_intensity is zero, so master is not involved)
		if slave['fertility'] >= 0 and slave['pregnant'] < 1 and slave['parasite'] < 1 and slave['fiend_tattoo'] = 0: slave['parasite'] = 1
		if slave['parasite'] < 1: slave_rate['arousal'] -= (slave['arousal'] * slave['sensitivity'])
		tentacle_hp += 1
		if slave['sub_tentacles'] > tentacle_size:
			tentacle_hp += 2
			spawn_semen += semen_gain[max(0, tentacle_size - spawn_milked)]
			$text[1] = '  <<$slave_name>> takes a bucket-pot and goes to the pen with the fiend in it. Thanks to previous experience, she manages not to lose control. While some insatiable slippery tentacles penetrate all her holes, she grabs the other feelers and milks them directly into the bucket. Fiend Cum Gained: <<semen_gain[max(0, tentacle_size - spawn_milked)]>>'
		else
			$text[1] = '  <<$slave_name>> takes a bucket-pot and goes to the pen with the fiend in it. Nevertheless, her efforts to milk the thing lead to nothing. Braided with powerful tentacles, your slave completely loses touch with reality and gets orgasm after orgasm as the fiend pumps her holes with seed.'
		end
		spawn_milked += slave['sub_tentacles']
		if felicity = 1 and $quest12 ! 'fail' and active[$quest[12]] = 1 and slave_type ! 2572: $quest12 = 'fail' & $quest12_failreason = 'It seems you haven’t been making her care for your fiend, slaver.'
		slave_rate['pride'] -= 2
		damage = 4 - slave['sub_tentacles']
		slave_rate['sensitivity'] -= damage
		slave_rate['stamina'] += min(interaction_slave['diligence'], 1) &! no extra calorie drop due to fiend cum swallowed
		slave_rate['hygiene'] += 30
		house_mess_rate += 10
	}
end

!Slave milking
if interaction = menu_S_milking:
	$interaction_type = 'milking_slave'
	interaction_slave['repulse'] = 1 - slave['milk_summ']/22 - slave['cowSK']*4
	shameful = 1
	$special_part = {
		$bg_path = func('display_pic', 'slave', 'milking', 'girls/sex_scenes/')
		house_mess_rate += 5
		master_hygiene_rate += 10
	}
	$place = iif(kitchen > 0, 'kitchen', 'bedroom')
end

!Assistant milking
if interaction = menu_A_milking:
	$interaction_type = 'milking_assistant'
	interaction_slave['repulse'] = 1 - assistant['milk_summ']/22 - assistant['cowSK']*4
	shameful = 1
	$special_part = {
		$bg_path = func('display_pic', 'assistant', 'milking', 'girls/sex_scenes/')
		house_mess_rate += 3
		master_hygiene_rate += 10
	}
	$place = iif(kitchen > 0, 'kitchen', 'bedroom')
end

!Cow milking
if interaction = menu_C_milking:
	$interaction_type = 'milking_cow'
	interaction_cow['repulse'] = 1 - cow['milk_summ']/22 - cow['cowSK']*4 - cow_locked*100 &! restraining the cow guarantees success
	shameful = 1
	$special_part = {
		$bg_path = func('display_pic', 'cow', 'milking', 'girls/sex_scenes/')
		house_mess_rate += 2
		master_hygiene_rate += 10
	}
	$place = 'barn'
	$return_lock = 'barn'
end

!farmhand milking the cow
if interaction = menu_farmhand_milking:
	$interaction_type = 'milking_farmhand'
	interaction_cow['repulse'] = 1 - cow['milk_summ']/22 - cow['cowSK']*4 - cow_locked*100 &! restraining the cow guarantees success
	shameful = 1
	$special_part = {
		$bg_path = func('display_pic', 'cow', 'milking', 'girls/sex_scenes/')
		house_mess_rate += 2
		farmhand_rate['hygiene'] += 10
	}
	$place = 'barn'
	$return_lock = 'barn'
end

!Prisoner milking
if interaction = menu_P_milking:
	$interaction_type = 'milking_prisoner'
	interaction_prisoner['repulse'] = -100 &! being imprisoned guarantees success
	shameful = 1
	$special_part = {
		$bg_path = func('display_pic', 'prisoner', 'milking', 'girls/sex_scenes/')
		house_mess_rate += 2
		master_hygiene_rate += 10
	}
	$place = 'dungeon'
	$return_lock = 'prison_cell'
end

!slave refuses to enter in barn
if interaction = menu_deny_barn:
	$interaction_type = 'special'
	show_slave_fullimage = 1
	$place = 'study'
	if slave['obedience'] < -4:
		$text[1] = '  Your slave strongly refuses to enter in the barn, calling you a fool to think she’s some animal.'
	elseif slave['obedience'] < 1:
		$text[1] = '  <<$slave_name>> takes a look in the barn, but finally firmly refuses to enter.'
	elseif slave['courage'] ! 2:
		$text[1] = '  With fear in her eyes, <<$slave_name>> refuses to go back in the barn. For the moment.'
	else
		$text[1] = '  <<$slave_name>> refuses to go back in the barn. For the moment.'
	end
	dynamic $sin_gained_now, 'slave'
end

!Barn stuff goes here - ref menu_form 3001 onwards

if interaction = 6000:
	$text[1] = '  A barn allows you to save money on groceries by growing your own food (although you also have to consider the cost of feeding the slaves who produce the food). Any surplus is sold, earning you a passive income off your slaves. A farmhand can manage the barn, reducing the food bill for the livestock, increasing their output, among other tasks.'
	$text[2] = '  An egglayer will produce eggs for your fridge at a higher rate than a regular slave with those modifications would. If your fridge already contains 5 eggs, the excess will be sold at a sixth of the market value. A girl recovering from surgery will not produce eggs until she has recovered.'
	$text[3] = '  Your cowshed can house one cow. Without regular exercise, your cow’s <font color="#ce0000"><b>Endurance</b></font> will slowly stabilize to a "Weakened" level. A cow will produce milk at the normal rate in a cowshed: however her cow skill (which affects her productivity) will gradually increase without needing you to train her. A farmhand can accelerate this process and also improve your cow’s mood.'
	$text[4] = '  Living in a cowshed is a harsh experience for a girl who is not ready for it. Depending on her level of cow training, her <font color="#ce0000"><b>Nature</b></font>, <font color="#ce0000"><b>Pride</b></font> and <font color="#ce0000"><b>Temperament</b></font> will decrease. This can be mitigated somewhat by having a farmhand taking care of the cow.<br>  Her <font color="#ce0000"><b>Intellect</b></font> also will decrease for each day in the barn.'
	$text[5] = '  To improve milk production, inseminate your cow regularly. You can ask the public farm (which will charge you) to take care of "impregnations." A girl recovering from surgery will have low - but increasing - productivity. You can choose to overfeed your cow to gradually increase her weight and thus (a bit) the milk she produces. Too much weight is not beneficial, so reduce her feed before she becomes corpulent.'
	$text[6] = '  Your farmhand will bathe your cow periodically to keep her from becoming too dirty, and when you have more than 50 bottles of milk, she will visit the cooperative daily to check market prices and sell some bottles when the prices are favorable. Although your farmhand also can milk your cow, she will only do so when directed.'
	$text[7] = '  Your farmhand can be ordered to overfeed your egglayer, gradually increasing her weight and thus the goods she produces. Your farmhand also can be ordered to automatically slaughter and butcher your pig once she’s fat enough, and to take prisoners to the barn as replacement pigs.'
	$text[8] = '  You can only have one slave of each type, as going beyond this limit violates the monopoly of the Grocers Guild. This is also why you make a fraction of the market value of these goods. You shouldn’t complain too much, as Guild monopolies are why you can charge so much for your slaves.'
end

if interaction = menu_bath_C:
	$place = 'barn'
	$return_lock = 'barn'
	show_cow_fullimage = 1
	dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'cow')
	$text[1] = '  Using a sponge, you carefully wash <<$cow_name>>.'
	if bull_ring_on = 0: master_half_action += 1 &! no more infinite washing - cleaning the cow consumes a half action - ImperatorAugustus
end

if interaction = menu_bath_C_A:
	$place = 'barn'
	$return_lock = 'barn'
	show_cow_fullimage = 1
	dynamic $replace($dyn_slave_bathed, 'dyn'+'slave', 'cow')
	$text[1] = '  Using a sponge, your assistant carefully washes <<$cow_name>>.'
	assistant['half_action'] += 1 &! no more infinite washing - cleaning the cow consumes a half action - ImperatorAugustus
end

!Make slave a farmhand
if interaction = 6001:
	$place = 'barn'
	$return_lock = 'barn'
	if slave['moral'] < 3:
		$text[1] = '  Your slave is not yet devoted enough for her to be trusted with the freedom that this job requires.'
	elseif slave['nurse'] > 2 and slave['secretary'] > 2:
		$text[1] = '  Your slave moves her bedroll to the barn, and from now on will be your farmhand and dedicate her time to taking care of any slaves in the barn’s pens.'
		show_farmhand_fullimage = 1
		slave['half_action'] += 1
		dynamic $swap_slave_instances, 'slave', 'farmhand'
	else
		$text[1] = '  Your slave needs both <font color="#0000D8"><b>medical</b></font> and <font color="#0000D8"><b>secretarial</b></font> skills to perform this role.'
	end
end

!Retrieve farmhand
if interaction = 6002:
	$place = 'barn'
	$return_lock = 'barn'
	$text[1] = '  On your order, your farmhand abandons the barn to report to you for further orders.'
	dynamic $swap_slave_instances, 'slave', 'farmhand'
	show_slave_fullimage = 1
end

!Make slave a harpy
if interaction = 6005:
	$place = 'barn'
	$return_lock = 'barn'
	if slave['fertility'] ! 1:
		show_slave_fullimage = 1
		$text[1] = '  Your slave is not capable of producing eggs. She needs to be taken first to receive the necessary procedure from the Technosphere medical center.'
	else
		if $slave_psy_status = 'broken':
			$text[1] = '  Your broken slave obeys, abandoning her life as a person in favor of a life constantly laying eggs. She walks into the pen without a care and settles down on a soft pile of hay.'
		elseif $slave_psy_status = 'servile' or slave['moral'] = 5:
			$text[1] = '  Your loyal slave makes herself comfortable in the pen, laying back on a soft pile of hay.'
		else
			$text[1] = '  Your slave is horrified at the idea of living in a barn, kept as an animal to lay eggs for your table, however she knows that resisting you is futile. She makes herself comfortable in the pen, laying back on a soft pile of hay.'
			torture_intensity = 2
			will_to_resist = torture_intensity + rebell[$slave_psy_status] + (slave['ego'] - 3) + slave['spoil'] - max(0, min(5, master_supermacy - master_style)) - slave['moral']*2 - slave['domini_dictum']*100
			if will_to_resist > 0 and slave['beaten'] = 0:
				slave['angst'] += 1
				slave_rate['angst'] = 10
				if slave['gladiatrix'] > max(0, master_supermacy - master_style):
					dynamic $slave_fights_back &! includes a 'gt' so it stops execution of the code below
				else
					dynamic $replace($dyn_slave_forced, 'dyn'+'slave', 'slave')
					slave['sin'] = 0 &! clear guilt from $dyn_slave_forced because it is not visible in the barn - ImperatorAugustus
				end
			end
			if slave['angst'] > 0 or slave['beaten'] ! 0:
				$text[1] = '  Your slave is horrified at the idea of living in a barn, kept as an animal to lay eggs for your table. Downcast, she reluctantly enters the pen and settles down on a soft pile of hay.'
			end
		end
		show_harpy_fullimage = 1
		slave['half_action'] += 1
		gs 'slave_to_harpy'
	else
		$text[1] = 'Your slave must be laying eggs to fulfill this role.'
	end
end

!Retrieve harpy
if interaction = 6006:
	$place = 'barn'
	$return_lock = 'barn'
	show_slave_fullimage = 1
	$text[1] = '  On your order, your slave leaves her pen and reports back to you.'
	if harpy_state = CONST_INT['slave_faint']:
		$text[1] = '  Your slave is unconscious, so you drag her out of her pen.'
		master_hygiene_rate += 10
	elseif harpy['time_in_barn'] > 5:
		$text[1] += ' Her walk is slightly bow-legged, making it obvious she’s spent more time with her legs spread than not until now.'
	end
	harpy_rate['hygiene'] += 10
	house_mess_rate += 10
	gs 'slave_to_harpy'
end

!Make slave a pig (this interaction is used when the slave interaction slot is not empty, regardless of whether the pig slot is full or not)
if interaction = 6007:
	$place = 'barn'
	$return_lock = 'barn'
	if $slave_psy_status = 'broken' or slave['intellect'] < 2 or slave['courage'] = 2:
		$text[1] = '  Your slave obeys, too stupid to realize or too broken to care what this new role implies for her future. Over the coming days her weight will dramatically increase as she will have nothing to do but eat.'
		$special_action[1] = {
			if $text[2] = '' or $text[2] = 'placeholder': dynamic $swap_slave_instances, 'slave', 'pig'
			show_pig_fullimage = 1
		}
	elseif slave_state = CONST_INT['slave_faint']:
		$text[1] = '  Your slave is unconscious, so you drag her limp body into the barn and leave her in the pig pen.<br>  Her food trough is mounded with weight-gain cookies, the tastiest thing she will have eaten in a long time. An evil blend of carbs, fat and sugar, and a few nutrients, laced with a hunger-inducing potion; the more she eats the hungrier she feels. The perfect food to fatten the sow up.'
		dynamic $master_energy_drop &! dragging the slave
		$special_action[1] = {
			if $text[2] = '' or $text[2] = 'placeholder': dynamic $swap_slave_instances, 'slave', 'pig'
			show_pig_fullimage = 0
			show_slave_fullimage = 0
		}
	else
		$text[1] = '  Your slave is terrified, understanding that she is to be fattened up for slaughter.<br>  Her food trough is mounded with weight-gain cookies, the tastiest thing she will have eaten in a long time. An evil blend of carbs, fat and sugar, and a few nutrients, laced with a hunger-inducing potion; the more she eats the hungrier she feels. The perfect food to fatten the sow up.'
		$special_action[1] = {
			if $text[2] = '' or $text[2] = 'placeholder': dynamic $swap_slave_instances, 'slave', 'pig'
			show_pig_fullimage = 1
			show_slave_fullimage = 0
		}
	end
	if pig_state > CONST_INT['no_slave']:
		$text[2] = 'placeholder'
		$special_action[2] = {
			if slave['time_in_barn'] > 0 and slave['fat'] = 5:
				show_pig_fullimage = 0
				show_slave_fullimage = 0
				$bg_path = 'scene\slave_to_pig'
				g = rand(1, picMax['slave_to_pig'])
				if g > 1: $bg_path += '_' + $str(g)
			else
				show_slave_fullimage = 1
				show_pig_fullimage = 0
			end
			if slave_state = CONST_INT['slave_faint']:
				$text[2] = '  Your former pig is unconscious, so you drag her out of her pen.'
				$return_lock = 'menu_form'
			else
				$text[2] = '  On your order, your former pig leaves her pen and reports back to you.'
			end
			if slave['time_in_barn'] > 0:
				if slave_state = CONST_INT['slave_faint']:
					$text[2] += ' Her stomach is bulging and she could definitely use a bath.'
				else
					$text[2] += ' Her stomach is bulging and her gaze dull, and she could definitely use a bath.'
				end
				slave_rate['hygiene'] = 200
			else
				$text[2] += ' She could definitely use a bath.'
				slave_rate['hygiene'] = 40
			end
		}
	end
	torture_intensity = 5
	will_to_resist = torture_intensity + rebell[$slave_psy_status] + slave['spoil'] + (slave['ego'] - 3) - max(0, min(5, master_supermacy - master_style)) - slave['moral']*2 - slave['domini_dictum']*100
	if will_to_resist > 0 and slave['beaten'] = 0 and slave_state = CONST_INT['slave_exist']:
		! an unconscious slave cannot resist - ImperatorAugustus
		if slave['gladiatrix'] > max(0, master_supermacy - master_style):
			dynamic $slave_fights_back &! includes a 'gt' so it stops execution of the code below
		else
			dynamic $replace($dyn_slave_forced, 'dyn'+'slave', 'slave')
			slave['sin'] = 0 &! clear guilt from $dyn_slave_forced because it is not visible in the barn - ImperatorAugustus
		end
	end
	if slave_state = CONST_INT['slave_exist']: slave['half_action'] += 1
	if pig_state = CONST_INT['slave_exist']: pig['half_action'] += 1
	if pig_state = CONST_INT['slave_faint']:
		master_hygiene_rate += 100
		dynamic $master_energy_drop &! dragging the former pig
	else
		master_hygiene_rate += 10
	end
	house_mess_rate += 40
end

!Retrieve pig (this interaction is used only when the slave instance slot is empty)
if interaction = 6008:
	$place = 'barn'
	$return_lock = 'barn'
	if pig['time_in_barn'] > 0 and pig['fat'] = 5:
		$bg_path = 'scene\slave_to_pig'
		g = rand(1, picMax['slave_to_pig'])
		if g > 1: $bg_path += '_' + $str(g)
	else
		show_slave_fullimage = 1
	end
	if pig_state = CONST_INT['slave_faint']:
		$text[1] = '  Your pig is unconscious, so you drag her out of her pen.'
		$return_lock = 'menu_form'
	else
		$text[1] = '  On your order, your pig leaves her pen and reports back to you.'
	end
	if pig['time_in_barn'] > 0:
		if pig_state = CONST_INT['slave_faint']:
			$text[1] += ' Her stomach is bulging and she could definitely use a bath.'
		else
			$text[1] += ' Her stomach is bulging and her gaze dull, and she could definitely use a bath.'
		end
		pig_rate['hygiene'] = 200
	else
		pig_rate['hygiene'] = 40
	end
	if pig_state = CONST_INT['slave_exist']: pig['half_action'] += 1
	if pig_state = CONST_INT['slave_faint']:
		master_hygiene_rate += 100
		dynamic $master_energy_drop &! dragging the former pig
	else
		master_hygiene_rate += 10
	end
	house_mess_rate += 40
	dynamic $swap_slave_instances, 'slave', 'pig'
end

if interaction = menu_cow_insemination_group:
	$interaction_type = 'cow_insemination'
	$place = 'barn'
	$return_lock = 'barn'
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	interaction_cow['repulse'] = iif(cow['virginity'] < 1, 8, 4) - cow_locked*100 &! same as vaginal lesson (because this is not a gangbang, it is a serial insemination); if resisted, will be treated as rape
	interaction_cow['motivation_repulse'] = 5 - cow['cowSK']
	if cow['orgy'] > 2: orgastic = 1
	shameful = 1
	interaction_no_auto_energy_drop = 1
	$target_skill = 'cowSK'
	$target_affinity = 'nymphomania'
	$special_part = {
		sparks -= 30
		$picture_type = 'pic_png'
		$bg_path = 'scene/insemination'
		g = rand(1, picMax['insemination'])
		if g > 1: $bg_path += '_' + $str(g)
		$text[1] = '  The public farm usually sends several employees for this kind of job. If your cow is used to being taken by several strangers, it shouldn’t faze her a bit. Anyway it won’t hurt anything else than her spirit, and she will progressively become accustomed to it. Considering the expense, it may be best to wait until the cow drops to a C+ impregnation rating before paying for another round.'
		interaction_cow['erotic_stimulation'] = 5
		ejaculation_intensity = 0 &! master is not involved
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'cow')
		dynamic $cow_energy_drop
		dynamic $inseminate, 'cow' &! sex with strangers
		cow['cum_load'] += rand(50,55) &! needed because ejaculation_intensity = 0
		! no disease risk, the public farm makes sure the employees are clean
		cow_rate['instinct'] += 1
		cow_rate['cowSK'] += 1
		if cow_state = CONST_INT['slave_exist']: cow['calories'] -= 1 & cow_rate['stamina'] += 1 &! not unconscious
		house_mess_rate += 10
		cow_rate['hygiene'] += 25
	}
	$place = 'barn'
end

if interaction = menu_cow_insemination_minotaur:
	$interaction_type = 'cow_insemination'
	$place = 'barn'
	$return_lock = 'barn'
	stimulating = 1 &! sex acceptance will be added to repulse - ImperatorAugustus
	interaction_cow['repulse'] = iif(cow['virginity'] < 1, 23, 22) &! same as horse mating lesson; if resisted, will be treated as rape
	interaction_cow['motivation_repulse'] = 5 - cow['cowSK']
	if cow['sub_horse'] > 3: orgastic = 1
	shameful = 1
	painful = 1
	interaction_no_auto_energy_drop = 1
	$target_skill = 'cowSK'
	$target_affinity = 'nymphomania'
	$special_part = {
		sparks -= 60
		$picture_type = 'pic_png'
		$bg_path = 'scene/insemination_full'
		g = rand(1, picMax['insemination_full'])
		if g > 1: $bg_path += '_' + $str(g)
		$text[1] = '  Although minotaurs usually take care not to hurt the girls they inseminate, the process is often painful and exhausting for the cows. But the results are so effective that every farmer uses these beasts when they are looking for high productivity. Considering the expense, it may be best to wait until the cow drops to an F- impregnation rating before paying for another round.'
		interaction_cow['erotic_stimulation'] = 10
		ejaculation_intensity = 0 &! master is not involved
		dynamic $replace($vaginally_penetrated, 'dyn'+'slave', 'cow')
		dynamic $cow_energy_drop
		dynamic $cow_energy_drop &! extra energy drop compared to group insemination
		dynamic $inseminate, 'cow' &! sex with minotaur
		cow['cum_load'] += rand(100,110) &! needed because ejaculation_intensity = 0
		if rand(1,12) > cow['stamina'] and cow['ill'] = 0: cow['ill'] = 1
		if cow['virginity'] = 3: damage = 10 - (cow['sub_horse'] + cow['sub_fisting']) &! calibrated to wound unless stamina is at least A+ and both skills are at least B+
		if cow['virginity'] < 3: damage = 14 - (cow['sub_horse'] + cow['sub_fisting']) &! calibrated to always wound (note that virginity < 3 implies low skill levels)
		cow_rate['sensitivity'] -= damage/2 &! before calling $dyn_slave_damaged, which resets damage global
		if damage > 0: dynamic $replace($dyn_slave_damaged, 'dyn'+'slave', 'cow')
		if cow['sub_horse'] < 5: cow['sub_horse'] += 1 & cow['sub_horse_xp'] = 0
		if cow['sub_horse'] > 2: cow['virginity'] = 3
		cow_rate['instinct'] += 1
		cow_rate['cowSK'] += 1
		if cow_state = CONST_INT['slave_exist']: cow_rate['stamina'] += 1 &! not unconscious
		house_mess_rate += 10
		cow_rate['hygiene'] += 25
	}
	$place = 'barn'
end

!Farmhand orders
!fatten animals
if interaction = 6020:
	$picture_type = 'pic_png'
	$bg_path = 'scene\slave_fat'
	g = rand(1, picMax['slave_fat'])
	if g > 1: $bg_path += '_' + $str(g)
	$text[1] = '  Do you want your farmhand to overfeed your egglayers, fattening them up to increase their output? <br><br>  (Pigs are always fattened.)'
	$yes = {
		barn_farmhand_fattens = 1
		gt 'menu_form'
	}
	$no = {
		gt 'menu_form'
	}
	if debug_interactions ! 2: gt 'choice_screen'
end

!stop fattening animals
if interaction = 6021:
	$picture_type = 'pic_png'
	$bg_path = 'scene\slave_fat'
	g = rand(1, picMax['slave_fat'])
	if g > 1: $bg_path += '_' + $str(g)
	$text[1] = '  Do you want your farmhand to stop overfeeding your egglayers?<br><br>  (Pigs are always fattened.)'
	$yes = {
		barn_farmhand_fattens = 0
		gt 'menu_form'
	}
	$no = {
		gt 'menu_form'
	}
	if debug_interactions ! 2: gt 'choice_screen'
end

!auto-slaughter pigs
if interaction = 6022:
	$place = 'barn'
	$text[1] = '  Do you want your farmhand to slaughter and butcher your pigs without prompting once they are suitably plump?'
	$yes = {
		barn_farmhand_slaughters = 1
		gt 'menu_form'
	}
	$no = {
		gt 'menu_form'
	}
	if debug_interactions ! 2: gt 'choice_screen'
end

!stop auto-slaughter pigs
if interaction = 6023:
	$place = 'barn'
	$text[1] = '  Do you want your farmhand to stop slaughtering your pigs?'
	$yes = {
		barn_farmhand_slaughters = 0
		gt 'menu_form'
	}
	$no = {
		gt 'menu_form'
	}
	if debug_interactions ! 2: gt 'choice_screen'
end

!auto-recruit pigs from prisoner
if interaction = 6024:
	$place = 'dungeon'
	$text[1] = '  If your farmhand notices that you have no pig, but you have someone locked in your dungeon, do you want her to bring the prisoner to the barn and start fattening her up for slaughter? This is a great option if you go out hunting regularly.'
	$yes = {
		barn_farmhand_prison = 1
		gt 'menu_form'
	}
	$no = {
		gt 'menu_form'
	}
	if debug_interactions ! 2: gt 'choice_screen'
end

!stop auto-recruit pigs from prisoner
if interaction = 6025:
	$place = 'dungeon'
	$text[1] = '  Do you want your farmhand to stop taking girls from your dungeon and fattening them for slaughter?'
	$yes = {
		barn_farmhand_prison = 0
		gt 'menu_form'
	}
	$no = {
		gt 'menu_form'
	}
	if debug_interactions ! 2: gt 'choice_screen'
end

!AUTOMATIC INTERACTIONS
!pregnant slave is gone
if interaction = 9911:
	$interaction_type = 'special_talk'
	$place = 'study'
	npc = 1
	$npc_id = 'ester'
	if slave['brand'] > 0:
		gs '$slave_price'
		sparks += common_price[rating]
	else
		sparks += 50
	end
	copyarr '$text', '$pregnant_slave_taken'
	dynamic $clear_slave_instance, 'slave'
end

if interaction = 9912:
	$interaction_type = 'special_talk'
	$place = 'study'
	npc = 1
	$npc_id = 'ester'
	if assistant['brand'] > 0:
		gs '$slave_price', 'assistant'
		sparks += common_price[rating]
	else
		sparks += 50
	end
	copyarr '$text', '$pregnant_slave_taken'
	dynamic $clear_slave_instance, 'assistant'
end

if interaction = 9913:
	$interaction_type = 'special_talk'
	$place = 'study'
	npc = 1
	$npc_id = 'ester'
	if prisoner['brand'] > 0:
		gs '$slave_price', 'prisoner'
		sparks += common_price[rating]
	else
		sparks += 50
	end
	copyarr '$text', '$pregnant_slave_taken'
	dynamic $clear_slave_instance, 'prisoner'
end

!TODO: need an automatic interaction for other pregnant characters (cow, farmhand, etc.) -ImperatorAugustus

!BIRTH OF THE PARASITE
!TODO: Parasite will not born from the assistant or prisoner if there is no slave
if interaction = 9921:
	$interaction_type = 'chestbuster'
	show_slave_fullimage = 0
	$special_action[1] = '$bg_path = "' + $slave['fullimage'] + '"'
	$special_action[2] = '$bg_path = "' + $slave['fullimage'] + '"'
	copyarr '$text', '$slave_chestbuster'
	$play_sound[1] = 'content/snd/girl_suffering.wav'
	dynamic $clear_slave_instance, 'slave'
	master_moodlet['neg_slave_died'] = 10
end

if interaction = 9922:
	$interaction_type = 'chestbuster'
	show_assistant_fullimage = 0
	$special_action[1] = '$bg_path = "' + $assistant['fullimage'] + '"'
	$special_action[2] = '$bg_path = "' + $assistant['fullimage'] + '"'
	copyarr '$text', '$assistant_chestbuster'
	$play_sound[1] = 'content/snd/girl_suffering.wav'
	dynamic $clear_slave_instance, 'assistant'
	master_moodlet['neg_slave_died'] = 10
end

if interaction = 9923:
	$interaction_type = 'chestbuster'
	show_prisoner_fullimage = 0
	$special_action[1] = '$bg_path = "' + $prisoner['fullimage'] + '"'
	$special_action[2] = '$bg_path = "' + $prisoner['fullimage'] + '"'
	copyarr '$text', '$prisoner_chestbuster'
	$play_sound[1] = 'content/snd/girl_suffering.wav'
	dynamic $clear_slave_instance, 'prisoner'
	master_moodlet['neg_slave_died'] = 10
end

if interaction = 666:
	$interaction_type = 'basic'
	show_slave_fullimage = 1
	$text[1] = '  <<$slave_name>> refuses to wear that.'
	dynamic $sin_gained_now, 'slave'
end

if debug_interactions = 2:
	if interaction < 1400:
		if $interaction_type = 'master_teaches_slave' or $interaction_type = 'self_sex_lesson':
			debug_repulse[$str(interaction)] = interaction_slave['repulse']
			debug_motivation_repulse[$str(interaction)] = interaction_slave['motivation_repulse']
			dynamic $replace($dyn_sex_acceptance, 'dyn'+'slave', 'slave') &! fills in interaction_slave['sex_acceptance']
			debug_sex_acceptance[$str(interaction)] = interaction_slave['sex_acceptance']
			dynamic $replace($dyn_repulse_check,  'dyn'+'slave', 'slave') &! fills in interaction_slave['res']
			debug_res[$str(interaction)] = interaction_slave['sex_acceptance']
		end
		interaction += 1
		copyarr 'slave', 'backup_slave'
		jump 'debug_interactions_loop'
	else
		copyarr 'slave', 'backup_slave'
		debug_interactions = 3
		gt 'teach_screen'
	end
end

gt 'interaction_result'

--- interaction ---------------------------------