Skip to content

Commit

Permalink
#添加对常规图9-3的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
veadex committed Jan 27, 2024
1 parent d09334a commit 04665d1
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 9 deletions.
2 changes: 1 addition & 1 deletion autowsgr/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.2.8"
__version__ = "0.2.2.9"
2 changes: 1 addition & 1 deletion autowsgr/constants/other_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,5 @@

# 维修船坞, 建造位, 开发位

CHAPTER_NODE_COUNT = [0, 5, 6, 4, 4, 5, 4, 5, 5, 2]
CHAPTER_NODE_COUNT = [0, 5, 6, 4, 4, 5, 4, 5, 5, 3]
# 常规图节点数
2 changes: 1 addition & 1 deletion autowsgr/data/default_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ emulator:
config_file: ""
emulator_name: emulator-5554 # 雷电模拟器使用多开器请填写该项, 不多开默认为 "emulator-5554"

game_app: "官服" #官服 小米(暂不支持) 应用宝
game_app: "官服" #官服 小米 应用宝

LOG_PATH: "log"
DELAY: 1.5
Expand Down
Binary file added autowsgr/data/images/normal_map_image/9-3.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions autowsgr/data/map/normal/9-3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
A: !!python/tuple
- 494
- 76
B: !!python/tuple
- 427
- 285
C: !!python/tuple
- 562
- 179
D: !!python/tuple
- 659
- 81
E: !!python/tuple
- 869
- 81
F: !!python/tuple
- 833
- 150
G: !!python/tuple
- 740
- 216
H: !!python/tuple
- 263
- 368
I: !!python/tuple
- 594
- 344
J: !!python/tuple
- 914
- 313
K: !!python/tuple
- 712
- 374
L: !!python/tuple
- 847
- 442
M: !!python/tuple
- 645
- 509
N: !!python/tuple
- 531
- 480
O: !!python/tuple
- 305
- 457
15 changes: 15 additions & 0 deletions autowsgr/data/plans/normal_fight/9-3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 功能:9-3航空点测试用,要求最低航速低于27

# MapLevel
chapter: 9
map: 3
selected_nodes: [A]

# NodeLevel
node_args:
A:
detour: False
formation: 4
proceed: False
long_missile_support: False

4 changes: 3 additions & 1 deletion autowsgr/fight/decisive_battle.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def __init__(
level2=["U-81", "大青花鱼"],
flagship_priority=["U-1405", "U-47", "U-96", "U-1206"],
logic=None,
repair_level = 1,
*args,
**kwargs,
):
Expand All @@ -233,6 +234,7 @@ def __init__(
"""
self.timer = timer
self.config = timer.config
self.repair_strategy = repair_level
assert chapter <= 6 and chapter >= 1
self.stats = DecisiveStats(timer, chapter, map, node, version)
if logic is None:
Expand Down Expand Up @@ -289,7 +291,7 @@ def go_fleet_page(self):

def repair(self):
self.go_fleet_page()
quick_repair(self.timer, 1) # TODO:我的中破比很高,先改成只修大破控制一下用桶
quick_repair(self.timer, self.repair_strategy) # TODO:我的中破比很高,先改成只修大破控制一下用桶
# quick_repair(self.timer, 2)

def next(self):
Expand Down
2 changes: 1 addition & 1 deletion autowsgr/fight/normal_fight.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
常规战决策模块/地图战斗用模板
"""

MAP_NUM = [5, 6, 4, 4, 5, 4, 5, 5, 2] # 每一章的地图数量
MAP_NUM = [5, 6, 4, 4, 5, 4, 5, 5, 3] # 每一章的地图数量


class NormalFightInfo(FightInfo):
Expand Down
1 change: 1 addition & 0 deletions examples/auto_daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

from autowsgr.scripts.daily_api import DailyOperation

#日常,可以实现日常出击,战役,演习等操作
operation = DailyOperation(f"{os.path.dirname(os.path.abspath(__file__))}/user_settings.yaml")
operation.run()
1 change: 1 addition & 0 deletions examples/battle.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import autowsgr.fight.battle as bf
from autowsgr.scripts.main import start_script

#实现战役的出击
timer = start_script()
baf = bf.BattlePlan(timer, "battle/困难驱逐.yaml")
baf.run()
7 changes: 5 additions & 2 deletions examples/decisive_battle.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os
from autowsgr.fight import DecisiveBattle
from autowsgr.scripts.main import start_script

timer = start_script()
#实现决战的自动化
timer = start_script(f"{os.path.dirname(os.path.abspath(__file__))}/user_settings.yaml")
decisive_battle = DecisiveBattle(
timer,
6,
Expand All @@ -10,5 +12,6 @@
level1=["肥鱼", "U-1206", "U-47", "射水鱼", "U-96", "U-1405"],
level2=["U-81", "大青花鱼"],
flagship_priority=["U-1405", "U-47"],
repair_level=1 , #维修策略,1为中破修,2为大破修
)
decisive_battle.start_fight()
decisive_battle.run_for_times(20) # 数字为决战出击的次数
1 change: 1 addition & 0 deletions examples/event.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from autowsgr.fight.event.event_2023_1215 import EventFightPlan20231215
from autowsgr.scripts.main import start_script

#活动自动化
timer = start_script()
plan = EventFightPlan20231215(timer, "event/20231215/E10AG.yaml", fleet_id=2)
plan.run_for_times(500) # 第一个参数是战斗次数,还有个可选参数为检查远征时间,默认为1800S
2 changes: 1 addition & 1 deletion examples/user_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ emulator:
config_file: ""
emulator_name: emulator-5554 # 雷电模拟器使用多开器请填写该项, 不多开默认为 "emulator-5554"

game_app: "官服" #官服 小米(暂不支持) 应用宝
game_app: "官服" #官服 小米 应用宝

LOG_PATH: "log"
DELAY: 1.5
Expand Down
2 changes: 1 addition & 1 deletion examples/user_settings_debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ emulator:
config_file: ""
emulator_name: emulator-5554 # 雷电模拟器使用多开器请填写该项, 不多开默认为 "emulator-5554"

game_app: "官服" #官服 小米(暂不支持) 应用宝
game_app: "官服" #官服 小米 应用宝

LOG_PATH: "log"
DELAY: 1.5
Expand Down

0 comments on commit 04665d1

Please sign in to comment.