PamGram/modules/material/talent.py
2023-04-04 22:02:14 +08:00

29 lines
970 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from typing import List
class TalentMaterials:
def __init__(self, amount: List[int]):
self.amount = amount
def cal_materials(self) -> List[int]:
"""
:return: [摩拉天赋书x3怪物素材x3皇冠周本素材]
"""
cost = [0, 0, 0, 0, 0, 0, 0, 0, 0]
cost_list = [
[0, 0, 0, 0, 0, 0, 0, 0, 0],
[12500, 3, 0, 0, 6, 0, 0, 0, 0],
[17500, 0, 2, 0, 0, 3, 0, 0, 0],
[25000, 0, 4, 0, 0, 4, 0, 0, 0],
[30000, 0, 6, 0, 0, 6, 0, 0, 0],
[37500, 0, 9, 0, 0, 9, 0, 0, 0],
[120000, 0, 0, 4, 0, 0, 4, 0, 1],
[260000, 0, 0, 6, 0, 0, 6, 0, 1],
[450000, 0, 0, 12, 0, 0, 9, 0, 2],
[700000, 0, 0, 16, 0, 0, 12, 1, 2],
]
for i in self.amount:
for level in range(1, i):
cost = list(map(lambda x: x[0] + x[1], zip(cost, cost_list[level])))
return cost