#script_cf_troop_agent_is_alive
# INPUT: arg1 = troop_id
("cf_troop_agent_is_alive",
[(store_script_param, ":troop_no", 1),
(assign, ":alive_count", 0),
(try_for_agents, ":cur_agent"),
(agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
(eq, ":troop_no", ":cur_agent_troop"),
(agent_is_alive, ":cur_agent"),
(val_add, ":alive_count", 1),
(try_end),
(gt, ":alive_count", 0),
]),
#script_cf_town_castle_recruit_volunteers_cond
# INPUT: none
# OUTPUT: none
("cf_castle_recruit_nobles_cond",
[(store_faction_of_party, ":town_faction", "$current_town"),
(party_get_slot, ":center_relation", "$current_town", slot_center_player_relation),
(store_relation, ":town_faction_relation", ":town_faction", "fac_player_faction"),
(ge, ":center_relation", 0),
(this_or_next|ge, ":center_relation", 5),
(this_or_next|eq, ":town_faction", "$players_kingdom"),
(this_or_next|ge, ":town_faction_relation", 5),
(this_or_next|eq, ":town_faction", "$supported_pretender_old_faction"),
( eq, "$players_kingdom", 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_type, 1),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(ge, ":free_capacity", 1),
]),
#script_cf_town_recruit_volunteers_cond
# INPUT: none
# OUTPUT: none
("cf_town_recruit_professionals_cond", #renamed
[(store_faction_of_party, ":town_faction", "$current_town"),
(party_get_slot, ":center_relation", "$current_town", slot_center_player_relation),
(store_relation, ":town_faction_relation", ":town_faction", "fac_player_faction"),
(ge, ":center_relation", 0),
(this_or_next|ge, ":center_relation", 10),
(this_or_next|eq, ":town_faction", "$players_kingdom"),
(this_or_next|ge, ":town_faction_relation", 0),
(this_or_next|eq, ":town_faction", "$supported_pretender_old_faction"),
( eq, "$players_kingdom", 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_type, 1),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(ge, ":free_capacity", 1),
]),
#script_cf_village_recruit_volunteers_cond
# INPUT: none
# OUTPUT: none
("cf_village_recruit_volunteers_cond",