Gvin / CodeMagic

A small ASCII Roguelike RPG with magic based on physics + programming.
GNU General Public License v3.0
2 stars 1 forks source link

[BUG] Player Stat can be increased several times per level up #127

Closed Gvin closed 4 years ago

Gvin commented 4 years ago

Steps

  1. Start a game
  2. Reach level up
  3. Select stat and press OK

Result

Sometimes Level Up dialog is not closed and Player can select another (or the same) stat and increase it.

Expected Result

Level Up dialog should be closed immediately after OK button click. Only one stat should be increased.

Gvin commented 4 years ago

This issue was caused by simultaneous death of several creatures when player is close to reaching next level. As a result 2 (or possibly more) level up windows can be opened at the same time ignoring experience drop after the initial level up. Fixed by adding lock arround experience increment.