106 bool show_move =
false,
114 const std::vector<map_location> &steps,
116 bool skip_ally_sighted,
124 const std::vector<map_location> &steps,
126 bool continued_move =
false,
127 bool show_move =
true,
128 bool* interrupted =
nullptr,
136 const std::vector<map_location> &steps,
139 bool skip_ally_sighted,
140 bool show_move =
true);
void set_ambusher(const unit_map::const_iterator &u)
set the location of an ambusher
void add_seen_friend(const unit_map::const_iterator &u)
add a location of a seen friend
const std::vector< unit_map::const_iterator > & get_seen_enemies() const
get the locations of seen enemies
const unit_map::const_iterator & get_ambusher() const
get the location of an ambusher
void add_seen_enemy(const unit_map::const_iterator &u)
add the location of new seen enemy
const unit_map::const_iterator & get_unit() const
get new location of moved unit
unit_map::const_iterator ambusher_
unit_map::const_iterator unit_
void reset(const unit_map &units)
reset all locations to empty values
void set_unit(const unit_map::const_iterator &u)
set the iterator to moved unit
std::vector< unit_map::const_iterator > seen_enemies_
void set_failed_teleport(const unit_map::const_iterator &u)
set the location of a failed teleport
std::vector< unit_map::const_iterator > seen_friends_
virtual ~move_unit_spectator()
destructor
const std::vector< unit_map::const_iterator > & get_seen_friends() const
get the locations of seen friends
const unit_map::const_iterator & get_failed_teleport() const
get the location of a failed teleport
unit_map::const_iterator failed_teleport_
move_unit_spectator(const unit_map &units)
constructor
Class to store the actions that a player can undo and redo.
Container associating units to locations.
void teleport_unit_from_replay(const std::vector< map_location > &steps, bool continued_move, bool skip_ally_sighted, bool show_move)
Teleports a unit across the board.
std::size_t move_unit_from_replay(const std::vector< map_location > &steps, undo_list *undo_stack, bool continued_move, bool skip_ally_sighted, bool show_move)
Moves a unit across the board.
std::size_t move_unit_and_record(const std::vector< map_location > &steps, undo_list *undo_stack, bool continued_move, bool show_move, bool *interrupted, move_unit_spectator *move_spectator)
Moves a unit across the board.
game_events::pump_result_t get_village(const map_location &loc, int side, bool *action_timebonus, bool fire_event)
Makes it so the village at the given location is owned by the given side.
void teleport_unit_and_record(const map_location &teleport_from, const map_location &teleport_to, bool show_move, move_unit_spectator *move_spectator)
Teleports a unit across the board and enters the synced context.
std::tuple< bool, bool > pump_result_t
bool fire_event(const ui_event event, const std::vector< std::pair< widget *, ui_event >> &event_chain, widget *dispatcher, widget *w, F &&... params)
Helper function for fire_event.
actions::undo_list * undo_stack
Encapsulates the map of the game.