CRISIS!

Turns out no Java function can exceed 64K bytes. AND I JUST HIT THAT LIMIT!

WHAT.

Noting for future reference: the Spell functionality is done but not playtested, and the main method is currently 6525 lines of code. Gotta get that down.

Luckily I was able to save a bunch of space by outsourcing the three research team spell menus (main-4-9, team-5, and post-spresults) to other methods and that saved a bunch of space. But this will basically squash all future development unless I find ways around this.

The OBVIOUS thing is just to move more stuff to other methods, but I have very little practice in doing that so I’ll have to figure it out! Jason’s gameState object really works for savefiling but I feel like it’s outrageously clunky for using *inside* the main method.

What about some sort of object that holds the essentials for lots of mission deployment stuff (sList, tList, and pend for isInVillage)?

SEGMENTS THAT CAN BE OUTSOURCED WITH SOME KIND OF BareEssentials OBJECT:

  • Lots of TeamList I/O in main-2 probably?
    • Subchoice==3 (creating new team) requires only:
      • sList
      • tList
    • Same with team display, autobuilder (!!!) and removeFromTeam, etc……
    • Also I need to write a true tList.displayTeam(), that shit is still written out in a for loop in the main method >_<
  • The sending of a team to attack a Rival can be done with the following:
    • rList.startMission(blah blah)
    • pend.add x2
    • tList.sendTeam()
    • TeamRivalPend

SEGMENTS THAT CAN BE OUTSOURCED TO SorceryClans static METHODS:

  • The buildmenu can probably be beefed up with the I/O stuff currently in the main method
    • Probably redesign that whole build menu thing, that will also help because it’s in two places! Why do I have to be arm-twisted into doing the right thing??