diff --git a/hoshino/modules/priconne/gacha/config.json b/hoshino/modules/priconne/gacha/config.json index 296a4785c..eef0cd923 100644 --- a/hoshino/modules/priconne/gacha/config.json +++ b/hoshino/modules/priconne/gacha/config.json @@ -1,10 +1,12 @@ { "MIX": { - "up_prob": 14, + "up_prob": 7, + "fes_prob": 7, "s3_prob": 50, "s2_prob": 180, - "up": [ "凯留(新年)", "空花(大江户)", "妮诺(大江户)" ], + "up": [ "可可罗(公主)"], "_comment": "star3 仅填3星常驻角色。不要填UP角,否则出率会偏高", + "fes": [ "贪吃佩可(公主)", "克莉丝提娜", "矛依未", "似似花" ], "star3": [ "杏奈","真步","璃乃","初音","霞","伊绪", "咲恋","望","妮诺","秋乃","镜华","智","真琴", @@ -12,9 +14,8 @@ "亚里莎","安","古蕾娅", "克萝依", "碧(插班生)", "美美(万圣节)", "露娜", "伊莉亚(圣诞节)", "霞(魔法少女)", "优妮", "琪爱儿", - "リン(レンジャー)" + "铃(游骑兵)", "真阳(游骑兵)" ], - "other_normal_star3": [ "空花(大江户)", "妮诺(大江户)" ], "star2": [ "茉莉","茜里","宫子","雪","七七香","美里", "铃奈","香织","美美","绫音","铃","惠理子", @@ -106,4 +107,4 @@ "优花梨","碧","美咲","莉玛" ] } -} +} \ No newline at end of file diff --git a/hoshino/modules/priconne/gacha/gacha.py b/hoshino/modules/priconne/gacha/gacha.py index 9889a7939..a6d803639 100644 --- a/hoshino/modules/priconne/gacha/gacha.py +++ b/hoshino/modules/priconne/gacha/gacha.py @@ -14,17 +14,19 @@ def __init__(self, pool_name:str="MIX"): def load_pool(self, pool_name:str): config = util.load_config(__file__) pool = config[pool_name] - self.up_prob = pool["up_prob"] + self.up_prob = pool["up_prob"] # 当期up + self.fes_prob = pool["fes_prob"] # 当期FES self.s3_prob = pool["s3_prob"] self.s2_prob = pool["s2_prob"] self.s1_prob = 1000 - self.s2_prob - self.s3_prob self.up = pool["up"] + self.fes = pool["fes"] # 当期Fes self.star3 = pool["star3"] self.star2 = pool["star2"] self.star1 = pool["star1"] - def gacha_one(self, up_prob:int, s3_prob:int, s2_prob:int, s1_prob:int=None): + def gacha_one(self, ten_flag:bool = False): ''' sx_prob: x星概率,要求和为1000 up_prob: UP角色概率(从3星划出) @@ -36,15 +38,18 @@ def gacha_one(self, up_prob:int, s3_prob:int, s2_prob:int, s1_prob:int=None): | *** | ** | * | --------------------------- ''' - if s1_prob is None: - s1_prob = 1000 - s3_prob - s2_prob - total_ = s3_prob + s2_prob + s1_prob + if self.s1_prob is None: + self.s1_prob = 1000 - self.s3_prob - self.s2_prob + total_ = self.s3_prob + self.s2_prob + self.s1_prob pick = random.randint(1, total_) - if pick <= up_prob: + + if pick <= self.up_prob: return Chara.fromname(random.choice(self.up), 3), 100 - elif pick <= s3_prob: + elif pick <= self.up_prob + self.fes_prob: # fes + return Chara.fromname(random.choice(self.fes), 3), 50 + elif pick <= self.s3_prob: return Chara.fromname(random.choice(self.star3), 3), 50 - elif pick <= s2_prob + s3_prob: + elif (pick <= self.s2_prob + self.s3_prob) or (ten_flag == True): return Chara.fromname(random.choice(self.star2), 2), 10 else: return Chara.fromname(random.choice(self.star1), 1), 1 @@ -58,10 +63,10 @@ def gacha_ten(self): s2 = self.s2_prob s1 = 1000 - s3 - s2 for _ in range(9): # 前9连 - c, y = self.gacha_one(up, s3, s2, s1) + c, y = self.gacha_one(False) result.append(c) hiishi += y - c, y = self.gacha_one(up, s3, s2 + s1, 0) # 保底第10抽 + c, y = self.gacha_one(True) # 保底第10抽 result.append(c) hiishi += y @@ -75,24 +80,27 @@ def gacha_tenjou(self): s3 = self.s3_prob s2 = self.s2_prob s1 = 1000 - s3 - s2 - for i in range(9 * 30): - c, y = self.gacha_one(up, s3, s2, s1) - if 100 == y: - result['up'].append(c) - first_up_pos = min(first_up_pos, 10 * ((i+1) // 9) + ((i+1) % 9)) - elif 50 == y: - result['s3'].append(c) - elif 10 == y: - result['s2'].append(c) - elif 1 == y: - result['s1'].append(c) - else: - pass # should never reach here for i in range(30): - c, y = self.gacha_one(up, s3, s2 + s1, 0) + # 前9抽 + # print("\n", i * 10, "-", i * 10 + 10) + for k in range(9): + c, y = self.gacha_one(False) + if 100 == y: + result['up'].append(c) + first_up_pos = min(first_up_pos, i * 10 + k) + elif 50 == y: + result['s3'].append(c) + elif 10 == y: + result['s2'].append(c) + elif 1 == y: + result['s1'].append(c) + else: + pass # should never reach here + # 第10抽保底 + c, y = self.gacha_one(True) if 100 == y: result['up'].append(c) - first_up_pos = min(first_up_pos, 10 * (i+1)) + first_up_pos = min(first_up_pos, 10 * (i + 1)) elif 50 == y: result['s3'].append(c) elif 10 == y: diff --git a/hoshino/modules/priconne/priconne_data.py b/hoshino/modules/priconne/priconne_data.py index 85c872b21..93a4eb810 100644 --- a/hoshino/modules/priconne/priconne_data.py +++ b/hoshino/modules/priconne/priconne_data.py @@ -135,6 +135,7 @@ class _PriconneData: 1125: ["凛(偶像大师)", "リン(デレマス)", "Rin(DEREM@S)", "凛", "Rin(DEREMAS)", "涩谷凛"], 1126: ["未央(偶像大师)", "ミオ(デレマス)", "Mio(DEREM@S)", "未央", "Mio(DEREMAS)", "本田未央"], 1127: ["铃(游骑兵)", "リン(レンジャー)", "Rin(Ranger)", "骑兵松鼠", "游侠松鼠", "游骑兵松鼠", "护林员松鼠", "护林松鼠", "游侠🐿️"], + 1128: ["真阳(游骑兵)", "マヒル(レンジャー)", "Mahiru(Ranger)", "骑兵奶牛", "游侠奶牛", "游骑兵奶牛", "护林员奶牛", "护林奶牛"], # =================================== # @@ -142,6 +143,7 @@ class _PriconneData: 1804: ["贪吃佩可(公主)", "ペコリーヌ(プリンセス)", "Pekoriinu(Princess)", "公主吃", "公主饭", "公主吃货", "公主佩可", "公主饭团", "公主🍙", "命运高达", "高达", "命运公主", "高达公主", "春哥高达", "🤖🍙", "🤖"], + 1805: ["可可罗(公主)", "コッコロ(プリンセス)", "Kokkoro(Princess)", "公主妈"],