Need advice on how to make temporary attribute bonuses

Splatterpunk
30 Aug 2021, 00:08

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?


mrangel
30 Aug 2021, 01:17

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.