Merge pull request #256 from yenatch/master

Fix predefs and battle code.