[
("castle_castle",
[
(party_slot_eq,"$current_town",slot_party_type, spt_castle),
(eq, "$sneaked_into_town", 0),
(str_clear, s1),
(try_begin),
(store_faction_of_party, ":center_faction", "$current_town"),
(faction_slot_eq, ":center_faction", slot_faction_ai_state, sfai_feast),
(faction_slot_eq, ":center_faction", slot_faction_ai_object, "$current_town"),
(str_store_string, s1, "str__join_the_feast"),
(try_end),
],"Go to the Lord's hall{s1}.",
[
(try_begin),
(this_or_next|eq, "$all_doors_locked", 1),
(eq, "$sneaked_into_town", 1),
(display_message,"str_door_locked",0xFFFFAAAA),
(else_try),
(this_or_next|neq, "$players_kingdom", "$g_encountered_party_faction"),
(neg|troop_slot_ge, "trp_player", slot_troop_renown, 50),
(neg|troop_slot_ge, "trp_player", slot_troop_renown, 125),
(neq, "$g_player_eligible_feast_center_no", "$current_town"),
(faction_slot_eq, "$g_encountered_party_faction", slot_faction_ai_state, sfai_feast),
(faction_slot_eq, "$g_encountered_party_faction", slot_faction_ai_object, "$g_encountered_party"),
(neg|check_quest_active, "qst_wed_betrothed"),
(neg|check_quest_active, "qst_wed_betrothed_female"),
(neg|troop_slot_ge, "trp_player", slot_troop_spouse, active_npcs_begin), #Married players always make the cut
(jump_to_menu, "mnu_cannot_enter_court"),
(else_try),
(assign, "$town_entered", 1),
(call_script, "script_enter_court", "$current_town"),
(try_end),
], "Door to the castle."),
("recruit_nobles",[(call_script, "script_cf_town_castle_recruit_volunteers_cond"),]
,"Recruit Nobles.",
[
(try_begin),
(call_script, "script_cf_enter_center_location_bandit_check"),
(else_try),
(jump_to_menu, "mnu_recruit_nobles"),
(try_end),
]),
("join_tournament", [(neg|is_currently_night),(party_slot_ge, "$current_town", slot_town_has_tournament, 1),]
,"Join the tournament.",
[
(call_script, "script_fill_tournament_participants_troop", "$current_town", 1),
(assign, "$g_tournament_cur_tier", 0),
(assign, "$g_tournament_player_team_won", -1),
(assign, "$g_tournament_bet_placed", 0),
(assign, "$g_tournament_bet_win_amount", 0),
(assign, "$g_tournament_last_bet_tier", -1),
(assign, "$g_tournament_next_num_teams", 0),
(assign, "$g_tournament_next_team_size", 0),
(jump_to_menu, "mnu_town_tournament"),
]),
("town_castle",[
(party_slot_eq,"$current_town",slot_party_type, spt_town),
(eq,"$entry_to_town_forbidden",0),
(str_clear, s1),
(try_begin),
(store_faction_of_party, ":center_faction", "$current_town"),
(faction_slot_eq, ":center_faction", slot_faction_ai_state, sfai_feast),
(faction_slot_eq, ":center_faction", slot_faction_ai_object, "$current_town"),
(str_store_string, s1, "str__join_the_feast"),
(try_end),
],"Go to the castle{s1}.",