彧哉
风光无限342111
关注数: 2
粉丝数: 0
发帖数: 273
关注贴吧数: 45
关于动态血量 理性分析,如果队伍里有氪佬带,为了降低boss难度(我指那种受战力影响的副本),会不会把和自己战斗力差距过大的氪佬踢了,几个平民一起打本,能更轻松一点。 (叠甲,本人只是探讨这种可能性,不针对动态血量本身,不针对氪佬和平民,仅仅是出于好奇,无任何冒犯的意思。)
想问个交易中心的问题 这个游戏是有底价的(我指的是包括专注值的10专注=800💰的人工费在里头) 也就是说,只要我底价购入,等七天再卖出去,永远不会亏钱?
根据今天的鸣潮团子结果写了个python代码 import random from collections import defaultdict class DangoRace: def __init__(self, odds=None): self.dangos = list(range(6)) # 六个团子编号0-5 self.dango_names = ["今汐", "长离", "卡卡罗", "守岸人", "椿", "珂莱塔"] self.positions = defaultdict(list) # 存储每个位置的堆叠(底层到顶层) self.current_positions = {} # 存储每个团子的当前位置 self.special_actions = defaultdict(bool) # 初始化所有团子在起始位置0(独立存在,不堆叠) for dango in self.dangos: self.current_positions[dango] = 0 self.positions[0].append(dango) # 每个团子独立加入位置0 # 初始化赔率,默认为1.25 self.odds = odds if odds else [1.25] * 6 def simulate_race(self): winner = None while winner is None: # 随机决定本回合行动顺序 turn_order = self.dangos.copy() random.shuffle(turn_order) # 处理长离团子的特殊行动 if self.special_actions[1]: if 1 in turn_order: turn_order.remove(1) turn_order.append(1) self.special_actions[1] = False for dango in turn_order: current_pos = self.current_positions[dango] if current_pos >= 24: continue stack = self.positions.get(current_pos, []) if not stack: continue try: idx = stack.index(dango) except ValueError: continue # 特殊技能处理 dice = self.roll_dice(dango) dice = self.apply_skills_before_move(dango, dice, stack, idx) new_pos = current_pos + dice new_pos = min(new_pos, 24) dice = self.apply_skills_after_move(dango, dice, new_pos) # 关键修改点:位置0的特殊移动逻辑 if current_pos == 0: # 仅移动自身,不带走其他团子 moving_stack = [dango] stack.remove(dango) # 从原位置单独移除 if not stack: # 清理空位置 del self.positions[current_pos] else: # 原有堆叠移动逻辑 moving_stack = stack[idx:] del stack[idx:] if not stack: del self.positions[current_pos] # 添加到新位置(堆叠到顶部) self.positions[new_pos].extend(moving_stack) for d in moving_stack: self.current_positions[d] = new_pos if new_pos == 24: winner = moving_stack[0] break if 24 in self.positions and self.positions[24]: winner = self.positions[24][0] break # 获取完整排名(逻辑不变) final_ranking = [] final_stack = self.positions.get(24, []) if final_stack: final_ranking.extend(final_stack[::-1]) remaining_dangos = [d for d in self.dangos if d not in final_stack] remaining_dangos.sort(key=lambda x: (-self.current_positions[x], x)) final_ranking.extend(remaining_dangos) return final_ranking # 以下方法保持不变 def roll_dice(self, dango): if dango == 4: return random.choice([2, 3]) return random.randint(1, 3) def apply_skills_before_move(self, dango, dice, stack, idx): if dango == 0 and len(stack) > 1 and idx < len(stack) - 1: if random.random() < 0.4: new_idx = len(stack) - 1 stack.insert(new_idx, stack.pop(idx)) if dango == 1 and idx > 0: if random.random() < 0.65: self.special_actions[1] = True if dango == 2: current_pos = self.current_positions[dango] others = [self.current_positions[d] for d in self.dangos if d != dango] if current_pos == min(others + [current_pos]): dice += 3 if dango == 4: if random.random() < 0.5: bonus = len(stack) - 1 dice += bonus return dice def apply_skills_after_move(self, dango, dice, new_pos): if dango == 5: if random.random() < 0.28: dice *= 2 return dice # 示例运行部分保持不变 if __name__ == "__main__": default_odds = [1.25] * 6 user_odds = [] print("请输入每个团子的赔率(默认为1.25):") for i, name in enumerate(["今汐", "长离", "卡卡罗", "守岸人", "椿", "珂莱塔"]): while True: try: value = input(f"{name}团子的赔率 ({i+1}/6): ") if value.strip() == "": user_odds.append(default_odds[i]) break odds = float(value) if odds > 0: user_odds.append(odds) break else: print("赔率必须大于0,请重新输入。") except ValueError: print("请输入有效数字。") win_counts = defaultdict(int) total_races = 10000 for _ in range(total_races): race = DangoRace(odds=user_odds) ranking = race.simulate_race() if ranking: winner = ranking[0] win_counts[winner] += 1 dango_names = ["今汐", "长离", "卡卡罗", "守岸人", "椿", "珂莱塔"] print("\n比赛结果:") print(f"总比赛次数:{total_races}") print("\n每个团子的获胜概率和基础回报率:") for dango in sorted(win_counts.keys()): probability = (win_counts[dango] / total_races) * 100 base_return = probability * user_odds[dango] / 100 print(f"{dango_names[dango]}团子: " f"获胜概率 {probability:.2f}% ({win_counts[dango]}次获胜), " f"基础回报率 {base_return:.4f}") total_investment_return = sum((win_counts[dango] / total_races) * user_odds[dango] for dango in win_counts) print(f"\n总投资回报率: {total_investment_return:.4f}")
说到底洗澡狗还是五只强
100930463号老登报到,请求入列
如何评价本部大兴土木 晚上睡不着,白天挖掘机比闹钟先响,最近还说要修阳台,给窗户前建脚手架。
礼物卡没了 sm雷火
脆弱的我,已经活了 我是来结束这场战斗的。
仪征水利局怎么样? 本人南京某水工专业,想考仪征市水利局,难度大吗?薪资待遇怎么样呢。
求打听河海大学水电院硕导 有没有导师不那么push,性格比较好相处的 求往届学长学姐解答。(配图无关) #河海大学##硕导#
玩帕鲁玩到真mygo了 完全符合
求助1111 想问一下,现在卸载PC还会删文件吗
12345 这算头像吗
想知道有什么活动 大佬们,赛马娘这个游戏里一般多久出一个活动版本啊,大概会给点什么。
洁西卡版赛马娘 休憩:没休息好 上课:知识没进脑袋 判定:83%没过 总结:是赛🦌娘,血压上来了
小小问一下 尘白禁区暂时没有内鬼吧吗
想问一下下 森空岛这类玩家社区软件需要版号吗
周常居然又刷新了?! 尘白他要是以后周常每天都刷新,那游戏问题我就睁一只眼闭一只眼了。
1
下一页