mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-09 05:47:30 +08:00
Add: Collecting EXP reward
- Opt: Increase reward interval to 60-120 - Fix: Default medal shop filter in buying BPs
This commit is contained in:
parent
b0f6798596
commit
8780477758
@ -675,13 +675,14 @@
|
||||
"Enable": false,
|
||||
"NextRun": "2020-01-01 00:00:00",
|
||||
"Command": "Reward",
|
||||
"SuccessInterval": 30,
|
||||
"FailureInterval": 30,
|
||||
"SuccessInterval": "60-120",
|
||||
"FailureInterval": "60-120",
|
||||
"ServerUpdate": "00:00"
|
||||
},
|
||||
"Reward": {
|
||||
"CollectOil": true,
|
||||
"CollectCoin": true,
|
||||
"CollectExp": true,
|
||||
"CollectMission": true
|
||||
}
|
||||
},
|
||||
|
@ -2957,11 +2957,11 @@
|
||||
},
|
||||
"SuccessInterval": {
|
||||
"type": "disable",
|
||||
"value": 30
|
||||
"value": "60-120"
|
||||
},
|
||||
"FailureInterval": {
|
||||
"type": "disable",
|
||||
"value": 30
|
||||
"value": "60-120"
|
||||
},
|
||||
"ServerUpdate": {
|
||||
"type": "disable",
|
||||
@ -2977,6 +2977,10 @@
|
||||
"type": "checkbox",
|
||||
"value": true
|
||||
},
|
||||
"CollectExp": {
|
||||
"type": "checkbox",
|
||||
"value": true
|
||||
},
|
||||
"CollectMission": {
|
||||
"type": "checkbox",
|
||||
"value": true
|
||||
@ -3160,7 +3164,7 @@
|
||||
"MedalShop": {
|
||||
"Filter": {
|
||||
"type": "textarea",
|
||||
"value": "DR > PRY\n> BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2 > BookYellowT2 > BookBlueT2\n> RetrofitT3 > PlateGeneralT3\n> FoodT6 > FoodT5"
|
||||
"value": "DRBP > PRYBP\n> BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2 > BookYellowT2 > BookBlueT2\n> RetrofitT3 > PlateGeneralT3\n> FoodT6 > FoodT5"
|
||||
}
|
||||
},
|
||||
"MeritShop": {
|
||||
|
@ -234,6 +234,7 @@ GuildOperation:
|
||||
Reward:
|
||||
CollectOil: true
|
||||
CollectCoin: true
|
||||
CollectExp: true
|
||||
CollectMission: true
|
||||
GeneralShop:
|
||||
UseGems: false
|
||||
@ -284,7 +285,7 @@ GuildShop:
|
||||
option: [champagne, anchorage, august, marcopolo]
|
||||
MedalShop:
|
||||
Filter: |-
|
||||
DR > PRY
|
||||
DRBP > PRYBP
|
||||
> BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2 > BookYellowT2 > BookBlueT2
|
||||
> RetrofitT3 > PlateGeneralT3
|
||||
> FoodT6 > FoodT5
|
||||
|
@ -130,8 +130,8 @@ Guild:
|
||||
ServerUpdate: 00:00, 12:00, 18:00, 21:00
|
||||
Reward:
|
||||
Scheduler:
|
||||
SuccessInterval: 30
|
||||
FailureInterval: 30
|
||||
SuccessInterval: 60-120
|
||||
FailureInterval: 60-120
|
||||
ServerUpdate: 00:00
|
||||
Shop:
|
||||
Scheduler:
|
||||
|
@ -174,6 +174,7 @@ class GeneratedConfig:
|
||||
# Group `Reward`
|
||||
Reward_CollectOil = True
|
||||
Reward_CollectCoin = True
|
||||
Reward_CollectExp = True
|
||||
Reward_CollectMission = True
|
||||
|
||||
# Group `GeneralShop`
|
||||
@ -198,7 +199,7 @@ class GeneratedConfig:
|
||||
GuildShop_PR3 = 'champagne' # champagne, anchorage, august, marcopolo
|
||||
|
||||
# Group `MedalShop`
|
||||
MedalShop_Filter = 'DR > PRY\n> BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2 > BookYellowT2 > BookBlueT2\n> RetrofitT3 > PlateGeneralT3\n> FoodT6 > FoodT5'
|
||||
MedalShop_Filter = 'DRBP > PRYBP\n> BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2 > BookYellowT2 > BookBlueT2\n> RetrofitT3 > PlateGeneralT3\n> FoodT6 > FoodT5'
|
||||
|
||||
# Group `MeritShop`
|
||||
MeritShop_Refresh = False
|
||||
|
@ -93,8 +93,9 @@ class ConfigGenerator:
|
||||
logger.warning(f'`{".".join(path)}` is not a existing argument')
|
||||
continue
|
||||
# Check type
|
||||
# But allow `Interval` to be different
|
||||
old_value = old.get('value', None) if isinstance(old, dict) else old
|
||||
if type(value) != type(old_value):
|
||||
if type(value) != type(old_value) and path[2] not in ['SuccessInterval', 'FailureInterval']:
|
||||
logger.warning(
|
||||
f'`{value}` ({type(value)}) and `{".".join(path)}` ({type(old_value)}) are in different types')
|
||||
continue
|
||||
|
@ -867,6 +867,10 @@
|
||||
"name": "Reward.CollectCoin.name",
|
||||
"help": "Reward.CollectCoin.help"
|
||||
},
|
||||
"CollectExp": {
|
||||
"name": "Reward.CollectExp.name",
|
||||
"help": "Reward.CollectExp.help"
|
||||
},
|
||||
"CollectMission": {
|
||||
"name": "Reward.CollectMission.name",
|
||||
"help": "Reward.CollectMission.help"
|
||||
|
@ -867,6 +867,10 @@
|
||||
"name": "Reward.CollectCoin.name",
|
||||
"help": "Reward.CollectCoin.help"
|
||||
},
|
||||
"CollectExp": {
|
||||
"name": "Reward.CollectExp.name",
|
||||
"help": "Reward.CollectExp.help"
|
||||
},
|
||||
"CollectMission": {
|
||||
"name": "Reward.CollectMission.name",
|
||||
"help": "Reward.CollectMission.help"
|
||||
|
@ -867,6 +867,10 @@
|
||||
"name": "Reward.CollectCoin.name",
|
||||
"help": "Reward.CollectCoin.help"
|
||||
},
|
||||
"CollectExp": {
|
||||
"name": "Reward.CollectExp.name",
|
||||
"help": "Reward.CollectExp.help"
|
||||
},
|
||||
"CollectMission": {
|
||||
"name": "Reward.CollectMission.name",
|
||||
"help": "Reward.CollectMission.help"
|
||||
|
@ -10,11 +10,12 @@ from module.ui.ui import UI
|
||||
|
||||
|
||||
class Reward(UI):
|
||||
def reward_receive(self, oil, coin, skip_first_screenshot=True):
|
||||
def reward_receive(self, oil, coin, exp, skip_first_screenshot=True):
|
||||
"""
|
||||
Args:
|
||||
oil (bool):
|
||||
coin (bool):
|
||||
exp (bool):
|
||||
skip_first_screenshot (bool):
|
||||
|
||||
Returns:
|
||||
@ -24,7 +25,7 @@ class Reward(UI):
|
||||
in: page_reward
|
||||
out: page_reward, with info_bar if received
|
||||
"""
|
||||
if not oil and not coin:
|
||||
if not oil and not coin and not exp:
|
||||
return False
|
||||
|
||||
logger.hr('Reward receive')
|
||||
@ -42,6 +43,9 @@ class Reward(UI):
|
||||
if coin and self.appear_then_click(COIN, interval=60):
|
||||
confirm_timer.reset()
|
||||
continue
|
||||
if exp and self.appear_then_click(EXP, interval=60):
|
||||
confirm_timer.reset()
|
||||
continue
|
||||
|
||||
# End
|
||||
if confirm_timer.reached():
|
||||
@ -244,7 +248,10 @@ class Reward(UI):
|
||||
out: page_main or page_mission, may have info_bar
|
||||
"""
|
||||
self.ui_ensure(page_reward)
|
||||
self.reward_receive(oil=self.config.Reward_CollectOil, coin=self.config.Reward_CollectCoin)
|
||||
self.reward_receive(
|
||||
oil=self.config.Reward_CollectOil,
|
||||
coin=self.config.Reward_CollectCoin,
|
||||
exp=self.config.Reward_CollectExp)
|
||||
self.ui_goto(page_main)
|
||||
self.reward_mission()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user