I'll walk backwards:
friarsol wrote:Then if a user wants to actually tweak what they start with, they can change the quest.preferences file. If a quest.preferences file exists, we use that. Else, we use questrewards.dat
Actually, this is sort of what's in place already, just hardcoded. If it's quite important, I can move those into a file, just say the word.
I'm surprised the user is "allowed" to do this - seems a lot like a cheat. Not sure of the "official" stance on that.
Max mtg wrote:How can QuestUtilRewards become a model? It holds no data itself, it's just a set of functions that were littering QuestData, the model.
My current understanding of "model" is a class that pulls together values for the view to display. For a QuestEvent win/loss, one view (Gui_WinLose) could use two models and a sub-view:
- QuestData, holding long-term "save-able" information
- A quest rewards model, to chase down short-term rewards specific to a QuestEvent
- A quest rewards sub-view, which is triggered when necessary by parent.
Further, this structure can be used in future quest events, such as Ladder, Bonus Rounds, or something. Whaddaya reckon?
Max mtg wrote:While QuestUtilRewards counts money, Gui_WinLose is composing a message. I didn't find a way how to eliminate that similiarity in code. Maybe move number of turns to a constant?
If the above architecture is a go, I'll spend a few hours exploring this - I'm sure there's an elegant solution.
For future game modes (puzzle, multiplayer, gauntlet, you name it) I think we'll definitely need a universal win/lose gui, with a rewards model/subview depending on the game type ("You've unlocked Puzzle 36" or "First win against 7 players - here's a cookie").