wrote lua functions for calculating battle character positions
added needed battle functions to pkg
started init state for battle