diff --git a/apps/riic_report_analysis.py b/apps/riic_report_analysis.py index 9487202..119e856 100644 --- a/apps/riic_report_analysis.py +++ b/apps/riic_report_analysis.py @@ -36,12 +36,14 @@ class RIICReportAnalysis: err_msg += "琉璃 243-153" use_tequila = False + power_plants = 2 if not card: await chain.onebot_reply(Text(err_msg)) return elif "153" in card or "243" in card: use_tequila = True + power_plants = 3 elif "252" in card: if m := re.search(r"([1-3][1-3])贸", card): if "3" in m.group(1): @@ -148,19 +150,29 @@ class RIICReportAnalysis: output += f"贸易效率:{trading_efficiency * 100:.0f}%\n" output += f"等效赤金:{gold_by_e:.0f}\n" output += f"经验调平:{balanced_exp_by_e:.0f}\n" - output += f"钱书比例:{lmb_exp_ratio_by_e:.2f}\n" + if power_plants == 2: + output += f"钱书比例:{lmb_exp_ratio_by_e:.2f}\n" output += f"调平总和:{total_by_e:.0f}\n\n" output += "-----数量算法-----\n" output += f"等效赤金:{gold_by_order:.0f}\n" output += f"经验调平:{balanced_exp_by_order:.0f}\n" - output += f"钱书比例:{lmb_exp_ratio_by_order:.2f}\n" - output += f"调平总和:{total_by_order:.0f}" + if power_plants == 2: + output += f"钱书比例:{lmb_exp_ratio_by_order:.2f}\n" + output += f"调平总和:{total_by_order:.0f}\n\n" + if power_plants == 3: + if exp_avg != 0: + output += f"钱书比例:{lmb_avg / exp_avg:.0f}" + else: + output += f"钱书比例:正无穷" else: balanced_gold = lmb_avg - external_gold overflow_gold = gold_avg - balanced_gold more_exp = overflow_gold * 0.8 balanced_exp = exp_avg + more_exp - lmb_exp_ratio = (lmb_avg + 43483) / (balanced_exp + 36284) + if power_plants == 2: + lmb_exp_ratio = (lmb_avg + 43483) / (balanced_exp + 36284) + else: + lmb_exp_ratio = (lmb_avg + 43483) / (exp_avg + 36284) total = lmb_avg + balanced_exp output += "====计算结果====\n"