Battle Additions

Addition of battle victory states, addition of prototype trainer table,
addition of trainerflags and related code, corrections on pre-processor
code to get lengths of flag banks