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

新增主线推进模式 #118

Open
wants to merge 131 commits into
base: dev
Choose a base branch
from
Open

新增主线推进模式 #118

wants to merge 131 commits into from

Conversation

erictan2001
Copy link

@erictan2001 erictan2001 commented Sep 12, 2023

已完成gui及cli界面下运行主线推进模式,不過目前该模式只能在tw及na服下运行。

功能描述:

于显示next的界面即可使用,该模式自动帮你跳过剧情,选助战(选助战界面连续刷新3次后还没找到符合目标就选第一个),战斗,关闭通关特异点后出现的界面等等。目前在两服上测试稳定,身为萌新的我使用体验良好。

变更:

  • fgoImage根目录下添加next.png,traitlist.png,skip.png。
  • fgoKernel.py下添加BattleStory及MainStory类。
  • fgoDetect.py下更动getStage及getStageTotal:增添retry_count来解决侦测不了一直retry的情况。
  • gui界面增添storymode选项,cli界面增加story指令。

未完成:

  • 除了fgoImage/{tw,na}目录下其他服还缺startbutton,startquest和closebutton,其他服的截圖需要有玩的玩家提供。

FGO-py/fgoMainWindow.ui Outdated Show resolved Hide resolved
FGO-py/fgoI18n.ja.ts Outdated Show resolved Hide resolved
FGO-py/fgoGui.py Outdated Show resolved Hide resolved
@erictan2001
Copy link
Author

进度自查

  • 逻辑部分已修正,战斗前流程更改为isChooseFriend->isBattleBegin->之后的流程完全参照Main并在其基础添加判断

  • 因剧情模式流程非固定,故流程上设定若遇到下一环节的判断对象就break(如在选择助战界面迴圈遇到战斗开始按钮就进入到战斗开始的判断迴圈)

  • 然后LF结尾方面我已确认并无问题,无论是运行git ls-files --eol查看或是自行cat -A 文件均为LF结尾,如果有其他方法验证还请告知
    eol_fgo-py

  • html,ts及ui相关文件已按照comment修改

@hgjazhgj
Copy link
Owner

image
这么显眼一个图标您是看不见吗

FGO-py/fgoCli.py Outdated
@@ -124,6 +124,12 @@ def do_battle(self,line):
arg=parser_battle.parse_args(line.split())
self.work=fgoKernel.Battle()
self.do_continue(f'-s {arg.sleep}')
def do_story(self,line):
'Run for Story Mode until AP empty or defeated'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改此描述为
Push the story forward until AP empty

FGO-py/fgoGui.py Outdated
'Windows':lambda:os.startfile('.'),
'Linux':lambda:os.system("xdg-open ."),
'Darwin':lambda:os.system("open ."),
'':lambda:os.system('open .')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么这里有个空字符串分支?
此外,你需要提供一个default

@@ -478,6 +491,7 @@
<tabstop>BTN_MAIN</tabstop>
<tabstop>BTN_BATTLE</tabstop>
<tabstop>BTN_CLASSIC</tabstop>
<tabstop>BTN_STORY</tabstop>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

将布局改为1*1+1*3+1*2+1*2,如下

+-------------------------------+
|              肝!              +
+-------------------------------+
| 完成战斗 | 陈年老肝 | 剧情推进 +
+-------------------------------+
|    挂起战斗    |    终止战斗   |
+-------------------------------+
|    预约终止    |    检查截图   |
+-------------------------------+

或是1*1+1*3+1*4亦可

@@ -638,6 +658,7 @@
<slot>revoke169()</slot>
<slot>runBattle()</slot>
<slot>runClassic()</slot>
<slot>runStory()</slot>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

按字典序排列

if Detect(.3,.3).isMainInterface():
s=time.time()
while not Detect(.3,.3).isBattleBegin():
if p:=Detect.cache.findStoryNext():
Copy link
Owner

@hgjazhgj hgjazhgj Oct 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DFA要有基本的基于流程控制的状态转移
需要尽可能避免每次循环见啥点啥一把梭

复读

@erictan2001
Copy link
Author

image 这么显眼一个图标您是看不见吗

抱歉对github跟lf不熟悉结果一直都不知道那个图标是提醒lf错误的意思, 已更, 还望大佬见谅

FGO-py/fgoGui.py Outdated Show resolved Hide resolved
@@ -556,73 +575,73 @@
<signal>triggered()</signal>
<receiver>fgoMainWindow</receiver>
<slot>expBall()</slot>
</connection>
</connection>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

撤回这些更改

FGO-py/fgoMainWindow.ui Outdated Show resolved Hide resolved
@@ -166,34 +166,47 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="LAYOUT_FUNC">
<layout class="QHBoxLayout" name="LAYOUT_BATTLE">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此layout名保持LAYOUT_FUNC
而原本的LAYOUT_FUNC改名为LAYOUT_CONTROL
LAYOUT_FUNC_MAIN改名为LAYOUT_CONTROL_LEFT
LAYOUT_FUNC_CONTROL改名为LAYOUT_CONTROL_RIGHT

</item>
<item>
<widget class="QPushButton" name="BTN_STORY">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正taborder

</widget>
</item>
</layout>
<widget class="QPushButton" name="BTN_CLASSIC">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正为我描述的顺序

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants