Giter Site home page Giter Site logo

jiajunsu / calculator_of_onmyoji Goto Github PK

View Code? Open in Web Editor NEW
230.0 230.0 46.0 2.02 MB

Calculate best combinations of mitamas for game Onmyoji

Home Page: http://bbs.ngacn.cc/read.php?tid=14380045

License: GNU General Public License v2.0

Python 98.81% HTML 1.19%
onmyoji

calculator_of_onmyoji's People

Contributors

chujie avatar jiajunsu avatar somethingmou avatar zepking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calculator_of_onmyoji's Issues

关于result_combinations,我觉得可以不用遍历所有

比如我自己的所有针女荒骷髅套组合,暴击从+85到+95,最后算下来2w6,26000C2有3亿组合,太长了。 \
但是在excel里筛选一下就发现能用的6号位就5个,4号位也是个位数,其实每个位置都没有用到多少,所以我大致想了一下:\

  1. 每号位的每个御魂建一个set,里面是用到这个御魂的组合序号。
  2. 遍历所有组合(指的是2w6的直接御魂结果,不是3亿多的那个排列组合),对每个组合的6个位置,用全集减掉6个位置的set,得到的差集就是不重复的御魂组合,直接输出对应行就行了。

其他问题:

  1. 算2套时大概是O(n)吧,剩下都是调包操作也没多大,可能需要点内存有待商確。
  2. 算>2套时可能会有写逻辑问题,没细想。

启用webui

基于html5开发新UI界面

后台cm_server.py,在本机127.0.0.1开放端口,默认端口2019,通过配置文件可修改。

.\server.conf

[global]  
host = 127.0.0.1
port = 2019

个人对前端不熟悉,希望有会前端的大佬帮忙做前端页面

Request: Separating codes into codes and string resources for i18n

Hi,

I'm a Japanese Onmyoji player.
And I have a hope to use this AMAZING tool in Japanese.

Can you provide separated string resources and the way to load the internationalized string resources?
(I mean that "string resources" are those for Web UI in JavaScript files...)
If you do so, I will cooperate with Japanese localization.
Please consider.

Thanks.

webUI使用文件上传而不是传文件名

image
输入和输出都默认在包安装位置就很奇怪,
最好输入支持上传任意位置文件,输出支持下载.
另外我的启动命令是py -m calculator_of_Onmyoji.cm_server

繁體系統上使用有問題

使用的最新版本,同樣一個導出文件在簡體系統上使用這個工具可以計算出結果,但是在繁體系統上得不到結果,總是顯示0個結果,是否是編碼問題。
image

需求:允许对result的任意总属性限制上下限

  • 参数 -UDL, --user-defined-limit

-UDL 属性名1,下限值,上限值.属性名2,下限值,上限值

  • 参数兼容性
    -DL,-HL的期望参数会覆盖-UDL的同名限制

  • 演进
    在6.0版本,-DL和-HL废弃,基础生命、基础攻击和基础暴伤新增式神属性参数(-BP, --base-prop)传入

需求:重新实现result_combination

0.指定期望的组合数量n
1.从result中按照组合数量进行itertools.combination遍历,遍历范围[2,n]
2.满足独立套装的结果保存

如果期望组合数量为0,则进行[2,max]方式遍历,直到某次遍历后无任何满足条件的组合

完善cm_server的API接口

1.完善各异常场景的返回码和信息,让UI可以有明确的信息返回
2.提供计算进度查询接口,让UI可以直接显示计算进度 done
3.提供API文档

希望能够加入开发团队,为爱发电

在泥潭看到大佬们的御魂计算器,特前来膜拜。本人前端开发一枚,js和python都经常使用,希望能为计算器尽一点微薄之力。如果需要,请联系微信: hanooyang

No module named 'calculator_of_Onmyoji'

使用命令安装好了依赖

$ pip install -r /Users/everlose/Downloads/calculator/requirements.txt

接下来运行

$ python3 /Users/everlose/Downloads/calculator/calculator_of_Onmyoji/cm_server.py

Traceback (most recent call last):
File "/Users/everlose/Downloads/calculator/calculator_of_Onmyoji/cm_server.py", line 17, in
from calculator_of_Onmyoji import cal_mitama
ModuleNotFoundError: No module named 'calculator_of_Onmyoji'

额?

需求: 同时计算多套组合

不是个特别强的需求.
目前多套组合是需要一个个算的, 每次需要手动添加到已使用然后再算下一套.
这样子, 一是需要额外操作麻烦一些; 二是每一轮都取最好的御魂, 会导致后面没有合适御魂能再组一套了, 所以希望能综合考虑多套需求, 第一套可能稍弱点, 但保证能组出多套

需求:计算魂十挖煤场景组合套装

计划的实现方式:框架+驱动(driver)

cal_suit.py,框架,负责解析driver,并让用户选择使用哪个driver,封装对cal_mitama的调用,提供若干基础函数能力。

driver/abc.py,驱动,实现分步骤多次对cal_mitama的调用,并综合判断是否满足期望目标。

结果保存为excel格式,与 result_combination格式一致

额外选项:计算所有组合(超过一定数量强制停止) 或 计算任一个满足条件的即停止计算

前置条件:调整cal_mitama,将main函数中解析args和实际计算的代码分离,cal_suit直接使用函数调用方式进行计算

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.