- A link to the Battle. Set by constructor.
- A link to ConsoleView. Set by constructor.
- Are we in debug mode. This prints out extra information during program execution.
- Sets the links for Battle and ConsoleView so that each of them can access ConsoleController and themselves. It sets the mode of gameplay, normal or debug. Afterwards, the game loop starts.
- This function does not automatically load nor save binary data!
- Additionally, it uses self.loadStaticData() to load EventTypes and non-playable Fighters.
- Prints out an event selection menu and collects a choice from the user. It returns the enemy selected for attack and the type of attack. Should use pygame's event driven input functionallity.
- Prints out the startup menu, via ConsoleController.printStartupMenu() then obtains user input. Returns result.
- Show dummy menu. Get user choices. Then:
- If New Game selected, call self.createNewSave(..)
- If Load Game selected, call self.load(..)
- If Save Game selected, call self.save(..) (show only if game loaded), show menu again.
- If Random Battle selected:
- Create a random battle. (self.createRandomBattle(..)).
- Print out the state of affairs before the battle begins. Executes Battle.nextTurn() once. The experience passed to giveExp should be the sum of the defeated party's experience.
- After battle, show dummy menu again.
- If Quit selected, end program.
+load(file: string): void
+save(file: string): void
- Randomly selects some number (1 to 6) of monsters, and randomly determines which monsters they are.
- Copies each monster to populate an enemy party.
+loadStaticData(newGame: bool): void
- Loads EventTypes and non-playable/initial playable Fighters. (at some point, other things too)
- Utilizes the Fighter xml constructor.
- By default it loads fighter objects that are non playable into Battle.monsters, but when newGame is True, it also creates the hero party from the files in ./data/fighter/playable. It does not load playable fighters into Battle.monsters.