Need advice on how to make temporary attribute bonuses

I'm trying to make a wine bottle which gives a temporary charisma bonus to the player for x amount of turns. Does anyone know how this can be done?

You could give it a 'drink' verb that looks something like:

game.pov.charisma = game.pov.charisma + 10
msg ("You drink the wine and feel more charming.")
SetTurnTimeout (8) {
  msg ("Your head feels clearer, and you realise that you are starting to sober up.")
  game.pov.charisma = game.pov.charisma - 10

That raises the player's charisma stat by 10 for 8 turns.

Log in to post a reply.