The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Public Attributes | List of all members
display_context::can_move_result Struct Reference

#include <display_context.hpp>

Public Member Functions

 operator bool () const
 

Public Attributes

bool move = false
 The unit can move to another hex, taking account of enemies' locations, ZoC and terrain costs vs current movement points. More...
 
bool attack_here = false
 The unit can make an attack from the hex that it's currently on, this requires attack points and a non-petrified enemy in an adjacent hex. More...
 

Detailed Description

Definition at line 62 of file display_context.hpp.

Member Function Documentation

◆ operator bool()

display_context::can_move_result::operator bool ( ) const
inline

Definition at line 76 of file display_context.hpp.

References attack_here, and move.

Member Data Documentation

◆ attack_here

bool display_context::can_move_result::attack_here = false

The unit can make an attack from the hex that it's currently on, this requires attack points and a non-petrified enemy in an adjacent hex.

Definition at line 74 of file display_context.hpp.

Referenced by operator bool(), and display_context::unit_can_move().

◆ move

bool display_context::can_move_result::move = false

The unit can move to another hex, taking account of enemies' locations, ZoC and terrain costs vs current movement points.

Definition at line 68 of file display_context.hpp.

Referenced by operator bool(), and display_context::unit_can_move().


The documentation for this struct was generated from the following file: