tBKwtWS 6 年 前
コミット
f70d1cf9d8
1 ファイル変更2 行追加2 行削除
  1. 2 2
      rotbot/commands/games.py

+ 2 - 2
rotbot/commands/games.py

@@ -88,10 +88,10 @@ def do_command(self, connection, event, user, channel):
                 connection.privmsg(replyto, "Too many arguments. For help type " + font.blue + self.network.help_character + "levelup" + font.reset + ".")
                 return
 
-            while xp > int(level * 2.7) and ap > 0 and upgrade_count > 0:
-                print(upgrade_count)
+            while xp > int((level + 1) * 2.7) and ap > 0 and upgrade_count > 0:
                 queries.levelup_user(self, user.id, int((level + 1) * 2.7))
                 level, xp, xp_spent, total_xp, karma, coin, coin_spent, coin_given, ap, ap_spent = GameHelpers.get_info(self, user)
+                upgrade_count -= 1
 
             if upgrade_count < 0:
                 connection.privmsg(replyto, 'Exhausted XP or AP before levelup was complete. You are only partially levelled up.')