MH Maps Tweaker

Rearrange mice in the map

当前为 2015-07-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name MH Maps Tweaker
  3. // @description Rearrange mice in the map
  4. // @author Dusan Djordjevic
  5. // @include http://www.mousehuntgame.com/*
  6. // @include https://www.mousehuntgame.com/*
  7. // @include http://apps.facebook.com/mousehunt/*
  8. // @include https://apps.facebook.com/mousehunt/*
  9. // @version 1.21 - Added cheese + charm
  10. // @history 1.10 - No need to update script when new mice are out
  11. // @history 1.00 - Initial release
  12. // @namespace MH Tweaks
  13. // ==/UserScript==
  14.  
  15. VERSION = 1.21;
  16.  
  17. var LOCATIONS = {
  18. "Acolyte Realm<div style=\"font-size: 10px; font-weight: normal\">Ancient</div>": ["Gorgon","Sorcerer","Spectre"],
  19. "Acolyte Realm<div style=\"font-size: 10px; font-weight: normal\">Radioactive Blue</div>": ["Gate Guardian","Golem"],
  20. "Acolyte Realm<div style=\"font-size: 10px; font-weight: normal\">Runic</div>": ["Acolyte","Chrono","Lich","Wight"],
  21. "Balack's Cove (High Tide)<div style=\"font-size: 10px; font-weight: normal\">Vanilla Stilton</div>": ["Riptide"],
  22. "Balack's Cove (Low Tide)<div style=\"font-size: 10px; font-weight: normal\">Vanilla Stilton</div>": ["Brimstone","Davy Jones","Tidal Fisher","Twisted Fiend"],
  23. "Balack's Cove (Low Tide)<div style=\"font-size: 10px; font-weight: normal\">Vengeful Vanilla Stilton</div>": ["Enslaved Spirit"],
  24. "Balack's Cove (Mid Tide)<div style=\"font-size: 10px; font-weight: normal\">Vengeful Vanilla Stilton</div>": ["Balack the Banished","Derr Lich","Elub Lich","Nerg Lich"],
  25. "Bazaar<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Bionic","Granite","Steel"],
  26. "Bazaar<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Burglar"],
  27. "Burroughs Rift (Mist Level 0)<div style=\"font-size: 10px; font-weight: normal\">Brie String</div>": ["Amplified White","Automated Sentry","Evil Scientist","Rift Bio Engineer"],
  28. "Burroughs Rift (Mist Level 0)<div style=\"font-size: 10px; font-weight: normal\">Magical String</div>": ["Amplified Brown","Amplified Grey","Cybernetic Specialist","Doktor","Portable Generator","Surgeon Bot"],
  29. "Burroughs Rift (Mist Level 1-5)<div style=\"font-size: 10px; font-weight: normal\">Magical String/Brie String</div>": ["Count Vampire","Phase Zombie","Prototype","Robat","Tech Ravenous Zombie"],
  30. "Burroughs Rift (Mist Level 1-5)<div style=\"font-size: 10px; font-weight: normal\">Polluted Parmesan</div>": ["Mecha Tail","Radioactive Ooze","Toxikinetic"],
  31. "Burroughs Rift (Mist Level 1-5)<div style=\"font-size: 10px; font-weight: normal\">Terre Ricotta</div>": ["Clump","Cyber Miner","Itty Bitty Rifty Burroughs","Pneumatic Dirt Displacement","Rifterranian"],
  32. "Burroughs Rift (Mist Level 19-20)<div style=\"font-size: 10px; font-weight: normal\">Magical String/Brie String</div>": ["Monstrous Abomination"],
  33. "Burroughs Rift (Mist Level 19-20)<div style=\"font-size: 10px; font-weight: normal\">Polluted Parmesan</div>": ["Assassin Beast","Plutonium Tentacle","The Menace of the Rift"],
  34. "Burroughs Rift (Mist Level 19-20)<div style=\"font-size: 10px; font-weight: normal\">Terre Ricotta</div>": ["Big Bad Behemoth Burroughs"],
  35. "Burroughs Rift (Mist Level 6-18)<div style=\"font-size: 10px; font-weight: normal\">Magical String/Brie String</div>": ["Lycanoid","Revenant","Zombot Unipire the Third"],
  36. "Burroughs Rift (Mist Level 6-18)<div style=\"font-size: 10px; font-weight: normal\">Polluted Parmesan</div>": ["Rancid Bog Beast","Super Mega Mecha Ultra RoboGold","Toxic Avenger"],
  37. "Burroughs Rift (Mist Level 6-18)<div style=\"font-size: 10px; font-weight: normal\">Terre Ricotta</div>": ["Boulder Biter","Lambent","Master Exploder"],
  38. "Calm Clearing<div style=\"font-size: 10px; font-weight: normal\">Cherry</div>": ["Bear","Cherry","Cyclops","Shaman"],
  39. "Calm Clearing<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Frog","Moosker"],
  40. "Calm Clearing<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Wiggler"],
  41. "Cape Clawed<div style=\"font-size: 10px; font-weight: normal\">Crunchy</div>": ["Aged","Healer","Trailblazer","Wordsmith"],
  42. "Cape Clawed<div style=\"font-size: 10px; font-weight: normal\">Gumbo</div>": ["Caretaker","Grandfather","Narrator","Pathfinder"],
  43. "Cape Clawed<div style=\"font-size: 10px; font-weight: normal\">Shell</div>": ["Alchemist","Elder","Scout","Taleweaver"],
  44. "Catacombs<div style=\"font-size: 10px; font-weight: normal\">Ancient</div>": ["Skeleton"],
  45. "Catacombs<div style=\"font-size: 10px; font-weight: normal\">Ancient with Antiskele</div>": ["Keeper","Keeper's Assistant","Ooze","Spider"],
  46. "Catacombs<div style=\"font-size: 10px; font-weight: normal\">Radioactive Blue with Antiskele</div>": ["Giant Snail"],
  47. "Catacombs<div style=\"font-size: 10px; font-weight: normal\">Undead Emmental with Antiskele</div>": ["Grave Robber","Terror Knight","Vampire"],
  48. "Claw Shot City<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Lasso Cowgirl"],
  49. "Claw Shot City (Hunting Bounty Hunter)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Prospector","Ruffian","Tumbleweed"],
  50. "Claw Shot City (Hunting Bounty Hunter)<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Bounty Hunter","Pyrite","Saloon Gal","Shopkeeper"],
  51. "Claw Shot City (Ringleaders)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Cardshark","Circuit Judge","Desperado","Outlaw","Stagecoach Driver","Undertaker"],
  52. "Crystal Library<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Bookborn","Flutterby","Infiltrator","Pocketwatch"],
  53. "Crystal Library<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Aether","Effervescent","Explorator","Scribe","Steam Grip","Tome Sprite","Walker"],
  54. "Crystal Library<div style=\"font-size: 10px; font-weight: normal\">SB+ with Scholar</div>": ["Zurreal the Eternal"],
  55. "Cursed City (Curse Lifted)<div style=\"font-size: 10px; font-weight: normal\">Graveblossom Camembert</div>": ["Corrupt","Essence Guardian"],
  56. "Cursed City (Curse Lifted)<div style=\"font-size: 10px; font-weight: normal\">Graveblossom Camembert with Shattering</div>": ["Dark Magi"],
  57. "Cursed City (Cursed)<div style=\"font-size: 10px; font-weight: normal\">Graveblossom Camembert</div>": ["Cursed Enchanter","Cursed Engineer","Cursed Librarian","Cursed Thief"],
  58. "Derr Dunes<div style=\"font-size: 10px; font-weight: normal\">Brie</div>": ["Sylvan"],
  59. "Derr Dunes<div style=\"font-size: 10px; font-weight: normal\">Crunchy</div>": ["Derr Chieftain","Gladiator","Guardian"],
  60. "Derr Dunes<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Grunt","Mintaka","Renegade","Seer","Spellbinder"],
  61. "Dojo<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Samurai"],
  62. "Dojo<div style=\"font-size: 10px; font-weight: normal\">Maki</div>": ["Assassin","Student of the Cheese Belt"],
  63. "Dracano<div style=\"font-size: 10px; font-weight: normal\">Inferno Havarti</div>": ["Draconic Warden","Dragon","Whelpling"],
  64. "Elub Shore<div style=\"font-size: 10px; font-weight: normal\">Brie</div>": ["Pinchy"],
  65. "Elub Shore<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Mystic","Pack","Soothsayer","Vanquisher", "Alnitak"],
  66. "Elub Shore<div style=\"font-size: 10px; font-weight: normal\">Shell</div>": ["Champion","Elub Chieftain","Protector"],
  67. "Event Mice<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Birthday","Glitchpaw","High Roller","Hope","Leprechaun","Lucky","Mobster","Snooty","Treasurer"],
  68. "Fiery Warpath<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Crimson Commander"],
  69. "Fiery Warpath (Wave 1)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Caravan Guard","Desert Archer","Desert Soldier","Gargantuamouse","Vanguard"],
  70. "Fiery Warpath (Wave 2)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Flame Archer","Flame Warrior","Inferno Mage","Sand Cavalry","Sentinel"],
  71. "Fiery Warpath (Wave 3)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Crimson Ranger","Crimson Titan","Crimson Watch","Flame Ordnance","Magmarage","Sandwing Cavalry"],
  72. "Fiery Warpath (Wave 4)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Theurgy Warden","Warmonger"],
  73. "Forbidden Grove<div style=\"font-size: 10px; font-weight: normal\">Ancient</div>": ["Gargoyle","Reaper"],
  74. "Forbidden Grove<div style=\"font-size: 10px; font-weight: normal\">Moon</div>": ["Scavenger"],
  75. "Forbidden Grove<div style=\"font-size: 10px; font-weight: normal\">Radioactive Blue</div>": ["Mutated Brown","Mutated Grey","Mutated White","Realm Ripper"],
  76. "Fungal Cavern<div style=\"font-size: 10px; font-weight: normal\">Diamond</div>": ["Crystal Behemoth","Diamondhide","Huntereater"],
  77. "Fungal Cavern<div style=\"font-size: 10px; font-weight: normal\">Gemstone</div>": ["Crystal Golem","Crystal Lurker","Crystal Observer","Crystal Queen"],
  78. "Fungal Cavern<div style=\"font-size: 10px; font-weight: normal\">Glowing Gruyere</div>": ["Cavern Crumbler","Crag Elder","Crystalline Slasher","Dirt Thing","Gemstone Worshipper","Shattered Obsidian","Splintered Stone Sentry","Stone Maiden"],
  79. "Fungal Cavern<div style=\"font-size: 10px; font-weight: normal\">Mineral</div>": ["Crystal Cave Worm","Crystal Controller","Crystalback","Gemorpher","Stalagmite"],
  80. "Fungal Cavern<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Bitter Root","Floating Spore","Funglore","Lumahead","Mouldy Mole","Mush","Mushroom Sprite","Nightshade Masquerade","Quillback","Spiked Burrower","Spore Muncher","Sporeticus"],
  81. "Gnawnia Rift<div style=\"font-size: 10px; font-weight: normal\">Brie String</div>": ["Agitated Gentle Giant","Excitable Electric","Supernatural"],
  82. "Gnawnia Rift<div style=\"font-size: 10px; font-weight: normal\">Magical String</div>": ["Dream Drifter","Micro","Mighty Mole"],
  83. "Gnawnia Rift<div style=\"font-size: 10px; font-weight: normal\">Marble String</div>": ["Brawny","Greyrun","Riftweaver"],
  84. "Gnawnia Rift<div style=\"font-size: 10px; font-weight: normal\">Resonator</div>": ["Goliath Field"],
  85. "Gnawnia Rift<div style=\"font-size: 10px; font-weight: normal\">Riftiago</div>": ["Cyborg","Raw Diamond","Rift Guardian","Shard Centurion","Spiritual Steel","Wealth"],
  86. "Gnawnian Express Station (Daredevil Canyon)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Fuel"],
  87. "Gnawnian Express Station (Daredevil Canyon)<div style=\"font-size: 10px; font-weight: normal\">Gouda with Black Powder</div>": ["Black Powder Thief"],
  88. "Gnawnian Express Station (Daredevil Canyon)<div style=\"font-size: 10px; font-weight: normal\">Gouda with Dusty Coal</div>": ["Coal Shoveller"],
  89. "Gnawnian Express Station (Daredevil Canyon)<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Train Engineer"],
  90. "Gnawnian Express Station (Daredevil Canyon)<div style=\"font-size: 10px; font-weight: normal\">SB+ with Magmatic Crystal</div>": ["Magmatic Crystal Thief","Magmatic Golem"],
  91. "Gnawnian Express Station (Raider River)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Automorat"],
  92. "Gnawnian Express Station (Raider River)<div style=\"font-size: 10px; font-weight: normal\">Gouda with Roof Rack</div>": ["Steel Horse Rider"],
  93. "Gnawnian Express Station (Raider River)<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Cannonball","Hookshot","Stoutgear"],
  94. "Gnawnian Express Station (Raider River)<div style=\"font-size: 10px; font-weight: normal\">SB+ with Roof Rack</div>": ["Dangerous Duo","Mouse With No Name","Sharpshooter"],
  95. "Gnawnian Express Station (Supply Depot (No Supply Rush))<div style=\"font-size: 10px; font-weight: normal\">Gouda with Supply Schedule</div>": ["Warehouse Manager"],
  96. "Gnawnian Express Station (Supply Depot (No Supply Rush))<div style=\"font-size: 10px; font-weight: normal\">SB+ with Supply Schedule</div>": ["Crate Camo","Cute Crate Carrier"],
  97. "Gnawnian Express Station (Supply Depot (Supply Rush))<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Supply Hoarder"],
  98. "Gnawnian Express Station (Waiting)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Angry Train Staff","Farrier"],
  99. "Gnawnian Express Station (Waiting)<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Parlour Player","Passenger","Photographer","Stowaway","Stuffy Banker","Train Conductor","Travelling Barber","Upper Class Lady","Bartender","Mysterious Traveller","Tonic Salesman"],
  100. "Great Gnarled Tree<div style=\"font-size: 10px; font-weight: normal\">Gnarled</div>": ["Curious Chemist","Eagle Owl","Fairy","Foxy"],
  101. "Great Gnarled Tree<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Goldleaf"],
  102. "Harbour<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Magic"],
  103. "Harbour<div style=\"font-size: 10px; font-weight: normal\">White Cheddar</div>": ["Pirate"],
  104. "Iceberg (Bombing Run (Magnet))<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Stickybomber"],
  105. "Iceberg (Bombing Run)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Heavy Blaster"],
  106. "Iceberg (Brutal Bulwark)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Iceblock","Mammoth","Polar Bear","Snow Slinger"],
  107. "Iceberg (Generals)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["General Drheller","Lady Coldsnap","Lord Splodington","Princess Fist"],
  108. "Iceberg (Hidden Depths)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Frostwing Commander","Living Salt"],
  109. "Iceberg (Icewing's Lair)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Frostlance Guard","Icewing"],
  110. "Iceberg (The Deep Lair)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Deep"],
  111. "Iceberg (The Mad Depths (Hearthstone))<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Snowblind","Wolfskie"],
  112. "Iceberg (The Mad Depths (Magnet))<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Iceblade","Water Wielder"],
  113. "Iceberg (Treacherous Tunnels (Magnet))<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Chipper","Icebreaker"],
  114. "Jungle of Dread<div style=\"font-size: 10px; font-weight: normal\">Creamy Havarti</div>": ["Jurassic"],
  115. "Jungle of Dread<div style=\"font-size: 10px; font-weight: normal\">Crunchy Havarti</div>": ["Fetid Swamp"],
  116. "Jungle of Dread<div style=\"font-size: 10px; font-weight: normal\">Magical Havarti</div>": ["Stonework Warrior"],
  117. "Jungle of Dread<div style=\"font-size: 10px; font-weight: normal\">Pungent Havarti</div>": ["Chitinous"],
  118. "Jungle of Dread<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Pygmy Wrangler","Swarm of Pygmy Mice"],
  119. "Jungle of Dread<div style=\"font-size: 10px; font-weight: normal\">Spicy Havarti</div>": ["Magma Carrier"],
  120. "Jungle of Dread<div style=\"font-size: 10px; font-weight: normal\">Sweet Havarti</div>": ["Primal"],
  121. "King's Arms<div style=\"font-size: 10px; font-weight: normal\">White Cheddar</div>": ["Longtail","Pugilist","Scruffy","Spotted"],
  122. "King's Gauntlet<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Clockwork Samurai","Hapless Marionette","Puppet Master","Sock Puppet Ghost","Toy Sylvan","Wound Up White"],
  123. "King's Gauntlet<div style=\"font-size: 10px; font-weight: normal\">Tier 2</div>": ["Bandit","Escape Artist","Impersonator","Lockpick","Rogue","Stealth"],
  124. "King's Gauntlet<div style=\"font-size: 10px; font-weight: normal\">Tier 3</div>": ["Berserker","Cavalier","Fencer","Knight","Page","Phalanx"],
  125. "King's Gauntlet<div style=\"font-size: 10px; font-weight: normal\">Tier 4</div>": ["Cowbell","Dancer","Drummer","Fiddler","Guqin Player"],
  126. "King's Gauntlet<div style=\"font-size: 10px; font-weight: normal\">Tier 5</div>": ["Aquos","Black Mage","Ignis","Terra","Zephyr"],
  127. "King's Gauntlet<div style=\"font-size: 10px; font-weight: normal\">Tier 6</div>": ["Paladin","Sacred Shrine","White Mage"],
  128. "King's Gauntlet<div style=\"font-size: 10px; font-weight: normal\">Tier 7</div>": ["Fiend","Necromancer"],
  129. "King's Gauntlet<div style=\"font-size: 10px; font-weight: normal\">Tier 8</div>": ["Eclipse"],
  130. "Laboratory<div style=\"font-size: 10px; font-weight: normal\">Radioactive Blue</div>": ["Monster"],
  131. "Lagoon<div style=\"font-size: 10px; font-weight: normal\">Gnarled</div>": ["Centaur","Goblin","Nomad","Tiger","Troll","Water Nymph"],
  132. "Lagoon<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Wicked Witch of Whisker Woods"],
  133. "Lagoon<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Elven Princess","Treant"],
  134. "Lagoon<div style=\"font-size: 10px; font-weight: normal\">Wicked Gnarly</div>": ["Harpy","Hydra","Silth"],
  135. "Living Garden (Not Poured)<div style=\"font-size: 10px; font-weight: normal\">Duskshade Camembert</div>": ["Camoflower","Carmine the Apothecary","Shroom"],
  136. "Living Garden (Not Poured)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Bark","Calalilly","Strawberry Hotcakes","Thistle"],
  137. "Living Garden (Poured)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Thirsty"],
  138. "Lost City (Curse Lifted)<div style=\"font-size: 10px; font-weight: normal\">Dewthief Camembert</div>": ["Essence Collector","Ethereal Librarian"],
  139. "Lost City (Cursed)<div style=\"font-size: 10px; font-weight: normal\">Dewthief Camembert</div>": ["Cursed","Ethereal Enchanter","Ethereal Engineer","Ethereal Thief"],
  140. "M400 hunting<div style=\"font-size: 10px; font-weight: normal\">Fusion Fondue</div>": ["M400"],
  141. "Meadow<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Flying","Tiny"],
  142. "Meadow<div style=\"font-size: 10px; font-weight: normal\">White Cheddar</div>": ["Field","Lightning Rod"],
  143. "Meditation Room<div style=\"font-size: 10px; font-weight: normal\">Combat</div>": ["Master of the Cheese Fang"],
  144. "Meditation Room<div style=\"font-size: 10px; font-weight: normal\">Glutter</div>": ["Master of the Cheese Belt"],
  145. "Meditation Room<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Hapless"],
  146. "Meditation Room<div style=\"font-size: 10px; font-weight: normal\">Susheese</div>": ["Master of the Cheese Claw"],
  147. "Mountain<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Abominable Snow","Black Widow","Fog","Frosty Snow","Pebble"],
  148. "Mountain<div style=\"font-size: 10px; font-weight: normal\">SB+ with Prospector's</div>": ["Silvertail"],
  149. "Mountain<div style=\"font-size: 10px; font-weight: normal\">White Cheddar</div>": ["Frozen","Ninja"],
  150. "Mountain<div style=\"font-size: 10px; font-weight: normal\">White Cheddar with Prospector's</div>": ["Diamond","Gold"],
  151. "Mousoleum<div style=\"font-size: 10px; font-weight: normal\">Moon</div>": ["Lycan"],
  152. "Mousoleum<div style=\"font-size: 10px; font-weight: normal\">Radioactive Blue</div>": ["Bat","Gluttonous Zombie","Ravenous Zombie","Zombie"],
  153. "Mousoleum<div style=\"font-size: 10px; font-weight: normal\">Undead Emmental</div>": ["Ghost","Mummy","Zombot Unipire"],
  154. "Muridae Market<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Falling Carpet","Pie Thief","Snake Charmer","Spice Merchant"],
  155. "Muridae Market<div style=\"font-size: 10px; font-weight: normal\">Gouda with Artisan</div>": ["Lumberjack"],
  156. "Muridae Market<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Desert Architect","Desert Nomad","Market Guard","Market Thief"],
  157. "Muridae Market<div style=\"font-size: 10px; font-weight: normal\">SB+ with Artisan</div>": ["Blacksmith","Glass Blower","Limestone Miner","Mage Weaver"],
  158. "Nerg Plains<div style=\"font-size: 10px; font-weight: normal\">Brie</div>": ["Chameleon"],
  159. "Nerg Plains<div style=\"font-size: 10px; font-weight: normal\">Gumbo</div>": ["Defender","Nerg Chieftain","Slayer"],
  160. "Nerg Plains<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Alnilam","Beast Tamer","Conjurer","Conqueror","Finder"],
  161. "Pinnacle Chamber<div style=\"font-size: 10px; font-weight: normal\">Onyx Gorgonzola</div>": ["Dojo Sensei"],
  162. "Pinnacle Chamber<div style=\"font-size: 10px; font-weight: normal\">Rumble</div>": ["Master of the Dojo"],
  163. "S.S. Huntington III<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Bottled","Briegull","Captain","Leviathan","Salt Water Snapper","Shipwrecked","Swabbie"],
  164. "S.S. Huntington III<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Buccaneer","Cook","Mermouse","Shelder","Siren","Squeaken"],
  165. "Sand Crypts<div style=\"font-size: 10px; font-weight: normal\">Graveblossom Camembert</div>": ["Sand Colossus","Sarcophamouse","Scarab","Serpentine"],
  166. "Sand Crypts<div style=\"font-size: 10px; font-weight: normal\">Graveblossom Camembert with Grub Scent</div>": ["King Grub"],
  167. "Sand Crypts<div style=\"font-size: 10px; font-weight: normal\">Graveblossom Camembert with Shattering</div>": ["King Scarab"],
  168. "Sand Dunes (No Stampede)<div style=\"font-size: 10px; font-weight: normal\">Dewthief Camembert</div>": ["Dunehopper","Grubling Herder","Sand Pilgrim"],
  169. "Sand Dunes (Stampede)<div style=\"font-size: 10px; font-weight: normal\">Dewthief Camembert</div>": ["Quesodillo","Spiky Devil"],
  170. "Sand Dunes (Stampede)<div style=\"font-size: 10px; font-weight: normal\">Dewthief Camembert with Grubling Chow</div>": ["Grubling"],
  171. "Seasonal Garden (Fall)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Harvest Harrier","Harvester","Pumpkin Head","Scarecrow","Whirleygig"],
  172. "Seasonal Garden (Fall)<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Fall Familiar"],
  173. "Seasonal Garden (Spring)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Hydrophobe","Puddlemancer","Tanglefoot","Vinetail"],
  174. "Seasonal Garden (Spring)<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Derpicorn","Spring Familiar"],
  175. "Seasonal Garden (Summer)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Firebreather","Stinger","Summer Mage"],
  176. "Seasonal Garden (Summer)<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Firefly","Hot Head","Monarch"],
  177. "Seasonal Garden (Winter)<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Bruticle","Icicle","Winter Mage"],
  178. "Seasonal Garden (Winter)<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Frostbite","Over-Prepared","Penguin"],
  179. "Slushy Shoreline<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Incompetent Ice Climber","Snow Bowler"],
  180. "Slushy Shoreline<div style=\"font-size: 10px; font-weight: normal\">Gouda with Softserve</div>": ["Saboteur","Snow Sniper","Yeti"],
  181. "Slushy Shoreline<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Living Ice","Snow Soldier"],
  182. "Sunken City (Carnivore Cove)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Carnivore","Derpshark"],
  183. "Sunken City (Coral Castle)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Coral Dragon","Coral Gardener","Coral Guard","Coral Queen","Turret Guard"],
  184. "Sunken City (Coral Garden)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Coral Harvester"],
  185. "Sunken City (Coral Reef)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Coral","Coral Cuddler","Seadragon"],
  186. "Sunken City (Deep Oxygen Stream)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Eel","Jellyfish"],
  187. "Sunken City (Docked)<div style=\"font-size: 10px; font-weight: normal\">Brie</div>": ["City Noble","Sunken Citizen"],
  188. "Sunken City (Docked)<div style=\"font-size: 10px; font-weight: normal\">Fishy Fromage</div>": ["Clumsy Carrier","Elite Guardian","Enginseer","Oxygen Baron"],
  189. "Sunken City (Docked)<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["City Worker","Hydrologist"],
  190. "Sunken City (Feeding Grounds)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Barracuda","Clownfish","Spear Fisher"],
  191. "Sunken City (Haunted Shipwreck)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Deep Sea Diver","Deranged Deckhand","Pirate Anchor","Sunken Banshee","Swashblade"],
  192. "Sunken City (Lair of the Ancients)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Ancient of the Deep","Tritus"],
  193. "Sunken City (Lost Ruins)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Angler","Mershark","Octomermaid","Old One","Urchin King"],
  194. "Sunken City (Magma Flow)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Treasure Keeper"],
  195. "Sunken City (Mermouse Den)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Mermousette"],
  196. "Sunken City (Monster Trench)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Serpent Monster"],
  197. "Sunken City (Murky Depths)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Betta","Koimaid","Angelfish"],
  198. "Sunken City (Oxygen Stream)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Stingray"],
  199. "Sunken City (Pearl Patch)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Pearl Diver","Sand Dollar Queen"],
  200. "Sunken City (Rocky Outcrop)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Barnacle Beautician","Bottom Feeder","Crabolia"],
  201. "Sunken City (Sand Dollar Sea Bar)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Saltwater Axolotl","Sand Dollar Diver"],
  202. "Sunken City (School of Mice)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Guppy","School of Mish","Tadpole"],
  203. "Sunken City (Shallow Shoals)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Cuttle","Manatee","Mlounder Flounder","Puffer"],
  204. "Sunken City (Shipwreck)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Dread Pirate Mousert"],
  205. "Sunken City (Sunken Treasure)<div style=\"font-size: 10px; font-weight: normal\">SB+/Gouda</div>": ["Pearl","Treasure Hoarder"],
  206. "Tournament Hall<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Crown Collector"],
  207. "Town of Digby<div style=\"font-size: 10px; font-weight: normal\">Limelight</div>": ["Big Bad Burroughs","Core Sample","Demolitions","Industrious Digger","Itty-Bitty Burroughs","Lambent Crystal","Miner","Nugget","Rock Muncher","Stone Cutter","Subterranean"],
  208. "Town of Gnawnia<div style=\"font-size: 10px; font-weight: normal\">Gilded</div>": ["Master Burglar"],
  209. "Town of Gnawnia<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Brown","Grey","White"],
  210. "Town of Gnawnia<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Nibbler"],
  211. "Town of Gnawnia<div style=\"font-size: 10px; font-weight: normal\">White Cheddar</div>": ["Cowardly","Dwarf"],
  212. "Toxic Spill<div style=\"font-size: 10px; font-weight: normal\">Rancid Radioactive Blue</div>": ["Biohazard","Gelatinous Octahedron","Mutant Mongrel","Mutant Ninja","Mutated Behemoth","Mutated Siblings","Outbreak Assassin","Plague Hag","Scrap Metal Monster","Slimefist","Sludge","Sludge Soaker","Sludge Swimmer","Spore","Swamp Runner","Telekinetic Mutant","Tentacle","The Menace","Toxic Warrior"],
  213. "Toxic Spill (Hazmat and Lab Techs)<div style=\"font-size: 10px; font-weight: normal\">Rancid Radioactive Blue</div>": ["Hazmat","Lab Technician"],
  214. "Toxic Spill (Knight)<div style=\"font-size: 10px; font-weight: normal\">Rancid Radioactive Blue</div>": ["Bog Beast","Monster Tail"],
  215. "Training Grounds<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Archer","Dumpling Chef","Kung Fu","Monk","Worker"],
  216. "Twisted Garden (Not Poured)<div style=\"font-size: 10px; font-weight: normal\">Duskshade Camembert</div>": ["Barkshell","Thorn","Twisted Hotcakes","Twisted Lilly"],
  217. "Twisted Garden (Not Poured)<div style=\"font-size: 10px; font-weight: normal\">Lunaria Camembert</div>": ["Camofusion","Fungal Spore","Twisted Carmine"],
  218. "Twisted Garden (Not Poured)<div style=\"font-size: 10px; font-weight: normal\">Lunaria Camembert with Shattering</div>": ["Shattered Carmine"],
  219. "Twisted Garden (Poured)<div style=\"font-size: 10px; font-weight: normal\">Duskshade Camembert</div>": ["Dehydrated"],
  220. "Whisker Woods Rift (Rage Level 0-24)<div style=\"font-size: 10px; font-weight: normal\">Magical String</div>": ["Bloomed Sylvan","Cranky Caterpillar","Crazed Goblin","Fungal Frog","Gilded Leaf","Karmachameleon","Mossy Moosker","Spirit of Balance","Twisted Treant","Water Sprite"],
  221. "Whisker Woods Rift (Rage Level 25+ Crazed Clearing)<div style=\"font-size: 10px; font-weight: normal\">Magical String</div>": ["Treant Queen", "Spirit Fox", "Red-Eyed Watcher Owl"],
  222. "Whisker Woods Rift (Rage Level 25+ Gigantic Gnarled Tree)<div style=\"font-size: 10px; font-weight: normal\">Magical String</div>": ["Red Coat Bear", "Rift Tiger", "Nomadic Warrior"],
  223. "Whisker Woods Rift (Rage Level 25+ Deep Lagoon)<div style=\"font-size: 10px; font-weight: normal\">Magical String</div>": ["Medicine", "Tree Troll", "Winged Harpy"],
  224. "Whisker Woods Rift (Crazed Clearing)<div style=\"font-size: 10px; font-weight: normal\">Magical String with Cherry</div>": ["Cherry Sprite"],
  225. "Whisker Woods Rift (Gigantic Gnarled Tree)<div style=\"font-size: 10px; font-weight: normal\">Magical String with Gnarled</div>": ["Naturalist"],
  226. "Whisker Woods Rift (Deep Lagoon)<div style=\"font-size: 10px; font-weight: normal\">Magical String with Stagnant</div>": ["Grizzled Silth"],
  227. "Whisker Woods Rift (Rage Level 50 Crazed Clearing)<div style=\"font-size: 10px; font-weight: normal\">Magical String</div>": ["Cyclops Barbarian"],
  228. "Whisker Woods Rift (Rage Level 50 Gigantic Gnarled Tree)<div style=\"font-size: 10px; font-weight: normal\">Magical String</div>": ["Centaur Ranger"],
  229. "Whisker Woods Rift (Rage Level 50 Deep Lagoon)<div style=\"font-size: 10px; font-weight: normal\">Magical String</div>": ["Tri-dra"],
  230. "Windmill<div style=\"font-size: 10px; font-weight: normal\">SB+</div>": ["Farmhand","Mole","Speedy"],
  231. "Windmill<div style=\"font-size: 10px; font-weight: normal\">White Cheddar</div>": ["Spud"],
  232. "Zugzwang's Tower<div style=\"font-size: 10px; font-weight: normal\">SB+/Checkmate</div>": ["Chess Master","Mystic King","Mystic Queen","Technic King","Technic Queen"],
  233. "Zugzwang's Tower<div style=\"font-size: 10px; font-weight: normal\">Gouda</div>": ["Mystic Bishop","Mystic Knight","Mystic Pawn","Mystic Rook","Technic Bishop","Technic Knight","Technic Pawn","Technic Rook"]
  234. };
  235. var miceRows = {},
  236. miceGroups = {},
  237. miceImages = {},
  238. miceMap = [],
  239. miceOrdered = '',
  240. remainingMice = '',
  241. locationsLoaded = false;
  242. var mapButton = document.getElementsByClassName('treasureMap')[0];
  243. mapButton.addEventListener('click', doMap, false);
  244.  
  245. function doMap() {
  246. var loaded = (document.getElementsByClassName('treasureMapPopup-mice-group-header').length == 0) ? false : true;
  247. if(loaded) {
  248. prepareMice();
  249. rearrangeMice();
  250. } else {
  251. setTimeout(doMap, 1000);
  252. }
  253. }
  254.  
  255. function prepareMice() {
  256. var miceContainer = document.getElementsByClassName('treasureMapPopup-miceBlockRow')[0],
  257. mice = miceContainer.getElementsByClassName('mice')[0],
  258. miceContent = mice.getElementsByClassName('treasureMapPopup-leftBlock-content')[0],
  259. miceContentDefault = miceContent.getElementsByClassName('treasureMapPopup-leftBlock-content-default')[0],
  260. uncaughtmice = miceContentDefault.getElementsByClassName('uncaughtmice')[0],
  261. miceGroupContainer = uncaughtmice.getElementsByClassName('treasureMapPopup-mice-group-miceContainer')[0],
  262. miceMapUncaugth = miceGroupContainer.getElementsByClassName('treasureMapPopup-mice-group-mouse');
  263.  
  264. miceRows = {};
  265. miceGroups = {};
  266. miceImages = {};
  267. miceMap = [];
  268. for(var i=0; i<miceMapUncaugth.length; i++) {
  269. var mouseUncaughtElement = miceMapUncaugth[i],
  270. mouseName = mouseUncaughtElement.getAttribute("data-name"),
  271. mouseGroup = mouseUncaughtElement.getAttribute("data-group"),
  272. mouseImg = mouseUncaughtElement.getAttribute("data-image");
  273. miceRows[mouseName] = mouseUncaughtElement.innerHTML;
  274. miceGroups[mouseName] = mouseGroup;
  275. miceImages[mouseName] = mouseImg;
  276. miceMap.push(mouseName);
  277. }
  278. miceOrdered = '';
  279. remainingMice = '';
  280. }
  281. function rearrangeMice() {
  282. miceOrdered += '<div class="treasureMapPopup-mice-group-header" style="margin-top:10px">Uncaught Mice</div>';
  283. for(loc in LOCATIONS) {
  284. var mice = LOCATIONS[loc], miceList = '';
  285. for(key in mice) {
  286. var mouse = mice[key];
  287. if(arrayContains(miceMap, mouse)) {
  288. var mouseRawHtml = miceRows[mouse],
  289. mouseHtml = mouseRawHtml.replace(new RegExp(mouse, 'g'), loc),
  290. index = miceMap.indexOf(mouse);
  291. miceList += '<div onmouseout="app.views.TreasureMapView.map.removeHighlight(); return false;" onmouseover="app.views.TreasureMapView.map.highlightMouse(this);" data-name="'+mouse+'" data-group="'+miceGroups[mouse]+'" data-image="'+miceImages[mouse]+'" class="treasureMapPopup-mice-group-mouse treasureMapPopup-searchIndex" style="width: 33%">'+mouseHtml+'</div>';
  292. //miceList += '<div class="treasureMap-mice-group-row">'+mouseHtml+'</div>';
  293. miceMap.splice(index, 1);
  294. }
  295. }
  296. if(miceList.length > 0) {
  297. //miceOrdered += '<div class="treasureMapPopup-mice-group-header" style="margin-top:10px">'+loc+'</div>'+miceList;
  298. miceOrdered += miceList;
  299. }
  300. }
  301. for(var i=0; i<miceMap.length; i++) {
  302. var mouse = miceMap[i];
  303. //remainingMice += '<div class="treasureMap-mice-group-row">'+miceRows[mouse]+'</div>';
  304. remainingMice += '<div onmouseout="app.views.TreasureMapView.map.removeHighlight(); return false;" onmouseover="app.views.TreasureMapView.map.highlightMouse(this);" data-name="'+mouse+'" data-group="'+miceGroups[mouse]+'" data-image="'+miceImages[mouse]+'" class="treasureMapPopup-mice-group-mouse treasureMapPopup-searchIndex">'+miceRows[mouse]+'</div>';
  305. }
  306. if(remainingMice != '') {
  307. miceOrdered += '<div class="treasureMapPopup-mice-group-header" style="margin-top:10px">Unknow Location</div>'+remainingMice;
  308. }
  309.  
  310. var firstMiceGroup = document.getElementsByClassName('uncaughtmice')[0];
  311. firstMiceGroup.innerHTML = miceOrdered;
  312. }
  313.  
  314. function rearrangeMiceOld() {
  315. for(loc in LOCATIONS) {
  316. var mice = LOCATIONS[loc], miceList = '';
  317. for(key in mice) {
  318. var mouse = mice[key];
  319. if(arrayContains(miceMap, mouse)) {
  320. var mouseHtml = miceRows[mouse],
  321. index = miceMap.indexOf(mouse);
  322. miceList += '<div onmouseout="app.views.TreasureMapView.map.removeHighlight(); return false;" onmouseover="app.views.TreasureMapView.map.highlightMouse(this);" data-name="'+mouse+'" data-group="'+miceGroups[mouse]+'" data-image="'+miceImages[mouse]+'" class="treasureMapPopup-mice-group-mouse treasureMapPopup-searchIndex">'+mouseHtml+'</div>';
  323. //miceList += '<div class="treasureMap-mice-group-row">'+mouseHtml+'</div>';
  324. miceMap.splice(index, 1);
  325. }
  326. }
  327. if(miceList.length > 0) {
  328. miceOrdered += '<div class="treasureMapPopup-mice-group-header" style="margin-top:10px">'+loc+'</div>'+miceList;
  329. }
  330. }
  331. for(var i=0; i<miceMap.length; i++) {
  332. var mouse = miceMap[i];
  333. //remainingMice += '<div class="treasureMap-mice-group-row">'+miceRows[mouse]+'</div>';
  334. remainingMice += '<div onmouseout="app.views.TreasureMapView.map.removeHighlight(); return false;" onmouseover="app.views.TreasureMapView.map.highlightMouse(this);" data-name="'+mouse+'" data-group="'+miceGroups[mouse]+'" data-image="'+miceImages[mouse]+'" class="treasureMapPopup-mice-group-mouse treasureMapPopup-searchIndex">'+miceRows[mouse]+'</div>';
  335. }
  336. if(remainingMice != '') {
  337. miceOrdered += '<div class="treasureMapPopup-mice-group-header" style="margin-top:10px">Uncaught Mice</div>'+remainingMice;
  338. }
  339.  
  340. var firstMiceGroup = document.getElementsByClassName('uncaughtmice')[0];
  341. firstMiceGroup.innerHTML = miceOrdered;
  342. }
  343.  
  344. function arrayContains(a, obj) {
  345. var i = a.length;
  346. while(i--) {
  347. if(a[i] === obj) {
  348. return true;
  349. }
  350. }
  351. return false;
  352. }