pacho_the_python

bdo_item_drop_rate

Sep 22nd, 2026
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.12 KB | Gaming | 0 0
  1. from random import choices
  2.  
  3. size = 5
  4. rewards = ["HAN Crystal of Ruin", "Herald's Crystal", "Deboreka Ring", "Caphras Stone", "Black Stone", "Junk"]
  5.  
  6. # 1. Базови тегла (Deboreka Ring има базово тегло 10)
  7. base_weights = [25, 25, 10, 50, 80, 100]
  8.  
  9. # 2. Модифицирани тегла за 310% бонус
  10. # Увеличаваме САМО теглото на Deboreka Ring: 10 * 4.1 = 41
  11. buffed_weights = [25, 25, 41, 50, 80, 100]
  12.  
  13. def generate_loot_matrix(weights_config):
  14.     matrix = []
  15.     for x in range(size):
  16.         current_row = []
  17.         for y in range(size):
  18.             reward = choices(rewards, weights=weights_config, k=1)[0]
  19.             current_row.append(reward)
  20.         matrix.append(current_row)
  21.     return matrix
  22.  
  23.  
  24. # Сравняваме двата резултата
  25. print("--- МАТРИЦА С БАЗОВ ДРОП ---")
  26. base_matrix = generate_loot_matrix(base_weights)
  27. for row in base_matrix:
  28.     print(row)
  29.  
  30. print("\n--- МАТРИЦА С +310% ITEM DROP RATE ---")
  31. buffed_matrix = generate_loot_matrix(buffed_weights)
  32. for row in buffed_matrix:
  33.     print(row)
Advertisement
Add Comment
Please, Sign In to add comment