Skip to content

Commit

Permalink
Fixes the main regex to comprise particular cases like 'catchYear equ…
Browse files Browse the repository at this point in the history
…al to ?', Reiceived values without name after Id. Also adds support to special move #2.
  • Loading branch information
esauvisky committed Mar 2, 2019
1 parent b59a1b8 commit 9f73494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ivcheck.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def not_in_func(a, b):
ch.setFormatter(formatter)
logger.addHandler(ch)

RE_CALCY_IV = re.compile(r"^./MainService\(\s*\d+\): Received values: Id: \d+ \((?P<name>.+)\), Nr: (?P<id>\d+), CP: (?P<cp>\-{0,1}\d+), Max HP: (?P<max_hp>\d+), Dust cost: (?P<dust_cost>\d+), Level: (?P<level>\-{0,1}[0-9\.]+), FastMove (?P<fast_move>.+), SpecialMove (?P<special_move>.+),Gender (?P<gender>\-{0,1}\d+), catchYear (?P<catch_year>.+), Level-up (true|false):$")
RE_CALCY_IV = re.compile(r"^.\/MainService\(\s*\d+\): Received values: Id: -{0,1}\d+ {0,1}\({0,1}(?P<name>[^\(\)]+){0,1}\){0,1}, Nr: (?P<id>-{0,1}\d+), CP: (?P<cp>-{0,1}\d+), Max HP: (?P<max_hp>-{0,1}\d+), Dust cost: (?P<dust_cost>-{0,1}\d+), Level: (?P<level>\-{0,1}[\d\.]+), FastMove (?P<fast_move>.+), SpecialMove (?P<special_move>.+), SpecialMove2 (?P<special_move2>.+),Gender (?P<gender>\-{0,1}\d+), catchYear (?P<catch_year>.+), Level-up (true|false):$")
RE_RED_BAR = re.compile(r"^.+\(\s*\d+\): Screenshot #\d has red error box at the top of the screen$")
RE_SUCCESS = re.compile(r"^.+\(\s*\d+\): calculateScanOutputData finished after \d+ms$")
RE_SCAN_INVALID = re.compile(r"^.+\(\s*\d+\): Scan invalid .+$")
Expand Down Expand Up @@ -78,7 +78,7 @@ def bool_filter(c):
return False

CALCY_VARIABLES = [
['catch_year', int_filter],
['catch_year', None],
['lucky', bool_filter],
['attack', int_filter],
['defense', int_filter],
Expand Down

0 comments on commit 9f73494

Please sign in to comment.