Yes. But maybe devs added randomness in the latest patches. It's ok. Nevermind. I don't need it. Just was curious.are you sure it's not on the scripting side?
Yes. But maybe devs added randomness in the latest patches. It's ok. Nevermind. I don't need it. Just was curious.are you sure it's not on the scripting side?
("cf_print_kill_count_to_s0",
[
(assign, ":total_reported1", 0),
(assign, ":total_reported2", 0),
(assign, ":total_reported3", 0),
(assign, ":total_reported4", 0),
(str_clear, s0),
(str_store_string, s0, "@^^Allied heroes :^"),
(try_for_agents, ":cur_agent"),
(agent_is_human, ":cur_agent"),
(agent_is_ally, ":cur_agent"),
(agent_get_troop_id, ":agent_troop_id", ":cur_agent"),
(troop_is_hero, ":agent_troop_id"),
(agent_get_kill_count, ":num_killed", ":cur_agent"),
(agent_get_kill_count, ":num_wounded", ":cur_agent", 1),
(troop_get_slot, ":troop_kill_count", ":agent_troop_id", slot_troop_kill_count),
(troop_get_slot, ":troop_wound_count", ":agent_troop_id", slot_troop_wound_count),
(val_add, ":troop_kill_count", ":num_killed"),
(val_add, ":troop_wound_count", ":num_wounded"),
(troop_set_slot, ":agent_troop_id", slot_troop_kill_count, ":troop_kill_count"),
(troop_set_slot, ":agent_troop_id", slot_troop_wound_count, ":troop_wound_count"),
(this_or_next|gt, ":num_killed", 0),
(gt, ":num_wounded", 0),
(str_store_troop_name, s5, ":agent_troop_id"),
(store_add, reg3, ":num_killed", ":num_wounded"),
(assign, reg4, ":num_killed"),
(assign, reg5, ":num_wounded"),
(try_begin),
(agent_is_wounded,":cur_agent"),
(str_store_string,s7,"@ (wounded) "),
(else_try),
(str_store_string,s7,"@ (alive) "),
(try_end),
(str_store_string, s6, "@{reg4} killed, {reg5} wounded"),
(try_begin),
(this_or_next|eq, ":agent_troop_id", "trp_player"),
(is_between, ":agent_troop_id", companions_begin, companions_end),
(str_store_string, s0, "@{s0}^{s5}{s7}: {reg3} ({s6})"),
(else_try),
(str_store_string, s0, "@{s0}^{s5}{s7}: {reg3} ({s6})"),
(try_end),
(val_add, ":total_reported1", 1),
(try_end),
(str_store_string, s1, "@^^Enemy heroes :^"),
(try_for_agents, ":cur_agent"),
(agent_is_human, ":cur_agent"),
(neg|agent_is_ally, ":cur_agent"),
(agent_get_troop_id, ":agent_troop_id", ":cur_agent"),
(troop_is_hero, ":agent_troop_id"),
(agent_get_kill_count, ":num_killed", ":cur_agent"),
(agent_get_kill_count, ":num_wounded", ":cur_agent", 1),
(troop_get_slot, ":troop_kill_count", ":agent_troop_id", slot_troop_kill_count),
(troop_get_slot, ":troop_wound_count", ":agent_troop_id", slot_troop_wound_count),
(val_add, ":troop_kill_count", ":num_killed"),
(val_add, ":troop_wound_count", ":num_wounded"),
(troop_set_slot, ":agent_troop_id", slot_troop_kill_count, ":troop_kill_count"),
(troop_set_slot, ":agent_troop_id", slot_troop_wound_count, ":troop_wound_count"),
(this_or_next|gt, ":num_killed", 0),
(gt, ":num_wounded", 0),
(str_store_troop_name, s5, ":agent_troop_id"),
(store_add, reg3, ":num_killed", ":num_wounded"),
(assign, reg4, ":num_killed"),
(assign, reg5, ":num_wounded"),
(str_store_string, s6, "@{reg4} killed, {reg5} wounded"),
(try_begin),
(agent_is_wounded,":cur_agent"),
(str_store_string,s7,"@ (wounded) "),
(else_try),
(str_store_string,s7,"@ (alive) "),
(try_end),
(try_begin),
(is_between, ":agent_troop_id", companions_begin, companions_end),
(str_store_string, s1, "@{s1}^{s5}{s7}: {reg3} ({s6})"),
(else_try),
(str_store_string, s1, "@{s1}^{s5}{s7}: {reg3} ({s6})"),
(try_end),
(val_add, ":total_reported2", 1),
(try_end),
(str_store_string, s2, "@^^Allied troops :^"),
(try_for_agents, ":cur_agent"),
(display_log_message, "@Test Loop"),
(agent_is_human, ":cur_agent"),
(agent_is_ally, ":cur_agent"),
(agent_get_troop_id, ":agent_troop_id", ":cur_agent"),
(neg|troop_is_hero, ":agent_troop_id"),
(agent_get_kill_count, ":num_killed", ":cur_agent"),
(assign, reg5, ":num_killed"),
(display_log_message, "@num Killed = {reg5}"),
(agent_get_kill_count, ":num_wounded", ":cur_agent", 1),
(troop_get_slot, ":troop_kill_count", ":agent_troop_id", slot_troop_kill_count),
(troop_get_slot, ":troop_wound_count", ":agent_troop_id", slot_troop_wound_count),
(val_add, ":troop_kill_count", ":num_killed"),
(val_add, ":troop_wound_count", ":num_wounded"),
(troop_set_slot, ":agent_troop_id", slot_troop_kill_count, ":troop_kill_count"),
(troop_set_slot, ":agent_troop_id", slot_troop_wound_count, ":troop_wound_count"),
(this_or_next|gt, ":num_killed", 0),
(gt, ":num_wounded", 0),
(str_store_troop_name, s5, ":agent_troop_id"),
(store_add, reg3, ":num_killed", ":num_wounded"),
(assign, reg4, ":num_killed"),
(assign, reg5, ":num_wounded"),
(str_store_string, s6, "@{reg4} killed, {reg5} wounded"),
(try_begin),
(neg|agent_is_alive,":cur_agent"),
(try_begin),
(agent_is_wounded,":cur_agent"),
(str_store_string,s7,"@ (wounded) "),
(else_try),
(str_store_string,s7,"@ (killed) "),
(try_end),
(else_try),
(agent_is_routed,":cur_agent"),
(str_store_string,s7,"@ (routed) "),
(else_try),
(str_store_string,s7,"@ (alive) "),
(try_end),
(str_store_string, s2, "@{s2}^{s5}{s7}: {reg3} ({s6})"),
(val_add, ":total_reported3", 1),
(try_end),
(str_store_string, s3, "@^^Enemy troops :^"),
(try_for_agents, ":cur_agent"),
(agent_is_human, ":cur_agent"),
(neg|agent_is_ally,":cur_agent"),
(agent_get_troop_id, ":agent_troop_id", ":cur_agent"),
(neg|troop_is_hero,":agent_troop_id"),
(agent_get_kill_count, ":num_killed", ":cur_agent"),
(agent_get_kill_count, ":num_wounded", ":cur_agent", 1),
(troop_get_slot, ":troop_kill_count", ":agent_troop_id", slot_troop_kill_count),
(troop_get_slot, ":troop_wound_count", ":agent_troop_id", slot_troop_wound_count),
(val_add, ":troop_kill_count", ":num_killed"),
(val_add, ":troop_wound_count", ":num_wounded"),
(troop_set_slot, ":agent_troop_id", slot_troop_kill_count, ":troop_kill_count"),
(troop_set_slot, ":agent_troop_id", slot_troop_wound_count, ":troop_wound_count"),
(this_or_next|gt, ":num_killed", 0),
(gt, ":num_wounded", 0),
(str_store_troop_name, s5, ":agent_troop_id"),
(store_add, reg3, ":num_killed", ":num_wounded"),
(assign, reg4, ":num_killed"),
(assign, reg5, ":num_wounded"),
(str_store_string, s6, "@{reg4} killed, {reg5} wounded"),
(try_begin),
(neg|agent_is_alive,":cur_agent"),
(try_begin),
(agent_is_wounded,":cur_agent"),
(str_store_string,s7,"@ (wounded) "),
(else_try),
(str_store_string,s7,"@ (killed) "),
(try_end),
(else_try),
(agent_is_routed,":cur_agent"),
(str_store_string,s7,"@ (routed) "),
(else_try),
(str_store_string,s7,"@ (alive) "),
(try_end),
(str_store_string, s3, "@{s3}^{s5}{s7}: {reg3} ({s6})"),
(val_add, ":total_reported4", 1),
(try_end),
(try_begin),
(eq, ":total_reported1", 0),
(str_store_string, s0, "@^^Allied heroes :^^None"),
(try_end),
(try_begin),
(eq, ":total_reported2", 0),
(str_store_string, s1, "@^^Enemy heroes :^^None"),
(try_end),
(try_begin),
(eq, ":total_reported3", 0),
(str_store_string, s2, "@^^Allied troops :^^None"),
(try_end),
(try_begin),
(eq, ":total_reported4", 0),
(str_store_string, s3, "@^^Enemy troops :^^None"),
(try_end),
]),
(
"custom_battle_end",mnf_disable_all_keys,
"The battle is over. {s18} Your side killed {reg10} enemies and lost {reg11} troops over the battle. You personally slew {reg7} men in the fighting.^^Your Casualties:{s8}^^Enemy Casualties:{s9}^^Kill count:{s12}{s13}{s14}{s15}",
"none",
[(music_set_situation, 0),
(assign, reg10, "$g_custom_battle_team2_death_count"),
(assign, reg11, "$g_custom_battle_team1_death_count"),
(get_player_agent_kill_count, ":kill_count"),
(get_player_agent_kill_count, ":wound_count", 1),
(store_add, reg7, ":kill_count", ":wound_count"),
(try_begin),
(eq, "$g_battle_result", 1),
(str_store_string, s18, "str_battle_won"),
(else_try),
(str_store_string, s18, "str_battle_lost"),
(try_end),
(try_begin),
(ge, "$g_custom_battle_team2_death_count", 100),
(unlock_achievement, ACHIEVEMENT_LOOK_AT_THE_BONES),
(try_end),
(call_script, "script_print_casualties_to_s0", "p_player_casualties", 0),
(str_store_string_reg, s8, s0),
(call_script, "script_print_casualties_to_s0", "p_enemy_casualties", 0),
(str_store_string_reg, s9, s0),
## CC
(call_script, "script_cf_print_kill_count_to_s0"),
(str_store_string_reg, s12, s0),
(str_store_string_reg, s13, s1),
(str_store_string_reg, s14, s2),
(str_store_string_reg, s15, s3),
],
[
("continue",[],"Continue.",
[(change_screen_quit),
]
),
]
),