Ikariam Upgrade Watcher 3

Attaches a simple icon on each building which show level and if upgradeable

  1. // ==UserScript==
  2. // @name Ikariam Upgrade Watcher 3
  3. // @version 2.6.4
  4. // @namespace ikariam
  5. // @description Attaches a simple icon on each building which show level and if upgradeable
  6. // @author rmeza (update for ikariam v0.7.0)
  7. // boun (update for greasemonkey 2.0+)
  8. // Apollo ヅ, mrkokaney
  9. // based on an original script from Anh Tuan Nguyen Dao (http://www.atdao.dk) (Update by michalis)
  10. // Almost entirely rewritten for ikariam v0.5.0,
  11. // Original from Anh Tuan Nguyen Dao : http://userscripts.org/scripts/show/49385
  12. // Michalis update : http://userscripts.org/scripts/show/58694
  13. //
  14. // @include /*?action=loginAvatar&*
  15. // @include https://s5-gr.ikariam.gameforge.com/*?view=city&*
  16. // @include https://s5-gr.ikariam.gameforge.com/*?*&function=changeCurrentCity&*
  17. //
  18. // @grant none
  19. //
  20. // ==/UserScript==
  21.  
  22. // Changelog:
  23. // v2.6.3 (jan 8, 2016) (rmeza)
  24. // - Update temple and shipyard levels
  25. // v2.6.2 (dec 6, 2014) (boun)
  26. // - New building Sea Chart Archive (Thanks to Emmanuel who provided all datas!)
  27. // v2.6.1 (sept 24, 2014) (boun)
  28. // - Fix for greaemonkey 2.0+ (removed GM_ uses, moved saved data to localStorage, using grant none)
  29. // - Copied to greasyfork from old script (fetched on userscripts)
  30. // v2.6.0 (oct 21, 2013)
  31. // - Add black market (Thx Valkazaar).
  32. // - Fix building costs errors (thx mrkokaney).
  33. // - Fix host detection bug (Thx Scavenger) and icon hide bug.
  34. // v2.5.3 (sept 12, 2013) new gameforge servers
  35. // v2.5.2 (aug 23, 2013) Regression fix: city change
  36. // v2.5.1 (aug 23, 2013)
  37. // - Fix: undeclared variable bug (thanks Qmegas)
  38. // - A lot of code cleanup
  39. // - GreaseKit support dropped. Please use TamperMonkey.
  40. // v2.5 (mrkokaney, aug 12, 2013)
  41. // - massive costs updates
  42. // - tables are now easier to be modified (maybe for future updates) as resources and levels are clearly seperated
  43. // - comments over the tables with building names and resources needed for the upgrades were modified
  44. // - jQuery upgrade
  45. // v2.4 (dec 17, 2012)
  46. // - New building Pirate Fortress
  47. // v2.3.1 (dec 17, 2012)
  48. // - Fix : Hanged when reloading the view before spirit was researched.
  49. // v2.3 (dec 16, 2012)
  50. // - Fix : icon on position 16 can be hovered again.
  51. // v2.2 (dec 15, 2012)
  52. // - Fix : building updates when changing from enemy to own city and vice-versa.
  53. // v2.1 (sept 10, 2012)
  54. // - Fix : reduction buildings detected even when they are in construction.
  55. // - Fix : CSS issue with firefox 15, the tooltip appeared as if it had no background.
  56. // v2.0.6 (july 31, 2012)
  57. // - Fix : the port appeared not-upgradeable when busy.
  58. // v2.0.5 (june 24, 2012)
  59. // - massive update of the costs, thanks to Woeka and ManicMiner.
  60. // - Fix: detection of construction site (the GF changed it...)
  61. // - jQuery is now used in noConflict mode, to allow the use of multiple scripts in Chrome/Tampermonkey
  62. // v2.0.4 (may 25, 2012)
  63. // - right alignment of numbers, minor corrections on optician costs for levels 28-32
  64. // - palace constructionSite bugfix
  65. // v2.0.3 (may 9, 2012)
  66. // - display gray icons in cities that are not your own.
  67. // v2.0.2 (may 5, 2012)
  68. // - Fix : displays also on the first city view after you login !
  69. // - Fix : proper display for small buildings using only wood.
  70. // v2.0.1 (may 5, 2012)
  71. // - Thousands separator
  72. // v2.0.0 (may 5, 2012)
  73. // - New author :)
  74. // - Upgrade for ikariam v0.5.0
  75. // - Removed ajax use to find research levels : No network activity whatsoever.
  76. // - Removed support for older ikariam versions.
  77. // - show info box is not an option anymore (maybe back later... no time now)
  78. // - Uses jQuery (much easier...)
  79. // Updates by michalis
  80. // v1.4.2 (20. February 2011)
  81. // - Added Support for museum with costs till level 21.
  82. // v1.4.1 (16. September 2010)
  83. // - Added Support for the new dump building with costs till level 40 and fix the problem with info box.
  84. // Original author Anh Tuan Nguyen Dao
  85. // v1.3.2 (26. October 2009)
  86. // - Fixed icon and tooltip positioning for temple (thanks to Lordshinjo "http://userscripts.org/users/114555" for pointing out the problem).
  87. // v1.3.1 (16. October 2009)
  88. // - Fixed the building cost calculation has been revised in Ikariam version 0.32 which I did not know, so the calculation are all wrong. This is now fixed (thanks to RandomMan "http://userscripts.org/users/91016" for pointing out the problem).
  89. // - Fixed a bug with dot-notation problem for servers which uses such notation (thanks to malus "http://userscripts.org/users/109688" for posting the bug).
  90. // - For servers which are still at version 0.31, the "old" building cost calculation is still supported.
  91. // v1.3.0 (15. October 2009)
  92. // - Building cost database updated.
  93. // - Images are now linked in place.
  94. // - Ready for Ikariam version 0.32.
  95. // - Fixed a bug where the info box is not positioning correctly on palace or residence construction spot.
  96. // - Fixed a bug for servers which use dot-notation as thousand seperator in stead of comma (thanks to Carpediem "http://userscripts.org/users/100184" for pointing out the bug).
  97. // v1.2.2 (27. June 2009)
  98. // - Now supporting CreaseKit and Fluid (thanks to Kahil Young "http://userscripts.org/users/69426" for the suggestion and testing the mod in Fluid).
  99. // v1.2.1 (8. June 2009)
  100. // - Fixed a bug which caused no resource reduction when a reduction building is being upgrade.
  101. // - Improved positioning of the icons. Icon and info box at construction spot are now correctly positioned.
  102. // v1.2.0 (2. June 2009)
  103. // - New: Added icon and info box to construction spot (thanks to giangkid "http://userscripts.org/users/86129" for the suggestion).
  104. // v1.1.1 (26. May 2009)
  105. // - Fixed a bug when NOT using Black Canvas add-on to Firefox, the level indication is not centralized correctly.
  106. // v1.1.0 (25. May 2009)
  107. // - New: Added a info box which shows up when mouse over the icon, the box can be turned off in the options page.
  108. // - Fixed a bug where in a rare case, an icon is not shown on the wall.
  109. // - Fixed a bug which caused no sulfur reduction bonus.
  110. // v1.0.3 (17. May 2009)
  111. // - Fixed first time running check which caused unnecessarily research checks.
  112. // v1.0.2 (17. May 2009)
  113. // - Fixed the parsing of the building level correctly for different languages (thanks to oliezekat "http://userscripts.org/users/78627").
  114. // - Improved bureaucracy-spot check.
  115. // v1.0.1 (17. May 2009)
  116. // - Fixed bureaucracy-spot, not showing if you are not done with that research.
  117. // - Removed alert boxes which shows up at the start.
  118. // v1.0.0 (16. May 2009)
  119.  
  120. // only for debug...
  121. //restore_consolelog();
  122.  
  123. var imgYes = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH9SURBVHjatJbdK0NhHMd/Oy5ES5oUF/I2skySaBx5acWNXCrhwkuGC+IPIS4w5Qopl3JDLbOMFZLQxAy5mPKStJQL5vddz7RwZrPjV989ned0Pt+z55zn9z2aQCBAESqVVcYqYWlZWWL+huVnHbEOWE9KAI2CQQqrhSXP7y5IGx47Pb48kvvWHTxpyDCQLllHDfp66qzoeOcpJ2uF9RyNQTHLMrE5mTi1NU1vgbdI/5ASNAk0WDNAw3VDr3xoZZ1EMjA7Lhyti/tLZDuzUSxlLjRTe3kb1ebXLvOh7SeDUlZ/43ST5H24pL9UXlourQ+sYclmWIeYk8IeZlf3Uu+f4ShcCwZYgvlp0DxmH0/i5aF4CwywwAwZ6PC2WJ2zpFYJlgw2DCpntq3Sb29LLAUWmGDjx+D0Okntcl25MBTBICOeB6tU53ceDJkw0GKXql2CqZXonwsGfvQVtUsw/TC4xQ5UuwrS9Rh8MHDLebLqBqYcE4ZTGOz1V1ve0RXVKrDABBsG9+jnFrlPNQPBwua6D71Fq6P1I6/cauOGgwEWmOHNDpE3h34ezwPHtWCAFYrRb4HDQRMMnFg7K+4ccA4excAJD54ebrmJ6IrRRCbWXCzLXChofgv9VBH6VeGhf+w7Dp40Zhq/hv6OCP2naL8qlD5bssX8dbSfLR8CDACURMy5Nc8LLAAAAABJRU5ErkJggg==";
  124. var imgWait = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH/SURBVHjatJbNSwJRFMWvg2DCGFKEComLCLIPMqIiWlW7qCSIiDYRLfof2rduGS0k2lS0CSvaVauQqEjpwyCCwkDDCkmhhNDuGd6EfahjTheOMG+c35l5b+aeZ8hms1SgrKw2VgtLZjnFeISVYp2xTlmJfABDHoNK1jCrx7/3JB2GkpRIvtNN5E05WeesIKvFSF2tFvL2VWd46IC1yXrRYtDEmln2P5hWtuOUyRR8QpIkA00M1tCk15bmw0XWRSGD/qPz5NjW/jMFgi9USnV7Kmmot4o6mi3rfLirjhtz/tPKGl1YjVIklqZSCzd0z9d1zFlG+fCRFVKeMGcxp2bnb6W/wNXCtWCAJZifBoNLGw9mnh4qt8AAC0zVoApvy9pOnPQqweoBGwadPCAVe1tKKbDABBs/7pPLFOldwbDCbICB/b6Mhc1Xd1GF6YCBjK9U7xJMWaJ/Lhik0Ff0LsFMwSBWazfpbuByKMwoDMLtjbLuBh63wryCwfH4QE0GXVG3eWcWmGBLojEd8IBuBoKFjHhU36LtqRFbmltt2XAwwAIzt9kh8nzo584yFhzXggGWGqM/Aof7uhI4pXZW3DngHDxfAue3yETwTHPLNaEraolMzLmYFp8aNMVC3ypCvzs39K/vXpWT9S7z99APiNBPaN1V5Nu2uNRepnXb8iHAALTTzrv1a76ZAAAAAElFTkSuQmCC";
  125. var imgNo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH6SURBVHjatJa7S8NgFMVvo7UGiq9JBxGnWkTEwYoPXFzFRelc6VDp0H/A2X9B7FDoXHQRVxfxgQ8QEalOUhx0EFu10NZq6jkxkfpIjTZeOP1ISn43373kns9VqVSkRrRBQ9AA5IW6jftXUB46hY6hnBXAZZGgBZqBxouplFLe3pZKNivPFxf6n40+n7ja28U9MSHNwaCGWzvQOvRgJ0E/FCnE455CIiGiaVIzFEXUcFjUSKSEqzh0VivBVHl3N1haXZWnrS35TTRNTopnbk7cY2MpXG5+l2AQWrifnVVeMhn5SzT09Ejr2hq3vAKd6Busaub8Yyz2ZziDz5JBlsF8TzBdWF5WUR6pN8ggi0yzRB1Yl+4CAeXHhtoNNL7j4ICwRe4gUEwmnYMzwNKZYPPHX97fF6ejfHjIpY8JOutprGXDLy+5dDGBV8NX6nQYTK8i/xxMkFcwVxwHvzHzTHDDL9DpaOjt5XLNBGn3yIjjCdzDw1zOmeCoORTS+HE4Vx9FdCbYpN5ynquhkGN8g0WPuDVfe0ONRksYtfWXBgyyyKwedrS8BOd5PQ3ns2SQZdroF8OB0eiG89vJyjcnHMZjaTjVxhPGyPUUkkl7lomaG2VJmEbzk+m3GaY/+sH00+k30/f7P5v+nmH6ObunCqtji9mgjN1jy6sAAwD9Hc4TcS9VxQAAAABJRU5ErkJggg==";
  126. var imgUnknown = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHmSURBVHjatJYxT8JQFIUvXYgJGOJkQ0zDpoiIDCbGsWETSUjjbhz8MfwCBzcmQ0gQN9LRuBhERHQjjSE4MBBhYSne0zwIqMXW1pscmj5433m8tvc0MJlMaElFWHusHVaItSHG31gj1hPrgTWwAwRsDFZZx6zDWq0mNRoNGg6HZBiG9aWiKBQOhymVSlEmkzF56JZ1zfpwYrDNOi+Xy8FKpUKmaS77hyRJEuVyOcrn82M+vWA9LzNQm83mia7rVK/XyU2l02lSVZWSyeQVn+qzBcz9ZpelFYtF13AU5mAuGIK1YICLeVooFKRer0d/LcwFAyzBnBkclUqlFd4e8lpggAXm1GANd0u1WiW/SrAOwYbBPg9Iv90tbgosMMHGx1ar1SK/q91u47AJg3UvF9auut0uDjIMQnhK/S7BDEn0zwWDEfqK3yWYIxi8y7Lsu0E0GrWePRi8JBIJ3w3i8TgOrzC4z2azJrqib/vOLDDBBrWPfs4DvhkIFjKiP132jaZpY261nuFggAXmfLND5F2in3u54JgLBljTGP0WONzXrcBx21mxcsA5eBYC56fIRFicccsNois6iUzsudgWrPzRSehHROgfzId+p9OxvozFYl9D/06E/sDpW4Xda4sixg2nry2fAgwA7hjKmyGdaWoAAAAASUVORK5CYII=";
  127. var imgWood = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAMCAYAAAC9QufkAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH9SURBVHjadJJNSNNxGMc///lvrb3828q1FJ1MKHCjlF4ouihJB4O69HJO8FCX6NC5a0XdeoGgc5ZEkIJ1iBpJRQmh4jxs2pZzm5ub/jfHxl7s3/6/sbJgz+V5+fF9nu/z/T1S6ttTtlsur2rBuWcUkmX6zlxBsdolmpjhf+Ce1p2cPD2Mu8/F/Mt7yKai1gwsN4ItaUaTJJVSyS7yHbt2E4+pvB99wn5Ht3Zw4LzUdHIhr/7jDdUi6Vyte3aNdOQrQf+41nRy+MdPPN1dwjsdGULTUfxhCKQLuCy/6N+Y1JtonsER2jo9goWkC6bvtZ4u4R+7jd3RxoOJVVrym9y6uI+FUEowKJvstBtVEV+9+0iAZV2kaOgzxbWIYPB4NERLzd+84aOz18viizf4zFmShTowXZT/0rbYIrglM7R7ReG6IcaJ4UsE5mbJb2Q4erafpS9BvJWseM/EEiSiYU2nLusC5TYLVIpZjDYLkVhdMN/hXlLRJRSbGbPLyKvn66LedaiHwMP79Axd1mQd2Pgahayg1mioOPayHC+Ig1EcVqaiW0xOrOA2QeunMWSb9RSR8OvaJRlZnklyZ0rj2OyCYGGoWsnMR/n4ISwGDDqr4KwBFYiX7XW19R3evR1nerHCiqqxmkhx7VwHRwYO8N0f+lPv2HapF4aO81uAAQAil+gxsz59XAAAAABJRU5ErkJggg==";
  128. var imgWine = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAMCAYAAABSgIzaAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHGSURBVHjaYnx1ag4DOtj38OT/vefPM4iJMjDoyhgy2MmaM7AwMTAiq2FhwAKWnFgGpr//YmH4wXSP4SfTKwZPBl8UNUzomv78Y/gvIAYx78OrPwxf3/1jePLwBYbhGBpBThJXYYbzv7z7z2Dy3Q9DIyOyH1+/+/B/3oTdDFsunmeQU2cFi7Ebf2CQ0YCwHQRCGZzkzRlRbARpOrnkIsOD128YfPQNGfK1/BkaLKIZXh3mhtt8X3YDOODgGs/fePk/KLGLQYyPlyHR3JxBW0SMYcO1ywzzTxxnUDaTAWsC+ffh5d8MZ37thngJFBi/TzwF2wJS/P7zNwYFURGGwzdvMrz4+JlhUpcbw+79dxnUrdihNn9g2M6w+T/L+w8fGNp372JINrdkuPrmFcPqU2cYJJ7xMpQ7u4MVXr59GEyDQpdbCOKzZ/+OIeJx6/VrYNpFUwtMq8tIMtx88pzhxrnX8MARkUaENrP8N56Gjz9+MJjJyzOEm5kwCLFzMtx+85ph/YULDOefPmGYlFPKoH5eg+EYwxkGMQVmhm+f/zNE/KuERAcoREGmgKJCVUWVwS/GACOJgQLwDOcmhndMtxmSuKsYAAIMAHIKugpSnTR5AAAAAElFTkSuQmCC";
  129. var imgMarble = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGoSURBVHjahFJdL8NgFH46XddtXZdN4yOWmBAXSCSEGy5dSvxB/8MdQUSQIBIuFqLD0q7ZlK5dt7a8+p6Jj2Tm3PT07Xue83xUsE63MahYqsAcYRRC4xLpdBrJISb8/C4OGg7fBCYWF1C/ucLxwQ1EgWFtuczKE8NfIIlBw5VmqteHXQQdH1G8fPe4Ar3WZP8CXOghtJExRP4LvJaLtufiLQZqOQ529mJGlzrrC8A111Fm2ZxCW4/2D8D7jc2tWH+PeRAE+JMBN0yWZahqHr7fQUbJYW5xhdhIchrFQv7X/b4SnBcbRq0Wuy7Tdi6jeneL6r1OIJqm4cF4JS/6AvDNk9MzKE3Nkn5ejboJv+1BkmRksgqdnVw9fcdIkZXWKbJ8oUAyLOORgNqdEE37FS3Xg+vYcD2fZorDxR7Ac6CwIbWETjxwdrgLMSnCcVyiOr+0Cnl8HO9Rl4YMo46cqpKR/E6Cbw4lDRk5iYZlovvpcBQGeKjquD4/JU8SYu+f4DLEpEQ9jzZhhiP0YpoWPXnOPL5ULIEXpyxEPlzbQk7J0pndbHz59SHAAPFG0oxdJVVKAAAAAElFTkSuQmCC";
  130. var imgSulfur = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH0SURBVHjajJJNaxNRFIafGZNp08zEJE3EaFOTCNFaRFqUggURddWFKC5cCP4H8V+4cVNc6cK6caMuBEGQaoVGLA1aJVosbZqONmnMh81kMu1UM85MQYrU4IELF877de49QnnmLp3KK723PmRyDJy8JuzWFzuSg6LVNosMnx1hLjtltdtb1n8L+A8mLYkiohRDbxyiNxrk47sMf4vsKuCAjPIL2FpCil7GaL1lLf+K0sJLHtwZ75wgfPyKpcTT7BE0TO8oPitDfypKS9NpapvIXWXu3bpp3R+/bf0zQXXxKR5JRtkrYKwvs6HXiCfDyEoXP+omp88NUy8v83VlzvojIHp9luP+bfo6oUg3tdUc048maAtR8vN5egIBhkbTLtbn07h0dYDnDye2Ezjk4NExNPUJ4QOD/DSbzL7OkUjLmM0F1KXvtBoNO5Gfvn4FNV9zTzAkIe4kO69eKZWYfPyMUxcuumKLuYI7f7Wyibauc2ZsiC+fqrSaJqrawuPbtx/1zQ032sq8DdYrHDmRwN+tUvhcd53KRQ3ZJvT4I8TiEuljvWRn1kimDiO632VXvaZgCn0Mjpy3QSGaDdON7Tg5FYmFXHGnHANF9rh3YecqO/+vKLP2CqYw9ASGsbq9kaLszCo4fX+gQL2yQaX8i+zkFL8FGABBCeG3MCTxbAAAAABJRU5ErkJggg==";
  131. var imgCrystal = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAMCAYAAAC9QufkAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHdSURBVHjabFLPTxNREP62u12WbdfSLiVSa1OgGIEABWMImiByENFoAvwBXLh68MK/4cmb8Wi4kXA0Bi7EH5Sfxq5GGzCSIpTYlO12a9utD3aq1Y2dy8y8N9+bb755XGb9GRrZT+ZmCWEY160tSFyFa1QjNDp8uhdix3wQ0VAL0uId3JC+skgx+d8Drkbg7SxPvlCuwixb+PgritWMh9lsHODPeYktcvfZ88okS5bb6wVKE49iqUxFacPCk2UNb05EJ+10kYcpWZS84waQ9cnn0QblplVrlNLek7/UXHXS1gwfbnW1UiKLAr78MCFIMpjohSxweL2r4UPiLSYnRuGPz+Jf6q5e7ykuuIFuVab5bOtq9ZA/KZSQ2VmjONYzBL3i1IazVzW/cZndi3cipTM0N4lI7h9g+loMS5sp9Mt5DMRHsJw8JMCjKwb+KE9qDwWqePnpCBFVqYu0+z2PQFXH3fHbuBqUEQkotf17onXqLjt40OcnqmLFwGC7gottbUT58cxETSivG2MdKhbGY3ih6bA/D4G/GTxe6WGoahAre7nafs+7P+wLUZw4yDnmtO92dOXvzHNLBuu4OYWwWMJYLAi/r4W6LW7uY7AzjMOcCfP3OIWCgaxRpLozAQYAw+q/LLa8YygAAAAASUVORK5CYII=";
  132. var imgScroll = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAJCAYAAAA2NNx1AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wFCQkMAyatkzcAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAATJJREFUKM+10j8vA3Ecx/H37+7X9jSSYnCVdBHtQNKh6WDC0HgEHoMHYDEYJRaLzSIsHoPEnzQi0ZOII40IEZaqgRCl1/rhej9rJSfR4DN/X8kn33wEwMLUqAZ4UZL6k2LZcQUdJMwbXy4Cza/S5oVf3dK10jzH++cUXUUmJZnIxVnb8Mhn09h2i8HsED0Ji2jc4L0ZUHtWAJwVHQpz64R5A18BGqFNtDbRgcAwjZ+3/MYLv17V6u6ISrlE5fKa/gFBX9LCOZCM5HMkEoLe9BhdVjdmTNJ683lVHgDe7QXJ4XHCvOTxBOUucrN3xbbbIJOSFPIWp8UG0fsytt0i8rCLTFiIuMFHM8Bre0VydjXUGxAAAlMGxCKCWERjdrSJcC92Vmb04abDn89tcnpJ/MfcPgHFJapS8yGUIAAAAABJRU5ErkJggg==';
  133.  
  134. var IUW_stylesheet =
  135. '.iuwIcon { position: absolute; z-index: 499; padding-top: 5px; height: 19px; width: 24px; text-align: center; color:white; font-weight:bold; cursor:default } ' +
  136. '.iuwyes { background-image: url(' + imgYes + '); } ' +
  137. '.iuwno { background-image: url(' + imgNo + '); } ' +
  138. '.iuwwait { background-image: url(' + imgWait + '); } ' +
  139. '.iuwunknown { background-image: url(' + imgUnknown + '); } ' +
  140. '#iuwtooltip {position:absolute;line-height:19px; text-align:right; font-size:smaller;opacity:0.85;color:#333;display:none;z-index:499; font-weight:bold; border:solid #c3802d; border-width:4px 10px 4px 11px; -moz-border-image:url('+imgScroll+') 4 10 4 11 fill repeat; -webkit-border-image:url('+imgScroll+') 4 10 4 11 fill repeat; } ' +
  141. '.iuwgreen { color:green; } ' +
  142. '.iuwred { color:red; } ' +
  143. '.iuwwood { padding-left:20px; background:url(' + imgWood + ') 2px 50% no-repeat; } ' +
  144. '.iuwwine { padding-left:20px; background:url(' + imgWine + ') 2px 50% no-repeat; } ' +
  145. '.iuwmarble { padding-left:20px; background:url(' + imgMarble + ') 0 50% no-repeat; } ' +
  146. '.iuwcrystal { padding-left:20px; background:url(' + imgCrystal + ') 2px 50% no-repeat; } ' +
  147. '.iuwsulfur { padding-left:20px; background:url(' + imgSulfur + ') 0 50% no-repeat; }';
  148.  
  149. var IUW = (function() {
  150. "use strict";
  151. // Materials reduction from researches
  152. var pulley = Number(localStorage.getItem("_iuw_pulley", 0)),
  153. geometry = Number(localStorage.getItem("_iuw_geometry", 0)),
  154. spirit = Number(localStorage.getItem("_iuw_spirit", 0));
  155.  
  156. var icons = [];
  157. var redCoef = null; // reduction coefficients
  158.  
  159. var screen = null,
  160. spot = null,
  161. ownCity = true;
  162.  
  163. // Startup - called once on page load.
  164. function init() {
  165. // Add stylesheet to document, avoiding GM_addstyle use.
  166. var IUW_css = document.createElement("style");
  167. IUW_css.type = "text/css";
  168. IUW_css.innerHTML = IUW_stylesheet;
  169. document.body.appendChild(IUW_css);
  170.  
  171. screen = ikariam.getScreen();
  172. spot = screen.data.position;
  173.  
  174. // Create all 18 icons.
  175. for(var i = 0; i < spot.length; i++) {
  176. icons.push( new IUWIcon(i) );
  177. }
  178.  
  179. // When we get a new popup (changeView event), we may deduce info about researches and building prices.
  180. // We do this only if the last building research (Spirit Level) isn't complete.
  181. // Once Spirit Level has been completed, we don't need anymore research info.
  182. if(!spirit) {
  183. ajax.Responder.IUW_IkaChangeView = ajax.Responder.changeView;
  184. ajax.Responder.changeView = function(params) {
  185. ajax.Responder.IUW_IkaChangeView(params);
  186. var id = params[0];
  187. var div = document.getElementById('buildingUpgrade');
  188. if(div) {
  189. checkResearch(div, id);
  190. }
  191. };
  192. }
  193.  
  194. // Some important data may have changed. Check if the building icons need to be refreshed.
  195. var screenUpdate = screen.update;
  196. screen.update = function(data) {
  197. screenUpdate.call(screen, data);
  198. reload();
  199. };
  200. }
  201.  
  202. // We inspect the building upgrade popup to check for pricing distorsion
  203. // and deduce which researches are completed.
  204. //
  205. // @param buildingUpgradeDiv a DOM object containing all the info - used to restrict DOM lookups.
  206. // @param buildingType string the building type, used as key in the BUILDINGS database.
  207. function checkResearch(buildingUgradeDiv, buildingType) {
  208. // Buliding level
  209. var level = IUW.$('ul.actions li:eq(1)', buildingUgradeDiv).text(); // 3 action list elements : upgrade, level, downgrade
  210. if(!level) return;
  211. level = parseInt(level.replace(/[^0-9]/g, ''), 10);
  212.  
  213. // wood price - actual price displayed on screen, with all reductions
  214. var wood = IUW.$('li.wood', buildingUgradeDiv).text();
  215. if(!wood) return;
  216. wood = parseInt(wood.replace(/[^0-9]/g, ''), 10);
  217.  
  218. // wood price - base price from DB without any reductions
  219. var prices = IUW.BUILDINGS[buildingType];
  220. if(!prices) return;
  221. var baseWood = prices[level-1].wood;
  222.  
  223. // minus the reductions we know about
  224. var theoretical = Math.floor(baseWood * redCoef.wood);
  225.  
  226. // Match ?
  227. if(theoretical > wood) { // theoretical price is never underestimated, since all you get in the game are reductions
  228. // difference between old and new reduction. Can be 2, 4, 6, 8, 12, 14
  229. // Pulley +2
  230. // Geometry +4
  231. // Spirit +8
  232. var difference = Math.round((theoretical - wood)/baseWood*100); // in percent
  233. pulley = (difference >= 2) ? 1 : 0;
  234. geometry = (difference >= 4) ? 1 : 0;
  235. spirit = (difference >= 14) ? 1 : 0;
  236.  
  237. localStorage.setItem("_iuw_pulley", pulley);
  238. localStorage.setItem("_iuw_geometry", geometry);
  239. localStorage.setItem("_iuw_spirit", spirit);
  240. }
  241. }
  242.  
  243. // updates reduction coefficients redCoef.
  244. // This method is called on several occasions.
  245. function getReductions() {
  246. // Just in case ikariam creates new objects every now and then.
  247. screen = ikariam.getScreen();
  248. spot = screen.data.position;
  249.  
  250. // Reduced materials
  251. var redAll = 0, redWood = 0, redWine = 0, redMarble = 0, redCrystal = 0, redSulfur = 0;
  252.  
  253. // Assigning reductions in %
  254. if (pulley) { redAll = 2; }
  255. if (geometry) { redAll = redAll + 4; }
  256. if (spirit) { redAll = redAll + 8; }
  257.  
  258. // We check if the user has built some material reduction buildings
  259. for (var i = 0; i < spot.length; i++) {
  260. // 'carpenter' or 'carpentering constructionSite' or 'buildingGround shore' or 'buildingGround land' or 'buildingGround wall' ...
  261. var buildingType = spot[i].building.split(/ /)[0];
  262. switch (buildingType) {
  263. case 'architect':
  264. redMarble = parseInt(spot[i].level, 10);
  265. break;
  266. case 'optician':
  267. redCrystal = parseInt(spot[i].level, 10);
  268. break;
  269. case 'carpentering':
  270. redWood = parseInt(spot[i].level, 10);
  271. break;
  272. case 'vineyard':
  273. redWine = parseInt(spot[i].level, 10);
  274. break;
  275. case 'fireworker':
  276. redSulfur = parseInt(spot[i].level, 10);
  277. break;
  278. }
  279. }
  280.  
  281. // Setting the material reduction coefficients
  282. redCoef = {
  283. wood : 1 - (redWood + redAll)/100,
  284. wine : 1 - (redWine + redAll)/100,
  285. marble : 1 - (redMarble + redAll)/100,
  286. crystal : 1 - (redCrystal + redAll)/100,
  287. sulfur : 1 - (redSulfur + redAll)/100
  288. };
  289. }
  290.  
  291. /**
  292. * Main function : loops through building locations, retrieves building types and levels,
  293. * and updates their icon accordingly.
  294. * This method is called on several occasions.
  295. */
  296. function updateIcons() {
  297. // Bureaucracy
  298. var lockedPosition = screen.data.lockedPosition ? screen.data.lockedPosition[0] : -1;
  299.  
  300. // Info about each building/spot
  301. var level, busy, underConstruction, upLevel, posTop, posRight;
  302. var cityBusy = (IUW.$('.constructionSite').length > 0); // 2 divs if under construction
  303.  
  304. // Updating the icon for each building
  305. for (var i = 0; i < spot.length; i++) {
  306.  
  307. // Check for bureaucracy spot
  308. if (i === lockedPosition) {
  309. // If the research have not been done
  310. // we skip skip the position 13
  311. icons[i].hide();
  312. continue;
  313. }
  314.  
  315. // Gets the level of a building
  316. level = spot[i].level;
  317. underConstruction = false; // detected later
  318. var buildingType = spot[i].building;
  319. // Busy buildings : port, workshop, shipyard, barracks, hideout(?)
  320. busy = spot[i].isBusy && (buildingType !== 'port'); // 'port constructionSite' ⇒ busy too because cityBusy = true
  321. busy = busy || cityBusy;
  322.  
  323. if(buildingType.substr(0, 15) === 'buildingGround ') { // buildingGround land, buildingGround shore
  324. icons[i].hide();
  325. continue;
  326. }
  327. else if(buildingType.substr(-17) === ' constructionSite') { // palace constructionSite
  328. buildingType = buildingType.substr(0, buildingType.length-17);
  329. underConstruction = true;
  330. }
  331.  
  332. // The upgrade level
  333. // Note: because the database starts with lvl 2 of all buildings,
  334. // and the index starts with 0, we have to get one level below
  335. if (underConstruction) {
  336. // If we find a contruction spot, we would like to see the level after the construction
  337. upLevel = parseInt(level, 10);
  338.  
  339. // Positioning for construction spot
  340. posTop = IUW.POSITIONS.constructionSite.y;
  341. posRight = IUW.POSITIONS.constructionSite.x;
  342.  
  343. }
  344. else if (IUW.POSITIONS.hasOwnProperty(buildingType) && IUW.BUILDINGS.hasOwnProperty(buildingType)) {
  345. // Positioning for other buildings
  346. upLevel = parseInt(level, 10) - 1;
  347. var POS = IUW.POSITIONS[buildingType];
  348. // Ports on the right spot have a different image
  349. if(i === 2) {
  350. POS = IUW.POSITIONS[buildingType+'2'];
  351. }
  352. posTop = POS.y;
  353. posRight = POS.x;
  354. }
  355. else {
  356. console.warn('Ikariam Upgrade Watcher 2 : unknown building '+buildingType);
  357. icons[i].hide();
  358. continue;
  359. }
  360.  
  361. // Is the building known in DB ?
  362. // If the level is out of bound in DB, we make the icon black.
  363. var requirements = null;
  364.  
  365. if(ownCity) {
  366. // Get basic resource requirements in the DB
  367. var basicRequirements = IUW.BUILDINGS[buildingType][upLevel];
  368. if(basicRequirements) {
  369. // And apply deductions
  370. requirements = {
  371. wood : Math.floor( basicRequirements.wood * redCoef.wood ), // all buildings require wood
  372. wine : Math.floor( basicRequirements.wine * redCoef.wine ), // NaN for unused materials
  373. marble : Math.floor( basicRequirements.marble * redCoef.marble ),
  374. crystal : Math.floor( basicRequirements.crystal * redCoef.crystal),
  375. sulfur : Math.floor( basicRequirements.sulfur * redCoef.sulfur )
  376. };
  377. }
  378. }
  379.  
  380. // Updates the icon
  381. icons[i].update(posTop, posRight, busy, level, requirements);
  382.  
  383. } // end of iteration through buildings
  384. }
  385.  
  386. function reload () {
  387. // Get each building/spot from the new building list
  388. spot = screen.data.position;
  389.  
  390. // Is this our city ?
  391. ownCity = (screen.data.ownerId === ikariam.model.avatarId);
  392.  
  393. if(ownCity) {
  394. getReductions();
  395. }
  396.  
  397. // Own city or not :
  398. updateIcons();
  399. }
  400.  
  401. // Public
  402. return {
  403. init: init,
  404. reload: reload
  405. };
  406. })();
  407.  
  408. //---------------------------- CLASSES ----------------------------//
  409. /**
  410. * Creates an icon to attach a building
  411. * @param object obj
  412. * @param int position building position spot number
  413. * @param integer position top
  414. * @param integer position right
  415. * @param string img = 'wait', 'yes', 'no', unknown'
  416. * @param integer level
  417. * @param req array [wood, wine, marble, crystal, sulfur]
  418. * @return void
  419. */
  420. var IUWIcon = function(position) {
  421. "use strict";
  422.  
  423. this.position = position; // position number in the city, from 0 to 16
  424. this.level = 0; // building level
  425. this.requirements = null; // { wood, wine, marble, wrystal, sulfur }
  426. this.top = 0;
  427. this.right = 0;
  428.  
  429. this.createDiv();
  430. this.icon = IUW.$('#iuwIcon'+this.position); // for faster access
  431. this.setTooltip();
  432. };
  433.  
  434. IUWIcon.prototype.hide = function() {
  435. "use strict";
  436. this.icon.hide();
  437. };
  438.  
  439. // Updates the icon position, class and text
  440. IUWIcon.prototype.update = function(top, right, busy, level, req) {
  441. "use strict";
  442. this.level = level; // building level
  443. this.requirements = req; // { wood, wine, marble, crystal, sulfur }
  444. this.top = top;
  445. this.right = right;
  446.  
  447. // position
  448. // icon#16 is positionned relative to the global #locations container. See IUWIcon.prototype.createDiv
  449. if(this.position === 16) {
  450. this.icon.css('top', this.top + 319);
  451. this.icon.css('left', 1088 + 86 - 24 - this.right); // #position16.left - #position16.width - this.width = 1088 + 86 - 24.
  452. }
  453. else {
  454. this.icon.css('top', this.top);
  455. this.icon.css('right', this.right);
  456. }
  457.  
  458. // class
  459. // no.png = red
  460. // yes.png = green
  461. // wait.png = blue
  462. // unknown.png = grey
  463. this.icon.show();
  464. var img = 'no';
  465. if(!this.requirements) {
  466. img = 'unknown';
  467. }
  468. else if(hasEnoughResources(this.requirements)) {
  469. img = busy ? "wait": 'yes';
  470. }
  471. this.icon.removeClass('iuwyes iuwno iuwwait iuwunknown').addClass('iuw'+img);
  472.  
  473. // text : building level
  474. this.icon.text(this.level);
  475. };
  476.  
  477. // Create the empty icon div.
  478. IUWIcon.prototype.createDiv = function() {
  479. "use strict";
  480. if(this.position === 16) {
  481. // #position16 has a z-index below that of #position10, which prevents the icon to get the mouseover event.
  482. // So in order to have icon#16 above #position10, we must not create it inside #position16 container.
  483. // It will have to be positionned relative to the #locations container, not #position16, obviously.
  484. IUW.$('#position16').after('<div id="iuwIcon16" class="iuwIcon" style="display:none"></div>');
  485. }
  486. else {
  487. IUW.$('#position'+this.position).append('<div id="iuwIcon'+ this.position +'" class="iuwIcon" style="display:none"></div>');
  488. }
  489. };
  490.  
  491. IUWIcon.prototype.info = function() {
  492. "use strict";
  493. // Get current resources
  494. var ikares = ikariam.model.currentResources;
  495. var curRes = {
  496. wood :ikares.resource,
  497. wine :ikares[1],
  498. marble :ikares[2],
  499. crystal:ikares[3],
  500. sulfur :ikares[4]
  501. };
  502.  
  503. // Estimating the resource status
  504. var html = '';
  505. for(var name in this.requirements) {
  506. // Process only required resources
  507. var required = this.requirements[name];
  508. if(required) {
  509. var current = curRes[name];
  510. var estimated = current - required;
  511. // Adding color to the values
  512. // Red if negative
  513. // Green if 0 or positive
  514. var color = (estimated >= 0) ? "iuwgreen": 'iuwred';
  515. html += '<div class="iuw' + name + ' ' + color + '">'+ estimated.toLocaleString() +'</div>';
  516. }
  517. }
  518.  
  519. return html;
  520. };
  521.  
  522. IUWIcon.prototype.setTooltip = function() {
  523. "use strict";
  524. var xOffset = 10;
  525. var yOffset = 0;
  526. var self = this;
  527. this.icon.hover(
  528. function(e){
  529. if(!self.requirements) // unknown.png (maximum level building)
  530. return;
  531. var tooltip = IUW.$("#iuwtooltip");
  532. if(tooltip.length === 0) {
  533. IUW.$("body").append('<div id="iuwtooltip"></div>');
  534. tooltip = IUW.$("#iuwtooltip");
  535. }
  536. tooltip
  537. .html(self.info())
  538. .css("top",(e.pageY - yOffset) + "px")
  539. .css("left",(e.pageX + xOffset) + "px")
  540. .stop(true, true)
  541. .fadeIn("fast");
  542. },
  543. function(){
  544. IUW.$("#iuwtooltip").stop(true, true).fadeOut("fast");
  545. }
  546. );
  547. this.icon.mousemove(function(e){
  548. IUW.$("#iuwtooltip")
  549. .css("top",(e.pageY - yOffset) + "px")
  550. .css("left",(e.pageX + xOffset) + "px");
  551. });
  552. };
  553.  
  554. //---------------------------- FUNCTIONS ----------------------------//
  555. function hasEnoughResources(requirements) {
  556. "use strict";
  557. // Get the resources we have in town
  558. var current = ikariam.model.currentResources;
  559. return (
  560. (isNaN(requirements.wood) || (current.resource >= requirements.wood)) &&
  561. (isNaN(requirements.wine) || (current[1] >= requirements.wine)) &&
  562. (isNaN(requirements.marble) || (current[2] >= requirements.marble)) &&
  563. (isNaN(requirements.crystal) || (current[3] >= requirements.crystal)) &&
  564. (isNaN(requirements.sulfur) || (current[4] >= requirements.sulfur))
  565. );
  566. }
  567.  
  568. function restore_consolelog() {
  569. // FOR DEBUG PURPOSE
  570. // Restore console.log function (overloaded/disabled by Ikariam script).
  571. var i = document.createElement('iframe');
  572. document.body.appendChild(i);
  573. window.console = i.contentWindow.console;
  574. }
  575.  
  576.  
  577. //---------------------------- DATABASE ----------------------------//
  578.  
  579. // Positions for each icon. Some of these won't work for left-to-right
  580. // writing countries, where the icons are reversed.
  581. IUW.POSITIONS = {
  582. academy: { x:50, y:38 },
  583. alchemist: { x:50, y:40 },
  584. architect: { x:60, y:35 },
  585. barracks: { x:32, y:40 },
  586. blackMarket: { x:-5, y:20 },
  587. branchOffice:{ x:50, y:45 },
  588. carpentering:{ x:30, y:30 },
  589. constructionSite:{ x:85, y:48 }, // (left side) or { x:35, y:65 } for below
  590. dump: { x:40, y:40 },
  591. embassy: { x:40, y:40 },
  592. fireworker: { x:40, y:40 },
  593. forester: { x:45, y:30 },
  594. glassblowing:{ x:50, y:37 },
  595. museum: { x:45, y:40 },
  596. optician: { x:46, y:38 },
  597. port: { x:-40, y:50 }, // left side
  598. port2: { x:95, y:55 }, // right side
  599. palace: { x:60, y:40 },
  600. palaceColony:{ x:60, y:40 },
  601. pirateFortress: { x:70, y:-60 },
  602. safehouse: { x:25, y:35 },
  603. shipyard: { x:70, y:40 }, // left side
  604. shipyard2: { x:30, y:40 }, // right side
  605. stonemason: { x:50, y:30 },
  606. tavern: { x:30, y:35 },
  607. temple: { x:26, y:30 },
  608. townHall: { x:35, y:45 },
  609. vineyard: { x:50, y:34 },
  610. wall: { x:20, y:30 },
  611. warehouse: { x:60, y:43 },
  612. winegrower: { x:25, y:40 },
  613. workshop: { x:45, y:35 },
  614. marineChartArchive: { x:15, y:35 }
  615. };
  616.  
  617. // All building costs. These are base costs, without any reduction. That's why they
  618. // DON'T match the costs you can see in the online help. When you have completed all the researches,
  619. // the costs you see in the help are 14 % less than these.
  620. // So Cost Here * 0.86 = Cost seen in the help when you have completed all research.
  621. // All indexes start with level 2
  622. IUW.BUILDINGS = {
  623. // Academy
  624. // Type of resources needed: Wood, Crystal
  625. "academy": [
  626. { "wood": 68 }, // level 2
  627. { "wood": 115 }, // level 3
  628. { "wood": 263 }, // level 4
  629. { "wood": 382, "crystal": 225 }, // level 5
  630. { "wood": 626, "crystal": 428 }, // level 6
  631. { "wood": 982, "crystal": 744 }, // level 7
  632. { "wood": 1330, "crystal": 1089 }, // level 8
  633. { "wood": 2004, "crystal": 1748 }, // level 9
  634. { "wood": 2665, "crystal": 2454 }, // level 10
  635. { "wood": 3916, "crystal": 3786 }, // level 11
  636. { "wood": 5156, "crystal": 5216 }, // level 12
  637. { "wood": 7446, "crystal": 7862 }, // level 13
  638. { "wood": 9753, "crystal": 10729 }, // level 14
  639. { "wood": 12751, "crystal": 14599 }, // level 15
  640. { "wood": 18163, "crystal": 21627 }, // level 16
  641. { "wood": 23691, "crystal": 29322 }, // level 17
  642. { "wood": 33451, "crystal": 43020 }, // level 18
  643. { "wood": 43572, "crystal": 58213 }, // level 19
  644. { "wood": 56729, "crystal": 78724 }, // level 20
  645. { "wood": 73833, "crystal": 106414 }, // level 21
  646. { "wood": 103459, "crystal": 154857 }, // level 22
  647. { "wood": 144203, "crystal": 224146 }, // level 23
  648. { "wood": 175058, "crystal": 282572 }, // level 24
  649. { "wood": 243930, "crystal": 408877 }, // level 25
  650. { "wood": 317208, "crystal": 552141 }, // level 26
  651. { "wood": 439968, "crystal": 795252 }, // level 27
  652. { "wood": 536310, "crystal": 1006648 }, // level 28
  653. { "wood": 743789, "crystal": 1449741 }, // level 29
  654. { "wood": 1027470, "crystal": 2079651 }, // level 30
  655. { "wood": 1257246, "crystal": 2642548 }, // level 31
  656. { "wood": 1736683, "crystal": 3790483 } // level 32
  657. ],
  658.  
  659. // Alchemist's Tower
  660. // Type of resources needed: Wood, Marble
  661. "alchemist": [
  662. { "wood": 467, "marble": 116 }, // level 2
  663. { "wood": 718, "marble": 255 }, // level 3
  664. { "wood": 1045, "marble": 436 }, // level 4
  665. { "wood": 1469, "marble": 671 }, // level 5
  666. { "wood": 2021, "marble": 977 }, // level 6
  667. { "wood": 2738, "marble": 1375 }, // level 7
  668. { "wood": 3671, "marble": 1892 }, // level 8
  669. { "wood": 4883, "marble": 2564 }, // level 9
  670. { "wood": 6459, "marble": 3437 }, // level 10
  671. { "wood": 8508, "marble": 4572 }, // level 11
  672. { "wood": 11172, "marble": 6049 }, // level 12
  673. { "wood": 14634, "marble": 7968 }, // level 13
  674. { "wood": 19135, "marble": 10462 }, // level 14
  675. { "wood": 24987, "marble": 13705 }, // level 15
  676. { "wood": 32594, "marble": 17921 }, // level 16
  677. { "wood": 42483, "marble": 23402 }, // level 17
  678. { "wood": 55339, "marble": 30527 }, // level 18
  679. { "wood": 72050, "marble": 39790 }, // level 19
  680. { "wood": 93778, "marble": 51830 }, // level 20
  681. { "wood": 122021, "marble": 67485 }, // level 21
  682. { "wood": 158740, "marble": 87835 }, // level 22
  683. { "wood": 206471, "marble": 114289 }, // level 23
  684. { "wood": 268524, "marble": 148680 }, // level 24
  685. { "wood": 349194, "marble": 193389 }, // level 25
  686. { "wood": 454063, "marble": 251512 }, // level 26
  687. { "wood": 590393, "marble": 327069 }, // level 27
  688. { "wood": 767620, "marble": 425294 }, // level 28
  689. { "wood": 998018, "marble": 552986 }, // level 29
  690. { "wood": 1297536, "marble": 718988 }, // level 30
  691. { "wood": 1686906, "marble": 934789 }, // level 31
  692. { "wood": 2193089, "marble": 1215330 } // level 32
  693. ],
  694.  
  695. // Architect's office
  696. // Type of resources needed: Wood, Marble
  697. "architect": [
  698. { "wood": 291, "marble": 160 }, // level 2
  699. { "wood": 413, "marble": 222 }, // level 3
  700. { "wood": 555, "marble": 295 }, // level 4
  701. { "wood": 720, "marble": 379 }, // level 5
  702. { "wood": 911, "marble": 475 }, // level 6
  703. { "wood": 1133, "marble": 587 }, // level 7
  704. { "wood": 1390, "marble": 716 }, // level 8
  705. { "wood": 1689, "marble": 865 }, // level 9
  706. { "wood": 2035, "marble": 1036 }, // level 10
  707. { "wood": 2437, "marble": 1233 }, // level 11
  708. { "wood": 2902, "marble": 1460 }, // level 12
  709. { "wood": 3443, "marble": 1722 }, // level 13
  710. { "wood": 4070, "marble": 2023 }, // level 14
  711. { "wood": 4797, "marble": 2369 }, // level 15
  712. { "wood": 5640, "marble": 2767 }, // level 16
  713. { "wood": 6618, "marble": 3226 }, // level 17
  714. { "wood": 7754, "marble": 3752 }, // level 18
  715. { "wood": 9070, "marble": 4358 }, // level 19
  716. { "wood": 10598, "marble": 5056 }, // level 20
  717. { "wood": 12369, "marble": 5857 }, // level 21
  718. { "wood": 14424, "marble": 6778 }, // level 22
  719. { "wood": 16807, "marble": 7836 }, // level 23
  720. { "wood": 19573, "marble": 9052 }, // level 24
  721. { "wood": 22780, "marble": 10448 }, // level 25
  722. { "wood": 26501, "marble": 12054 }, // level 26
  723. { "wood": 30817, "marble": 13899 }, // level 27
  724. { "wood": 35826, "marble": 16289 }, // level 28
  725. { "wood": 41631, "marble": 18450 }, // level 29
  726. { "wood": 48371, "marble": 21246 }, // level 30
  727. { "wood": 56185, "marble": 24455 }, // level 31
  728. { "wood": 65251, "marble": 28141 } // level 32
  729. ],
  730.  
  731. // Barracks
  732. // Type of resources needed: Wood, Marble
  733. "barracks": [
  734. { "wood": 114 }, // level 2
  735. { "wood": 195 }, // level 3
  736. { "wood": 296 }, // level 4
  737. { "wood": 420 }, // level 5
  738. { "wood": 574 }, // level 6
  739. { "wood": 766 }, // level 7
  740. { "wood": 1003 }, // level 8
  741. { "wood": 1297, "marble": 178 }, // level 9
  742. { "wood": 1662, "marble": 431 }, // level 10
  743. { "wood": 2115, "marble": 745 }, // level 11
  744. { "wood": 2676, "marble": 1134 }, // level 12
  745. { "wood": 3371, "marble": 1616 }, // level 13
  746. { "wood": 4234, "marble": 2214 }, // level 14
  747. { "wood": 5304, "marble": 2956 }, // level 15
  748. { "wood": 6630, "marble": 3875 }, // level 16
  749. { "wood": 8275, "marble": 5015 }, // level 17
  750. { "wood": 10314, "marble": 6429 }, // level 18
  751. { "wood": 12843, "marble": 8183 }, // level 19
  752. { "wood": 15979, "marble": 10357 }, // level 20
  753. { "wood": 19868, "marble": 13052 }, // level 21
  754. { "wood": 24690, "marble": 16395 }, // level 22
  755. { "wood": 30669, "marble": 20540 }, // level 23
  756. { "wood": 38083, "marble": 25680 }, // level 24
  757. { "wood": 47277, "marble": 32054 }, // level 25
  758. { "wood": 58676, "marble": 39957 }, // level 26
  759. { "wood": 72812, "marble": 49757 }, // level 27
  760. { "wood": 90341, "marble": 61909 }, // level 28
  761. { "wood": 112076, "marble": 76977 }, // level 29
  762. { "wood": 139028, "marble": 95661 }, // level 30
  763. { "wood": 172448, "marble": 118830 }, // level 31
  764. { "wood": 213889, "marble": 147560 }, // level 32
  765. { "wood": 265276, "marble": 183185 }, // level 33
  766. { "wood": 328996, "marble": 227359 }, // level 34
  767. { "wood": 408008, "marble": 282136 }, // level 35
  768. { "wood": 505984, "marble": 350059 }, // level 36
  769. { "wood": 627473, "marble": 434283 }, // level 37
  770. { "wood": 778120, "marble": 538721 }, // level 38
  771. { "wood": 964923, "marble": 668224 }, // level 39
  772. { "wood": 1196558, "marble": 828808 }, // level 40
  773. { "wood": 1483785, "marble": 1027932 }, // level 41
  774. { "wood": 1839947, "marble": 1274847 }, // level 42
  775. { "wood": 2281588, "marble": 1581020 }, // level 43
  776. { "wood": 2829223, "marble": 1960675 }, // level 44
  777. { "wood": 3508290, "marble": 2431447 }, // level 45
  778. { "wood": 4350333, "marble": 3015205 }, // level 46
  779. { "wood": 5394466, "marble": 3739064 }, // level 47
  780. { "wood": 6689191, "marble": 4636650 }, // level 48
  781. { "wood": 8294651, "marble": 5749656 } // level 49 max
  782. ],
  783.  
  784. // BlackMarket
  785. // Type of resources needed: Wood, Marble
  786. "blackMarket": [
  787. { "wood": 887, "marble": 525}, // level 2
  788. { "wood": 1360, "marble": 807}, // level 3
  789. { "wood": 1890, "marble": 1126}, // level 4
  790. { "wood": 2516, "marble": 1509}, // level 5
  791. { "wood": 3288, "marble": 1988}, // level 6
  792. { "wood": 4263, "marble": 2601}, // level 7
  793. { "wood": 5505, "marble": 3390}, // level 8
  794. { "wood": 7086, "marble": 4403}, // level 9
  795. { "wood": 9086, "marble": 5693}, // level 10
  796. { "wood": 11590, "marble": 7315}, // level 11
  797. { "wood": 14691, "marble": 9331}, // level 12
  798. { "wood": 18489, "marble": 11807}, // level 13
  799. { "wood": 23088, "marble": 14812}, // level 14
  800. { "wood": 28600, "marble": 18420}, // level 15
  801. { "wood": 35143, "marble": 22708}, // level 16
  802. { "wood": 42839, "marble": 27757}, // level 17
  803. { "wood": 51820, "marble": 33654}, // level 18
  804. { "wood": 62218, "marble": 40486}, // level 19
  805. { "wood": 74175, "marble": 48348}, // level 20
  806. { "wood": 87838, "marble": 57334}, // level 21
  807. { "wood": 103356, "marble": 67546}, // level 22
  808. { "wood": 120888, "marble": 79087}, // level 23
  809. { "wood": 140596, "marble": 92064}, // level 24
  810. { "wood": 162647, "marble": 106587} // level 25
  811. ],
  812.  
  813. // Trading post
  814. // Type of resources needed: Wood, Marble
  815. "branchOffice": [
  816. { "wood": 173 }, // level 2
  817. { "wood": 346 }, // level 3
  818. { "wood": 581 }, // level 4
  819. { "wood": 896, "marble": 540 }, // level 5
  820. { "wood": 1314, "marble": 792 }, // level 6
  821. { "wood": 1863, "marble": 1123 }, // level 7
  822. { "wood": 2580, "marble": 1555 }, // level 8
  823. { "wood": 3509, "marble": 2115 }, // level 9
  824. { "wood": 4706, "marble": 2837 }, // level 10
  825. { "wood": 6241, "marble": 3762 }, // level 11
  826. { "wood": 8203, "marble": 4945 }, // level 12
  827. { "wood": 10699, "marble": 6450 }, // level 13
  828. { "wood": 13866, "marble": 8359 }, // level 14
  829. { "wood": 17872, "marble": 10774 }, // level 15
  830. { "wood": 22926, "marble": 13820 }, // level 16
  831. { "wood": 29286, "marble": 17654 }, // level 17
  832. { "wood": 37272, "marble": 22469 }, // level 18
  833. { "wood": 47283, "marble": 28503 }, // level 19
  834. { "wood": 59806, "marble": 36051 }, // level 20
  835. { "wood": 75447, "marble": 45482 }, // level 21
  836. { "wood": 94954, "marble": 57240 }, // level 22
  837. { "wood": 119245, "marble": 71883 }, // level 23
  838. { "wood": 149453, "marble": 90092 }, // level 24
  839. { "wood": 186977, "marble": 112712 }, // level 25
  840. { "wood": 233530, "marble": 121067 }, // level 26
  841. { "wood": 291225, "marble": 175556 }, // level 27
  842. { "wood": 362658, "marble": 218617 }, // level 28
  843. { "wood": 451015, "marble": 271878 }, // level 29
  844. { "wood": 560208, "marble": 337705 }, // level 30
  845. { "wood": 695038, "marble": 418983 }, // level 31
  846. { "wood": 861391, "marble": 519260 } // level 32
  847. ],
  848.  
  849. // Carpenter
  850. // Type of resources needed: Wood, Marble
  851. "carpentering": [
  852. { "wood": 122 }, // level 2
  853. { "wood": 191 }, // level 3
  854. { "wood": 274 }, // level 4
  855. { "wood": 372 }, // level 5
  856. { "wood": 486 }, // level 6
  857. { "wood": 620 }, // level 7
  858. { "wood": 777, "marble": 359 }, // level 8
  859. { "wood": 962, "marble": 444 }, // level 9
  860. { "wood": 1178, "marble": 546 }, // level 10
  861. { "wood": 1432, "marble": 669 }, // level 11
  862. { "wood": 1730, "marble": 816 }, // level 12
  863. { "wood": 2078, "marble": 993 }, // level 13
  864. { "wood": 2486, "marble": 1205 }, // level 14
  865. { "wood": 2964, "marble": 1459 }, // level 15
  866. { "wood": 3524, "marble": 1765 }, // level 16
  867. { "wood": 4178, "marble": 2131 }, // level 17
  868. { "wood": 4945, "marble": 2571 }, // level 18
  869. { "wood": 5841, "marble": 3097 }, // level 19
  870. { "wood": 6890, "marble": 3731 }, // level 20
  871. { "wood": 8117, "marble": 4490 }, // level 21
  872. { "wood": 9550, "marble": 5402 }, // level 22
  873. { "wood": 11229, "marble": 6496 }, // level 23
  874. { "wood": 13190, "marble": 7809 }, // level 24
  875. { "wood": 15484, "marble": 9383 }, // level 25
  876. { "wood": 18166, "marble": 11274 }, // level 26
  877. { "wood": 21299, "marble": 13543 }, // level 27
  878. { "wood": 24963, "marble": 16265 }, // level 28
  879. { "wood": 29245, "marble": 19531 }, // level 29
  880. { "wood": 34247, "marble": 23450 }, // level 30
  881. { "wood": 40096, "marble": 28154 }, // level 31
  882. { "wood": 46930, "marble": 33798 } // level 32
  883. ],
  884.  
  885. // Dump
  886. // Type of resources needed: Wood, Marble, Crystal, Sulfur
  887. "dump": [
  888. { "wood": 1152, "marble": 932, "crystal": 1146, "sulfur": 845 }, // level 2
  889. { "wood": 1766, "marble": 1445, "crystal": 1668, "sulfur": 1398 }, // level 3
  890. { "wood": 2504, "marble": 2050, "crystal": 2278, "sulfur": 2061 }, // level 4
  891. { "wood": 3388, "marble": 2762, "crystal": 2991, "sulfur": 2857 }, // level 5
  892. { "wood": 4450, "marble": 3609, "crystal": 3526, "sulfur": 3813 }, // level 6
  893. { "wood": 5724, "marble": 4604, "crystal": 4803, "sulfur": 4960 }, // level 7
  894. { "wood": 7253, "marble": 5778, "crystal": 5946, "sulfur": 6336 }, // level 8
  895. { "wood": 9088, "marble": 7164, "crystal": 7283, "sulfur": 7987 }, // level 9
  896. { "wood": 11289, "marble": 8799, "crystal": 8847, "sulfur": 9968 }, // level 10
  897. { "wood": 13931, "marble": 10728, "crystal": 10678, "sulfur": 12346 }, // level 11
  898. { "wood": 17101, "marble": 13005, "crystal": 12819, "sulfur": 15199 }, // level 12
  899. { "wood": 20905, "marble": 15691, "crystal": 15325, "sulfur": 18623 }, // level 13
  900. { "wood": 25470, "marble": 18862, "crystal": 18257, "sulfur": 22731 }, // level 14
  901. { "wood": 30948, "marble": 22602, "crystal": 21687, "sulfur": 27661 }, // level 15
  902. { "wood": 37522, "marble": 27016, "crystal": 25700, "sulfur": 33578 }, // level 16
  903. { "wood": 45410, "marble": 32225, "crystal": 30395, "sulfur": 40677 }, // level 17
  904. { "wood": 54876, "marble": 38371, "crystal": 35889, "sulfur": 49197 }, // level 18
  905. { "wood": 66236, "marble": 45623, "crystal": 42316, "sulfur": 59420 }, // level 19
  906. { "wood": 79867, "marble": 54181, "crystal": 49837, "sulfur": 71688 }, // level 20
  907. { "wood": 96223, "marble": 64278, "crystal": 58635, "sulfur": 86409 }, // level 21
  908. { "wood": 115852, "marble": 76194, "crystal": 68929, "sulfur": 104076 }, // level 22
  909. { "wood": 139407, "marble": 90256, "crystal": 80973, "sulfur": 125274 }, // level 23
  910. { "wood": 167672, "marble": 106847, "crystal": 95065, "sulfur": 150714 }, // level 24
  911. { "wood": 201592, "marble": 126424, "crystal": 111553, "sulfur": 181241 }, // level 25
  912. { "wood": 242293, "marble": 149528, "crystal": 130843, "sulfur": 217872 }, // level 26
  913. { "wood": 291136, "marble": 176787, "crystal": 153414, "sulfur": 261830 }, // level 27
  914. { "wood": 349749, "marble": 208956, "crystal": 179821, "sulfur": 314581 }, // level 28
  915. { "wood": 420081, "marble": 246913, "crystal": 201716, "sulfur": 377881 }, // level 29
  916. { "wood": 504483, "marble": 291702, "crystal": 246864, "sulfur": 453842 }, // level 30
  917. { "wood": 605763, "marble": 344555, "crystal": 289157, "sulfur": 544994 }, // level 31
  918. { "wood": 727300, "marble": 406921, "crystal": 338642, "sulfur": 654378 }, // level 32
  919. { "wood": 873143, "marble": 480512, "crystal": 396536, "sulfur": 785637 }, // level 33
  920. { "wood": 1048157, "marble": 567350, "crystal": 464274, "sulfur": 943149 }, // level 34
  921. { "wood": 1258171, "marble": 669817, "crystal": 543528, "sulfur": 1132163 }, // level 35
  922. { "wood": 1510191, "marble": 790730, "crystal": 636253, "sulfur": 1358979 }, // level 36
  923. { "wood": 1812613, "marble": 933408, "crystal": 744742, "sulfur": 1631159 }, // level 37
  924. { "wood": 2175519, "marble": 1101767, "crystal": 871676, "sulfur": 1957774 }, // level 38
  925. { "wood": 2611007, "marble": 1300431, "crystal": 1020187, "sulfur": 2349714 }, // level 39
  926. { "wood": 3133592, "marble": 1534855, "crystal": 1193945, "sulfur": 2820041 } // level 40
  927. ],
  928.  
  929. // Embassy
  930. // Type of resources needed: Wood, Marble
  931. "embassy": [
  932. { "wood": 415, "marble": 342 }, // level 2
  933. { "wood": 623, "marble": 571 }, // level 3
  934. { "wood": 873, "marble": 850 }, // level 4
  935. { "wood": 1173, "marble": 1190 }, // level 5
  936. { "wood": 1532, "marble": 1606 }, // level 6
  937. { "wood": 1964, "marble": 2112 }, // level 7
  938. { "wood": 2482, "marble": 2730 }, // level 8
  939. { "wood": 3103, "marble": 3484 }, // level 9
  940. { "wood": 3849, "marble": 4404 }, // level 10
  941. { "wood": 4743, "marble": 5527 }, // level 11
  942. { "wood": 5817, "marble": 6896 }, // level 12
  943. { "wood": 7105, "marble": 8566 }, // level 13
  944. { "wood": 8651, "marble": 10604 }, // level 14
  945. { "wood": 10507, "marble": 13090 }, // level 15
  946. { "wood": 12733, "marble": 16123 }, // level 16
  947. { "wood": 15404, "marble": 19824 }, // level 17
  948. { "wood": 18610, "marble": 24339 }, // level 18
  949. { "wood": 22457, "marble": 29846 }, // level 19
  950. { "wood": 27074, "marble": 36566 }, // level 20
  951. { "wood": 32614, "marble": 44764 }, // level 21
  952. { "wood": 39261, "marble": 54765 }, // level 22
  953. { "wood": 47239, "marble": 66967 }, // level 23
  954. { "wood": 56811, "marble": 81853 }, // level 24
  955. { "wood": 68299, "marble": 100014 }, // level 25
  956. { "wood": 82084, "marble": 122170 }, // level 26
  957. { "wood": 98625, "marble": 149201 }, // level 27
  958. { "wood": 118475, "marble": 182178 }, // level 28
  959. { "wood": 142295, "marble": 222411 }, // level 29
  960. { "wood": 170879, "marble": 271495 }, // level 30
  961. { "wood": 205180, "marble": 331377 }, // level 31
  962. { "wood": 246341, "marble": 404433 } // level 32
  963. ],
  964.  
  965. // Firework Test Area
  966. // Type of resources needed: Wood, Marble
  967. "fireworker": [
  968. { "wood": 353, "marble": 212 }, // level 2
  969. { "wood": 445, "marble": 302 }, // level 3
  970. { "wood": 551, "marble": 405 }, // level 4
  971. { "wood": 673, "marble": 526 }, // level 5
  972. { "wood": 813, "marble": 665 }, // level 6
  973. { "wood": 974, "marble": 827 }, // level 7
  974. { "wood": 1159, "marble": 1015 }, // level 8
  975. { "wood": 1373, "marble": 1233 }, // level 9
  976. { "wood": 1618, "marble": 1486 }, // level 10
  977. { "wood": 1899, "marble": 1779 }, // level 11
  978. { "wood": 2223, "marble": 2120 }, // level 12
  979. { "wood": 2596, "marble": 2514 }, // level 13
  980. { "wood": 3025, "marble": 2972 }, // level 14
  981. { "wood": 3517, "marble": 3503 }, // level 15
  982. { "wood": 4084, "marble": 4119 }, // level 16
  983. { "wood": 4736, "marble": 4834 }, // level 17
  984. { "wood": 5485, "marble": 5662 }, // level 18
  985. { "wood": 6346, "marble": 6623 }, // level 19
  986. { "wood": 7338, "marble": 7738 }, // level 20
  987. { "wood": 8478, "marble": 9032 }, // level 21
  988. { "wood": 9790, "marble": 10534 }, // level 22
  989. { "wood": 11297, "marble": 12275 }, // level 23
  990. { "wood": 13030, "marble": 13355 }, // level 24
  991. { "wood": 14990, "marble": 16636 }, // level 25
  992. { "wood": 17317, "marble": 19354 }, // level 26
  993. { "wood": 19954, "marble": 22507 }, // level 27
  994. { "wood": 22986, "marble": 26163 }, // level 28
  995. { "wood": 26472, "marble": 30404 }, // level 29
  996. { "wood": 30484, "marble": 35325 }, // level 30
  997. { "wood": 35096, "marble": 41033 }, // level 31
  998. { "wood": 40399, "marble": 47652 } // level 32
  999. ],
  1000.  
  1001. // Forester's House
  1002. // Type of resources needed: Wood, Marble
  1003. "forester": [
  1004. { "wood": 430, "marble": 104 }, // level 2
  1005. { "wood": 664, "marble": 237 }, // level 3
  1006. { "wood": 968, "marble": 410 }, // level 4
  1007. { "wood": 1364, "marble": 635 }, // level 5
  1008. { "wood": 1878, "marble": 928 }, // level 6
  1009. { "wood": 2546, "marble": 1309 }, // level 7
  1010. { "wood": 3415, "marble": 1803 }, // level 8
  1011. { "wood": 4544, "marble": 2446 }, // level 9
  1012. { "wood": 6013, "marble": 3282 }, // level 10
  1013. { "wood": 7922, "marble": 4368 }, // level 11
  1014. { "wood": 10403, "marble": 5781 }, // level 12
  1015. { "wood": 13629, "marble": 7617 }, // level 13
  1016. { "wood": 17823, "marble": 10004 }, // level 14
  1017. { "wood": 23274, "marble": 13108 }, // level 15
  1018. { "wood": 30362, "marble": 17142 }, // level 16
  1019. { "wood": 39574, "marble": 22386 }, // level 17
  1020. { "wood": 51552, "marble": 29204 }, // level 18
  1021. { "wood": 67123, "marble": 38068 }, // level 19
  1022. { "wood": 87363, "marble": 49589 }, // level 20
  1023. { "wood": 113680, "marble": 64569 }, // level 21
  1024. { "wood": 147889, "marble": 84041 }, // level 22
  1025. { "wood": 192360, "marble": 109356 }, // level 23
  1026. { "wood": 250173, "marble": 142266 }, // level 24
  1027. { "wood": 325330, "marble": 185046 }, // level 25
  1028. { "wood": 423034, "marble": 240663 }, // level 26
  1029. { "wood": 550049, "marble": 312965 }, // level 27
  1030. { "wood": 715169, "marble": 406956 }, // level 28
  1031. { "wood": 929826, "marble": 529144 }, // level 29
  1032. { "wood": 1208878, "marble": 687989 }, // level 30
  1033. { "wood": 1571647, "marble": 894489 }, // level 31
  1034. { "wood": 2043246, "marble": 1162937 } // level 32
  1035. ],
  1036.  
  1037. // Glassblower
  1038. // Type of resources needed: Wood, Marble
  1039. "glassblowing": [
  1040. { "wood": 467, "marble": 116 }, // level 2
  1041. { "wood": 718, "marble": 255 }, // level 3
  1042. { "wood": 1045, "marble": 436 }, // level 4
  1043. { "wood": 1469, "marble": 671 }, // level 5
  1044. { "wood": 2021, "marble": 977 }, // level 6
  1045. { "wood": 2738, "marble": 1375 }, // level 7
  1046. { "wood": 3671, "marble": 1892 }, // level 8
  1047. { "wood": 4883, "marble": 2564 }, // level 9
  1048. { "wood": 6459, "marble": 3437 }, // level 10
  1049. { "wood": 8508, "marble": 4572 }, // level 11
  1050. { "wood": 11172, "marble": 6049 }, // level 12
  1051. { "wood": 14634, "marble": 7968 }, // level 13
  1052. { "wood": 19135, "marble": 10462 }, // level 14
  1053. { "wood": 24987, "marble": 13705 }, // level 15
  1054. { "wood": 32594, "marble": 17921 }, // level 16
  1055. { "wood": 42483, "marble": 23402 }, // level 17
  1056. { "wood": 55339, "marble": 30527 }, // level 18
  1057. { "wood": 72050, "marble": 39790 }, // level 19
  1058. { "wood": 93778, "marble": 51830 }, // level 20
  1059. { "wood": 122021, "marble": 67485 }, // level 21
  1060. { "wood": 158740, "marble": 87835 }, // level 22
  1061. { "wood": 206471, "marble": 114289 }, // level 23
  1062. { "wood": 268524, "marble": 148680 }, // level 24
  1063. { "wood": 349194, "marble": 193389 }, // level 25
  1064. { "wood": 454063, "marble": 251512 }, // level 26
  1065. { "wood": 590393, "marble": 327069 }, // level 27
  1066. { "wood": 767620, "marble": 425294 }, // level 28
  1067. { "wood": 998018, "marble": 552986 }, // level 29
  1068. { "wood": 1297536, "marble": 718988 }, // level 30
  1069. { "wood": 1686906, "marble": 934789 }, // level 31
  1070. { "wood": 2193089, "marble": 1215330 } // level 32
  1071. ],
  1072.  
  1073. // Museum
  1074. // Type of resources needed: Wood, Marble
  1075. "museum": [
  1076. { "wood": 1435, "marble": 1190 }, // level 2
  1077. { "wood": 2748, "marble": 2573 }, // level 3
  1078. { "wood": 4716, "marble": 4676 }, // level 4
  1079. { "wood": 7669, "marble": 7871 }, // level 5
  1080. { "wood": 12099, "marble": 12729 }, // level 6
  1081. { "wood": 18744, "marble": 20112 }, // level 7
  1082. { "wood": 28710, "marble": 31335 }, // level 8
  1083. { "wood": 43661, "marble": 48394 }, // level 9
  1084. { "wood": 66086, "marble": 74323 }, // level 10
  1085. { "wood": 99724, "marble": 113736 }, // level 11
  1086. { "wood": 150181, "marble": 173643 }, // level 12
  1087. { "wood": 225866, "marble": 264701 }, // level 13
  1088. { "wood": 339394, "marble": 403110 }, // level 14
  1089. { "wood": 509686, "marble": 613492 }, // level 15
  1090. { "wood": 765124, "marble": 933272 }, // level 16
  1091. { "wood": 1148281, "marble": 1419338 }, // level 17
  1092. { "wood": 1723017, "marble": 2158158 }, // level 18
  1093. { "wood": 2585121, "marble": 3281165 }, // level 19
  1094. { "wood": 3878276, "marble": 4988136 }, // level 20
  1095. { "wood": 5818009, "marble": 7582731 } // level 21
  1096. ],
  1097.  
  1098. // Optician's
  1099. // Type of resources needed: Wood, Marble
  1100. "optician": [
  1101. { "wood": 188, "marble": 35 }, // level 2
  1102. { "wood": 269, "marble": 96 }, // level 3
  1103. { "wood": 362, "marble": 167 }, // level 4
  1104. { "wood": 471, "marble": 249 }, // level 5
  1105. { "wood": 597, "marble": 345 }, // level 6
  1106. { "wood": 742, "marble": 455 }, // level 7
  1107. { "wood": 912, "marble": 584 }, // level 8
  1108. { "wood": 1108, "marble": 733 }, // level 9
  1109. { "wood": 1335, "marble": 905 }, // level 10
  1110. { "wood": 1600, "marble": 1106 }, // level 11
  1111. { "wood": 1906, "marble": 1338 }, // level 12
  1112. { "wood": 2261, "marble": 1608 }, // level 13
  1113. { "wood": 2673, "marble": 1921 }, // level 14
  1114. { "wood": 3152, "marble": 2283 }, // level 15
  1115. { "wood": 3706, "marble": 2704 }, // level 16
  1116. { "wood": 4348, "marble": 3191 }, // level 17
  1117. { "wood": 5096, "marble": 3759 }, // level 18
  1118. { "wood": 5962, "marble": 4416 }, // level 19
  1119. { "wood": 6966, "marble": 5178 }, // level 20
  1120. { "wood": 8131, "marble": 6062 }, // level 21
  1121. { "wood": 9482, "marble": 7087 }, // level 22
  1122. { "wood": 11050, "marble": 8276 }, // level 23
  1123. { "wood": 12868, "marble": 9656 }, // level 24
  1124. { "wood": 14978, "marble": 11257 }, // level 25
  1125. { "wood": 17424, "marble": 13113 }, // level 26
  1126. { "wood": 20262, "marble": 15267 }, // level 27
  1127. { "wood": 23553, "marble": 17762 }, // level 28
  1128. { "wood": 27373, "marble": 20662 }, // level 29
  1129. { "wood": 31804, "marble": 24024 }, // level 30
  1130. { "wood": 36943, "marble": 27922 }, // level 31
  1131. { "wood": 42904, "marble": 32447 } // level 32
  1132. ],
  1133.  
  1134. // Palace
  1135. // Type of resources needed: Wood, Wine, Marble, Crystal, Sulfur
  1136. "palace": [
  1137. { "wood": 5824, "marble": 1434 }, // level 2
  1138. { "wood": 16048, "marble": 4546, "sulfur": 3089 }, // level 3
  1139. { "wood": 36496, "marble": 10770, "sulfur": 10301, "wine": 10898 }, // level 4
  1140. { "wood": 77392, "marble": 23218, "sulfur": 24725, "wine": 22110, "crystal": 21188 }, // level 5
  1141. { "wood": 159184, "marble": 48114, "sulfur": 53573, "wine": 44534, "crystal": 42400 }, // level 6
  1142. { "wood": 322768, "marble": 97906, "sulfur": 111269, "wine": 89382, "crystal": 84824 }, // level 7
  1143. { "wood": 649936, "marble": 197490, "sulfur": 226661, "wine": 179078, "crystal": 169672 }, // level 8
  1144. { "wood": 1304272, "marble": 396658, "sulfur": 457445, "wine": 358470, "crystal": 339368 }, // level 9
  1145. { "wood": 2612944, "marble": 794994, "sulfur": 919013, "wine": 717254, "crystal": 678760 }, // level 10
  1146. { "wood": 4743518, "marble": 1591666, "sulfur": 1842149, "wine": 1434822, "crystal": 1357544 } // level 11 max
  1147. ],
  1148.  
  1149. // Governor's Residence
  1150. // Type of resources needed: Wood, Wine, Marble, Crystal, Sulfur
  1151. "palaceColony": [
  1152. { "wood": 5824, "marble": 1434 }, // level 2
  1153. { "wood": 16048, "marble": 4546, "sulfur": 3089 }, // level 3
  1154. { "wood": 36496, "marble": 10770, "sulfur": 10301, "wine": 10898 }, // level 4
  1155. { "wood": 77392, "marble": 23218, "sulfur": 24725, "wine": 22110, "crystal": 21188 }, // level 5
  1156. { "wood": 159184, "marble": 48114, "sulfur": 53573, "wine": 44534, "crystal": 42400 }, // level 6
  1157. { "wood": 322768, "marble": 97906, "sulfur": 111269, "wine": 89382, "crystal": 84824 }, // level 7
  1158. { "wood": 649936, "marble": 197490, "sulfur": 226661, "wine": 179078, "crystal": 169672 }, // level 8
  1159. { "wood": 1304272, "marble": 396658, "sulfur": 457445, "wine": 358470, "crystal": 339368 }, // level 9
  1160. { "wood": 2612944, "marble": 794994, "sulfur": 919013, "wine": 717254, "crystal": 678760 }, // level 10
  1161. { "wood": 4743518, "marble": 1591666, "sulfur": 1842149, "wine": 1434822, "crystal": 1357544 } // level 11 max
  1162. ],
  1163.  
  1164. // Pirate Fortress
  1165. // Type of resources needed: Wood, Marble
  1166. pirateFortress: [
  1167. { "wood": 906, "marble": 505 }, // level 2
  1168. { "wood": 1389, "marble": 783 }, // level 3
  1169. { "wood": 1935, "marble": 1112 }, // level 4
  1170. { "wood": 2593, "marble": 1534 }, // level 5
  1171. { "wood": 3427, "marble": 2103 }, // level 6
  1172. { "wood": 4516, "marble": 2883 }, // level 7
  1173. { "wood": 5950, "marble": 3949 }, // level 8
  1174. { "wood": 7834, "marble": 5388 }, // level 9
  1175. { "wood": 10284, "marble": 7296 }, // level 10
  1176. { "wood": 13430, "marble": 9782 }, // level 11
  1177. { "wood": 17415, "marble": 12964 }, // level 12
  1178. { "wood": 22394, "marble": 16970 }, // level 13
  1179. { "wood": 28534, "marble": 21938 }, // level 14
  1180. { "wood": 36015, "marble": 28019 }, // level 15
  1181. { "wood": 45029, "marble": 35370 }, // level 16
  1182. { "wood": 55779, "marble": 44162 }, // level 17
  1183. { "wood": 68482, "marble": 54573 }, // level 18
  1184. { "wood": 83366, "marble": 66793 }, // level 19
  1185. { "wood": 100671, "marble": 81020 }, // level 20
  1186. { "wood": 120648, "marble": 97463 }, // level 21
  1187. { "wood": 143562, "marble": 116341 }, // level 22
  1188. { "wood": 169686, "marble": 137883 }, // level 23
  1189. { "wood": 199309, "marble": 162325 }, // level 24
  1190. { "wood": 232729, "marble": 189915 }, // level 25
  1191. { "wood": 270255, "marble": 220912 }, // level 26
  1192. { "wood": 312210, "marble": 255580 }, // level 27
  1193. { "wood": 358926, "marble": 294197 }, // level 28
  1194. { "wood": 410748, "marble": 337048 }, // level 29
  1195. { "wood": 468032, "marble": 384429 } // level 30
  1196. ],
  1197.  
  1198. // Trading port
  1199. // Type of resources needed: Wood, Marble
  1200. "port": [
  1201. { "wood": 150 }, // level 2
  1202. { "wood": 274 }, // level 3
  1203. { "wood": 429 }, // level 4
  1204. { "wood": 637 }, // level 5
  1205. { "wood": 894, "marble": 176 }, // level 6
  1206. { "wood": 1207, "marble": 326 }, // level 7
  1207. { "wood": 1645, "marble": 540 }, // level 8
  1208. { "wood": 2106, "marble": 791 }, // level 9
  1209. { "wood": 2735, "marble": 1138 }, // level 10
  1210. { "wood": 3537, "marble": 1598 }, // level 11
  1211. { "wood": 4492, "marble": 2176 }, // level 12
  1212. { "wood": 5689, "marble": 2928 }, // level 13
  1213. { "wood": 7103, "marble": 3859 }, // level 14
  1214. { "wood": 8849, "marble": 5051 }, // level 15
  1215. { "wood": 11094, "marble": 6628 }, // level 16
  1216. { "wood": 13731, "marble": 8566 }, // level 17
  1217. { "wood": 17062, "marble": 11089 }, // level 18
  1218. { "wood": 21097, "marble": 14265 }, // level 19
  1219. { "wood": 25965, "marble": 18241 }, // level 20
  1220. { "wood": 31810, "marble": 23197 }, // level 21
  1221. { "wood": 39190, "marble": 29642 }, // level 22
  1222. { "wood": 47998, "marble": 37636 }, // level 23
  1223. { "wood": 58713, "marble": 47703 }, // level 24
  1224. { "wood": 71955, "marble": 60556 }, // level 25
  1225. { "wood": 87627, "marble": 76367 }, // level 26
  1226. { "wood": 107102, "marble": 96639 }, // level 27
  1227. { "wood": 130776, "marble": 122156 }, // level 28
  1228. { "wood": 159019, "marble": 153754 }, // level 29
  1229. { "wood": 193938, "marble": 194089 }, // level 30
  1230. { "wood": 235849, "marble": 244300 }, // level 31
  1231. { "wood": 286515, "marble": 307174 }, // level 32
  1232. { "wood": 348718, "marble": 386956 }, // level 33
  1233. { "wood": 423990, "marble": 486969 }, // level 34
  1234. { "wood": 513947, "marble": 610992 }, // level 35
  1235. { "wood": 625160, "marble": 769302 }, // level 36
  1236. { "wood": 758178, "marble": 965792 }, // level 37
  1237. { "wood": 919693, "marble": 1212790 }, // level 38
  1238. { "wood": 1116013, "marble": 1523570 }, // level 39
  1239. { "wood": 1353517, "marble": 1913073 }, // level 40
  1240. { "wood": 1642275, "marble": 2403314 }, // level 41
  1241. { "wood": 1990224, "marble": 3015689 }, // level 42
  1242. { "wood": 2411062, "marble": 3782993 }, // level 43
  1243. { "wood": 2923229, "marble": 4749576 }, // level 44
  1244. { "wood": 3541580, "marble": 5959027 }, // level 45
  1245. { "wood": 4291524, "marble": 7478201 }, // level 46
  1246. { "wood": 5199343, "marble": 9383420 } // level 47 max
  1247. ],
  1248.  
  1249. //Hideout
  1250. // Type of resources needed: Wood, Marble
  1251. "safehouse": [
  1252. { "wood": 248 }, // level 2
  1253. { "wood": 402 }, // level 3
  1254. { "wood": 578, "marble": 129 }, // level 4
  1255. { "wood": 779, "marble": 197 }, // level 5
  1256. { "wood": 1007, "marble": 275 }, // level 6
  1257. { "wood": 1267, "marble": 366 }, // level 7
  1258. { "wood": 1564, "marble": 471 }, // level 8
  1259. { "wood": 1903, "marble": 593 }, // level 9
  1260. { "wood": 2288, "marble": 735 }, // level 10
  1261. { "wood": 2728, "marble": 900 }, // level 11
  1262. { "wood": 3230, "marble": 1090 }, // level 12
  1263. { "wood": 3801, "marble": 1312 }, // level 13
  1264. { "wood": 4453, "marble": 1569 }, // level 14
  1265. { "wood": 5195, "marble": 1866 }, // level 15
  1266. { "wood": 6042, "marble": 2212 }, // level 16
  1267. { "wood": 7008, "marble": 2613 }, // level 17
  1268. { "wood": 8108, "marble": 3078 }, // level 18
  1269. { "wood": 9363, "marble": 3617 }, // level 19
  1270. { "wood": 10793, "marble": 4243 }, // level 20
  1271. { "wood": 12423, "marble": 4968 }, // level 21
  1272. { "wood": 14282, "marble": 5810 }, // level 22
  1273. { "wood": 16401, "marble": 6787 }, // level 23
  1274. { "wood": 18816, "marble": 7919 }, // level 24
  1275. { "wood": 21570, "marble": 9233 }, // level 25
  1276. { "wood": 24709, "marble": 10758 }, // level 26
  1277. { "wood": 28288, "marble": 12526 }, // level 27
  1278. { "wood": 32368, "marble": 14577 }, // level 28
  1279. { "wood": 37019, "marble": 16956 }, // level 29
  1280. { "wood": 42321, "marble": 19716 }, // level 30
  1281. { "wood": 48365, "marble": 22917 }, // level 31
  1282. { "wood": 55255, "marble": 26631 } // level 32
  1283. ],
  1284.  
  1285. // Shipyard
  1286. // Type of resources needed: Wood, Marble
  1287. "shipyard": [
  1288. { "wood": 202 }, // level 2
  1289. { "wood": 324 }, // level 3
  1290. { "wood": 477 }, // level 4
  1291. { "wood": 671 }, // level 5
  1292. { "wood": 914, "marble": 778 }, // level 6
  1293. { "wood": 1222, "marble": 1052 }, // level 7
  1294. { "wood": 1609, "marble": 1397 }, // level 8
  1295. { "wood": 2096, "marble": 1832 }, // level 9
  1296. { "wood": 2711, "marble": 2381 }, // level 10
  1297. { "wood": 3485, "marble": 3071 }, // level 11
  1298. { "wood": 4460, "marble": 3942 }, // level 12
  1299. { "wood": 5689, "marble": 5038 }, // level 13
  1300. { "wood": 7238, "marble": 6420 }, // level 14
  1301. { "wood": 9190, "marble": 8161 }, // level 15
  1302. { "wood": 11648, "marble": 10354 }, // level 16
  1303. { "wood": 14746, "marble": 13118 }, // level 17
  1304. { "wood": 18649, "marble": 16601 }, // level 18
  1305. { "wood": 23568, "marble": 20989 }, // level 19
  1306. { "wood": 29765, "marble": 26517 }, // level 20
  1307. { "wood": 37573, "marble": 33484 }, // level 21
  1308. { "wood": 47412, "marble": 42261 }, // level 22
  1309. { "wood": 59808, "marble": 53321 }, // level 23
  1310. { "wood": 75428, "marble": 67256 }, // level 24
  1311. { "wood": 95108, "marble": 84814 }, // level 25
  1312. { "wood": 119906, "marble": 106938 }, // level 26
  1313. { "wood": 151151, "marble": 134814 }, // level 27
  1314. { "wood": 190520, "marble": 169937 }, // level 28
  1315. { "wood": 240124, "marble": 214192 }, // level 29
  1316. { "wood": 302626, "marble": 269954 }, // level 30
  1317. { "wood": 381378, "marble": 340214 }, // level 31
  1318. { "wood": 480605, "marble": 428741 }, // level 32
  1319. { "wood": 520843, "marble": 464645 }, // level 33
  1320. { "wood": 656322, "marble": 585515 }, // level 34
  1321. { "wood": 827026, "marble": 737811 }, // level 35
  1322. { "wood": 1042112, "marble": 929703 }, // level 36
  1323. { "wood": 1313121, "marble": 1171488 }, // level 37
  1324. { "wood": 1654593, "marble": 1476136 } // level 38
  1325. ],
  1326.  
  1327. //Stonemason
  1328. // Type of resources needed: Wood, Marble
  1329. "stonemason": [
  1330. { "wood": 467, "marble": 116 }, // level 2
  1331. { "wood": 718, "marble": 255 }, // level 3
  1332. { "wood": 1045, "marble": 436 }, // level 4
  1333. { "wood": 1469, "marble": 671 }, // level 5
  1334. { "wood": 2021, "marble": 977 }, // level 6
  1335. { "wood": 2738, "marble": 1375 }, // level 7
  1336. { "wood": 3671, "marble": 1892 }, // level 8
  1337. { "wood": 4883, "marble": 2564 }, // level 9
  1338. { "wood": 6459, "marble": 3437 }, // level 10
  1339. { "wood": 8508, "marble": 4572 }, // level 11
  1340. { "wood": 11172, "marble": 6049 }, // level 12
  1341. { "wood": 14634, "marble": 7968 }, // level 13
  1342. { "wood": 19135, "marble": 10462 }, // level 14
  1343. { "wood": 24987, "marble": 13705 }, // level 15
  1344. { "wood": 32594, "marble": 17921 }, // level 16
  1345. { "wood": 42483, "marble": 23402 }, // level 17
  1346. { "wood": 55339, "marble": 30527 }, // level 18
  1347. { "wood": 72050, "marble": 39790 }, // level 19
  1348. { "wood": 93778, "marble": 51830 }, // level 20
  1349. { "wood": 122021, "marble": 67485 }, // level 21
  1350. { "wood": 158740, "marble": 87835 }, // level 22
  1351. { "wood": 206471, "marble": 114289 }, // level 23
  1352. { "wood": 268524, "marble": 148680 }, // level 24
  1353. { "wood": 349194, "marble": 193389 }, // level 25
  1354. { "wood": 454063, "marble": 251512 }, // level 26
  1355. { "wood": 590393, "marble": 327069 }, // level 27
  1356. { "wood": 767620, "marble": 425294 }, // level 28
  1357. { "wood": 998018, "marble": 552986 }, // level 29
  1358. { "wood": 1297536, "marble": 718988 }, // level 30
  1359. { "wood": 1686906, "marble": 934789 }, // level 31
  1360. { "wood": 2193089, "marble": 1215330 } // level 32
  1361. ],
  1362.  
  1363. //Tavern
  1364. // Type of resources needed: Wood, Marble
  1365. "tavern": [
  1366. { "wood": 222 }, // level 2
  1367. { "wood": 367 }, // level 3
  1368. { "wood": 541, "marble": 94 }, // level 4
  1369. { "wood": 750, "marble": 122 }, // level 5
  1370. { "wood": 1001, "marble": 158 }, // level 6
  1371. { "wood": 1302, "marble": 206 }, // level 7
  1372. { "wood": 1663, "marble": 267 }, // level 8
  1373. { "wood": 2097, "marble": 348 }, // level 9
  1374. { "wood": 2617, "marble": 452 }, // level 10
  1375. { "wood": 3241, "marble": 587 }, // level 11
  1376. { "wood": 3990, "marble": 764 }, // level 12
  1377. { "wood": 4888, "marble": 993 }, // level 13
  1378. { "wood": 5967, "marble": 1290 }, // level 14
  1379. { "wood": 7261, "marble": 1677 }, // level 15
  1380. { "wood": 8814, "marble": 2181 }, // level 16
  1381. { "wood": 10678, "marble": 2835 }, // level 17
  1382. { "wood": 12914, "marble": 3685 }, // level 18
  1383. { "wood": 15598, "marble": 4791 }, // level 19
  1384. { "wood": 18818, "marble": 6228 }, // level 20
  1385. { "wood": 22683, "marble": 8097 }, // level 21
  1386. { "wood": 27320, "marble": 10526 }, // level 22
  1387. { "wood": 32885, "marble": 13684 }, // level 23
  1388. { "wood": 39562, "marble": 17789 }, // level 24
  1389. { "wood": 47576, "marble": 23125 }, // level 25
  1390. { "wood": 57192, "marble": 30063 }, // level 26
  1391. { "wood": 68731, "marble": 39082 }, // level 27
  1392. { "wood": 82578, "marble": 50806 }, // level 28
  1393. { "wood": 99194, "marble": 66048 }, // level 29
  1394. { "wood": 119134, "marble": 85862 }, // level 30
  1395. { "wood": 143061, "marble": 111621 }, // level 31
  1396. { "wood": 171774, "marble": 145107 }, // level 32
  1397. { "wood": 206230, "marble": 188640 }, // level 33
  1398. { "wood": 247577, "marble": 245232 }, // level 34
  1399. { "wood": 297193, "marble": 318801 }, // level 35
  1400. { "wood": 356732, "marble": 414441 }, // level 36
  1401. { "wood": 428179, "marble": 538774 }, // level 37
  1402. { "wood": 513916, "marble": 700406 }, // level 38
  1403. { "wood": 616800, "marble": 910528 }, // level 39
  1404. { "wood": 740261, "marble": 1183686 }, // level 40
  1405. { "wood": 888413, "marble": 1538791 }, // level 41
  1406. { "wood": 1066197, "marble": 2000428 }, // level 42
  1407. { "wood": 1279538, "marble": 2600558 }, // level 43
  1408. { "wood": 1535545, "marble": 3380726 }, // level 44
  1409. { "wood": 1842756, "marble": 4394943 }, // level 45
  1410. { "wood": 2211407, "marble": 5713425 }, // level 46
  1411. { "wood": 2653789, "marble": 7427454 } // level 47 max
  1412. ],
  1413.  
  1414. // Temple
  1415. // Type of resources needed: Wood, Crystal
  1416. "temple": [
  1417. { "wood": 228, "crystal": 190 }, // level 2
  1418. { "wood": 333, "crystal": 290 }, // level 3
  1419. { "wood": 465, "crystal": 423 }, // level 4
  1420. { "wood": 598, "crystal": 567 }, // level 5
  1421. { "wood": 760, "crystal": 752 }, // level 6
  1422. { "wood": 958, "crystal": 989 }, // level 7
  1423. { "wood": 1197, "crystal": 1290 }, // level 8
  1424. { "wood": 1432, "crystal": 1610 }, // level 9
  1425. { "wood": 1773, "crystal": 2080 }, // level 10
  1426. { "wood": 2112, "crystal": 2586 }, // level 11
  1427. { "wood": 2512, "crystal": 3210 }, // level 12
  1428. { "wood": 3082, "crystal": 4109 }, // level 13
  1429. { "wood": 3655, "crystal": 5084 }, // level 14
  1430. { "wood": 4458, "crystal": 6471 }, // level 15
  1431. { "wood": 5126, "crystal": 7765 }, // level 16
  1432. { "wood": 6232, "crystal": 9851 }, // level 17
  1433. { "wood": 7167, "crystal": 11821 }, // level 18
  1434. { "wood": 8688, "crystal": 14952 }, // level 19
  1435. { "wood": 10247, "crystal": 18402 }, // level 20
  1436. { "wood": 11784, "crystal": 22082 }, // level 21
  1437. { "wood": 14229, "crystal": 27824 }, // level 22
  1438. { "wood": 16753, "crystal": 34184 }, // level 23
  1439. { "wood": 19266, "crystal": 41020 }, // level 24
  1440. { "wood": 23156, "crystal": 51514 }, // level 25
  1441. { "wood": 26664, "crystal": 61817 }, // level 26
  1442. { "wood": 32027, "crystal": 77477 }, // level 27
  1443. { "wood": 36831, "crystal": 92972 }, // level 28
  1444. { "wood": 43257, "crystal": 113941 }, // level 29
  1445. { "wood": 50782, "crystal": 139577 }, // level 30
  1446. { "wood": 59591, "crystal": 170911 }, // level 31
  1447. { "wood": 68529, "crystal": 205093 }, // level 32
  1448. { "wood": 69131, "crystal": 215889 }, // level 33
  1449. { "wood": 82618, "crystal": 269226 }, // level 34
  1450. { "wood": 93217, "crystal": 316976 }, // level 35
  1451. { "wood": 111324, "crystal": 395001 }, // level 36
  1452. { "wood": 128023, "crystal": 474001 }, // level 37
  1453. { "wood": 149952, "crystal": 579334 } // level 38
  1454. ],
  1455.  
  1456.  
  1457. // Town Hall
  1458. // Type of resources needed: Wood, Marble
  1459. "townHall": [
  1460. { "wood": 158 }, // level 2
  1461. { "wood": 335 }, // level 3
  1462. { "wood": 623 }, // level 4
  1463. { "wood": 923, "marble": 285 }, // level 5
  1464. { "wood": 1390, "marble": 551 }, // level 6
  1465. { "wood": 2015, "marble": 936 }, // level 7
  1466. { "wood": 2706, "marble": 1411 }, // level 8
  1467. { "wood": 3661, "marble": 2091 }, // level 9
  1468. { "wood": 4776, "marble": 2945 }, // level 10
  1469. { "wood": 6173, "marble": 4072 }, // level 11
  1470. { "wood": 8074, "marble": 5664 }, // level 12
  1471. { "wood": 10281, "marble": 7637 }, // level 13
  1472. { "wood": 13023, "marble": 10214 }, // level 14
  1473. { "wood": 16424, "marble": 13575 }, // level 15
  1474. { "wood": 20986, "marble": 18254 }, // level 16
  1475. { "wood": 25423, "marble": 23250 }, // level 17
  1476. { "wood": 32285, "marble": 31022 }, // level 18
  1477. { "wood": 40232, "marble": 40599 }, // level 19
  1478. { "wood": 49286, "marble": 52216 }, // level 20
  1479. { "wood": 61207, "marble": 68069 }, // level 21
  1480. { "wood": 74804, "marble": 87316 }, // level 22
  1481. { "wood": 93956, "marble": 115101 }, // level 23
  1482. { "wood": 113035, "marble": 145326 }, // level 24
  1483. { "wood": 141594, "marble": 191053 }, // level 25
  1484. { "wood": 170213, "marble": 241039 }, // level 26
  1485. { "wood": 210011, "marble": 312128 }, // level 27
  1486. { "wood": 258875, "marble": 403825 }, // level 28
  1487. { "wood": 314902, "marble": 515593 }, // level 29
  1488. { "wood": 387657, "marble": 666229 }, // level 30
  1489. { "wood": 471194, "marble": 850031 }, // level 31
  1490. { "wood": 572581, "marble": 1084293 }, // level 32
  1491. { "wood": 695617, "marble": 1382827 }, // level 33
  1492. { "wood": 854729, "marble": 1783721 }, // level 34
  1493. { "wood": 1037816, "marble": 2273687 }, // level 35
  1494. { "wood": 1274043, "marble": 2930330 }, // level 36
  1495. { "wood": 1529212, "marble": 3692591 }, // level 37
  1496. { "wood": 1876201, "marble": 4756439 }, // level 38
  1497. { "wood": 2276286, "marble": 6058643 }, // level 39
  1498. { "wood": 2761291, "marble": 7716366 } // level 40 max
  1499. ],
  1500.  
  1501. // Wine Press
  1502. // Type of resources needed: Wood, Marble
  1503. "vineyard": [
  1504. { "wood": 423, "marble": 198 }, // level 2
  1505. { "wood": 520, "marble": 285 }, // level 3
  1506. { "wood": 631, "marble": 387 }, // level 4
  1507. { "wood": 758, "marble": 504 }, // level 5
  1508. { "wood": 905, "marble": 640 }, // level 6
  1509. { "wood": 1074, "marble": 798 }, // level 7
  1510. { "wood": 1269, "marble": 981 }, // level 8
  1511. { "wood": 1492, "marble": 1194 }, // level 9
  1512. { "wood": 1749, "marble": 1440 }, // level 10
  1513. { "wood": 2045, "marble": 1726 }, // level 11
  1514. { "wood": 2384, "marble": 2058 }, // level 12
  1515. { "wood": 2775, "marble": 2443 }, // level 13
  1516. { "wood": 3225, "marble": 2889 }, // level 14
  1517. { "wood": 3741, "marble": 3407 }, // level 15
  1518. { "wood": 4336, "marble": 4008 }, // level 16
  1519. { "wood": 5019, "marble": 4705 }, // level 17
  1520. { "wood": 5813, "marble": 5513 }, // level 18
  1521. { "wood": 6875, "marble": 6450 }, // level 19
  1522. { "wood": 7941, "marble": 7537 }, // level 20
  1523. { "wood": 8944, "marble": 8800 }, // level 21
  1524. { "wood": 10319, "marble": 10263 }, // level 22
  1525. { "wood": 11900, "marble": 11961 }, // level 23
  1526. { "wood": 13718, "marble": 13930 }, // level 24
  1527. { "wood": 15809, "marble": 16214 }, // level 25
  1528. { "wood": 18215, "marble": 18864 }, // level 26
  1529. { "wood": 20978, "marble": 21938 }, // level 27
  1530. { "wood": 24159, "marble": 25503 }, // level 28
  1531. { "wood": 27816, "marble": 29639 }, // level 29
  1532. { "wood": 32021, "marble": 34437 }, // level 30
  1533. { "wood": 36857, "marble": 40002 }, // level 31
  1534. { "wood": 42419, "marble": 46457 } // level 32
  1535. ],
  1536.  
  1537. //Town Wall
  1538. // Type of resources needed: Wood, Marble
  1539. "wall": [
  1540. { "wood": 361, "marble": 203 }, // level 2
  1541. { "wood": 657, "marble": 516 }, // level 3
  1542. { "wood": 1012, "marble": 892 }, // level 4
  1543. { "wood": 1439, "marble": 1344 }, // level 5
  1544. { "wood": 1951, "marble": 1885 }, // level 6
  1545. { "wood": 2565, "marble": 2535 }, // level 7
  1546. { "wood": 3302, "marble": 3315 }, // level 8
  1547. { "wood": 4186, "marble": 4251 }, // level 9
  1548. { "wood": 5247, "marble": 5374 }, // level 10
  1549. { "wood": 6521, "marble": 6721 }, // level 11
  1550. { "wood": 8049, "marble": 8338 }, // level 12
  1551. { "wood": 9882, "marble": 10279 }, // level 13
  1552. { "wood": 12083, "marble": 12608 }, // level 14
  1553. { "wood": 14724, "marble": 15402 }, // level 15
  1554. { "wood": 17892, "marble": 18755 }, // level 16
  1555. { "wood": 21695, "marble": 22779 }, // level 17
  1556. { "wood": 26258, "marble": 27607 }, // level 18
  1557. { "wood": 31733, "marble": 33402 }, // level 19
  1558. { "wood": 38304, "marble": 40355 }, // level 20
  1559. { "wood": 46189, "marble": 48699 }, // level 21
  1560. { "wood": 55650, "marble": 58711 }, // level 22
  1561. { "wood": 67004, "marble": 70726 }, // level 23
  1562. { "wood": 80629, "marble": 85144 }, // level 24
  1563. { "wood": 96979, "marble": 102446 }, // level 25
  1564. { "wood": 116599, "marble": 123208 }, // level 26
  1565. { "wood": 140143, "marble": 148122 }, // level 27
  1566. { "wood": 168395, "marble": 178019 }, // level 28
  1567. { "wood": 202298, "marble": 213896 }, // level 29
  1568. { "wood": 242982, "marble": 256948 }, // level 30
  1569. { "wood": 291802, "marble": 308610 }, // level 31
  1570. { "wood": 350387, "marble": 370605 }, // level 32
  1571. { "wood": 420688, "marble": 444998 }, // level 33
  1572. { "wood": 505049, "marble": 534270 }, // level 34
  1573. { "wood": 606284, "marble": 641397 }, // level 35
  1574. { "wood": 727765, "marble": 769949 }, // level 36
  1575. { "wood": 873541, "marble": 924213 }, // level 37
  1576. { "wood": 1048473, "marble": 1109328 }, // level 38
  1577. { "wood": 1258393, "marble": 1331467 }, // level 39
  1578. { "wood": 1510294, "marble": 1598031 }, // level 40
  1579. { "wood": 1812577, "marble": 1917913 }, // level 41
  1580. { "wood": 2175317, "marble": 2301767 }, // level 42
  1581. { "wood": 2610603, "marble": 2762392 }, // level 43
  1582. { "wood": 3132948, "marble": 3315144 }, // level 44
  1583. { "wood": 3759764, "marble": 3978446 }, // level 45
  1584. { "wood": 4511941, "marble": 4774409 }, // level 46
  1585. { "wood": 5414554, "marble": 5729565 }, // level 47
  1586. { "wood": 6497687, "marble": 6875750 } // level 48
  1587. ],
  1588.  
  1589. // Warehouse
  1590. // Type of resources needed: Wood, Marble
  1591. "warehouse": [
  1592. { "wood": 288 }, // level 2
  1593. { "wood": 442 }, // level 3
  1594. { "wood": 626, "marble": 96 }, // level 4
  1595. { "wood": 847, "marble": 211 }, // level 5
  1596. { "wood": 1113, "marble": 349 }, // level 6
  1597. { "wood": 1431, "marble": 515 }, // level 7
  1598. { "wood": 1813, "marble": 714 }, // level 8
  1599. { "wood": 2272, "marble": 953 }, // level 9
  1600. { "wood": 2822, "marble": 1240 }, // level 10
  1601. { "wood": 3483, "marble": 1584 }, // level 11
  1602. { "wood": 4275, "marble": 1997 }, // level 12
  1603. { "wood": 5226, "marble": 2492 }, // level 13
  1604. { "wood": 6368, "marble": 3086 }, // level 14
  1605. { "wood": 7737, "marble": 3800 }, // level 15
  1606. { "wood": 9380, "marble": 4656 }, // level 16
  1607. { "wood": 11353, "marble": 5683 }, // level 17
  1608. { "wood": 13719, "marble": 6915 }, // level 18
  1609. { "wood": 16559, "marble": 8394 }, // level 19
  1610. { "wood": 19967, "marble": 10169 }, // level 20
  1611. { "wood": 24056, "marble": 12299 }, // level 21
  1612. { "wood": 28963, "marble": 14855 }, // level 22
  1613. { "wood": 34852, "marble": 17922 }, // level 23
  1614. { "wood": 41918, "marble": 21602 }, // level 24
  1615. { "wood": 50398, "marble": 26019 }, // level 25
  1616. { "wood": 60574, "marble": 31319 }, // level 26
  1617. { "wood": 72784, "marble": 37678 }, // level 27
  1618. { "wood": 87437, "marble": 45310 }, // level 28
  1619. { "wood": 105021, "marble": 54468 }, // level 29
  1620. { "wood": 126121, "marble": 65458 }, // level 30
  1621. { "wood": 151441, "marble": 78645 }, // level 31
  1622. { "wood": 181825, "marble": 94471 }, // level 32
  1623. { "wood": 218286, "marble": 113461 }, // level 33
  1624. { "wood": 262039, "marble": 136249 }, // level 34
  1625. { "wood": 314543, "marble": 163595 }, // level 35
  1626. { "wood": 377548, "marble": 196409 }, // level 36
  1627. { "wood": 453153, "marble": 235787 }, // level 37
  1628. { "wood": 543880, "marble": 283041 }, // level 38
  1629. { "wood": 652752, "marble": 339745 }, // level 39
  1630. { "wood": 783398, "marble": 407790 } // level 40
  1631. ],
  1632.  
  1633. // Winegrower
  1634. // Type of resources needed: Wood, Marble
  1635. "winegrower": [
  1636. { "wood": 467, "marble": 116 }, // level 2
  1637. { "wood": 718, "marble": 255 }, // level 3
  1638. { "wood": 1045, "marble": 436 }, // level 4
  1639. { "wood": 1469, "marble": 671 }, // level 5
  1640. { "wood": 2021, "marble": 977 }, // level 6
  1641. { "wood": 2738, "marble": 1375 }, // level 7
  1642. { "wood": 3671, "marble": 1892 }, // level 8
  1643. { "wood": 4883, "marble": 2564 }, // level 9
  1644. { "wood": 6459, "marble": 3437 }, // level 10
  1645. { "wood": 8508, "marble": 4572 }, // level 11
  1646. { "wood": 11172, "marble": 6049 }, // level 12
  1647. { "wood": 14634, "marble": 7968 }, // level 13
  1648. { "wood": 19135, "marble": 10462 }, // level 14
  1649. { "wood": 24987, "marble": 13705 }, // level 15
  1650. { "wood": 32594, "marble": 17921 }, // level 16
  1651. { "wood": 42483, "marble": 23402 }, // level 17
  1652. { "wood": 55339, "marble": 30527 }, // level 18
  1653. { "wood": 72050, "marble": 39790 }, // level 19
  1654. { "wood": 93778, "marble": 51830 }, // level 20
  1655. { "wood": 122021, "marble": 67485 }, // level 21
  1656. { "wood": 158740, "marble": 87835 }, // level 22
  1657. { "wood": 206471, "marble": 114289 }, // level 23
  1658. { "wood": 268524, "marble": 148680 }, // level 24
  1659. { "wood": 349194, "marble": 193389 }, // level 25
  1660. { "wood": 454063, "marble": 251512 }, // level 26
  1661. { "wood": 590393, "marble": 327069 }, // level 27
  1662. { "wood": 767620, "marble": 425294 }, // level 28
  1663. { "wood": 998018, "marble": 552986 }, // level 29
  1664. { "wood": 1297536, "marble": 718988 }, // level 30
  1665. { "wood": 1686906, "marble": 934789 }, // level 31
  1666. { "wood": 2193089, "marble": 1215330 } // level 32
  1667. ],
  1668.  
  1669. // Workshop
  1670. // Type of resources needed: Wood, Marble
  1671. "workshop": [
  1672. { "wood": 383, "marble": 167 }, // level 2
  1673. { "wood": 569, "marble": 251 }, // level 3
  1674. { "wood": 781, "marble": 349 }, // level 4
  1675. { "wood": 1023, "marble": 461 }, // level 5
  1676. { "wood": 1299, "marble": 592 }, // level 6
  1677. { "wood": 1613, "marble": 744 }, // level 7
  1678. { "wood": 1971, "marble": 920 }, // level 8
  1679. { "wood": 2380, "marble": 1125 }, // level 9
  1680. { "wood": 2846, "marble": 1362 }, // level 10
  1681. { "wood": 3377, "marble": 1637 }, // level 11
  1682. { "wood": 3982, "marble": 1956 }, // level 12
  1683. { "wood": 4671, "marble": 2326 }, // level 13
  1684. { "wood": 5457, "marble": 2755 }, // level 14
  1685. { "wood": 6355, "marble": 3253 }, // level 15
  1686. { "wood": 7377, "marble": 3831 }, // level 16
  1687. { "wood": 8542, "marble": 4500 }, // level 17
  1688. { "wood": 9870, "marble": 5279 }, // level 18
  1689. { "wood": 11385, "marble": 6180 }, // level 19
  1690. { "wood": 13111, "marble": 7226 }, // level 20
  1691. { "wood": 15078, "marble": 8439 }, // level 21
  1692. { "wood": 17321, "marble": 9847 }, // level 22
  1693. { "wood": 19481, "marble": 11478 }, // level 23
  1694. { "wood": 22796, "marble": 13373 }, // level 24
  1695. { "wood": 26119, "marble": 15570 }, // level 25
  1696. { "wood": 29909, "marble": 18118 }, // level 26
  1697. { "wood": 34228, "marble": 21074 }, // level 27
  1698. { "wood": 39153, "marble": 24503 }, // level 28
  1699. { "wood": 44766, "marble": 28481 }, // level 29
  1700. { "wood": 51166, "marble": 33095 }, // level 30
  1701. { "wood": 58462, "marble": 38447 }, // level 31
  1702. { "wood": 66778, "marble": 44656 } // level 32
  1703. ],
  1704. "marineChartArchive": [
  1705. { "wood": 1298, "marble": 1066, "crystal": 611 }, // level 2
  1706. { "wood": 2133, "marble": 1916, "crystal": 1142 },
  1707. { "wood": 3102, "marble": 2918, "crystal": 1769 },
  1708. { "wood": 4226, "marble": 4101, "crystal": 2508 },
  1709. { "wood": 5530, "marble": 5497, "crystal": 3380 },
  1710. { "wood": 7042, "marble": 7144, "crystal": 4410 },
  1711. { "wood": 8796, "marble": 9088, "crystal": 5625 },
  1712. { "wood": 10831, "marble": 11381, "crystal": 7058 },
  1713. { "wood": 13191, "marble": 14088, "crystal": 8750 }, // level 10
  1714. { "wood": 15929, "marble": 17281, "crystal": 10746 },
  1715. { "wood": 19106, "marble": 21050, "crystal": 13101 },
  1716. { "wood": 22790, "marble": 25496, "crystal": 15880 },
  1717. { "wood": 27064, "marble": 30743, "crystal": 19159 },
  1718. { "wood": 32022, "marble": 36935, "crystal": 23029 },
  1719. { "wood": 37773, "marble": 44241, "crystal": 27595 },
  1720. { "wood": 44444, "marble": 52862, "crystal": 32984 },
  1721. { "wood": 52183, "marble": 63035, "crystal": 39342 },
  1722. { "wood": 61159, "marble": 75039, "crystal": 46844 },
  1723. { "wood": 71572, "marble": 89204, "crystal": 55697 }, // level 20
  1724. { "wood": 83651, "marble": 105918, "crystal": 66144 },
  1725. { "wood": 97663, "marble": 125641, "crystal": 78470 },
  1726. { "wood": 113917, "marble": 148914, "crystal": 93016 },
  1727. { "wood": 132771, "marble": 176377, "crystal": 110180 },
  1728. { "wood": 154642, "marble": 208782, "crystal": 130434 },
  1729. { "wood": 180012, "marble": 247021, "crystal": 154333 },
  1730. { "wood": 209442, "marble": 292142, "crystal": 182533 },
  1731. { "wood": 243580, "marble": 345385, "crystal": 215810 },
  1732. { "wood": 283180, "marble": 408212, "crystal": 255077 },
  1733. { "wood": 329116, "marble": 482348, "crystal": 301412 }, // level 30
  1734. { "wood": 382402, "marble": 569829, "crystal": 356088 },
  1735. { "wood": 444214, "marble": 673055, "crystal": 420604 },
  1736. { "wood": 515916, "marble": 794863, "crystal": 496734 },
  1737. { "wood": 599090, "marble": 938596, "crystal": 586567 },
  1738. { "wood": 695572, "marble": 1108201, "crystal": 692571 },
  1739. { "wood": 807491, "marble": 1308335, "crystal": 817654 },
  1740. { "wood": 937317, "marble": 1544493, "crystal": 965253 },
  1741. { "wood": 1087916, "marble": 1823160, "crystal": 1139420 },
  1742. { "wood": 1262610, "marble": 2151986, "crystal": 1344936 },
  1743. { "wood": 1465255, "marble": 2540001, "crystal": 1587446 } // level 40
  1744. ]
  1745. };
  1746.  
  1747. /* Launch IUW using jQuery loaded inside the ikariam page */
  1748. IUW.$ = jQuery;
  1749. IUW.$(function(){
  1750. "use strict";
  1751. IUW.init();
  1752. IUW.reload();
  1753. });