⚠️THIS PROJECT WILL NO LONGER BE MAINTAINED
Check out FGO-One for the latest version :)
In short, this project is a auto battle script for the game
Fate/Grand Order.
The script mainly consists three parts:
The interface recognition part is mainly related to
OpenCV, which is the module "cv2"(or opencv-python)
And the algorithm is mainly from this
picture
The last part obviously is the part which combine the parts
mentioned above
use the following command to check whether adb is installed
adb devices
if not, install it via Homebrew
brew cask install android-platform-tools
clone the repository
git clone git@github.com:Meowcolm024/FGO_Battle.git
connect you Android phone with USB Debugging ON, then run "main.py"
The templates are from Fate/GO(Chinese version), if you're using other versions, please change them QWQ
The coordinates in the script ares based on screenshots from
Huawei Mate 10 Pro with a resolution of 2160x1080, you may
need to change some parameters if your phone is not this resolution. QAQ
Just run "test.py" then you could get the coordinates of the cards
and compare it with the existed data to check whether a modification is needed
Recognition may not be 100% correct. Thus, the action the script has taken may not be the best choice(especially in complicated scenarios)