2. Hmm, I looked back at the code and the game but it looks fine from my side?
I'll try to find the time to look at it and understand why I had the feeling that something was wrong. This said, I can be wrong.
3. Actually, there is two outcome with meeting Luna outside the promotion. No hugs and different dialogue if the affection is not high enough.
The flag is affection as to gain the needed affection you need to have done the hug part. However, I may change it so the flag is actually the hug itself.
It would probably be better yes. When I played the promotion event the first time, I loaded my last save once I saw Luna jump to hug me. I haven't done the knife quest at this time and, as I said, it doesn't felt good that she hug me.
Anyway limiting thing like this by the quest, or having the quest as part of the condition, is always a better option than doing it by the affection level itself. Some players can have done it perfectly, some other can have made some mistake, and the more they'll progress in the game, the more the gap will increase. So when, at the early stage of the game, you have something like :
Code:
if 7 < pl.lu < 10: yes you can do it
When the game is near to its end, it can become something like :
Code:
if 30 < pl.lu < 60: yes you can do it
And it's obviously a really high gap. And while an average player can be more near the lower limit when he finish the quest 15, another can be near the above limit while still being at the quest 10, just because he did it perfectly.
So, if you add a "done the quest X" to the condition, you ensure that the context is correct for the action.
And for the fact that the finished quest will vanish, I propose a "luna_quest_level" integer (and obviously "isabel_quest_level", and so on). Just increment it each time the player finish one of the Luna's quest. You can probably make it automatic inside the code that gave the "completed" state to the quest, so you'll even don't have to care about it.
As long as you can't do a Luna's quest before having finished the previous one, it will tell you precisely if "this" quest have been finished or not.
So, for the promotion event it would give something like this :
Code:
if luna_quest_level >= 3 and pl.lu >= 8: she jump to hug you
Which read as : If Luna is enough at ease with hugs and like you enough, she'll hug you. Else she'll not do it, whatever it's because she don't like you enough or because she isn't enough at ease with hugs.
Still I think that limiting the ranking is needed. Like I said, else a time will come when the player will be ranked at the same level that Wilfred (what ? I can dream

) while still having to play the punishment scene (No Gracie, it still wasn't a mission) and in fact the whole story.
Problem with using completed quest for something like that is compatibility issues. Right now the quest log removes all completed quest. So it won't register in future releases. So have to add flags to those manually.
I talked about the "luna_quest_level" above, and for the ranking cap, you can use a "max_xp" integer instead of flags ; in fact it will even make the code easier to write since you'll only have one line :
Code:
def isXPCaped():
return xp >= max_xp
I think it's still a good idea to keep it in a function even for something as simple, because it offer you the possibility to easily add more things limiting the XP earning in the future. By example the "max_xp", but also a flag because "this" must absolutely be done before the next rank, whatever can say the other limitations.
You just have to change what is in this function, without having to care of the rest of your code. And you just change the value of "max_xp" when the quest/event/whatever that actually impose the limit is done.
Note that I changed my mind, limiting by xp is probably better than doing it by rank.
I assume that, the higher is your rank, the more xp you'll have to earn for the next rank. So, a limit by rank mean that the player will have to do many missions once the limiting quest/event/whatever is done. At the opposite, if you do something like :
Code:
max_xp = xp_of_the_next_rank - ( max_xp_gave_by_more_rewarding_mission_available * 2)
The player will just have to do few missions before his promotion. This will make the game more dynamic ; the player finally finished the limiting quest, and if he do it right, the next day he can have his promotion.
You can even use :
Code:
max_xp = xp_of_the_next_rank - 1
To stop it right before the promotion, but I don't like it. Having at least two missions to do make it a little less obvious that "this" quest/event was what you needed to do.
Thanks for the great feedback as always, anne O'nymous.
No, thanks to you for your great game.