add battle code framework