tBKwtWS 7 vuotta sitten
vanhempi
sitoutus
465ca749f6
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      irc/commands/common.py

+ 3 - 1
irc/commands/common.py

@@ -165,7 +165,7 @@ class GameHelpers():
         
         chatxp = messages + (messages_words / 4) + (messages_characters / 10) + ((actions + (actions_words / 4) + (actions_characters / 10)) * 2) + ((notices + (notices_words / 4) + (notices_characters / 10)) / 2)
         kickxp = given * received
-        total_xp = ((joins + kickxp + chatxp) / 120) + float(coin_spent + ap_spent / 8) - (level * 5) 
+        total_xp = ((joins + kickxp + chatxp) / 120) + float(coin_spent + ap_spent / 8) - (level * 3) 
         
         xp = total_xp - xp_spent
         ap = total_xp - float(ap_spent)
@@ -183,6 +183,8 @@ class GameHelpers():
         xpkarma = xp / 25
         coinkarma = (coin - coin_given / (xp_spent + 1)) / 99
         karma = float(joinkarma) + float(chatkarma) - float(kickkarma) + float(xpkarma) - float(coinkarma)
+        if xp < 0:
+            xp = 0
         
         return level, xp, xp_spent, total_xp, karma, coin, coin_spent, coin_given, ap, ap_spent