struct Combat::MapData

Defined in:

mechanics/combat.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(size : IntVector2, walls : Array2D(Bool), units : Array2D(ECS::Entity | Nil), loot : Array2D(ECS::Entity | Nil), attacked : Array2D(Bool), escape : Array2D(Bool), tiles : Array2D(MapTile)) #

[View source]

Class Method Detail

def self.component_index #

def self.generate(size : Int32) #

[View source]
def self.generate(vsize : IntVector2) #

[View source]

Instance Method Detail

def attacked : Array2D(Bool) #

def can_attack(who, target) #

[View source]
def can_go(who : ECS::Entity, target, allow_jump = true) #

[View source]
def clone #

[View source]
def copy_with(size _size = @size, walls _walls = @walls, units _units = @units, loot _loot = @loot, attacked _attacked = @attacked, escape _escape = @escape, tiles _tiles = @tiles) #

[View source]
def each_cell(&) #

[View source]
def escape : Array2D(Bool) #

def iterate_lines(v, &) #

[View source]
def loot : Array2D(ECS::Entity | Nil) #

def size : IntVector2 #

def tiles : Array2D(MapTile) #

def units : Array2D(ECS::Entity | Nil) #

def walls : Array2D(Bool) #