class GeoWars::Units::Soldier

Defined in:

geo_wars/units/soldier.cr

Constant Summary

DEFAULT_DAMAGE = 6
MAX_MOVEMENT = 5

Constructors

Instance Method Summary

Instance methods inherited from class GeoWars::Units::Unit

add_moves(moves, moves_left, cells, cells_x, cells_y) add_moves, attack(unit : Units::Unit, unit_cell, current_cell)
attack(cursor_cell, cells)
attack
, attack_preview_percentage(unit : Units::Unit, unit_cell) attack_preview_percentage, can_attack? can_attack?, damage(unit : Units::Unit, unit_cell) damage, description description, die die, disable disable, disabled? : Bool? disabled?, draw(viewport) draw, draw_attack_radius(viewport) draw_attack_radius, draw_movement_radius(viewport) draw_movement_radius, enable enable, jump_to(x : Int32, y : Int32) jump_to, max_movement : Int32 max_movement, move(cursor_cell, cells) move, move_absolute(move) move_absolute, player : Player player, remove? : Bool remove?, select(cells, cells_x, cells_y) select, selectable?(turn_player) selectable?, selected? : Bool selected?, serialize(players) serialize, take_damage(damage) take_damage, terrain_moves(terrain) terrain_moves, turn_reset turn_reset, unselect unselect, update(frame_time) update, update_attack_cells(cells) update_attack_cells, update_moves(cells, cells_x, cells_y) update_moves, valid_move?(cursor_cell, moves_relative) valid_move?, x : Int32 x, y : Int32 y

Constructor methods inherited from class GeoWars::Units::Unit

new(x : Int32, y : Int32, player : GeoWars::Player, max_movement : Int32 = MAX_MOVEMENT, default_damage : Int32 = DEFAULT_DAMAGE, attack_cells_relative_initial : Array(NamedTuple(x: Int32, y: Int32)) = DEFAULT_ATTACK_CELLS_RELATIVE) new

Class methods inherited from class GeoWars::Units::Unit

deserialize(line, players) deserialize

Constructor Detail

def self.new(x, y, player) #

[View source]

Instance Method Detail

def description #

[View source]