You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let cultural_influence_attempt_action = self.action_log[self.action_log_index - 2].as_playing_action().expect("any log item previous to a cultural influence resolution action log item should a cultural influence attempt action log item");
true => format!("paid {} culture tokens to increased the dice roll and proceed with the cultural influence", game.dice_roll_log.last().expect("there should have been at least one dice roll before a cultural influence resolution action") / 2 + 1),
84
-
false => String::from("declined to increase the dice roll"),
Action::PlaceSettler(position) => format!("{} placed a settler in the city at {position}", game.players[game.state.settler_placer().expect("the game should be in the place settler state")].get_name()),
PlayingAction::Advance{ advance, payment } => format!("{player_name} paid {payment} to get the {advance} advance"),
99
-
PlayingAction::FoundCity{ settler } => format!("{player_name} founded a city at {}", player.get_unit(*settler).expect("The player should have the settler").position),
118
+
PlayingAction::Advance{ advance, payment } => {
119
+
format!("{player_name} paid {payment} to get the {advance} advance")
PlayingAction::Recruit{ units, city_position, payment, leader_index, replaced_units } => format!("{player_name} paid {payment} to recruit {}{} in the city at {city_position}{}{}", units.iter().cloned().collect::<Units>(), leader_index.map_or(String::new(), |leader_index| format!(" {} {} as his leader",if player.available_leaders.len() > 1{"choosing"} else {"getting"},&player.available_leaders[leader_index].name)),if player.get_city(*city_position).expect("there should be a city at the given position").is_activated(){ format!(" making it {:?}", player.get_city(*city_position).expect("there should be a city at the given position").mood_state.clone() - 1)} else {String::new()}, format_args!("{}{}",match replaced_units.len(){0 => "",1 => " and replaces the unit at ", _ => " and replaces units at "}, utils::format_list(&replaced_units.iter().map(|unit_id| player.get_unit(*unit_id).expect("the player should have the replaced units").position.to_string()).unique().collect::<Vec<String>>(),""))),
let happiness_increases = happiness_increases.iter().filter_map(|(position, steps)| if*steps > 0{Some(format!("the city at {position} by {steps} steps, making it {:?}", player.get_city(*position).expect("player should have a city at this position").mood_state.clone() + *steps))}else{None}).collect::<Vec<String>>();
106
-
format!("{player_name} increased happiness in {}", utils::format_list(&happiness_increases,"no city"))
107
-
},
108
-
PlayingAction::InfluenceCultureAttempt{ starting_city_position, target_player_index, target_city_position, city_piece } => format!("{player_name} tried to influence culture the {city_piece:?} in the city at {target_city_position} by {}{}",if target_player_index == &game.active_player(){String::from("himself")} else { game.players[*target_player_index].get_name()},if starting_city_position != target_city_position { format!(" with the city at {starting_city_position}")} else {String::new()}),
0 commit comments