Basic logic for battle.js, still working on it