Commit Graph

107 Commits

Author SHA1 Message Date
LmeSzinc
164db6f4da Chore: Rename "threshold" in template matching to "similarity"
to be differ from the "threshold" in color matching
2024-12-09 15:37:25 +08:00
LmeSzinc
7c38091201 Add: Map config MAP_SIREN_HAS_BOSS_ICON 2024-08-16 19:19:06 +08:00
LmeSzinc
58202c6a40 Pref: Reuse image array to improve memory performance 2024-06-05 01:15:41 +08:00
LmeSzinc
5be152baf1 Fix: relative_hsv_count was counting pixels in 3 channels
causing lots of predict_current_fleet() mis-detection
2024-05-02 16:47:11 +08:00
LmeSzinc
58922cccb8 Opt: Improve memory performance in map detection 2024-04-30 17:42:56 +08:00
guoh064
27693a6762
Add: 15图开荒/周回 (#3563)
* Add: W15 maps extracted

* Add: template for Special Carrier in W15

* Add: method mob_move

* Fix: MapDetectionError in strategy mob move

* Fix: adjacent grid judge condition

* Fix: should focus on location before moving

* Fix: should update view before further operation

* Fix: wait for STRATEGY_OPENED after executing mob move

* Fix: offset for assets in _mob_move()

* Opt: judge if movable before moving camera

* Add: W15 mechanism

* Opt: Rename Special Carrier asset name

* Fix: offset for MOB_MOVE_1/MOB_MOVE_2

* Fix: separate MOB_MOVE_1 and MOB_MOVE_2

* Fix: should use appear_then_click in strategy_mob_move_enter

* Fix: function import in campaign_15_base.py

* Fix: missing assets import

* Fix: missing offset in strategy_mob_move_cancel()

* Fix: should move only once in a campaign

* Temp: modify special carrier filter string to 3E

* Fix: missing self. before 'moved' variable

* Revert "Fix: missing self. before 'moved' variable"

This reverts commit 00f70e0ab55e422898cb90c5d5e54d4e7c989511.

* Revert "Fix: should move only once in a campaign"

This reverts commit b588f5bb07dfc4511f39fa0797fbe160f356d604.

* Fix: force goto special carrier

* Fix: missing return True in battle function

* Fix: enlarge offset of MOB_MOVE_ICON

* Fix: typo in campaing_15_3

* Fix: update view after moving mob

* Fix: should use full_scan_movable since mob moved

* Fix: missing map_data_init() in campaign_15_4.py

* Fix: battle 4 should be done by mob fleet

* Revert "Fix: battle 4 should be done by mob fleet"

This reverts commit 0e2af1ec817b7bc89fe123f03a33ea9ad955973f.

* Fix: should switch to fleet_1 after battle_3

* Add: battle function when using clear mode

* Fix: missing import

* Fix: colliding Config class

* Fix: Config.when should contain all cases

* Opt: pick ammo after third battle in clear mode of 15-4

* Del: old assets CarrierSpecial

* Fix: remake of CarrierSpecial template

* Add: UI mask for W15

* Fix: missing ASSETS import

* Fix: change full_scan_movable() to predict()

* Fix: predict should be done after each move

* Opt: camera_data in W15

* Del: remove predict

* Add: map info process after mob move

* Add: support for multi bosses in _expected_end() for W15

* Opt: show map after moving

* Del: remove redundant import in fleet.py

* Opt: using clear_chosen_enemy() instead of goto() directly

* Fix: should first take screenshot before strategy enter/confirm/cancel

* Add: asset TEMPLATE_SIREN_BOSS

* Opt: Handle first stages of BOSS as Siren in 15-3/15-4

* Fix: missing override map_data

* Add: ignore is_boss prediction for siren boss in 15-3/15-4

* Fix: should not use decorator Config with battle_x functions

* Opt: camera data in 15-4

* Opt: directly overwrite map info into original map_data

* Fix: missing indent block in campaign_15_4.py

* Fix: expect 15-3/15-4 first bosses as siren

* Revert "Add: ignore is_boss prediction for siren boss in 15-3/15-4"

This reverts commit 1104631f92e5df0672dce8c7acaa1eb122731746.

* Revert "Add: asset TEMPLATE_SIREN_BOSS"

This reverts commit a29d6b6b9bfb9d79963adb404ce2091cbfafb810.

* Revert "Add: support for multi bosses in _expected_end() for W15"

This reverts commit 8d357abe5b.

* Del: redundent map config

* Fix: recover boss grids

* Del: redundant clear_siren()

* Del: redundant clear_siren() in battle_6

* Add: template for mob move icon

* Opt: enlarge reinforcement fleet mask area for W15

* Opt: method _mob_move

* Upd: TEMPLATE_MOB_MOVE_ICON

* Fix: should have cool time between clicks of grid

* Revert "Upd: TEMPLATE_MOB_MOVE_ICON"

This reverts commit b3f2dcbc88dbe166470905f33d041b91c2192f57.

* Upd: TEMPLATE_MOB_MOVE_ICON

* Upd: TEMPLATE_MOB_MOVE_ICON

* Upd: predict_mob_move_icon

* Fix: 15-2 camera spawn point

* Fix: should update view using self.device.image

* Revert "Upd: TEMPLATE_MOB_MOVE_ICON"

This reverts commit 92a12596a8f271ec64e249ecb58779d9b64ecea6.

* Del: redundant assets MOB_MOVE_ICON.png

* Fix: using map_is_clear_mode to get real value of clear mode

* Opt: check mob_movable before moving

* Opt: Refactor _mob_move

* Fix: camera_sight in W15

* Opt: move sight to further point in _mob_move
2024-04-19 01:29:17 +08:00
LmeSzinc
ad5dd520e1 Fix: Use the same edge_th in detect_edges() and generate() 2023-02-21 21:43:35 +08:00
LmeSzinc
b8d022ab53 Fix: Collect exploration rewards that are ignored by auto search 2022-10-02 17:10:38 +08:00
LmeSzinc
515beddde5 Fix: Fleet Mechanism detection
- Fix: Special whether on opsi map are detected as fleet mechanism
2022-06-03 00:27:49 +08:00
LmeSzinc
16f699754c Fix: Missing usage of MAP_ENEMY_GENRE_SIMILARITY 2022-05-28 00:31:31 +08:00
LmeSzinc
00587a3423 Fix: False fleet mechanism detection on island and belt 2022-05-17 23:36:48 +08:00
LmeSzinc
32f939f2bb Fix: Siren scanning tower and logging device are not detected if they are covered by other fleets 2022-05-16 19:54:51 +08:00
LmeSzinc
9f2df3c2c5 Add: Do random map events in OpSi
- Opt: Select the second story option from the bottom in OpSi
- Fix: ui_mask_homo_stroke in OpSi
- Dev: Fix relative_crop.py
2022-05-15 00:03:33 +08:00
LmeSzinc
08aa64580d Add: Rondo at Rainbow's End chapter AC
- Fix: swipe route out of target box
- Fix: Re-add handle_combat_weapon_release()
2022-04-28 23:22:05 +08:00
Egor Nats
6eac8ae259 Opt: Imports isorted 2022-04-14 16:37:54 -03:00
SaarChaffee
303dd90fdc change CRLF to LF 2022-04-09 23:31:09 +08:00
LmeSzinc
bcda0016eb Fix: Update enemy data to fortress in movable scanning 2022-02-26 18:06:44 +08:00
LmeSzinc
593912cbcc Opt: Increase HOMO_EDGE_HOUGHLINES_THRESHOLD to 140
140 is the length of one tile
Also show Lines objects in trace back
2022-02-25 18:51:06 +08:00
LmeSzinc
49c9e0afd9 Add: Abyssal Refrain chapter AC
- Add: clear_bouncing_enemy()
- Opt: Retry faster if fleet was caught by a moving enemy
2022-02-24 21:34:16 +08:00
LmeSzinc
7508597492 Opt: Edge detection in Northern Overture Rerun
- Opt: Use bottom edges first, upper edges have higher errors rates
2022-02-11 00:34:06 +08:00
LmeSzinc
e92579b5f9 Opt: Remove redundant converts from pillow to numpy 2022-01-24 23:43:53 +08:00
LmeSzinc
65f166ad12 Refactor: Use numpy image cache instead of pillow image 2022-01-23 23:03:55 +08:00
LmeSzinc
27bc8b3843 Add: Detecting and moving submarines 2022-01-10 00:46:37 +08:00
LmeSzinc
c5a04c55dc Add: Submarine move in map (#864) 2022-01-09 19:26:49 +08:00
LmeSzinc
cd0204f455 Opt: Better tips when having wrong configs 2021-12-31 01:34:01 +08:00
LmeSzinc
29d4e69fde Add: Tower of Transcendence Chapter AC 2021-12-30 00:01:44 +08:00
LmeSzinc
a1817778f5 Fix: Retry question_goto in abyssal
- Fix: Handle index error in search_tile_rectangle
2021-12-13 18:33:36 +08:00
LmeSzinc
265346783c Fix: Leave button in OpSi abyssal 2021-12-10 20:24:19 +08:00
LmeSzinc
caf51858e9 Add: Attack abyssal boss 2021-12-06 20:56:57 +08:00
LmeSzinc
927be88d08 Add: Fleet switching in OpSi
- Remove grid predictions except predict_current_fleet(), because they are never used.
2021-12-05 20:19:42 +08:00
LmeSzinc
2e4f6cba6b Fix: Remove the edge of mask image, because perspective transform may produce aliasing 2021-11-30 00:07:37 +08:00
LmeSzinc
7a0c566a9e Fix: Map swipe optimize should use local map view to generate blacklist
- Opt: Take less screenshots during swipe, reuse local view object as possible
- Refactor: handle_boss_appear_refocus()
- Fix: Update swipe box area in map, avoid clicking auto search
2021-11-22 18:09:38 +08:00
LmeSzinc
501467ed4c Opt: Reduce swipes become clicks when game is randomly stuck (#743)
Optimise the swipe path so that it ends on land
2021-11-17 22:28:19 +08:00
LmeSzinc
a723740528 Add: The Flame-Touched Dagger (event_20211111_cn)
- Fix: Force to use fleet2 when MAP_CLEAR_ALL_THIS_TIME is True
2021-11-11 18:25:34 +08:00
LmeSzinc
08c033a6e1 Fix: Sleep < 0 if it's hoarding tasks but not closing game
- Minor typo in GridInfo.merge()
2021-11-06 22:25:14 +08:00
LmeSzinc
3a489339a4 Fix: Some detection changes for W14
- Expose MAP_SWIPE_PREDICT_WITH_CURRENT_FLEET and MAP_SWIPE_PREDICT_WITH_SEA_GRIDS, due to errors in sea grids predictions
- Expose MAP_WALK_OPTIMIZE, disabled in W14, because of large map size
- Not allow enemy_scale overwrites, but allow 3 overwrites 2. 3 triangle enemies may be detected as 2 if being covered
- Reduce TEMPLATE_ENEMY_L similarity, the same reason as above
2021-10-22 17:40:47 +08:00
LmeSzinc
fa8d29059b Opt: W14 mechanism
- Split map_init()
- Add MAP_WALK_USE_CURRENT_FLEET
2021-10-22 01:08:38 +08:00
LmeSzinc
5ed75c8de5 Merge branch 'master' into app
# Conflicts:
#	module/config/config.py
#	module/map/fleet.py
#	module/ui/ui.py
2021-09-17 23:53:15 +08:00
LmeSzinc
b6f5dca0c4 Opt: Allow to set multiple template scaling ratios 2021-09-17 18:28:59 +08:00
LmeSzinc
017df17029 Fix: Path finding when grids blocked by fortress 2021-09-17 18:23:25 +08:00
LmeSzinc
54ba53a4d3 Fix: Handle machine fortress 2021-09-16 21:56:27 +08:00
LmeSzinc
b97f3a8a39 Add: MAP_HAS_MYSTERY and its extraction 2021-09-16 18:11:39 +08:00
LmeSzinc
61cbe75527 Refactor: More accurate exceptions and add friendly advices 2021-09-16 12:09:00 +08:00
LmeSzinc
aa03f7c1a3 Fix: Handle a rare game bug, OpSi camera not focusing on current fleet
- Opt: Add config HOMO_CANNY_THRESHOLD
2021-09-05 17:50:10 +08:00
LmeSzinc
22e8b73570 Merge branch 'master' into dev 2021-07-25 21:24:30 +08:00
LmeSzinc
8f80ee34bd Opt: Low cost farming in Azur Anthem 2021-07-25 21:24:01 +08:00
LmeSzinc
be1c6420d6 Opt: Separate module/map_detection/utils.py 2021-06-30 14:53:49 +08:00
LmeSzinc
f94f3ce955 Opt: Points and Lines class no longer require config 2021-06-30 14:11:04 +08:00
LmeSzinc
909c84c2cb Fix: Delete edge lines out of detection area in homography detection 2021-06-25 21:28:34 +08:00
LmeSzinc
0af4507384 Merge branch 'master' into dev 2021-04-24 15:54:44 +08:00