Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于耐力计算的bug #36

Closed
aaaaaaria opened this issue Aug 13, 2022 · 5 comments
Closed

关于耐力计算的bug #36

aaaaaaria opened this issue Aug 13, 2022 · 5 comments
Labels
bug Something isn't working question Further information is requested

Comments

@aaaaaaria
Copy link

aaaaaaria commented Aug 13, 2022

uma_endurance模块中,

  1. config.py 136行,距离适性F的加速度补正写成了10.5,应该是0.5
  2. init.py 60行,hp_bonus的计算结果完全没有用到,caculate.py中theoretical_endurance()方法对理论体力的计算已经包含了跑法的耐力补正run_type_bonus[run_type]['hp_bonus'],judge_hp_bonus()方法完全多余
  3. init.py 86行,计算理论体力直接使用了原始耐力面板endurance_tmp,没有进行心情补正
  4. init.py 88行,计算回体技能折算耐力时使用了总需求体力hp,应该使用马娘理论体力theoretical_hp
  5. caculate.py 136~140行,回体技能折算耐力的计算式中,分母缺少了面板耐力换算hp系数0.8

感谢作者大大的辛苦付出!

@azmiao
Copy link
Owner

azmiao commented Aug 13, 2022

感谢您的反馈,这个理论也是很早的时候的理论了,现在我已经不记得咋算了2333,如果你有空的话可以改一下提交PR。
另外第2点中确实没有用到,但还是保留下来了,因为本来我是想把这些数据 (包括这里提到的体力补正) 全部放进一张图里,后来嫌麻烦就变成文本了hhh,然后又嫌消息太长才把这个删掉的,所有可以先保留着。

@azmiao azmiao added bug Something isn't working question Further information is requested labels Aug 13, 2022
@azmiao
Copy link
Owner

azmiao commented Aug 26, 2022

有空的时候能不能麻烦你来修复下呢,我实在记不得机制了2333

@aaaaaaria
Copy link
Author

aaaaaaria commented Aug 27, 2022

抱歉长时间未回复,一是我不懂怎么提交(,二是提出的这些问题其实都是进行具体计算之前的小问题,我也只是很简单粗暴的改了改(,三是具体机制我也不懂,包括详细计算的代码也看不懂,只是群里使用耐力计算得到的耐力需求明显偏高才在力所能及的范围内大概看了一下代码,发现了一些小问题,即使更正了这些问题我也不知道更正之后的结果可不可靠……

对应3,init.py现在代码87行
theoretical_hp = await theoretical_endurance(track_length, endurance_tmp, run_type)
改成了:
theoretical_hp = await theoretical_endurance(track_length, endurance_tmp * feeling_bonus[feeling], run_type)

对应4,init.py现在代码89行
stable_recover_endu, common_recover_endu, upper_recover_endu = await cacul_skill_endu(stable_recover_level, hp, run_type)
改成了:
stable_recover_endu, common_recover_endu, upper_recover_endu = await cacul_skill_endu(stable_recover_level, theoretical_hp, run_type)

对应5,caculate.py现在代码135行起

# 固有回耐量
stable_recover_endu = 0.055 * stable_recover_bonus[stable_recover_level] * hp / run_type_bonus[run_type]['hp_bonus']
# 单个普通回耐量
common_recover_endu = 0.015 * hp / run_type_bonus[run_type]['hp_bonus']
# 单个金回耐量
upper_recover_endu = 0.055 * hp / run_type_bonus[run_type]['hp_bonus']

改成了:

# 固有回耐量
stable_recover_endu = 0.055 * stable_recover_bonus[stable_recover_level] * hp / (0.8 * run_type_bonus[run_type]['hp_bonus'])
# 单个普通回耐量
common_recover_endu = 0.015 * hp / (0.8 * run_type_bonus[run_type]['hp_bonus'])
# 单个金回耐量
upper_recover_endu = 0.055 * hp / (0.8 * run_type_bonus[run_type]['hp_bonus'])

以上,没有别的改动了2333

@azmiao
Copy link
Owner

azmiao commented Aug 28, 2022

抱歉长时间未回复,一是我不懂怎么提交(,二是提出的这些问题其实都是进行具体计算之前的小问题,我也只是很简单粗暴的改了改(,三是具体机制我也不懂,包括详细计算的代码也看不懂,只是群里使用耐力计算得到的耐力需求明显偏高才在力所能及的范围内大概看了一下代码,发现了一些小问题,即使更正了这些问题我也不知道更正之后的结果可不可靠……

对应3,init.py现在代码87行 theoretical_hp = await theoretical_endurance(track_length, endurance_tmp, run_type) 改成了: theoretical_hp = await theoretical_endurance(track_length, endurance_tmp * feeling_bonus[feeling], run_type)

对应4,init.py现在代码89行 stable_recover_endu, common_recover_endu, upper_recover_endu = await cacul_skill_endu(stable_recover_level, hp, run_type) 改成了: stable_recover_endu, common_recover_endu, upper_recover_endu = await cacul_skill_endu(stable_recover_level, theoretical_hp, run_type)

对应5,caculate.py现在代码135行起

# 固有回耐量
stable_recover_endu = 0.055 * stable_recover_bonus[stable_recover_level] * hp / run_type_bonus[run_type]['hp_bonus']
# 单个普通回耐量
common_recover_endu = 0.015 * hp / run_type_bonus[run_type]['hp_bonus']
# 单个金回耐量
upper_recover_endu = 0.055 * hp / run_type_bonus[run_type]['hp_bonus']

改成了:

# 固有回耐量
stable_recover_endu = 0.055 * stable_recover_bonus[stable_recover_level] * hp / (0.8 * run_type_bonus[run_type]['hp_bonus'])
# 单个普通回耐量
common_recover_endu = 0.015 * hp / (0.8 * run_type_bonus[run_type]['hp_bonus'])
# 单个金回耐量
upper_recover_endu = 0.055 * hp / (0.8 * run_type_bonus[run_type]['hp_bonus'])

以上,没有别的改动了2333

好嘞,太感谢你了,麻烦你了

@azmiao azmiao closed this as completed in 7a000ee Aug 28, 2022
@azmiao
Copy link
Owner

azmiao commented Aug 28, 2022

已同步至主分支

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants