1.数值转整形2.炼金期望调整为1.1左右
This commit is contained in:
@@ -21,13 +21,13 @@ class AlchemyGame(BaseGame):
|
|||||||
# 奖品池配置 - 确保数学期望等于消耗积分
|
# 奖品池配置 - 确保数学期望等于消耗积分
|
||||||
self.prize_pool: List[Tuple[int, str, float, str]] = [
|
self.prize_pool: List[Tuple[int, str, float, str]] = [
|
||||||
# (权重, 类型, 倍率, 描述)
|
# (权重, 类型, 倍率, 描述)
|
||||||
(9, "penalty", 0, "炼金失败"),
|
(500, "penalty", 0, "炼金失败"),
|
||||||
(1, "penalty", -1, "炼金爆炸"),
|
(100, "penalty", -1, "炼金爆炸"),
|
||||||
(100, "points", 0.1, "少量积分"),
|
(100, "points", 0.1, "少量积分"),
|
||||||
(390, "points", 0.5, "少量积分"),
|
(390, "points", 0.5, "少量积分"),
|
||||||
(500, "points", 1, "等值积分"),
|
(500, "points", 1, "等值积分"),
|
||||||
(590, "points", 2, "丰厚积分"),
|
(390, "points", 2, "丰厚积分"),
|
||||||
(400, "points", 5, "丰厚积分"),
|
(200, "points", 5, "丰厚积分"),
|
||||||
(9, "points", 10, "🌟 巨额积分"),
|
(9, "points", 10, "🌟 巨额积分"),
|
||||||
(1, "points", 100, "💎 传说积分"),
|
(1, "points", 100, "💎 传说积分"),
|
||||||
]
|
]
|
||||||
@@ -90,7 +90,7 @@ class AlchemyGame(BaseGame):
|
|||||||
|
|
||||||
# 执行抽奖
|
# 执行抽奖
|
||||||
reward = self._draw_prize(prize_pool)
|
reward = self._draw_prize(prize_pool)
|
||||||
reward_points = reward['value']*cost_points
|
reward_points = int(reward['value']*cost_points)
|
||||||
|
|
||||||
# 消费积分
|
# 消费积分
|
||||||
if not self.db.consume_points(user_id, cost_points, "alchemy", f"炼金抽奖消耗"):
|
if not self.db.consume_points(user_id, cost_points, "alchemy", f"炼金抽奖消耗"):
|
||||||
|
|||||||
Reference in New Issue
Block a user