35 virtual std::ostream&
print(std::ostream&
s)
const;
39 virtual void execute(
bool& success,
bool& complete);
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.
std::size_t team_index() const
Returns the index of the team that owns this action.
int temp_movement_subtracted_
virtual void remove_temp_modifier(unit_map &unit_map)
Removes the result of this action from the specified unit map.
int temp_attacks_subtracted_
virtual void do_hide()
Called by the non-virtual hide() and show(), respectively.
void invalidate()
invalidates the move-destination and attack-target hexes
virtual void redraw()
Redrawing function, called each time the action situation might have changed.
virtual error check_validity() const
Check the validity of the action.
virtual void accept(visitor &v)
int attack_movement_cost_
virtual void apply_temp_modifier(unit_map &unit_map)
Applies temporarily the result of this action to the specified unit map.
attack(std::size_t team_index, bool hidden, unit &mover, const map_location &target_hex, int weapon_choice, const pathfind::marked_route &route, arrow_ptr arrow, fake_unit_ptr fake_unit)
virtual void execute(bool &success, bool &complete)
Output parameters: success: Whether or not to continue an execute-all after this execution complete: ...
map_location target_hex_
the target of the attack
const map_location & get_target_hex() const
virtual config to_config() const
Constructs and returns a config object representing this object.
virtual void draw_hex(const map_location &hex)
Gets called by display when drawing a hex, to allow actions to draw to the screen.
std::shared_ptr< attack > shared_from_this()
virtual std::ostream & print(std::ostream &s) const
A planned move, represented on the map by an arrow and a ghosted unit in the destination hex.
std::shared_ptr< move > shared_from_this()
Abstract base class for all the visitors (cf GoF Visitor Design Pattern) the whiteboard uses.
std::shared_ptr< attack > attack_ptr
std::shared_ptr< arrow > arrow_ptr
std::shared_ptr< attack const > attack_const_ptr
std::ostream & operator<<(std::ostream &s, const action_ptr &action)
Encapsulates the map of the game.
Structure which holds a single route and marks for special events.
static map_location::direction s