Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import choices
- size = 5
- rewards = ["HAN Crystal of Ruin", "Herald's Crystal", "Deboreka Ring", "Caphras Stone", "Black Stone", "Junk"]
- # 1. Базови тегла (Deboreka Ring има базово тегло 10)
- base_weights = [25, 25, 10, 50, 80, 100]
- # 2. Модифицирани тегла за 310% бонус
- # Увеличаваме САМО теглото на Deboreka Ring: 10 * 4.1 = 41
- buffed_weights = [25, 25, 41, 50, 80, 100]
- def generate_loot_matrix(weights_config):
- matrix = []
- for x in range(size):
- current_row = []
- for y in range(size):
- reward = choices(rewards, weights=weights_config, k=1)[0]
- current_row.append(reward)
- matrix.append(current_row)
- return matrix
- # Сравняваме двата резултата
- print("--- МАТРИЦА С БАЗОВ ДРОП ---")
- base_matrix = generate_loot_matrix(base_weights)
- for row in base_matrix:
- print(row)
- print("\n--- МАТРИЦА С +310% ITEM DROP RATE ---")
- buffed_matrix = generate_loot_matrix(buffed_weights)
- for row in buffed_matrix:
- print(row)
Advertisement
Add Comment
Please, Sign In to add comment