Skip to content

Commit

Permalink
Avoid Immobilized cards
Browse files Browse the repository at this point in the history
Fixes #1666
  • Loading branch information
reconman committed Aug 27, 2023
1 parent 4d19ef7 commit c1e08a4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
Binary file added app/src/main/assets/En/immobilized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class ImageLoader @Inject constructor(
Images.FPSummonContinue -> "fp_continue.png"
Images.SkillTen -> "skill_ten.png"
Images.Stun -> "stun.png"
Images.Immobilized -> "immobilized.png"
Images.SelectedParty -> "selected_party.png"
Images.SilverXP -> "SilverXP.png"
Images.GoldXP -> "GoldXP.png"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ interface AutomataApi {

operator fun Region.contains(image: Pattern) = exists(image)

operator fun Region.contains(images: Collection<Pattern>) = images.any { contains(it) }

fun Region.find(
pattern: Pattern,
similarity: Double? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ enum class Images {
FPSummonContinue,
SkillTen,
Stun,
Immobilized,
SelectedParty,
SilverXP,
GoldXP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AutoDetect @Inject constructor(
images[Images.LotteryBoxFinished] in locations.lottery.checkRegion || images[Images.LotteryBoxFinished] in locations.lottery.finishedRegion ->
ScriptModeEnum.Lottery

images[Images.GoldXP] in emberSearchRegion || images[Images.SilverXP] in emberSearchRegion ->
listOf(images[Images.GoldXP], images[Images.SilverXP]) in emberSearchRegion ->
ScriptModeEnum.PresentBox

locations.support.confirmSetupButtonRegion.exists(images[Images.SupportConfirmSetupButton], similarity = 0.75) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CardParser @Inject constructor(
height = 188
)

return images[Images.Stun] in stunRegion
return listOf(images[Images.Stun], images[Images.Immobilized]) in stunRegion
}

private fun CommandCard.Face.type(): CardTypeEnum {
Expand Down

0 comments on commit c1e08a4

Please sign in to comment.