code:
# mission_accept
!Common interface for selecting options in different places
gs '_layout'

if lord_spectre_offer = 1:
		lord_spectre_offer = 0
		copyarr '$text', '$spectre_quest_prompt'
		txt = 1
		gt 'choice_screen'
end

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

$text_display = ''
dynamic $display_options[sp_txt]

if npc = 0:
	$info_bar = ''
	*p '

<<$place_name[$place]>>
<<$place_location[$place]>>
'
	*nl 'Information for consideration:
'
	*p '
<<$place_info[$place]>>
'
else
	$info_bar = ''
	if nsfw = 1:
		*p '

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

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

if not_safe = 1:
	not_safe = 0
	*p '

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

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

--- mission_accept ---------------------------------

repo_name: Tcallas/game

license: unknown


code:
# moodlets
!update master "permanent" (situationally derived, constantly refreshed) moodlets

estate_quality = estate_prestige[$estate] + interior_prestige[$study] + interior_prestige[$bath] + interior_prestige[$bed]
estate_quality_modifier = estate_quality - brand_reputation
if estate_quality_modifier > 0: master_moodlet['pos_housing'] = 100
if estate_quality_modifier >= 0: master_moodlet['neg_housing'] = 0
if estate_quality_modifier < 0: master_moodlet['neg_housing'] = 100
if estate_quality_modifier <= 0: master_moodlet['pos_housing'] = 0
wealth_quality_modifier = master_wealth - brand_reputation - 1
if wealth_quality_modifier > 0: master_moodlet['pos_wealth'] = 100 & master_moodlet['neg_wealth'] = 0
if wealth_quality_modifier = 0: master_moodlet['pos_wealth'] = 0 & master_moodlet['neg_wealth'] = 0
if wealth_quality_modifier < 0: master_moodlet['neg_wealth'] = 100 & master_moodlet['pos_wealth'] = 0

master_moodlet['pos_house_clean'] = 0
master_moodlet['neg_house_mess'] = 0
if is_home = 1:
	if house_mess = 0: master_moodlet['pos_house_clean'] = 100
	if house_mess > 3: master_moodlet['neg_house_mess'] = 100
end
if master_hygiene > 1: master_moodlet['pos_self_clean'] = 0
if master_hygiene > 3: master_moodlet['neg_dirty'] = 100
if master_hygiene <= 3: master_moodlet['neg_dirty'] = 0

if master_moodlet['pos_satisfied'] < 0: master_moodlet['pos_satisfied'] = 0
if master_excitement > master_moodlet['pos_satisfied']: master_moodlet['neg_boner'] = master_excitement
if master_moodlet['pos_satisfied'] > 2: master_moodlet['neg_boner'] = 0
if master_excitement <= master_moodlet['pos_satisfied']: master_moodlet['neg_boner'] = 0
if master_excitement < -2 and master_libido > 0: master_moodlet['neg_softcore'] = 100
if master_excitement > -3 or master_libido = 0: master_moodlet['neg_softcore'] = 0

if master_wounds = 0: master_moodlet['neg_wounded'] = 0

if master_energy < 0:
	master_moodlet['pos_energy'] = 0
	master_moodlet['neg_tired'] = 100
elseif master_energy >= master_str and max(master_moodlet['neg_drunk'], master_moodlet['neg_wounded'], master_moodlet['neg_no_koffe'], master_moodlet['neg_no_meth'], master_moodlet['neg_no_opium'], master_moodlet['neg_master_ill']) = 0:
	master_moodlet['pos_energy'] = 100
	master_moodlet['neg_tired'] = 0
else
	master_moodlet['pos_energy'] = 0
	master_moodlet['neg_tired'] = 0
end

if master_excitement = 5 and blazing_counter >= 3:
	master_moodlet['neg_blazing'] = 100
	$excitement[5] = dyneval($vb_cycle_stat, 0, 'Blazing')
else
	$excitement[5] = dyneval($vb_cycle_stat, 10, 'Blazing')
	master_moodlet['neg_blazing'] = 0
end

master_moodlet['neg_alone'] = 0
master_moodlet['pos_optimism'] = 0
master_moodlet['neg_grumpy'] = 0

if master_moodlet['pos_show'] > 0: master_moodlet['neg_boring'] = 0

if slave_state < CONST_INT['slave_exist'] and assistant_state < CONST_INT['slave_exist']:
	!check < exist instead of = no_slave: dead slaves do not cure loneliness - ImperatorAugustus
	if alone_count > 2: master_moodlet['neg_alone'] = 100 &! alone_count is incremented nightly in next_day if no slave or assistant
else
	alone_count = 0
	!update master moodlets related to slave psy status
	if slave['beauty'] > 2 and slave['expression'] > 3 and slave['status_met'] = 1: master_moodlet['pos_optimism'] = 100
	if assistant['beauty'] > 2 and assistant['expression'] > 3 and assistant['status_met'] = 1: master_moodlet['pos_optimism'] = 100
	if $slave_psy_status = 'broken' or $assistant_psy_status = 'broken': master_moodlet['neg_grumpy'] = 100 & master_moodlet['pos_optimism'] = 0
end

--- moodlets ---------------------------------


code:
# new_estate
!Initializes a new home or interior

if $estate = 'slum_house':
	bath = 0
	kitchen = 0
	dungeon = 0
	boudoir = 0
else
	bath = 1
	kitchen = 1
	dungeon = IIF(estate_cost_dungeon[$estate] = 0, 1, 0)
	boudoir = IIF(estate_cost_boudoir[$estate] = 0, 1, 0)
end

lab = 0
library = 0
barn = 0

! fiend pen status transfers with estate changes

$study = $interior
$bed = $interior
$bath = $interior
$kitchen = $interior
$boudoir = $interior
$lab = $interior
$dungeon = $interior
$barn = $interior

$bg['home_lux'] = $interior_study_large[$interior]

$bg['study'] = $interior_study[$interior]
$place_name['study'] = $estate_study_name[$estate]
$place_location['study'] = $estate_study_location[$estate]
$place_info['study'] = $interior_study_info[$interior]

$bg['bedroom_lux'] = $interior_bed_large[$interior]

$bg['bedroom'] = $interior_bed[$interior]
$place_name['bedroom'] = $estate_bed_name[$estate]
$place_location['bedroom'] = $estate_bed_location[$estate]
$place_info['bedroom'] = $interior_bed_info[$interior]

$bg['bathroom_lux'] = $interior_bath_large[$interior]

$bg['bathroom'] = $interior_bath[$interior]
$place_name['bathroom'] = $estate_bath_name[$estate]
$place_location['bathroom'] = $estate_bath_location[$estate]
$place_info['bathroom'] = $interior_bath_info[$interior]

$bg['dungeon_lux'] = $interior_dungeon_large[$interior]

$bg['dungeon'] = $interior_dungeon[$interior]
$place_name['dungeon'] = $estate_dungeon_name[$estate]
$place_location['dungeon'] = $estate_dungeon_location[$estate]
$place_info['dungeon'] = $interior_dungeon_info[$interior]

$bg['kitchen_lux'] = $interior_kitchen_large[$interior]

$bg['kitchen'] = $interior_kitchen[$interior]
$place_name['kitchen'] = $estate_kitchen_name[$estate]
$place_location['kitchen'] = $estate_kitchen_location[$estate]
$place_info['kitchen'] = $interior_kitchen_info[$interior]

$bg['lab_lux'] = $interior_lab_large[$interior]

$bg['lab'] = $interior_lab[$interior]
$place_name['lab'] = $estate_lab_name[$estate]
$place_location['lab'] = $estate_lab_location[$estate]
$place_info['lab'] = $interior_lab_info[$interior]

$bg['boudoir_lux'] = $interior_boudoir_large[$interior]

$bg['boudoir'] = $interior_boudoir[$interior]
$place_name['boudoir'] = $estate_boudoir_name[$estate]
$place_location['boudoir'] = $estate_boudoir_location[$estate]
$place_info['boudoir'] = $interior_boudoir_info[$interior]

$bg['barn_lux'] = $interior_barn_large

$bg['barn'] = $interior_barn
$place_name['barn'] = $estate_barn_name[$estate]
$place_location['barn'] = $estate_barn_location[$estate]
$place_info['barn'] = $interior_barn_info[$interior]

--- new_estate ---------------------------------


code:
# new_game
!Начало новой игры с предысторией
!$onnewloc = '$newloc'

gs '_layout'
gt 'intro'

--- new_game ---------------------------------