Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Commit

Permalink
better Arena mode detection from log file
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrcho committed Dec 7, 2014
1 parent 9351d92 commit 7e98189
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ class LogParser extends Logging {
Some(EndSpectatorEvent)
case RANKED_MODE_REGEX() =>
Some(GameModeDetected(GameMode.RANKED))
case ARENA_MODE_REGEX() =>
Some(GameModeDetected(GameMode.ARENA))
case GAME_MODE_REGEX(mode) =>
debug(s"$mode detected")
GAME_MODES.get(mode) map GameModeDetected
case LEGEND_RANK_REGEX(rank) => // TODO : test this on a legend log file ...
Some(LegendRank(rank.toInt))
Expand Down Expand Up @@ -153,6 +154,7 @@ class LogParser extends Logging {
val HIDDEN_REGEX = """\[Zone\] ZoneChangeList\.ProcessChanges\(\) - id=(\d*) local=(.*) \[id=(\d*) cardId=(.*) type=(.*) zone=(.*) zonePos=(\d*) player=(\d*)\] zone from (.*) -> (.*)""".r
val HERO_POWER_USE_REGEX = """\[Power\].*cardId=(\w+).*player=(\d+).*""".r
val GAME_MODE_REGEX = """\[Bob\] ---(\w+)---""".r
val ARENA_MODE_REGEX = """\[LoadingScreen\] LoadingScreen.OnSceneLoaded\(\) - prevMode=.* currMode=DRAFT""".r
val RANKED_MODE_REGEX = ".*name=rank_window.*".r
val LEGEND_RANK_REGEX = """\[Bob\] legend rank (\d*)""".r
val STARTUP_REGEX = """^Initialize engine version.*""".r
Expand Down

0 comments on commit 7e98189

Please sign in to comment.