update script for battle