40 void error(
const std::string& message)
override;
132 const std::vector<map_location> &steps,
134 bool skip_ally_sighted,
142 const std::vector<map_location> &steps,
147 bool continued_move =
false,
148 bool* interrupted =
nullptr);
155 const std::vector<map_location> &steps,
157 bool skip_ally_sighted,
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 set_tiles_entered(std::size_t tiles_entered)
void error(const std::string &message) override
ingerited from action_spectator
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
std::size_t get_tiles_entered() const
void set_unit(const unit_map::const_iterator &u)
set the iterator to moved unit
bool get_interrupted() const
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
void set_interrupted(bool interrupted)
const std::vector< unit_map::const_iterator > & get_seen_friends() const
get the locations of seen friends
std::size_t tiles_entered_
void set_ai_move(bool ai_move=true)
const unit_map::const_iterator & get_failed_teleport() const
get the location of a failed teleport
unit_map::const_iterator failed_teleport_
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.
void teleport_unit_and_record(const map_location &teleport_from, const map_location &teleport_to, move_unit_spectator *)
Teleports a unit across the board and enters the synced context.
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.
std::size_t move_unit_and_record(const std::vector< map_location > &steps, bool continued_move, bool *interrupted)
Wrapper around the other overload.
void execute_move_unit(const std::vector< map_location > &steps, bool continued_move, bool skip_ally_sighted, move_unit_spectator *move_spectator)
Moves a unit across the board.
static int ai_move(lua_State *L, bool exec, bool remove_movement)
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.
Encapsulates the map of the game.