/** Called on every draw */ void refresh(const game_display& disp,const map_location& loc) { if (state_ == STATE_FORGET && anim_ && anim_->animation_finished_potential()) { set_standing( loc); return; } if (state_ != STATE_STANDING || (get_current_animation_tick() < next_idling_) || incapacitated()) return; if (get_current_animation_tick() > next_idling_ + 1000) { // prevent all units animating at the same set_standing(loc); } else { set_idling(disp, loc); } }
bool emits_zoc() const { return emit_zoc_ && !incapacitated();}
int attacks_left() const { return (attacks_left_ == 0 || incapacitated()) ? 0 : attacks_left_; }
/// Returns how far a unit can move this turn (zero if incapacitated). int movement_left() const { return (movement_ == 0 || incapacitated()) ? 0 : movement_; }