Upd: Assets for anniversary 3x rogue event (#412)

This commit is contained in:
LmeSzinc 2024-04-10 23:29:25 +08:00
parent 768391852e
commit d985ca3b67
4 changed files with 23 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -53,3 +53,13 @@ OCR_DOUBLE_EVENT_REMAIN_AT_COMBAT = ButtonWrapper(
button=(799, 460, 1268, 626),
),
)
OCR_DOUBLE_ROGUE_REMAIN = ButtonWrapper(
name='OCR_DOUBLE_ROGUE_REMAIN',
share=Button(
file='./assets/share/dungeon/event/OCR_DOUBLE_ROGUE_REMAIN.png',
area=(517, 179, 1118, 201),
search=(497, 159, 1138, 221),
color=(203, 145, 88),
button=(517, 179, 1118, 201),
),
)

View File

@ -209,7 +209,7 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat):
relic = 0
rogue = 0
if self.has_double_rogue_event():
rogue = self.get_double_event_remain()
rogue = self.get_double_rogue_remain()
if self.has_double_calyx_event():
self._dungeon_nav_goto(KEYWORDS_DUNGEON_NAV.Calyx_Golden)
calyx = self.get_double_event_remain()

View File

@ -9,6 +9,7 @@ from tasks.dungeon.assets.assets_dungeon_event import (
DOUBLE_ROGUE_EVENT_TAG,
OCR_DOUBLE_EVENT_REMAIN,
OCR_DOUBLE_EVENT_REMAIN_AT_COMBAT,
OCR_DOUBLE_ROGUE_REMAIN,
)
@ -51,6 +52,8 @@ class DungeonEvent(UI):
"""
has = self.image_color_count(DOUBLE_ROGUE_EVENT_TAG, color=(252, 209, 123), threshold=221, count=50)
has |= self.image_color_count(DOUBLE_ROGUE_EVENT_TAG, color=(252, 251, 140), threshold=221, count=50)
# Anniversary 3x rogue event
has |= self.image_color_count(DOUBLE_ROGUE_EVENT_TAG, color=(229, 62, 44), threshold=221, count=50)
logger.attr('Double rogue', has)
return has
@ -84,6 +87,15 @@ class DungeonEvent(UI):
logger.attr('Double event remain', remain)
return remain
def get_double_rogue_remain(self) -> int:
"""
Pages:
in: page_guide, Survival_Index, selected at the nav with double event
"""
remain = self._get_double_event_remain(OCR_DOUBLE_ROGUE_REMAIN)
logger.attr('Double event remain', remain)
return remain
def get_double_event_remain_at_combat(self) -> int | None:
"""
Pages: