43 virtual std::ostream&
print(std::ostream&
s)
const;
47 virtual void execute(
bool& success,
bool& complete);
105 return std::static_pointer_cast<move>(action::shared_from_this());
112 std::unique_ptr<pathfind::marked_route>
route_;
132 std::unique_ptr<temporary_unit_mover>
mover_;
Arrows destined to be drawn on the map.
A config object defines a single node in a WML file, with access to child nodes.
Holds a temporary unit that can be drawn on the map without being placed in the unit_map.
Container associating units to locations.
This class represents a single unit of a specific type.
Abstract base class for all the whiteboard planned actions.
std::size_t team_index() const
Returns the index of the team that owns this action.
A planned move, represented on the map by an arrow and a ghosted unit in the destination hex.
move(std::size_t team_index, bool hidden, unit &mover, const pathfind::marked_route &route, arrow_ptr arrow, fake_unit_ptr fake_unit)
void redraw()
Redrawing function, called each time the action situation might have changed.
virtual void set_turn_number(int turn)
Assigns a turn number to display to this planned move.
virtual void accept(visitor &v)
virtual void remove_temp_modifier(unit_map &unit_map)
Removes the result of this action from the specified unit map.
virtual unit_ptr get_unit() const
Return the unit targeted by this action.
virtual error check_validity() const
Check the validity of the action.
std::unique_ptr< pathfind::marked_route > route_
virtual void draw_hex(const map_location &hex)
Gets called by display when drawing a hex, to allow actions to draw to the screen.
void set_arrow_texture(ARROW_TEXTURE x) const
void modify_unit(unit &new_unit)
virtual void do_hide()
Called by the non-virtual hide() and show(), respectively.
virtual std::ostream & print(std::ostream &s) const
virtual map_location get_dest_hex() const
std::size_t unit_underlying_id_
virtual void set_route(const pathfind::marked_route &route)
virtual size_t get_unit_id() const
Returns the id of the unit targeted by this action.
void set_arrow_brightness(ARROW_BRIGHTNESS x) const
std::unique_ptr< temporary_unit_mover > mover_
virtual const pathfind::marked_route & get_route() const
ARROW_TEXTURE arrow_texture_
virtual bool calculate_new_route(const map_location &source_hex, const map_location &dest_hex)
attempts to pathfind a new marked route for this path between these two hexes; returns true and assig...
virtual config to_config() const
Constructs and returns a config object representing this object.
int turn_number_
Turn end number to draw if greater than zero.
int calculate_moves_left(unit &u)
std::shared_ptr< move > shared_from_this()
virtual map_location get_source_hex() const
virtual fake_unit_ptr get_fake_unit()
virtual arrow_ptr get_arrow()
void init(unit *u=nullptr)
virtual void execute(bool &success, bool &complete)
Output parameters: success: Whether or not to continue an execute-all after this execution complete: ...
void update_arrow_style()
ARROW_BRIGHTNESS arrow_brightness_
@ ARROW_BRIGHTNESS_STANDARD
@ ARROW_BRIGHTNESS_HIGHLIGHTED
std::size_t raw_uid() const
virtual map_location get_numbering_hex() const
virtual void apply_temp_modifier(unit_map &unit_map)
Applies temporarily the result of this action to the specified unit map.
Abstract base class for all the visitors (cf GoF Visitor Design Pattern) the whiteboard uses.
std::shared_ptr< move > move_ptr
std::shared_ptr< arrow > arrow_ptr
std::shared_ptr< move const > move_const_ptr
std::ostream & operator<<(std::ostream &s, const action_ptr &action)
std::shared_ptr< unit > unit_ptr
Encapsulates the map of the game.
Structure which holds a single route and marks for special events.
This object is used to temporary move a unit in the unit map, swapping out any unit that is already t...
static map_location::direction s