chat commands: update duel arena messages
This commit is contained in:
@@ -116,8 +116,8 @@ public class ChatCommandsPlugin extends Plugin
|
||||
private static final Pattern TOB_WAVE_DURATION_PATTERN = Pattern.compile("Theatre of Blood wave completion time: <col=ff0000>[0-9:.]+</col>\\. Personal best: (?<pb>[0-9:]+(?:\\.[0-9]+)?)");
|
||||
private static final Pattern KILL_DURATION_PATTERN = Pattern.compile("(?i)(?:(?:Fight |Lap |Challenge |Corrupted challenge )?duration:|Subdued in) <col=[0-9a-f]{6}>[0-9:.]+</col>\\. Personal best: (?:<col=ff0000>)?(?<pb>[0-9:]+(?:\\.[0-9]+)?)");
|
||||
private static final Pattern NEW_PB_PATTERN = Pattern.compile("(?i)(?:(?:Fight |Lap |Challenge |Corrupted challenge )?duration:|Subdued in) <col=[0-9a-f]{6}>(?<pb>[0-9:]+(?:\\.[0-9]+)?)</col> \\(new personal best\\)");
|
||||
private static final Pattern DUEL_ARENA_WINS_PATTERN = Pattern.compile("You (were defeated|won)! You have(?: now)? won (\\d+) duels?");
|
||||
private static final Pattern DUEL_ARENA_LOSSES_PATTERN = Pattern.compile("You have(?: now)? lost (\\d+) duels?");
|
||||
private static final Pattern DUEL_ARENA_WINS_PATTERN = Pattern.compile("You (were defeated|won)! You have(?: now)? won ([\\d,]+|one) duels?");
|
||||
private static final Pattern DUEL_ARENA_LOSSES_PATTERN = Pattern.compile("You have(?: now)? lost ([\\d,]+|one) duels?");
|
||||
private static final Pattern ADVENTURE_LOG_TITLE_PATTERN = Pattern.compile("The Exploits of (.+)");
|
||||
private static final Pattern ADVENTURE_LOG_PB_PATTERN = Pattern.compile("Fastest (?:kill|run)(?: - \\(Team size: " + TEAM_SIZES + "\\))?: ([0-9:]+(?:\\.[0-9]+)?)");
|
||||
private static final Pattern HS_PB_PATTERN = Pattern.compile("Floor (?<floor>\\d) time: <col=ff0000>(?<floortime>[0-9:]+(?:\\.[0-9]+)?)</col>(?: \\(new personal best\\)|. Personal best: (?<floorpb>[0-9:]+(?:\\.[0-9]+)?))" +
|
||||
@@ -415,7 +415,8 @@ public class ChatCommandsPlugin extends Plugin
|
||||
if (matcher.find())
|
||||
{
|
||||
final int oldWins = getKc("Duel Arena Wins");
|
||||
final int wins = Integer.parseInt(matcher.group(2));
|
||||
final int wins = matcher.group(2).equals("one") ? 1 :
|
||||
Integer.parseInt(matcher.group(2).replace(",", ""));
|
||||
final String result = matcher.group(1);
|
||||
int winningStreak = getKc("Duel Arena Win Streak");
|
||||
int losingStreak = getKc("Duel Arena Lose Streak");
|
||||
@@ -443,7 +444,8 @@ public class ChatCommandsPlugin extends Plugin
|
||||
matcher = DUEL_ARENA_LOSSES_PATTERN.matcher(message);
|
||||
if (matcher.find())
|
||||
{
|
||||
int losses = Integer.parseInt(matcher.group(1));
|
||||
int losses = matcher.group(1).equals("one") ? 1 :
|
||||
Integer.parseInt(matcher.group(1).replace(",", ""));
|
||||
|
||||
setKc("Duel Arena Losses", losses);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user