Update battle_code