Skip to content

Commit

Permalink
Add logic for the additional Arcarum adjustment to backend
Browse files Browse the repository at this point in the history
  • Loading branch information
steve1316 committed Feb 1, 2022
1 parent 5df877b commit 7815b96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src-tauri/backend/bot/combat_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ def start_combat_mode(script_commands: List[str] = None, is_nightmare: bool = Fa

# If current Farming Mode is Arcarum, attempt to dismiss potential stage effect popup like "Can't use Charge Attacks".
if Settings.farming_mode == "Arcarum":
Game.find_and_click_button("arcarum_stage_effect_active", tries = 10)
Game.find_and_click_button("arcarum_stage_effect_active", tries = 10, bypass_general_adjustment = True)

# Save the positions of the "Attack" and "Back" button.
CombatMode._attack_button_location = ImageUtils.find_button("attack", tries = 50, bypass_general_adjustment = True)
Expand Down
3 changes: 3 additions & 0 deletions src-tauri/backend/utils/image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def _determine_adjustment(image_name: str) -> int:
skill_usage_list = ["use_skill", "skill_unusable"]
summon_usage_list = ["summon_details", "quick_summon1", "quick_summon2"]
arcarum_list = ["arcarum_party_selection", "arcarum_treasure", "arcarum_node", "arcarum_mob", "arcarum_red_mob", "arcarum_silver_chest", "arcarum_gold_chest", "arcarum_boss", "arcarum_boss2"]
arcarum_stage_effect_list = ["arcarum_stage_effect_active"]

if Settings.enable_calibration_adjustment and calibration_list.__contains__(image_name):
return Settings.adjust_calibration
Expand All @@ -241,6 +242,8 @@ def _determine_adjustment(image_name: str) -> int:
return Settings.adjust_summon_usage
elif Settings.enable_arcarum_adjustment and arcarum_list.__contains__(image_name):
return Settings.adjust_arcarum
elif Settings.enable_arcarum_adjustment and arcarum_stage_effect_list.__contains__(image_name):
return Settings.arcarum
else:
return 0

Expand Down
3 changes: 2 additions & 1 deletion src-tauri/backend/utils/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ class Settings:
adjust_waiting_for_reload: int = _data["adjustment"]["adjustWaitingForReload"]
adjust_waiting_for_attack: int = _data["adjustment"]["adjustWaitingForAttack"]
enable_arcarum_adjustment: bool = _data["adjustment"]["enableArcarumAdjustment"]
adjust_arcarum: int = _data["adjustment"]["adjustArcarum"]
adjust_arcarum_action: int = _data["adjustment"]["adjustArcarumAction"]
adjust_arcarum_stage_effect: int = _data["adjustment"]["adjustArcarumStageEffect"]
# #### end of adjustment ####
# ################## end of settings.json ###################
#############################################################
Expand Down

0 comments on commit 7815b96

Please sign in to comment.