mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-23 00:52:22 +00:00
Add: 增加中路站桩时放空袭和鱼雷
This commit is contained in:
parent
8ec5099b58
commit
4503793e47
BIN
assets/combat/READY_AIR_RAID.png
Normal file
BIN
assets/combat/READY_AIR_RAID.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
BIN
assets/combat/READY_TORPEDO.png
Normal file
BIN
assets/combat/READY_TORPEDO.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
@ -26,6 +26,8 @@ LOADING_BAR = Button(area=(33, 676, 1247, 680), color=(172, 205, 232), button=(3
|
||||
MOVE_DOWN = Button(area=(148, 647, 155, 669), color=(21, 28, 57), button=(148, 647, 155, 669), file='./assets/combat/MOVE_DOWN.png')
|
||||
PAUSE = Button(area=(1236, 37, 1244, 59), color=(247, 243, 247), button=(1162, 34, 1246, 61), file='./assets/combat/PAUSE.png')
|
||||
PAUSE_DOUBLE_CHECK = Button(area=(1231, 35, 1236, 60), color=(96, 104, 136), button=(1231, 35, 1236, 60), file='./assets/combat/PAUSE_DOUBLE_CHECK.png')
|
||||
READY_AIR_RAID = Button(area=(887, 618, 907, 628), color=(255, 255, 255), button=(887, 618, 907, 628), file='./assets/combat/READY_AIR_RAID.png')
|
||||
READY_TORPEDO = Button(area=(1038, 611, 1046, 619), color=(255, 255, 255), button=(1038, 611, 1046, 619), file='./assets/combat/READY_TORPEDO.png')
|
||||
SUBMARINE_AVAILABLE_CHECK_1 = Button(area=(707, 660, 712, 665), color=(255, 255, 255), button=(707, 660, 712, 665), file='./assets/combat/SUBMARINE_AVAILABLE_CHECK_1.png')
|
||||
SUBMARINE_AVAILABLE_CHECK_2 = Button(area=(790, 631, 795, 641), color=(255, 255, 255), button=(790, 631, 795, 641), file='./assets/combat/SUBMARINE_AVAILABLE_CHECK_2.png')
|
||||
SUBMARINE_CALLED = Button(area=(737, 608, 750, 626), color=(132, 134, 132), button=(737, 608, 750, 626), file='./assets/combat/SUBMARINE_CALLED.png')
|
||||
|
@ -171,10 +171,10 @@ class Combat(HPBalancer, EnemySearchingHandler, Retirement, SubmarineCall, Comba
|
||||
|
||||
return False
|
||||
|
||||
def combat_execute(self, func=None, call_submarine_at_boss=False, save_get_items=False):
|
||||
def combat_execute(self, auto=True, call_submarine_at_boss=False, save_get_items=False):
|
||||
"""
|
||||
Args:
|
||||
func: Funtion to run when in combat.
|
||||
auto (bool):
|
||||
call_submarine_at_boss (bool):
|
||||
save_get_items (bool)
|
||||
"""
|
||||
@ -198,6 +198,9 @@ class Combat(HPBalancer, EnemySearchingHandler, Retirement, SubmarineCall, Comba
|
||||
continue
|
||||
if self.handle_combat_manual():
|
||||
continue
|
||||
if not auto and self.is_combat_executing():
|
||||
if self.handle_combat_weapon_release():
|
||||
continue
|
||||
if call_submarine_at_boss:
|
||||
pass
|
||||
else:
|
||||
@ -343,7 +346,7 @@ class Combat(HPBalancer, EnemySearchingHandler, Retirement, SubmarineCall, Comba
|
||||
self.combat_preparation(
|
||||
balance_hp=balance_hp, emotion_reduce=emotion_reduce, auto=auto, fleet_index=fleet_index)
|
||||
self.combat_execute(
|
||||
func=func, call_submarine_at_boss=call_submarine_at_boss, save_get_items=save_get_items)
|
||||
auto=auto, call_submarine_at_boss=call_submarine_at_boss, save_get_items=save_get_items)
|
||||
self.combat_status(
|
||||
save_get_items=save_get_items, expected_end=expected_end)
|
||||
self.handle_map_after_combat_story()
|
||||
|
@ -1,5 +1,5 @@
|
||||
from module.base.base import ModuleBase
|
||||
from module.combat.assets import MOVE_DOWN
|
||||
from module.combat.assets import *
|
||||
|
||||
|
||||
class CombatManual(ModuleBase):
|
||||
@ -16,6 +16,14 @@ class CombatManual(ModuleBase):
|
||||
self.device.long_click(MOVE_DOWN, duration=0.8)
|
||||
return True
|
||||
|
||||
def handle_combat_weapon_release(self):
|
||||
if self.appear_then_click(READY_AIR_RAID, interval=5):
|
||||
return True
|
||||
if self.appear_then_click(READY_TORPEDO, interval=5):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def handle_combat_manual(self):
|
||||
if self.manual_executed or not self.auto_mode_checked:
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user