35 virtual std::ostream&
print(std::ostream&
s)
const;
39 virtual void execute(
bool& success,
bool& complete);
map_location target_hex_
the target of the attack
boost::shared_ptr< attack > shared_from_this()
virtual void apply_temp_modifier(unit_map &unit_map)
Applies temporarily the result of this action to the specified unit map.
virtual void execute(bool &success, bool &complete)
Output parameters: success: Whether or not to continue an execute-all after this execution complete: ...
int attack_movement_cost_
virtual void redraw()
Redrawing function, called each time the action situation might have changed.
virtual config to_config() const
Constructs and returns a config object representing this object.
map_location const & get_target_hex() const
int temp_movement_subtracted_
virtual void accept(visitor &v)
size_t team_index() const
Returns the index of the team that owns this action.
Arrows destined to be drawn on the map.
boost::shared_ptr< move > shared_from_this()
virtual error check_validity() const
Check the validity of the action.
Structure which holds a single route and marks for special events.
Encapsulates the map of the game.
virtual std::ostream & print(std::ostream &s) const
virtual void remove_temp_modifier(unit_map &unit_map)
Removes the result of this action from the specified unit map.
attack(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 do_hide()
Called by the non-virtual hide() and show(), respectively.
Container associating units to locations.
std::ostream & operator<<(std::ostream &s, action_ptr action)
A config object defines a single node in a WML file, with access to child nodes.
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 invalidate()
invalidates the move-destination and attack-target hexes
Holds a temporary unit that can be drawn on the map without being placed in the unit_map.
A planned move, represented on the map by an arrow and a ghosted unit in the destination hex...
Abstract base class for all the visitors (cf GoF Visitor Design Pattern) the whiteboard uses...