mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 06:18:21 +08:00
Add: Handle mechanism and land_based
This commit is contained in:
@@ -34,6 +34,11 @@ class GridInfo:
|
||||
may_ammo = False # MA
|
||||
may_siren = False # MS
|
||||
may_ambush = False
|
||||
may_mechanism_trigger = False
|
||||
may_mechanism_block = False
|
||||
mechanism_trigger = None # SelectedGrids
|
||||
mechanism_block = None # SelectedGrids
|
||||
mechanism_wait = 2 # Seconds to wait the mechanism unlock animation
|
||||
|
||||
is_enemy = False # example: 0L 1M 2C 3T 3E
|
||||
is_boss = False # BO
|
||||
@@ -51,8 +56,10 @@ class GridInfo:
|
||||
|
||||
is_cleared = False
|
||||
is_caught_by_siren = False
|
||||
is_carrier = False
|
||||
is_movable = False
|
||||
is_carrier = False # Is carrier spawn in mystery
|
||||
is_movable = False # Is movable enemy
|
||||
is_mechanism_trigger = False # Mechanism has triggered
|
||||
is_mechanism_block = False # Blocked by mechanism
|
||||
cost = 9999
|
||||
cost_1 = 9999
|
||||
cost_2 = 9999
|
||||
@@ -123,6 +130,9 @@ class GridInfo:
|
||||
def __hash__(self):
|
||||
return hash(self.location)
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.location == other.location
|
||||
|
||||
@property
|
||||
def str(self):
|
||||
return self.encode()
|
||||
@@ -240,6 +250,9 @@ class GridInfo:
|
||||
self.is_caught_by_siren = False
|
||||
self.is_carrier = False
|
||||
self.is_movable = False
|
||||
if self.is_mechanism_trigger:
|
||||
self.mechanism_trigger.set(is_mechanism_trigger=False)
|
||||
self.mechanism_block.set(is_mechanism_block=False)
|
||||
|
||||
def reset(self):
|
||||
"""
|
||||
@@ -250,6 +263,8 @@ class GridInfo:
|
||||
self.is_current_fleet = False
|
||||
self.is_submarine = False
|
||||
self.is_cleared = False
|
||||
self.is_mechanism_trigger = self.may_mechanism_trigger
|
||||
self.is_mechanism_block = self.may_mechanism_block
|
||||
|
||||
def covered_grid(self):
|
||||
"""Relative coordinate of the covered grid.
|
||||
|
||||
Reference in New Issue
Block a user