Rematch is an addon to help create, store, recall and share battle pet teams.

Its primary purpose is to store and recall battle pets for targets. For instance:

- When you target Aki the Chosen, bring up the Rematch window and hit Save, it will record under her name the pets you have out.
- When you return to Aki another day, you can target her, bring up the window and hit Load to bring those pets back.

New in 2.4.6

- Ability tooltips now look more like the pet cards.
- New option: Larger Pet Cards for slightly bigger pet cards and ability tooltips.
- New option: Show on Injured to show the window if any pets are injured.
- Localization update for zhTW, zhCN.

Searches

In the search bar of the pet browser, you can not only search for names of pets and their source, but you can also search for:

- Names of abilities ("Call Lightning")
- Text within abilities ("Bleed")
- Level ranges ("level=25" or "level>10" or "level=8-13")
- Stat ranges ("health>700" or "speed=250-350" or "power>=276")

Also:

- Searches are not case sensitive. "Bleed" will work just as well as "bleed" or "BLEED".
- You can hit "Fill" on the leveling queue to add one of each species from your search results to the leveling queue.
- When you look at the pet card, abilities that contain the search text will be marked with a gold ring.
- You can also search levels, stats and text simultaneously:
"bleed health>700 level<25" : Pets with Bleed in text that have over 700hp and are under 25.
"level<25 bleed health>700" : Same thing. The order of search isn't important.
"health>700 <25 bleed" : Same again. If a stat doesn't appear with a < > or =, it assumes level.

How to Use

You can summon the Rematch window several ways:
- Set a key binding from options.
- /rematch command.
- The Rematch button at the bottom of the pet journal.
- 'Use Minimap Button' in options will create a minimap button.
- From its LDB button if you use a Broker bar addon.
- Have 'Auto Show' checked in options and target something for which you have a saved team that's not already loaded.

As mentioned at the top, this addon's primary purpose is to save for targets. Target an NPC, click Save, and a team is saved for that target.
- If you don't have an NPC targeted, 'Save' will turn to 'Save As' and if clicked it will ask for a name for the team.
- If you name a team the same as a player, it will react to that player just like an NPC.
- You can bring up a list of teams you've saved by clicking the pullout button at the bottom.

Pet Browser

Rematch has a pet browser you can open alongside the main window for help creating your teams. You can open it with the 'Pets' button on the main window, or by setting up a key binding in the default key binding interface.

Some advantages it has over the default pet journal:
- You can search the names of abilities or text within abilities.
- You can search for level and stat ranges.
- In addition to filtering pets by type, you can filter by 'Strong vs': if you filter Strong vs Dragonkin, it will list all pets with magic attacks.
- You can also filter to pets that are Tough vs a type of attack: filtering Tough vs Elemental will list all critters.
- A 'Type Bar' to filter by the various types without going through the dropdown menus.
- A counter at the bottom of the browser tells you how many pets are listed: search =25 and you'll see how many level 25 pets you own.
- If Jump to Key is enabled, you can hit a letter and it will jump to the next pet that begins with that letter.

To clear filters, you can click the little X button in the search box or the type bar, or you can click the X along the bottom when filters are applied.  You can also click 'Reset All' within the filters menu.  Closing the browser itself will also clear most filters.

Leveling Pets

Thanks to suggestions from Behub, Aloek and others, Rematch has a robust system to make leveling pets easy.

In the pullout drawer there is a leveling slot with a shiny gold border. You can drag a pet here to mark it as your leveling pet. (You can also right-click a pet elsewhere like in the journal and choose 'Start Leveling')

- Any teams saved with a leveling pet will reserve that pet's slot for future leveling pets.
- When you see a shiny gold border around a pet anywhere in Rematch, it means that is a leveling pet.

So if you save teams for various tamers with the leveling pet loaded, when you return to those tamers later with a different leveling pet, it will load that new leveling pet in their saved places.

The Leveling Queue

In addition to the gold-bordered leveling slot in the pullout drawer, there is a leveling queue you can store any number of pets that you intend to level.

As soon as your current leveling pet reaches 25 (gratz!), if there are any leveling pets waiting it will swap the top-most pet in the queue to the leveling slot.

In the pullout control panel in the queue you can also:
- Sort the queue by level: ascending (level 1 to 25), descending (25 to 1) or median (closest to level 10.5).
- Create your own order by dragging pets around and inserting them between other pets.
- Use the Auto Rotate option to move to a new pet in the queue after each successful pet battle.
- Click the Fill button to fill the queue from pets in the browser. For instance, search "21-24", filter for Rare and hit Fill to add 21-24 rare pets to the leveling queue.
- Click Empty button to empty the queue. It will ask for confirmation but in options you can turn confirmations off.
- If you want to switch to another pet for one fight without changing the order, right-click the pet and choose start leveling. You can also double-click a pet in the queue to make it the current leveling pet. Or you can drag it to the leveling slot.
- When the window is collapsed, if the leveling pet is loaded, you can navigate around the queue with previous/next buttons when you mouseover the leveling pet.

Sharing Teams

There are two ways to share battle pet teams when you right-click it in the pullout drawer:
- The Send option to send a team to someone online on your faction.
- The Export option to create a WeakAuras-like text string that you can copy/paste.

When a user receives a team that you Send, they'll receive a popup displaying the team with the option to save it.

To use an Export string, click the Import button in the pullout drawer and paste the string. You can review the team before saving it.

If you receive or import a team that includes pets you don't have, that's fine. They'll be greyed out and only the pets you have will attempt to load. You can keep the team as is for the day when you get the pet, or you can choose to save over it if you find a suitable substitute for the missing pet.

Note: Battle.net and RealID are not supported yet, sorry. It will happen in a future update. But you can send to Name-Realm if they're on the same faction.

Miscellaneous
- The "tooltip" for pets is a card with stats. Hold Alt to flip the card over for more about your pet. Click the pet to lock the card in place so you can mouseover abilities.
- When the card is locked and has a wooden frame around it, you can unlock it several ways: clicking one of the little screws on the corner, clicking the pet again from where you locked it, hitting ESCape or any other action that dismisses the card.
- You can Rename, Delete, Send or Export a team by right-clicking it in the pullout drawer.
- When a team is selected, the little window to the right of your saved pets lists the types your team is strong against, sorted by the number of strong attacks loaded on your team. Abilities that don't attack are excluded.
- Teams with white names have an NPC ID stored in them to focus its target awareness to that NPC ID. If they have a gold name then any target of that name is considered its target.
- This addon will peacefully co-exist with all other battle pet addons. If the addon is installed it will pull breed information from Battle Pet Breed ID.
- You can shift-click pets and abilities to chat like you can from the pet journal.
- You can manually edit the names at the start of an import string to save it under a different name.
- The Escape key will pull back most panels opened within the addon. For instance, if you pull up the Rematch window, open the drawer and go into options: hitting escape will close options and return to the drawer, hitting escape again will collapse the drawer, and hitting escape again will close the window.
- Clicking a pet or one of its abilities will jump to that pet in the Pet Journal.
- You can view or rearrange pets in the leveling queue by moving the mouse over the leveling slot in the pullout drawer.
- If you have the addon Pet Battle Teams enabled, "/rematch import" will import your PBT teams into Rematch.

If you have any comments, suggestions or bugs to report feel free to post them here in the comments. Thanks!

Special thanks to those providing translations to other clients:
deDE: Tonyleila at wowinterface (Leilameda at EU-Anetheron)
zhCN: Zkpjy at wowinterface
zhTW: Leg883 at curse

06/05/2014 2.4.7 localization updates for zhTW and zhCN.
06/02/2014 2.4.6 ability tooltips now look more like pet cards, new options Larger Pet Cards and Show on Injured, show window if a pet is missing when team loads, update for zhTW, zhCN
05/29/2014 2.4.5 import PBT team button, localization method reworked, updates for zhTW and zhCN.
05/27/2014 2.4.4 only battle pets option added for real
05/26/2014 2.4.3 level internally classified as a stat for more standard behavior, ability to search for text+stats together, browser options: wide search bar, use type bar, only battle pets, update for zhTW locale
05/24/2014 2.4.2 journal button now attaches to chain of anchors ending at the find battle button, zhTW localization by leg883, hide journal option, minimap button, key binding option button, find battle button
05/18/2014 2.4.1 zhCN localization, show on any pets dead after load complete, added stat compare search, added xp bar on pets with partial levels in queue
05/16/2014 2.4.0 leveling queue revamp, tooltips added, LDB support, pet card health shows health/max when hurt
04/06/2014 2.3.8 localization updates for zhTW, zhCN and deDE clients
04/03/2014 2.3.7 new OnlyLeveling filter option, new Close Pet Journal option, sort order saved to savedvar
03/30/2014 2.3.6 zhTW localization, fix for current zone in kun-lai summit
03/29/2014 2.3.5 options panel changed to scrollable list, deDE localization, zhCN localization 
03/21/2014 2.3.4 strings separated out to localization files
03/17/2014 2.3.3 search hits highlights on pet card, typebar radio buttons turned to tabs, all three type modes can be filtered simultaneously, dropdown type menu behavior made same as typebar, fix for non-battle pets having wrong damage taken for their type, strong/tough searches no longer include non-battle pets, buttons added to browser scrollbar to scroll to top and bottom
03/09/2014 2.3.2 fix for 'start leveling' in pet journal, double-click in browser to summon/dismiss pets, browser pets marked if dead, possible fix for a scrollframe bug (when scrollbar disabled move offset to 0 if not already there)
03/08/2014 2.3.1 removed portrait mask for ability icons on default ability tooltip, jump to key only if no modifier down, added link to chat for browser pets, browser opens back up after journal closes (if it was up before), favorite filter turned into a soft filter
03/07/2014 2.3.0 new pet browser, pet card lock/mouseover mechanism, SmartAnchor system references the main window instead of relativeTo, Jump to Team changed to Jump to Key, species aren't filled when when caging a species that has multiples in a saved team, fix for abilities not linking from current pets
02/22/2014 2.2.9 new option StayForBattle, added "weak vs" row to hints window, SmartAnchor system for pet card and tooltips, reworked dropdown menu build to make options more consistent, added Swap with Next in Queue to dropdown, added pullout side panel for leveling pet/queue auto load, added option ShowSidePanel to enable side panel
02/19/2014 2.2.8 window hides when a battle starts/returns after, fix for 5.4.7 patch and revoked pets
02/11/2014 2.2.7 fix for pet names on leveling slot/queue right-click menu, pets in the journal show an icon if they're a leveling pet, leveling icon changed, when queue is empty 'Put Leveling Pet Here' still given as an option but disabled, removed highlight texture from saved pets
02/01/2014 2.2.6 when pets are loaded, there is no longer an effort to have loaded teams move into first slots, but instead to the slots they were saved, fix for dead X icon persisting on empty slots, auto load only fires once per encounter with a saved target, added AutoLoad->AutoLoadAlways option, added AutoLoad->EmptyMissing option, fixed minor xml errors, fix for current header not being draggable, pet loading more rigorous (checks if pet/ability needs loading, verifies it loaded, sets up a reload in 0.3 seconds or after battle if failed), /rematch import converts empty slots to leveling pets and turns on 'Empty Missing', /rematch import over to overwrite existing teams, /rematch help
01/29/2014 2.2.5 fix for right-click menu on leveling slot
01/29/2014 2.2.4 species ID is saved with teams and used when the pet ID is no longer valid, 'Send to End of Queue' option added for current leveling pets, full support for empty slots, petload process changed from OnUpdate one swap per frame to all swaps at once
01/25/2014 2.2.3 rename/send/export/delete moved to right-click of a team; fix for current team title not updating if pets don't change, fix for ESC sometimes failing with unexpected UISpecialFrame entry, possible fix for pet loading issue
01/18/2014 2.2.2 ESC system switched from UISpecialFrames to propagated keys, "Current Battle Pets" header will show last loaded team (if current pets are still last loaded team), teams can be renamed, hitting a letter over teams will jump to a team that begins with that letter, new toggle auto load binding
01/10/2014 2.2.1 changed 'frame' to 'rematch' in RematchSharedDropDown CreateFrame
01/10/2014 2.2.0 code restructured, UI/ESCable system reworked, saved pet section collapses, Lock Drawer option, esc clears selected team, auto-show/load will not dismiss the window if it was up already, 'Use Leveling Pet' added to right-click menu of current pets that can't level, save button is 'Save As' when it will ask for a name, help button and help plates
12/14/2013 2.1.5a fix for ability icons made too big from today's update oops
12/14/2013 2.1.5 'Add to Leveling Queue' option added for journal pet menus to send to end of queue, removed 5.4.1 taint bug fix, queue only processes when out of combat/pet battle
12/06/2013 2.1.4 auto upgrade (aka best of species) option added
11/29/2013 2.1.3 leveling queue system, right-click menus added to journal current pets and leveling pets, level displayed on current pets under 25
11/07/2013 2.1.2 confirmation on save/import/receive over existing teams, confirmation on delete, option to disable confirmations, changed icon of the pullout button, new option: Auto Load->On Mouseover to auto load teams on mouseover instead of target
11/04/2013 2.1.1 caged pets replaced by their species in saved teams, fix for auto load preventing opening window, petsNeedLoading will take leveling pets into account
11/03/2013 2.1.0 removed lock system, replaced with leveling slot system; pet journal onshow HookScript instead of SetScript; removed requirement for selected team to be scrolled in to save/delete; saveAs will allow saving over a team with same name
10/29/2013 2.0.10 fix for taint issue with microbuttons: setfenv onshow to empty UpdateMicroButtons()
10/28/2013 2.0.9 removed visibility requirement to update pet journal loadouts
10/27/2013 2.0.8 fix for disconnect bug when dragging pets to a saved slot; PetBattleTeam migration moved to /rematch migrate
10/27/2013 2.0.7 rematch button on pet journal will move based on the existence of other buttons along the bottom
10/24/2013 2.0.6 if 'Auto Show' and 'Lock Window' are both checked, window will remain after pets load; all three slots can be locked; auto show/load trigger more intelligently with locked pets; added Rematch button to pet journal; ability tooltip mouse disabled; holding Shift will let you move the window while it's locked; 'Keep Companion' system reworked around UNIT_PET with a timeout
10/18/2013 2.0.5 fix for saving low level pets caused by fix from last update
10/18/2013 2.0.4 low level pets with abilities higher than they can use will load the lower tier ability instead, low level current pets only show abilities they can use, team loads taking too long will stop trying, BAG_UPDATE throttled
10/18/2013 2.0.3 rewrite: new UI, new options, custom teams, send/import/export teams
09/11/2013 1.0.5 toc update for 5.4
08/06/2013 1.0.4 fix for saved pets caged or missing
05/21/2013 1.0.3 toc update for 5.3
03/16/2013 1.0.2 added 'Auto Show' option, changed UI a bit
03/13/2013 1.0.1 initial release