From 13aba919a2c9f4708afb4f45e33c900f57a4d9e8 Mon Sep 17 00:00:00 2001 From: guoh064 <50830808+guoh064@users.noreply.github.com> Date: Thu, 19 Feb 2026 23:29:58 +0800 Subject: [PATCH] Add: hide_in_upper_left option for combat manual --- assets/cn/combat/my_MOVE_LEFT_UP.png | Bin 0 -> 7048 bytes module/combat/combat_manual.py | 43 ++++++++++ module/combat/my_assets.py | 7 ++ module/config/argument/args.json | 117 ++++++++++++++++++--------- module/config/argument/argument.yaml | 4 +- module/config/config_generated.py | 4 +- module/config/i18n/en-US.json | 6 +- module/config/i18n/ja-JP.json | 6 +- module/config/i18n/zh-CN.json | 6 +- module/config/i18n/zh-TW.json | 6 +- 10 files changed, 148 insertions(+), 51 deletions(-) create mode 100644 assets/cn/combat/my_MOVE_LEFT_UP.png create mode 100644 module/combat/my_assets.py diff --git a/assets/cn/combat/my_MOVE_LEFT_UP.png b/assets/cn/combat/my_MOVE_LEFT_UP.png new file mode 100644 index 0000000000000000000000000000000000000000..93a4efff58688d5b40adc95a6b7e47f8dad1c4d3 GIT binary patch literal 7048 zcmeI1e^3hlUm%{eeYQ1ZqM6= zyVE8Cm1_JQj8l_3SR3=hIFdLTI|-r{p+sjwX-w6cfr4$?6eEa3D;A}F_YM#eJ1H~G zADy|I;k|d?_j$hW^L*atedl&~IWH%3s`3dXf*@0ES(X9>iG|(hwkgr@D}C;=CI+*zT=MN8cR9)2)%ZhHjq_jR?mHX#`Yt_F|DR!lI#5&s&pKNGPJ(Ck$wrAgu z_7BY-{A0uVjhSHXJGCDtto=m`a+{44t1jN|%-EeBpVS@wc6WW_-oaCMb|;&*mb{*u zbm|R%$p<})lLjyKZ){X;xm1DcUu?+rE1x+T*mULdUkbk84S+MKr@+c9UpXXZl7g}eLPrkIQFy+cmT{%hao|GYAHZrrYvYjw2@ zM7D*`$jGy0WQ-t#pboz9%DLqi(q}i9tauZfk^kH_qvB{zMgH`bf@Z8}p}Tt3Q`xEq zvGylwk{-`I|3PQxp5}Kq?>JdEt!@)K5Yx0c{b17SBTc>EuTIv?nSHmby`iQ3x%AS) z18Xa+Q7cdGEKFPA6puMNXGBlZRBF;4Z`Ee0ot>t$Jzamgxq6E$cxX`UPYv#iTJ(zX zl5_#r8X;@z08G*50o^f97<}U+7Qrn@(&|)Fh<5@l*1d_Y)4UoY!pG z{ttG}(Dar=^M96IN6s`Q=T$2&_HF*x`CiW_js36wJZWcCyZZD4%``*>|x{LDL-la#TY4|bkSogCjD z-LTFh9Dm{9B4k$g+Iy3XM#X~duQv4b_0+a@44E%?_fD3AzPIbIB?Vz=SMacei|pAn zE4Wn*CpdsA;P%22N079|0WZU@0}|>0F5Y9tdh5?&D9@R(AL{Ic-J1bQ`K%2-uwp|_ zA-iE6YvQoQi^U8^KnkPz_N5$0zR3sQc3dCYPH|*SNXLn!RJzIOeT|>Ak`#^LknCCdL$-* zd&GINL|DTDMApZ9C0_8LvL@pY$|W;~!FhBfKDXCyAC>or!xSJ7b%61zH7Y{wcB{vF zh?2DeiVO$zNDr|P-UR9bAPVI^7Fa8QN18WQf@4Shz2&~LP&yo|24%nvO+~n>X55mQ zHhbQvhm63*yS*VV2z#8R#5*6t8W)>96G~@nAkckOcbxS|?jd7nWw+B7fi0KAvsuiT zygtndEYH!Qu7flgDV78{t2Z(@rE_q&k>n`csdaJ&qmI>cTHP2an@5xw4+~@|D6Zn6 zj>7>s1HtKV(y7*HZnGG$|2wBtIO>q%D&P}gEy}7ILZuDQ z$Qwh$bRb$ru2d)xl7-pO89u;Bg0D~z%FLK7fy$nv({^~EI7VVDj0B)4LF#FOq&22O zLPKjQn$kT>7-?dRy}y&%7-sgzyp5)`QfWl$^IYLz}Kuvj^&w_&2BNJ Qk7N^@HOEr-gEgD}4N)^I@Bjb+ literal 0 HcmV?d00001 diff --git a/module/combat/combat_manual.py b/module/combat/combat_manual.py index 3857d9477..927ab15b6 100644 --- a/module/combat/combat_manual.py +++ b/module/combat/combat_manual.py @@ -69,3 +69,46 @@ class CombatManual(ModuleBase): return True return False + + +from module.combat.my_assets import * + + +class CombatManual(CombatManual): + def handle_combat_stand_still_upper_left(self, auto): + """ + Args: + auto (str): Combat auto mode. + + Returns: + bool: If executed + """ + + if auto != 'hide_in_upper_left': + return False + + self.device.long_click(my_MOVE_LEFT_UP, duration=(1.5, 3.5)) + return True + + def handle_combat_manual(self, auto): + """ + Args: + auto (str): Combat auto mode. + + Returns: + bool: If executed + """ + if self.manual_executed or not self.auto_mode_checked: + return False + + if self.handle_combat_stand_still_in_the_middle(auto): + self.manual_executed = True + return True + if self.handle_combat_stand_still_bottom_left(auto): + self.manual_executed = True + return True + if self.handle_combat_stand_still_upper_left(auto): + self.manual_executed = True + return True + + return False diff --git a/module/combat/my_assets.py b/module/combat/my_assets.py new file mode 100644 index 000000000..b0a9600cf --- /dev/null +++ b/module/combat/my_assets.py @@ -0,0 +1,7 @@ +from module.base.button import Button +from module.base.template import Template + +# This file was automatically generated by dev_tools/button_extract.py. +# Don't modify it manually. + +my_MOVE_LEFT_UP = Button(area={'cn': (101, 539, 136, 574), 'en': (101, 539, 136, 574), 'jp': (101, 539, 136, 574), 'tw': (101, 539, 136, 574)}, color={'cn': (255, 255, 255), 'en': (255, 255, 255), 'jp': (255, 255, 255), 'tw': (255, 255, 255)}, button={'cn': (101, 539, 136, 574), 'en': (101, 539, 136, 574), 'jp': (101, 539, 136, 574), 'tw': (101, 539, 136, 574)}, file={'cn': './assets/cn/combat/my_MOVE_LEFT_UP.png', 'en': './assets/cn/combat/my_MOVE_LEFT_UP.png', 'jp': './assets/cn/combat/my_MOVE_LEFT_UP.png', 'tw': './assets/cn/combat/my_MOVE_LEFT_UP.png'}) diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 1cadb9876..cd4056f9c 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -1209,7 +1209,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -1251,7 +1252,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -1586,7 +1588,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -1628,7 +1631,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -1963,7 +1967,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -2005,7 +2010,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -2340,7 +2346,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -2382,7 +2389,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -2717,7 +2725,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -2759,7 +2768,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -3094,7 +3104,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -3136,7 +3147,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -3893,7 +3905,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -3935,7 +3948,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -4673,7 +4687,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -4715,7 +4730,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -5410,7 +5426,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -5452,7 +5469,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -6147,7 +6165,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -6189,7 +6208,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -6884,7 +6904,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -6926,7 +6947,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -7621,7 +7643,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -7663,7 +7686,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -8358,7 +8382,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -8400,7 +8425,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -9170,7 +9196,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ], "display": "hide" }, @@ -10255,7 +10282,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -10297,7 +10325,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -11009,7 +11038,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -11051,7 +11081,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -11763,7 +11794,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -11805,7 +11837,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -12517,7 +12550,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -12559,7 +12593,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -13271,7 +13306,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -13313,7 +13349,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { @@ -14015,7 +14052,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet1Step": { @@ -14057,7 +14095,8 @@ "combat_auto", "combat_manual", "stand_still_in_the_middle", - "hide_in_bottom_left" + "hide_in_bottom_left", + "hide_in_upper_left" ] }, "Fleet2Step": { diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index b6f5ba974..4616fb8ff 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -175,7 +175,7 @@ Fleet: option: [ line_ahead, double_line, diamond ] Fleet1Mode: value: combat_auto - option: [ combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left ] + option: [ combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left, hide_in_upper_left ] Fleet1Step: value: 3 option: [ 2, 3, 4, 5 ] @@ -187,7 +187,7 @@ Fleet: option: [ line_ahead, double_line, diamond ] Fleet2Mode: value: combat_auto - option: [ combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left ] + option: [ combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left, hide_in_upper_left ] Fleet2Step: value: 2 option: [ 2, 3, 4, 5 ] diff --git a/module/config/config_generated.py b/module/config/config_generated.py index bbeade53a..8707f20bf 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -93,11 +93,11 @@ class GeneratedConfig: # Group `Fleet` Fleet_Fleet1 = 1 # 1, 2, 3, 4, 5, 6 Fleet_Fleet1Formation = 'double_line' # line_ahead, double_line, diamond - Fleet_Fleet1Mode = 'combat_auto' # combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left + Fleet_Fleet1Mode = 'combat_auto' # combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left, hide_in_upper_left Fleet_Fleet1Step = 3 # 2, 3, 4, 5 Fleet_Fleet2 = 2 # 0, 1, 2, 3, 4, 5, 6 Fleet_Fleet2Formation = 'double_line' # line_ahead, double_line, diamond - Fleet_Fleet2Mode = 'combat_auto' # combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left + Fleet_Fleet2Mode = 'combat_auto' # combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left, hide_in_upper_left Fleet_Fleet2Step = 2 # 2, 3, 4, 5 Fleet_FleetOrder = 'fleet1_mob_fleet2_boss' # fleet1_mob_fleet2_boss, fleet1_boss_fleet2_mob, fleet1_all_fleet2_standby, fleet1_standby_fleet2_all diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index b102d01a4..41f71cf77 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -968,7 +968,8 @@ "combat_auto": "combat_auto", "combat_manual": "combat_manual", "stand_still_in_the_middle": "stand_still_in_the_middle", - "hide_in_bottom_left": "hide_in_bottom_left" + "hide_in_bottom_left": "hide_in_bottom_left", + "hide_in_upper_left": "hide_in_upper_left" }, "Fleet1Step": { "name": "Fleet 1 Step Number", @@ -1002,7 +1003,8 @@ "combat_auto": "combat_auto", "combat_manual": "combat_manual", "stand_still_in_the_middle": "stand_still_in_the_middle", - "hide_in_bottom_left": "hide_in_bottom_left" + "hide_in_bottom_left": "hide_in_bottom_left", + "hide_in_upper_left": "hide_in_upper_left" }, "Fleet2Step": { "name": "Fleet 2 Step Number", diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index fb8bdcf53..844235fe1 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -968,7 +968,8 @@ "combat_auto": "combat_auto", "combat_manual": "combat_manual", "stand_still_in_the_middle": "stand_still_in_the_middle", - "hide_in_bottom_left": "hide_in_bottom_left" + "hide_in_bottom_left": "hide_in_bottom_left", + "hide_in_upper_left": "hide_in_upper_left" }, "Fleet1Step": { "name": "Fleet.Fleet1Step.name", @@ -1002,7 +1003,8 @@ "combat_auto": "combat_auto", "combat_manual": "combat_manual", "stand_still_in_the_middle": "stand_still_in_the_middle", - "hide_in_bottom_left": "hide_in_bottom_left" + "hide_in_bottom_left": "hide_in_bottom_left", + "hide_in_upper_left": "hide_in_upper_left" }, "Fleet2Step": { "name": "Fleet.Fleet2Step.name", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 9c09eeebe..5d0477648 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -968,7 +968,8 @@ "combat_auto": "自律战斗", "combat_manual": "手操", "stand_still_in_the_middle": "中路站桩", - "hide_in_bottom_left": "躲左下角" + "hide_in_bottom_left": "躲左下角", + "hide_in_upper_left": "躲左上角" }, "Fleet1Step": { "name": "一队步长", @@ -1002,7 +1003,8 @@ "combat_auto": "自律战斗", "combat_manual": "手操", "stand_still_in_the_middle": "中路站桩", - "hide_in_bottom_left": "躲左下角" + "hide_in_bottom_left": "躲左下角", + "hide_in_upper_left": "躲左上角" }, "Fleet2Step": { "name": "二队步长", diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index e21832c8e..916a97b8b 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -968,7 +968,8 @@ "combat_auto": "自律戰鬥", "combat_manual": "手動", "stand_still_in_the_middle": "中路站樁", - "hide_in_bottom_left": "躲左下角" + "hide_in_bottom_left": "躲左下角", + "hide_in_upper_left": "hide_in_upper_left" }, "Fleet1Step": { "name": "一隊步幅", @@ -1002,7 +1003,8 @@ "combat_auto": "自律戰鬥", "combat_manual": "手動", "stand_still_in_the_middle": "中路站樁", - "hide_in_bottom_left": "躲左下角" + "hide_in_bottom_left": "躲左下角", + "hide_in_upper_left": "hide_in_upper_left" }, "Fleet2Step": { "name": "二隊步幅",