Module: Lich::DragonRealms::DRParser::Pattern
- Defined in:
- documented/dragonrealms/drinfomon/drparser.rb
Constant Summary collapse
- ExpColumns =
Regular expression pattern for experience columns This pattern matches skill experience data in the format:
Skill: Rank Percent Rate /(?:\s*(?<skill>[a-zA-Z\s]+)\b:\s*(?<rank>\d+)\s+(?<percent>\d+)%\s+(?<rate>[a-zA-Z\s]+)\b)/.freeze
- BriefExpOn =
Regular expression pattern for brief experience on This pattern matches the XML component for skills with experience on.
%r{<component id='exp .*?<d cmd='skill (?<skill>[a-zA-Z\s]+)'.*:\s+(?<rank>\d+)\s+(?<percent>\d+)%\s*\[\s?(?<rate>\d+)\/34\].*?<\/component>}.freeze
- BriefExpOff =
Regular expression pattern for brief experience off This pattern matches the XML component for skills with experience off.
%r{<component id='exp .*?\b(?<skill>[a-zA-Z\s]+)\b:\s+(?<rank>\d+)\s+(?<percent>\d+)%\s+\b(?<rate>[a-zA-Z\s]+)\b.*?<\/component>}.freeze
- NameRaceGuild =
Regular expression pattern for name, race, and guild This pattern captures the player’s name, race, and guild from the output.
/^Name:\s+\b(?<name>.+)\b\s+Race:\s+\b(?<race>.+)\b\s+Guild:\s+\b(?<guild>.+)\b\s+/.freeze
- GenderAgeCircle =
Regular expression pattern for gender, age, and circle This pattern captures the player’s gender, age, and circle from the output.
/^Gender:\s+\b(?<gender>.+)\b\s+Age:\s+\b(?<age>.+)\b\s+Circle:\s+\b(?<circle>.+)/.freeze
- StatValue =
Regular expression pattern for stat values This pattern captures individual stat values and their corresponding numbers.
/(?<stat>Strength|Agility|Discipline|Intelligence|Reflex|Charisma|Wisdom|Stamina|Favors|TDPs)\s+:\s+(?<value>\d+)/.freeze
- TDPValue =
Regular expression pattern for TDP values This pattern captures the total number of TDPs available.
/You have (\d+) TDPs\./.freeze
- EncumbranceValue =
Regular expression pattern for encumbrance values This pattern captures the player’s current encumbrance status.
/^\s*Encumbrance\s+:\s+(?<encumbrance>[\w\s'?!]+)$/.freeze
- LuckValue =
Regular expression pattern for luck values This pattern captures the player’s luck status.
/^\s*Luck\s+:\s+.*\((?<luck>[-\d]+)\/3\)/.freeze
- BalanceValue =
Regular expression pattern for balance values This pattern captures the player’s balance status.
/^(?:You are|\[You're) (?<balance>#{Regexp.union(DR_BALANCE_VALUES)}) balanced?/.freeze
- ExpClearMindstate =
Regular expression pattern for clearing mindstate This pattern matches the XML component indicating a skill has no experience.
%r{<component id='exp (?<skill>[a-zA-Z\s]+)'><\/component>}.freeze
- RoomPlayers =
Regular expression pattern for room players This pattern captures the list of players present in the room.
%r{\'room players\'>Also here: (.*)\.</component>}.freeze
- RoomPlayersEmpty =
Regular expression pattern for empty room players This pattern matches the case where no players are present in the room.
%r{\'room players\'></component>}.freeze
- RoomObjs =
Regular expression pattern for room objects This pattern captures the list of objects present in the room.
%r{\'room objs\'>(.*)</component>}.freeze
- RoomObjsEmpty =
Regular expression pattern for empty room objects This pattern matches the case where no objects are present in the room.
%r{\'room objs\'></component>}.freeze
- GroupMembers =
Regular expression pattern for group members This pattern captures the list of members in the player’s group.
%r{<pushStream id="group"/> (\w+):}.freeze
- GroupMembersEmpty =
Regular expression pattern for empty group members This pattern matches the case where no group members are present.
%r{<pushStream id="group"/>Members of your group:}.freeze
- ExpModsStart =
Regular expression pattern for the start of experience modifiers This pattern indicates the beginning of a list of skills under modifiers.
/^(<.*?\/>)?The following skills are currently under the influence of a modifier/.freeze
- KnownSpellsStart =
Regular expression pattern for known spells This pattern indicates the start of the known spells list for magic users.
/^You recall the spells you have learned/.freeze
- BarbarianAbilitiesStart =
Regular expression pattern for barbarian abilities This pattern indicates the start of the list of known barbarian abilities.
/^You know the (Berserks:)/.freeze
- ThiefKhriStart =
Regular expression pattern for thief khri This pattern indicates the start of the list of known khri for thieves.
/^From the Subtlety tree, you know the following khri:/.freeze
- SpellBookFormat =
Regular expression pattern for spellbook format This pattern captures the format type of the spellbook output.
/^You will .* (?<format>column-formatted|non-column) output for the SPELLS verb/.freeze
- PlayedAccount =
Regular expression pattern for played account This pattern captures the account information of the player.
/^(?:<.*?\/>)?Account Info for (?<account>.+):/.freeze
- PlayedSubscription =
Regular expression pattern for played subscription This pattern captures the subscription status of the player’s account.
/Current Account Status: (?<subscription>F2P|Basic|Premium|Platinum)/.freeze
- LastLogoff =
Regular expression pattern for last logoff This pattern captures the last logoff time of the player.
/^\s+Logoff : (?<weekday>[A-Z][a-z]{2}) (?<month>[A-Z][a-z]{2}) (?<day>[\s\d]{2}) (?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2}) ET (?<year>\d{4})/.freeze
- RoomIDOff =
Regular expression pattern for room ID off This pattern indicates that room IDs are no longer visible.
/^You will no longer see room IDs when LOOKing in the game and room windows\./.freeze