"Besiege the {reg6?town:castle}.",
[
(assign,"$g_player_besiege_town","$g_encountered_party"),
#MOTO chief add consequences as vassal
(try_begin),
(gt, "$players_kingdom", 0),
(faction_slot_eq, "$players_kingdom", slot_faction_state, sfs_active),
(store_relation, ":enemy_relation", "$g_encountered_party_faction", "$players_kingdom"),
(ge,":enemy_relation",0), #not yet at war?
(call_script, "script_diplomacy_start_war_between_kingdoms", "$players_kingdom", "$g_encountered_party_faction", logent_player_faction_declares_war),
(call_script, "script_change_player_relation_with_center", "$g_encountered_party", -4),
(party_get_slot, ":town_lord", "$g_encountered_party", slot_town_lord),
(call_script, "script_change_player_relation_with_troop", ":town_lord", -30),
#player is vassal
(try_begin),
(neq, "$players_kingdom", "fac_player_supporters_faction"),
(store_add, ":slot_provocation_days", "$players_kingdom", slot_faction_provocation_days_with_factions_begin),
(val_sub, ":slot_provocation_days", kingdoms_begin),
#there was provocation
(try_begin),
(faction_slot_ge, "$g_encountered_party_faction", ":slot_provocation_days", 1),
(faction_get_slot,":faction_leader","$players_kingdom",slot_faction_leader),
(try_begin),
(ge, ":faction_leader", 0),
(call_script,"script_change_player_relation_with_troop",":faction_leader",-10),
(try_end),
#unprovoked attack
(else_try),
(troop_get_slot, ":controversy", "trp_player", slot_troop_controversy),
(val_add, ":controversy", 40), #two of these will get player fired as marshal script_decide_faction_ai
(troop_set_slot, "trp_player", slot_troop_controversy, ":controversy"),
(display_message, "@The rulers of the realms are troubled by your offense against the majesty of your lord."),
(try_for_range, ":kingdom", npc_kingdoms_begin, npc_kingdoms_end),
(faction_get_slot,":faction_leader", ":kingdom", slot_faction_leader),
(ge, ":faction_leader", 0),
(try_begin),
(eq, ":kingdom", "$players_kingdom"),
(call_script,"script_change_player_relation_with_troop",":faction_leader",-20),
(else_try),
(call_script,"script_change_player_relation_with_troop",":faction_leader",-5), #this effectively prevents player from becoming vassal of other kings to cause wars lord_ask_enter_service
(try_end),
(try_end),
(try_end),
(try_end),
#no kingdom or at war
(else_try),
(call_script, "script_make_kingdom_hostile_to_player", "$g_encountered_party_faction", -40),
(call_script, "script_change_player_relation_with_center", "$g_encountered_party", -2),
(party_get_slot, ":town_lord", "$g_encountered_party", slot_town_lord),
(call_script, "script_change_player_relation_with_troop", ":town_lord", -30),
(try_end),