MWI TaskManager

sort all task in taskboard

  1. // ==UserScript==
  2. // @name MWI TaskManager
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.22
  5. // @description sort all task in taskboard
  6. // @author shykai
  7. // @match https://www.milkywayidle.com/*
  8. // @match https://test.milkywayidle.com/*
  9. // @icon https://www.milkywayidle.com/favicon.svg
  10. // @grant GM_getValue
  11. // @grant GM_setValue
  12. // ==/UserScript==
  13.  
  14. (function () {
  15. 'use strict';
  16.  
  17. //default config
  18. let globalConfig = {
  19. isBattleIcon: true,
  20. dungeonConfig: {
  21. "/actions/combat/chimerical_den": false,
  22. "/actions/combat/sinister_circus": false,
  23. "/actions/combat/enchanted_fortress": false,
  24. "/actions/combat/pirate_cove": false,
  25. }
  26. };
  27.  
  28. const globalConfigName = "MWITaskManager_globalConfig";
  29. function saveConfig() {
  30. GM_setValue(globalConfigName, JSON.stringify(globalConfig));
  31. }
  32.  
  33. const savedConfig = GM_getValue(globalConfigName, null);
  34. if (savedConfig) {
  35. let readConfig = JSON.parse(savedConfig);
  36. globalConfig.isBattleIcon = readConfig.isBattleIcon;
  37. for (let key in readConfig.dungeonConfig) {
  38. globalConfig.dungeonConfig[key] = readConfig.dungeonConfig[key];
  39. }
  40. }
  41.  
  42. // split from actions_sprite.e6388cbc.svg
  43. const actionSVGText = '<?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <symbol fill="none" viewBox="0 0 100 100" id="chimerical_den" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#aea)"> <path d="m14.554 35.23-8.92 8.92L16.9 50.254l6.573-6.104 1.409-4.695-10.329-4.225Z" fill="#2FC4A7" /> <path d="m14.554 35.23-8.92 8.92L16.9 50.254l6.573-6.104 1.409-4.695-10.329-4.225Z" fill="#fff" fill-opacity=".6" /> <path d="M63.38 10.347 42.723 8l10.798 11.268 9.86-8.92Z" fill="#2FC4A7" /> <path d="M63.38 10.347 42.723 8l10.798 11.268 9.86-8.92Z" fill="#fff" fill-opacity=".6" /> <path d="m80.751 32.413-5.164-13.145 18.31 12.206-13.146.94Z" fill="#2FC4A7" /> <path d="m80.751 32.413-5.164-13.145 18.31 12.206-13.146.94Z" fill="#fff" fill-opacity=".6" /> <path d="m65.258 44.15 9.39-8.45 4.695 3.286 7.511 2.817-10.328 6.573-11.268-4.226Z" fill="#2FC4A7" /> <path d="m65.258 44.15 9.39-8.45 4.695 3.286 7.511 2.817-10.328 6.573-11.268-4.226Z" fill="#fff" fill-opacity=".6" /> <path d="m30.516 34.291 7.512-6.573 15.963 1.409 6.103 4.225-9.39 11.737-15.023 2.348-5.165-13.146Z" fill="#2FC4A7" /> <path d="m30.516 34.291 7.512-6.573 15.963 1.409 6.103 4.225-9.39 11.737-15.023 2.348-5.165-13.146Z" fill="#fff" fill-opacity=".6" /> <path d="M28.639 15.981 42.722 8l10.798 8.92 2.347 12.207H36.15L28.64 15.98Z" fill="#898989" /> <path d="M28.639 15.981 42.722 8l10.798 8.92 2.347 12.207H36.15L28.64 15.98Z" fill="#fff" fill-opacity=".4" /> <path d="m30.516 34.291-7.98 4.225v5.634l-2.818 15.493-2.817 22.066 11.738-5.634 1.408-13.615 6.573-14.554-6.104-13.615Z" fill="#898989" /> <path d="m30.516 34.291-7.98 4.225v5.634l-2.818 15.493-2.817 22.066 11.738-5.634 1.408-13.615 6.573-14.554-6.104-13.615Z" fill="#fff" fill-opacity=".4" /> <path d="M39.437 29.127 28.638 15.98l-6.103 22.535 7.981-4.225 8.92-5.164Z" fill="#898989" /> <path d="M39.437 29.127 28.638 15.98l-6.103 22.535 7.981-4.225 8.92-5.164Z" fill="#fff" fill-opacity=".6" /> <path d="m63.38 10.347-9.859 6.573.47 12.207 16.431 11.737 4.226-4.695L63.38 10.347Z" fill="#898989" /> <path d="m63.38 10.347-9.859 6.573.47 12.207 16.431 11.737 4.226-4.695L63.38 10.347Z" fill="#fff" fill-opacity=".6" /> <path d="M16.432 47.437 5.634 44.15 0 77.014l16.901 4.695 4.226-21.596-4.695-12.676Z" fill="#898989" /> <path d="M16.432 47.437 5.634 44.15 0 77.014l16.901 4.695 4.226-21.596-4.695-12.676Z" fill="#fff" fill-opacity=".2" /> <path d="m68.075 82.178-.47-38.028 8.92 4.226 4.696 35.21-13.146-1.408Z" fill="#898989" /> <path d="m68.075 82.178-.47-38.028 8.92 4.226 4.696 35.21-13.146-1.408Z" fill="#fff" fill-opacity=".2" /> <path d="m75.587 19.268-7.042 3.286 6.103 13.615 4.695 2.817 1.408-6.573-5.164-13.145Z" fill="#898989" /> <path d="m75.587 19.268-7.042 3.286 6.103 13.615 4.695 2.817 1.408-6.573-5.164-13.145Z" fill="#fff" fill-opacity=".2" /> <path d="m49.765 44.15 12.207 13.146-4.226 9.859L43.662 53.54l-8.92 5.164-3.756 20.658-4.225-2.348 1.878-14.554 7.511-15.493 13.615-2.817Z" fill="#898989" /> <path d="m49.765 44.15 12.207 13.146-4.226 9.859L43.662 53.54l-8.92 5.164-3.756 20.658-4.225-2.348 1.878-14.554 7.511-15.493 13.615-2.817Z" fill="#fff" fill-opacity=".2" /> <path d="m22.535 44.15-6.103 3.287 4.695 12.676 1.408-15.963ZM60.094 33.352 49.765 44.15l12.207 13.146 6.103-1.878-.47-11.268 2.817-3.286-10.328-7.512ZM86.385 41.803l-9.86 6.573 4.696 35.21 9.39-1.877-4.226-39.906Z" fill="#898989" /> <path d="m68.075 55.418-6.103 1.878-4.225 9.859 1.877 15.962 8.451-.939v-26.76Z" fill="#898989" /> <path d="m68.075 55.418-6.103 1.878-4.225 9.859 1.877 15.962 8.451-.939v-26.76Z" fill="#000" fill-opacity=".2" /> <path d="m79.343 38.986 1.408-6.573 13.146-.939 4.225 17.84L100 76.545l-9.39 5.165-4.225-39.906-7.042-2.817Z" fill="#898989" /> <path d="m79.343 38.986 1.408-6.573 13.146-.939 4.225 17.84L100 76.545l-9.39 5.165-4.225-39.906-7.042-2.817Z" fill="#000" fill-opacity=".2" /> <path d="M69.101 16.752c.084 1.88-.63 3.5-1.263 3.7l2.593 6.56c1.068-.383 2.141-.145 3.241.883l-.002-.004c-.967-1.794-1.301-2.413-2.38-2.577 1.172-.4 1.431-1.393 2.658-1.709-.878-.082-1.5-.025-3.007.405.41-.616.707-.851 1.308-1.149-1.13.26-1.49.285-2.253 1.102.945-1.264 1.327-2.09 1.684-4.15-.934 1.533-1.065 1.344-2.199 2.19.687-1.427.637-1.872.585-2.676-.273.652-.7 1.175-.983 1.186.133-.797.316-1.99.018-3.76Z" fill="#2FC4A7" /> <path d="M69.101 16.752c.084 1.88-.63 3.5-1.263 3.7l2.593 6.56c1.068-.383 2.141-.145 3.241.883l-.002-.004c-.967-1.794-1.301-2.413-2.38-2.577 1.172-.4 1.431-1.393 2.658-1.709-.878-.082-1.5-.025-3.007.405.41-.616.707-.851 1.308-1.149-1.13.26-1.49.285-2.253 1.102.945-1.264 1.327-2.09 1.684-4.15-.934 1.533-1.065 1.344-2.199 2.19.687-1.427.637-1.872.585-2.676-.273.652-.7 1.175-.983 1.186.133-.797.316-1.99.018-3.76Z" fill="#000" fill-opacity=".2" /> <path d="M46.386 24.963c-1.368 1.02-2.704 3.187-2.455 4.13h-4.72c-.545-1.037-1.439-2.29-3.113-2.967.854-.035 2.563-.104 3.113.824-.44-1.767-.744-1.83-1.278-3.617.598 1.094 1.78 1.066 2.406 3.287.178-.905.161-1.432 0-2.393.512 1.627.718 2.11.614 3.594.304-1.99.649-2.983 1.872-4.686-.5 2.137-.287 2.194-.183 4.178.578-1.75.92-1.954 1.516-2.368-.289.747-.392 1.617-.227 1.991.477-.652 1.03-1.295 2.455-1.973Z" fill="#2FC4A7" /> <path d="M46.386 24.963c-1.368 1.02-2.704 3.187-2.455 4.13h-4.72c-.545-1.037-1.439-2.29-3.113-2.967.854-.035 2.563-.104 3.113.824-.44-1.767-.744-1.83-1.278-3.617.598 1.094 1.78 1.066 2.406 3.287.178-.905.161-1.432 0-2.393.512 1.627.718 2.11.614 3.594.304-1.99.649-2.983 1.872-4.686-.5 2.137-.287 2.194-.183 4.178.578-1.75.92-1.954 1.516-2.368-.289.747-.392 1.617-.227 1.991.477-.652 1.03-1.295 2.455-1.973Z" fill="#000" fill-opacity=".4" /> <path d="M45 80H30.5l4-21.5 9-5L58 67l2 16-15-3Z" fill="#898989" /> <path d="M45 80H30.5l4-21.5 9-5L58 67l2 16-15-3Z" fill="#000" fill-opacity=".6" /> <path d="M46.233 80.352 34 80l3.964-15.085L44.33 61l10.255 9.61L56 82l-9.767-1.648Z" fill="#141414" /> <path d="M26.5 36.5C28 45 39 73 58.5 73c15.824 0 22.5-6 30-14.5M21 59c.5 7 4.203 20.5 17.5 20.5 13.5 0 26-18.5 29.5-28" stroke="#2FC4A7" /> <path d="M26.5 36.5C28 45 39 73 58.5 73c15.824 0 22.5-6 30-14.5M21 59c.5 7 4.203 20.5 17.5 20.5 13.5 0 26-18.5 29.5-28" stroke="#000" stroke-opacity=".4" /> <path d="M74 73c-.247-1.188.236-2.431.502-2.692.47.373 1.675 1.192 1.998 2.192.407 1.26-.337 1.922-.5 2.5-.722-.315-1.752-.812-2-2Z" fill="#2FC4A7" /> <path d="M74 73c-.247-1.188.236-2.431.502-2.692.47.373 1.675 1.192 1.998 2.192.407 1.26-.337 1.922-.5 2.5-.722-.315-1.752-.812-2-2Z" fill="#000" fill-opacity=".4" /> <path d="M71.28 68.543c.586.823.554 2.026.404 2.354-.527-.078-1.832-.17-2.426-.81-.75-.807-.307-1.67-.346-2.202.728-.083 1.78-.165 2.368.658Z" fill="#2FC4A7" /> <path d="M71.28 68.543c.586.823.554 2.026.404 2.354-.527-.078-1.832-.17-2.426-.81-.75-.807-.307-1.67-.346-2.202.728-.083 1.78-.165 2.368.658Z" fill="#000" fill-opacity=".4" /> <path d="M46.016 81.03c-.402 1.146-1.459 1.96-1.822 2.046-.21-.563-.817-1.887-.576-2.91.303-1.29 1.443-1.755 1.882-2.166.455.643.919 1.886.516 3.03Z" fill="#2FC4A7" /> <path d="M46.016 81.03c-.402 1.146-1.459 1.96-1.822 2.046-.21-.563-.817-1.887-.576-2.91.303-1.29 1.443-1.755 1.882-2.166.455.643.919 1.886.516 3.03Z" fill="#000" fill-opacity=".4" /> <path d="M50.587 77.86c.093 1.007-.54 2.03-.835 2.238-.416-.332-1.498-1.067-1.69-1.92-.241-1.073.575-1.598.809-2.076.67.293 1.622.752 1.716 1.758Z" fill="#2FC4A7" /> <path d="M50.587 77.86c.093 1.007-.54 2.03-.835 2.238-.416-.332-1.498-1.067-1.69-1.92-.241-1.073.575-1.598.809-2.076.67.293 1.622.752 1.716 1.758Z" fill="#000" fill-opacity=".4" /> <path d="m68 79-14 3 6.5 8 13-1.078L78 83l-10-4Z" fill="#2FC4A7" /> <path d="m68 79-14 3 6.5 8 13-1.078L78 83l-10-4Z" fill="#fff" fill-opacity=".6" /> <path d="m59.5 93-.5-4.5 18-2-3 4.5-14.5 2Z" fill="#898989" /> <path d="m59.5 93-.5-4.5 18-2-3 4.5-14.5 2Z" fill="#fff" fill-opacity=".2" /> <path d="M51.5 87.5 54 82l7 6.32L59.5 93l-8-5.5Z" fill="#898989" /> <path d="M51.5 87.5 54 82l7 6.32L59.5 93l-8-5.5Z" fill="#fff" fill-opacity=".4" /> <path d="m74 91-1-4 5-4 2 5.053L74 91Z" fill="#898989" /> <path d="M37.019 73.47c-2.247 2.135-3.95 6.66-3.519 8.53h-14c-.656-3.208-2.787-7.926-5.753-9.53 4.05.347 5.429.765 7.229 4.057-.752-3.5.539-5.353-.414-8.89 1.178 2.165 1.827 3.832 2.93 8.23.502-1.795.529-2.84.292-4.743.926 3.221 1.318 4.18.909 7.119.91-3.944 1.788-5.914 4.68-9.298-1.357 4.24-.897 4.35-.911 8.282 1.224-1.895 1.409-3.783 2.767-4.608-.726 1.482-.21 3.112.109 3.853 1.126-1.294 3.487-2.951 5.68-3.002Z" fill="#2FC4A7" /> <path d="M37.019 73.47c-2.247 2.135-3.95 6.66-3.519 8.53h-14c-.656-3.208-2.787-7.926-5.753-9.53 4.05.347 5.429.765 7.229 4.057-.752-3.5.539-5.353-.414-8.89 1.178 2.165 1.827 3.832 2.93 8.23.502-1.795.529-2.84.292-4.743.926 3.221 1.318 4.18.909 7.119.91-3.944 1.788-5.914 4.68-9.298-1.357 4.24-.897 4.35-.911 8.282 1.224-1.895 1.409-3.783 2.767-4.608-.726 1.482-.21 3.112.109 3.853 1.126-1.294 3.487-2.951 5.68-3.002Z" fill="#000" fill-opacity=".6" /> <path d="M8.522 77.258C9.86 79.598 10.626 83.625 10 85h11.5c0-2.538-.169-4.418 2.549-7.443-1.841.817-3.11.91-4.67 4.12-.319-1.579-.238-2.423.197-3.88-1.262 2.318-1.754 2.974-1.647 5.444-.506-3.415-1.184-5.242-3.738-8.768.925 3.778.451 3.736.06 6.89-1.033-1.864-1.024-3.428-2.3-4.473.574 1.392-.113 2.552-.508 3.055-.997-1.355-1.455-1.452-2.921-2.687Z" fill="#2FC4A7" /> <path d="M8.522 77.258C9.86 79.598 10.626 83.625 10 85h11.5c0-2.538-.169-4.418 2.549-7.443-1.841.817-3.11.91-4.67 4.12-.319-1.579-.238-2.423.197-3.88-1.262 2.318-1.754 2.974-1.647 5.444-.506-3.415-1.184-5.242-3.738-8.768.925 3.778.451 3.736.06 6.89-1.033-1.864-1.024-3.428-2.3-4.473.574 1.392-.113 2.552-.508 3.055-.997-1.355-1.455-1.452-2.921-2.687Z" fill="#000" fill-opacity=".4" /> </g> <defs> <clipPath id="aea"> <path fill="#fff" d="M0 0h100v100H0z" /> </clipPath> </defs> </symbol> <symbol fill="none" viewBox="0 0 100 100" id="sinister_circus" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#ara)"> <path d="M0 91.722V68.39L100 68v23.5c-5.74 1.296-24 4.111-48.889 4.111-24.889 0-44.444-2.592-51.111-3.889Z" fill="#D0333D" /> <path d="M0 91.722V68.39L100 68v23.5c-5.74 1.296-24 4.111-48.889 4.111-24.889 0-44.444-2.592-51.111-3.889Z" fill="#000" fill-opacity=".2" /> <path d="M62.222 70.611H36.667V95.39c1.852 0 7.11.222 13.333.222 6.222 0 10.37-.037 12.222-.222V70.61Z" fill="#D0333D" /> <path d="M62.222 70.611H36.667V95.39c1.852 0 7.11.222 13.333.222 6.222 0 10.37-.037 12.222-.222V70.61Z" fill="#000" fill-opacity=".8" /> <path d="M10 93.167V68.389l17.778.556v25.888c-7.28-.448-11.18-.801-17.778-1.666Z" fill="#7445B8" /> <path d="M10 93.167V68.389l17.778.556v25.888c-7.28-.448-11.18-.801-17.778-1.666Z" fill="#fff" fill-opacity=".6" /> <path d="M90 93.167V68.945l-17.778.536v25.464c7.036-.447 10.947-.789 17.778-1.778Z" fill="#7445B8" /> <path d="M90 93.167V68.945l-17.778.536v25.464c7.036-.447 10.947-.789 17.778-1.778Z" fill="#fff" fill-opacity=".2" /> <path d="M56.667 5.056c-4 .888-6.482-.741-7.223-1.667v6.667c.926.555 3.89 1.11 7.778-.556 4.708-2.018 6.049-2.353 12.222-1.667 5 .556 7.593-2.037 8.334-3.889-1.482.926-5.223 2.445-8.334 1.112-3.889-1.667-7.777-1.112-12.777 0Z" fill="#A272E4" /> <path d="M49.444 22.278V3.388" stroke="#898989" stroke-width="1.111" /> <path d="M49.444 22.278V3.388" stroke="#fff" stroke-opacity=".6" stroke-width="1.111" /> <path d="M49.444 69.643C38.778 69.643 12.963 69.214 0 69v3.857c.185 1.072 1.111 3.857 3.333 3.857 3.89 0 6.111-4.5 6.667-6.428.556 2.143 4.444 7.071 8.889 7.071 4.444 0 8.518-4.286 9.444-6.428C29.444 73.286 33.556 78 38.89 78c5.333 0 9.444-4.071 10.555-6.429C50.556 74.143 55.667 78 60.556 78S70 73.5 71.11 70.929c1.296 2.571 5.111 6.428 10 6.428s8.148-4.5 8.889-7.071c.556 2.143 4 6.428 6.667 6.428 2.222 0 3.333-1.928 3.333-3.214V69c-11.111.214-39.889.643-50.556.643Z" fill="#7445B8" /> <path d="M49.444 69.643C38.778 69.643 12.963 69.214 0 69v3.857c.185 1.072 1.111 3.857 3.333 3.857 3.89 0 6.111-4.5 6.667-6.428.556 2.143 4.444 7.071 8.889 7.071 4.444 0 8.518-4.286 9.444-6.428C29.444 73.286 33.556 78 38.89 78c5.333 0 9.444-4.071 10.555-6.429C50.556 74.143 55.667 78 60.556 78S70 73.5 71.11 70.929c1.296 2.571 5.111 6.428 10 6.428s8.148-4.5 8.889-7.071c.556 2.143 4 6.428 6.667 6.428 2.222 0 3.333-1.928 3.333-3.214V69c-11.111.214-39.889.643-50.556.643Z" fill="#fff" fill-opacity=".4" /> <path d="M31.111 46.167C43.333 34.5 47.222 25.056 49.444 17.833c2.223 7.223 5.034 17.28 20 30 11.112 9.445 23.334 16.111 30.556 20-10.74.37-35.889 1.112-48.333 1.112-12.445 0-39.63-.741-51.667-1.112 4.444-2.222 17.725-8.889 31.111-21.666Z" fill="#D0333D" /> <path d="M45.556 47.278c1.777-10.667 3.333-21.667 3.889-29.445.555 7.778 1.888 22.778 2.777 29.445.89 6.666 4.074 17.222 5.556 21.667H40.556c.926-2.778 3.222-11 5-21.667Z" fill="#7445B8" /> <path d="M45.556 47.278c1.777-10.667 3.333-21.667 3.889-29.445.555 7.778 1.888 22.778 2.777 29.445.89 6.666 4.074 17.222 5.556 21.667H40.556c.926-2.778 3.222-11 5-21.667Z" fill="#fff" fill-opacity=".6" /> <path d="M32.222 49.5c8.89-11.111 15.556-24.444 17.223-31.667-1.112 7.778-6.445 25.111-10 32.223-3.556 7.11-7.056 12.889-10.945 18.444h-18c3.889-2.222 12.833-7.889 21.722-19Z" fill="#7445B8" /> <path d="M32.222 49.5c8.89-11.111 15.556-24.444 17.223-31.667-1.112 7.778-6.445 25.111-10 32.223-3.556 7.11-7.056 12.889-10.945 18.444h-18c3.889-2.222 12.833-7.889 21.722-19Z" fill="#fff" fill-opacity=".8" /> <path d="M66.603 49.848c-9.143-11.233-15.58-24.237-17.159-32.015 1.143 7.864 6.073 25.387 9.73 32.577C62.833 57.599 67.5 63.383 71.5 69l18.5-.617c-4-2.247-14.254-7.302-23.397-18.535Z" fill="#7445B8" /> <path d="M66.603 49.848c-9.143-11.233-15.58-24.237-17.159-32.015 1.143 7.864 6.073 25.387 9.73 32.577C62.833 57.599 67.5 63.383 71.5 69l18.5-.617c-4-2.247-14.254-7.302-23.397-18.535Z" fill="#fff" fill-opacity=".4" /> <path d="M49.444 68.945c-10.666 0-36.481-.926-49.444-1.112v3.334c.185.926 1.111 3.333 3.333 3.333 3.89 0 6.111-3.889 6.667-5.555.556 1.851 4.444 6.11 8.889 6.11 4.444 0 8.518-3.703 9.444-5.555 1.111 2.037 5.223 6.111 10.556 6.111 5.333 0 9.444-3.518 10.555-5.555 1.112 2.222 6.223 5.555 11.112 5.555S70 71.722 71.11 69.5c1.296 2.222 5.111 5.556 10 5.556s8.148-3.89 8.889-6.111c.556 1.851 4 5.555 6.667 5.555 2.222 0 3.333-1.667 3.333-2.778v-3.889c-11.111.186-39.889 1.112-50.556 1.112Z" fill="#D0333D" /> <path d="M49.444 68.945c-10.666 0-36.481-.926-49.444-1.112v3.334c.185.926 1.111 3.333 3.333 3.333 3.89 0 6.111-3.889 6.667-5.555.556 1.851 4.444 6.11 8.889 6.11 4.444 0 8.518-3.703 9.444-5.555 1.111 2.037 5.223 6.111 10.556 6.111 5.333 0 9.444-3.518 10.555-5.555 1.112 2.222 6.223 5.555 11.112 5.555S70 71.722 71.11 69.5c1.296 2.222 5.111 5.556 10 5.556s8.148-3.89 8.889-6.111c.556 1.851 4 5.555 6.667 5.555 2.222 0 3.333-1.667 3.333-2.778v-3.889c-11.111.186-39.889 1.112-50.556 1.112Z" fill="#000" fill-opacity=".2" /> </g> <defs> <clipPath id="ara"> <path fill="#fff" d="M0 0h100v100H0z" /> </clipPath> </defs> </symbol> <symbol fill="none" viewBox="0 0 100 100" id="enchanted_fortress" xmlns="http://www.w3.org/2000/svg"> <path d="M8 71V44h80v27H8Z" fill="#898989" /> <path d="M8 71V44h80v27H8Z" fill="#fff" fill-opacity=".4" /> <path d="M8 71V44h26v27H8Z" fill="#898989" /> <path d="M8 71V44h26v27H8Z" fill="#fff" fill-opacity=".2" /> <path d="M88 44v27H66V44h22Z" fill="#898989" /> <path d="M88 44v27H66V44h22Z" fill="#fff" fill-opacity=".2" /> <path d="M66 44v24l18.5.912V50.5L66 44ZM66 44H34V23h32v21Z" fill="#898989" /> <path d="M66 44H34V23h32v21Z" fill="#fff" fill-opacity=".4" /> <path d="M66 23H34l32 11V23Z" fill="#898989" /> <path d="M66 23H34l32 11V23Z" fill="#fff" fill-opacity=".2" /> <path d="M34 23v-8h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v8H34Z" fill="#898989" /> <path d="M34 23v-8h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v8H34Z" fill="#fff" fill-opacity=".6" /> <path d="M50 15V4" stroke="#898989" /> <path d="M50 15V4" stroke="#fff" stroke-opacity=".6" /> <path d="M0 48v-8h4v3h3v-3h4v3h3v-3h4v8l-2 3H2l-2-3Z" fill="#7445B8" /> <path d="M0 48v-8h4v3h3v-3h4v3h3v-3h4v8l-2 3H2l-2-3Z" fill="#fff" fill-opacity=".2" /> <path d="m2 51-2-3h18l-2 3H2ZM30 58v-8h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v8H30Z" fill="#7445B8" /> <path d="M30 58v-8h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v8H30Z" fill="#fff" fill-opacity=".2" /> <path d="M2 90V51h14v39H2Z" fill="#7445B8" /> <path fill="#7445B8" d="M8 88h3v2H8z" /> <path fill="#fff" fill-opacity=".2" d="M8 88h3v2H8z" /> <path fill="#7445B8" d="M9 78h4v3H9z" /> <path fill="#fff" fill-opacity=".2" d="M9 78h4v3H9z" /> <path fill="#7445B8" d="M4 73h4v2H4z" /> <path fill="#fff" fill-opacity=".2" d="M4 73h4v2H4z" /> <path fill="#7445B8" d="M12 62h3v2h-3z" /> <path fill="#fff" fill-opacity=".2" d="M12 62h3v2h-3z" /> <path d="M84 90V51h14v39H84Z" fill="#7445B8" /> <path fill="#898989" d="M90 56h3v5h-3z" /> <path fill="#000" fill-opacity=".6" d="M90 56h3v5h-3z" /> <path d="M16 88V64h14v24H16ZM69 88V64h15v24H69Z" fill="#7445B8" /> <path d="M69 88V64h15v24H69Z" fill="#000" fill-opacity=".2" /> <path d="M69 64v24h15V69.588L69 64Z" fill="#7445B8" /> <path d="M69 64v24h15V69.588L69 64Z" fill="#000" fill-opacity=".4" /> <path d="M84 76v14h14v-8.412L84 76Z" fill="#7445B8" /> <path d="M84 76v14h14v-8.412L84 76Z" fill="#000" fill-opacity=".2" /> <path d="M30 92V58h39v34H30Z" fill="#7445B8" /> <path d="M30 92V58h39v34H30Z" fill="#fff" fill-opacity=".2" /> <path d="M41.389 92V75.815C41.666 73.543 43.714 69 49.694 69c5.98 0 8.03 4.543 8.306 6.815V92H41.389Z" fill="#898989" /> <path d="M41.389 92V75.815C41.666 73.543 43.714 69 49.694 69c5.98 0 8.03 4.543 8.306 6.815V92H41.389Z" fill="#000" fill-opacity=".8" /> <path fill="#898989" d="M7 56h3v5H7z" /> <path fill="#000" fill-opacity=".6" d="M7 56h3v5H7z" /> <path fill="#898989" d="M7 67h3v5H7z" /> <path fill="#000" fill-opacity=".6" d="M7 67h3v5H7z" /> <path fill="#898989" d="M37 56h3v5h-3z" /> <path fill="#000" fill-opacity=".6" d="M37 56h3v5h-3z" /> <path fill="#898989" d="M48 56h3v5h-3z" /> <path fill="#000" fill-opacity=".6" d="M48 56h3v5h-3z" /> <path fill="#898989" d="M59 56h3v5h-3z" /> <path fill="#000" fill-opacity=".6" d="M59 56h3v5h-3z" /> <path fill="#898989" d="M39 26h3v5h-3z" /> <path fill="#000" fill-opacity=".2" d="M39 26h3v5h-3z" /> <path fill="#898989" d="M48 26h3v5h-3z" /> <path fill="#000" fill-opacity=".2" d="M48 26h3v5h-3z" /> <path fill="#898989" d="M57 26h3v5h-3z" /> <path fill="#000" fill-opacity=".4" d="M57 26h3v5h-3z" /> <path d="M16 51H2l14 5.5V51Z" fill="#7445B8" /> <path d="M16 51H2l14 5.5V51Z" fill="#000" fill-opacity=".2" /> <path d="M16 64.206V88h14V69.794l-14-5.588Z" fill="#7445B8" /> <path d="M16 64.206V88h14V69.794l-14-5.588Z" fill="#000" fill-opacity=".2" /> <path d="M51 26h-3v2l3 1v-3Z" fill="#898989" /> <path d="M51 26h-3v2l3 1v-3Z" fill="#000" fill-opacity=".4" /> <path d="M82 48v-8h4v3h3v-3h4v3h3v-3h4v8l-2 3H84l-2-3Z" fill="#7445B8" /> <path d="M82 48v-8h4v3h3v-3h4v3h3v-3h4v8l-2 3H84l-2-3Z" fill="#fff" fill-opacity=".2" /> <path d="m84 51-2-3h18l-2 3H84ZM98 51H84l14 5.5V51Z" fill="#7445B8" /> <path d="M98 51H84l14 5.5V51Z" fill="#000" fill-opacity=".2" /> <path fill="#898989" d="M39 37h4v3h-4z" /> <path fill="#fff" fill-opacity=".6" d="M39 37h4v3h-4z" /> <path fill="#898989" d="M44 44h5v2h-5z" /> <path fill="#fff" fill-opacity=".6" d="M44 44h5v2h-5z" /> <path fill="#898989" d="M50 34h3v2h-3z" /> <path fill="#fff" fill-opacity=".6" d="M50 34h3v2h-3z" /> <path fill="#898989" d="M58 40h4v2h-4z" /> <path fill="#fff" fill-opacity=".6" d="M58 40h4v2h-4z" /> <path fill="#7445B8" d="M30 65h4v3h-4z" /> <path fill="#fff" fill-opacity=".4" d="M30 65h4v3h-4z" /> <path fill="#7445B8" d="M37 72h3v2h-3z" /> <path fill="#fff" fill-opacity=".4" d="M37 72h3v2h-3z" /> <path fill="#7445B8" d="M63 90h3v2h-3z" /> <path fill="#fff" fill-opacity=".4" d="M63 90h3v2h-3z" /> <path fill="#7445B8" d="M42 63h4v2h-4z" /> <path fill="#fff" fill-opacity=".4" d="M42 63h4v2h-4z" /> <path fill="#7445B8" d="M64 80h4v3h-4z" /> <path fill="#fff" fill-opacity=".4" d="M64 80h4v3h-4z" /> <path fill="#7445B8" d="M60 75h3v2h-3z" /> <path fill="#fff" fill-opacity=".4" d="M60 75h3v2h-3z" /> <path fill="#7445B8" d="M33 82h4v4h-4z" /> <path fill="#fff" fill-opacity=".4" d="M33 82h4v4h-4z" /> <path fill="#7445B8" d="M64 67h4v2h-4z" /> <path fill="#fff" fill-opacity=".4" d="M64 67h4v2h-4z" /> <path fill="#7445B8" d="M90 67h4v2h-4z" /> <path fill="#fff" fill-opacity=".2" d="M90 67h4v2h-4z" /> <path d="M11.143 33c-.857 0-1.714-.667-2.143-1v2c.429.333 1.286 1 2.143 1 .857 0 1.286-1 2.571-1 1.286 0 1.715 1 2.572 1 .685 0 1.428-.667 1.714-1l-.429-.5L18 32c-.286.333-.857 1-1.714 1S15 32 13.714 32c-1.285 0-1.714 1-2.571 1Z" fill="#FAA21E" /> <path d="M11.059 33c-.824 0-1.647-.667-2.059-1v2c.412.333 1.235 1 2.059 1v-2ZM16 33c-.823 0-1.235-1-2.47-1h-.014l.013 2c1.236 0 1.648 1 2.471 1v-2Z" fill="#C57A09" /> <path d="M93.143 33c-.857 0-1.714-.667-2.143-1v2c.429.333 1.286 1 2.143 1 .857 0 1.286-1 2.571-1 1.286 0 1.715 1 2.572 1 .685 0 1.428-.667 1.714-1l-.429-.5L100 32c-.286.333-.857 1-1.714 1S97 32 95.714 32c-1.285 0-1.714 1-2.571 1Z" fill="#FAA21E" /> <path d="M93.059 33c-.824 0-1.647-.667-2.059-1v2c.412.333 1.235 1 2.059 1v-2ZM98 33c-.823 0-1.235-1-2.47-1h-.014l.013 2c1.236 0 1.648 1 2.471 1v-2Z" fill="#C57A09" /> <path d="M9 40v-8" stroke="#898989" /> <path d="M9 40v-8" stroke="#fff" stroke-opacity=".6" /> <path d="M53 5c-1 0-2-.667-2.5-1v2c.5.333 1.5 1 2.5 1s1.5-1 3-1 2 1 3 1c.8 0 1.667-.667 2-1l-.5-.5L61 4c-.333.333-1 1-2 1s-1.5-1-3-1-2 1-3 1Z" fill="#FAA21E" /> <path d="M53 5c-1 0-2-.667-2.5-1v2c.5.333 1.5 1 2.5 1V5ZM59 5c-1 0-1.5-1-3-1h-.016L56 6c1.5 0 2 1 3 1V5Z" fill="#C57A09" /> <path d="M91 40v-8" stroke="#898989" /> <path d="M91 40v-8" stroke="#fff" stroke-opacity=".6" /> <path fill="#7445B8" d="M85 53h3v3h-3z" /> <path fill="#fff" fill-opacity=".2" d="M85 53h3v3h-3z" /> <path fill="#7445B8" d="M93 73h3v2h-3z" /> <path fill="#fff" fill-opacity=".2" d="M93 73h3v2h-3z" /> <path fill="#7445B8" d="M88 85h4v3h-4z" /> </symbol> <symbol fill="none" viewBox="0 0 100 100" id="pirate_cove" xmlns="http://www.w3.org/2000/svg"> <path d="M100 76c0 11.874-22.386 21.5-50 21.5S0 87.874 0 76c0-5.878 9-20.5 9-20.5h41c13.627 0 40 1 40 1s10 13.486 10 19.5Z" fill="#FAA21E" /> <path d="M100 76c0 11.874-22.386 21.5-50 21.5S0 87.874 0 76c0-5.878 9-20.5 9-20.5h41c13.627 0 40 1 40 1s10 13.486 10 19.5Z" fill="#fff" fill-opacity=".4" /> <path d="M4.5 32.5 1.5 70c10-8.5 26.412-14 49.912-14 22 0 37.5 7 47 14.5l-2.913-38-2.5 1v4L90.5 39v-4L88 36v4l-3 .5v-4l-2.5.5v4.5L80 42v-4l-2.5.5v4l-3 .5v-4l-23.087-1.5-22.912 2V43l-3-.5V39l-3-.5V42l-2.5-.5V38l-3-.5V41l-3.088-1v-4L11 35v4l-3.5-1.5v-4l-3-1Z" fill="#898989" /> <path d="M0 75.803C0 89.721 22.353 92.5 49.927 92.5c25.167 0 49.5-3.697 50-16-.5 1.318-1.222 3.5-3.5 3.5-2.996 0-4.062-7.428-7.557-7.428-2.496 0-3.495 4.11-7.49 4.11-5.491 0-9.47-9.182-20.453-9.182-9.992 0-18.512 15-26.5 15-7.988 0-10.462-6.35-13.458-6.35-1.997 0-1.997 3.168-5.492 3.168S8.987 68.54 5.991 68.54C3.595 68.54 1 73.167 0 75.803Z" fill="#1D8CE0" /> <path d="M0 75.803C0 89.721 22.353 92.5 49.927 92.5c25.167 0 49.5-3.697 50-16-.5 1.318-1.222 3.5-3.5 3.5-2.996 0-4.062-7.428-7.557-7.428-2.496 0-3.495 4.11-7.49 4.11-5.491 0-9.47-9.182-20.453-9.182-9.992 0-18.512 15-26.5 15-7.988 0-10.462-6.35-13.458-6.35-1.997 0-1.997 3.168-5.492 3.168S8.987 68.54 5.991 68.54C3.595 68.54 1 73.167 0 75.803Z" fill="#fff" fill-opacity=".95" /> <path d="M0 76.177C0 87.953 22.386 97.5 50 97.5c25.204 0 45.98-7.957 49.427-18.3-.403.839-1.575 1.8-3 1.8-2.574 0-4.5-5.5-7.5-5.5s-2.725 2.382-7.427 2.382c-7.018 0-9.573-5.882-20.573-5.882-10.007 0-18 12-26 12s-9.073-5-14-5c-2.514 0-2.768 1.441-5.427 1.441C12 80.441 8.427 72 5.427 72 3.027 72 1 75.04 0 76.177Z" fill="#1D8CE0" /> <path d="M0 76.177C0 87.953 22.386 97.5 50 97.5c25.204 0 45.98-7.957 49.427-18.3-.403.839-1.575 1.8-3 1.8-2.574 0-4.5-5.5-7.5-5.5s-2.725 2.382-7.427 2.382c-7.018 0-9.573-5.882-20.573-5.882-10.007 0-18 12-26 12s-9.073-5-14-5c-2.514 0-2.768 1.441-5.427 1.441C12 80.441 8.427 72 5.427 72 3.027 72 1 75.04 0 76.177Z" fill="#000" fill-opacity=".4" /> <path d="m81.23 71 2.183 9.178-3.637 1.004-3.636-1.004 1.454-6.118L81.231 71Z" fill="#898989" /> <path d="m81.23 71 2.183 9.178-3.637 1.004-3.636-1.004 1.454-6.118L81.231 71Z" fill="#fff" fill-opacity=".4" /> <path d="m70.322 63.238 1.454 4.079-2.73 1.138-1.633-1.138.727-3.06 2.182-1.02Z" fill="#898989" /> <path d="m70.322 63.238 1.454 4.079-2.73 1.138-1.633-1.138.727-3.06 2.182-1.02Z" fill="#fff" fill-opacity=".4" /> <path d="M77.058 74.06 81.23 71l-3.636 6.546 2.182 3.636-4.096-1.004 1.378-6.118Z" fill="#898989" /> <path d="M77.058 74.06 81.23 71l-3.636 6.546 2.182 3.636-4.096-1.004 1.378-6.118Z" fill="#fff" fill-opacity=".2" /> <path d="m68.101 64.257 2.067-1.02-1.208 2.22v2.998l-1.548-1.138.69-3.06Z" fill="#898989" /> <path d="m68.101 64.257 2.067-1.02-1.208 2.22v2.998l-1.548-1.138.69-3.06Z" fill="#fff" fill-opacity=".2" /> <path d="M50.385 56.224c-3.746 0-9.171 2.146-10.537 2.927L36.92 43.344h26.343l-.5 15.807c-1.756-.586-8.632-2.927-12.379-2.927Z" fill="#898989" /> <path d="M50.385 56.224c-3.746 0-9.171 2.146-10.537 2.927L36.92 43.344h26.343l-.5 15.807c-1.756-.586-8.632-2.927-12.379-2.927Z" fill="#000" fill-opacity=".6" /> <path d="m39.262 61.546 1.756-2.98-1.756-12.454 2.927 6.014 1.757-4.098 2.341 2.342 1.756-3.513 2.927 3.513 2.342-4.098 1.756 3.512 3.513-2.342 1.17 5.27 2.928-6.6-1.757 12.453 3.013 1.171 2.927-1.17 3.513-15.807 7.525-7.823v-14.37l-6.524-7.45-5.201-6.653L47.29 3.536l-15.054 7.025-5.87 8.196-2.927 13.465 8.797 10.697L33.5 57.5l5.762 4.046Z" fill="#898989" /> <path d="m39.262 61.546 1.756-2.98-1.756-12.454 2.927 6.014 1.757-4.098 2.341 2.342 1.756-3.513 2.927 3.513 2.342-4.098 1.756 3.512 3.513-2.342 1.17 5.27 2.928-6.6-1.757 12.453 3.013 1.171 2.927-1.17 3.513-15.807 7.525-7.823v-14.37l-6.524-7.45-5.201-6.653L47.29 3.536l-15.054 7.025-5.87 8.196-2.927 13.465 8.797 10.697L33.5 57.5l5.762 4.046Z" fill="#fff" fill-opacity=".4" /> <path d="m32.22 43.345 2.928-5.27 4.098 8.197-7.025-2.927Z" fill="#898989" /> <path d="m32.22 43.345 2.928-5.27 4.098 8.197-7.025-2.927Z" fill="#fff" fill-opacity=".2" /> <path d="m67.346 44.515 2.927-7.61H61.49l5.855 7.61Z" fill="#898989" /> <path d="m67.346 44.515 2.927-7.61H61.49l5.855 7.61Z" fill="#fff" fill-opacity=".2" /> <path d="m70.375 42.76-2.927 1.755-.586 14.05 3.513-15.806Z" fill="#898989" /> <path d="m70.375 42.76-2.927 1.755-.586 14.05 3.513-15.806Z" fill="#000" fill-opacity=".2" /> <path d="m49.784 19.928-.586 4.098 2.927.586 6.44-3.513-1.171-2.927-3.512-1.756-4.098 3.512Z" fill="#898989" /> <path d="m49.784 19.928-.586 4.098 2.927.586 6.44-3.513-1.171-2.927-3.512-1.756-4.098 3.512Z" fill="#fff" fill-opacity=".2" /> <path d="m39.246 46.272 3.512-1.757 1.171 3.513 1.756-3.513 2.342 2.342 2.927-2.342 2.342 1.757 3.512-2.928 1.757 4.098v-2.341l4.097 1.17-2.927 6.44-1.17-5.269-3.513 2.342-1.756-3.512-2.342 4.097-2.927-3.512-1.756 3.512-2.342-2.341-1.756 4.098-2.927-5.854Z" fill="#FEFEFE" /> <path d="m53.881 32.807-1.756-2.342v-5.854l5.854-3.512 2.342 4.098-6.44 7.61ZM39.831 12.903l-7.61-2.341 15.22-7.025-7.61 9.366Z" fill="#898989" /> <path d="m39.831 12.903-7.61-2.341 15.22-7.025-7.61 9.366Z" fill="#fff" fill-opacity=".95" /> <path d="m47.442 3.537-7.61 9.366 7.61-.585 7.025-2.927 4.098 1.17h4.097l2.928-1.17.585-2.927-18.733-2.928Z" fill="#898989" /> <path d="m47.442 3.537-7.61 9.366 7.61-.585 7.025-2.927 4.098 1.17h4.097l2.928-1.17.585-2.927-18.733-2.928Z" fill="#fff" fill-opacity=".95" /> <path d="m47.442 3.537-7.61 9.366 7.61-.585 7.025-2.927-7.025-5.854Z" fill="#898989" /> <path d="m47.442 3.537-7.61 9.366 7.61-.585 7.025-2.927-7.025-5.854Z" fill="#fff" fill-opacity=".8" /> <path d="m41.018 27.539-7.025-2.342-1.756 4.683 2.927 8.196 7.61-1.17 4.684-2.928-6.44-6.44Z" fill="#546DDB" /> <path d="m41.018 27.539-7.025-2.342-1.756 4.683 2.927 8.196 7.61-1.17 4.684-2.928-6.44-6.44Z" fill="#000" fill-opacity=".8" /> <path d="m65.02 27.539-8.781 6.44 5.269 2.926h8.781l1.756-7.025-1.756-4.683-5.269 2.342Z" fill="#546DDB" /> <path d="m65.02 27.539-8.781 6.44 5.269 2.926h8.781l1.756-7.025-1.756-4.683-5.269 2.342Z" fill="#000" fill-opacity=".8" /> <path d="m49.214 43.345 2.927-4.684 2.927 5.27-2.927-1.172-2.927.586Z" fill="#546DDB" /> <path d="m49.214 43.345 2.927-4.684 2.927 5.27-2.927-1.172-2.927.586Z" fill="#000" fill-opacity=".8" /> <path d="m39.831 12.903-7.61-2.341 3.512 9.366 4.098-7.025Z" fill="#898989" /> <path d="m39.831 12.903-7.61-2.341 3.512 9.366 4.098-7.025Z" fill="#fff" fill-opacity=".8" /> <path d="m53.881 32.807 2.342 1.171 8.781-6.44-4.683-2.341-6.44 7.61Z" fill="#898989" /> <path d="m53.881 32.807 2.342 1.171 8.781-6.44-4.683-2.341-6.44 7.61Z" fill="#fff" fill-opacity=".6" /> <path d="m49.784 33.392-.586 9.953 2.927-4.684v-8.196l-2.341 2.927Z" fill="#898989" /> <path d="m49.784 33.392-.586 9.953 2.927-4.684v-8.196l-2.341 2.927Z" fill="#fff" fill-opacity=".8" /> <path d="m53.881 32.807 1.171 11.123-2.927-5.269v-8.196l1.756 2.342Z" fill="#898989" /> <path d="m53.881 32.807 1.171 11.123-2.927-5.269v-8.196l1.756 2.342Z" fill="#fff" fill-opacity=".6" /> <path d="m32.22 21.684 1.757 3.513 7.025 2.342 3.512-2.342-8.78-5.269-3.513 1.756Z" fill="#898989" /> <path d="m32.22 21.684 1.757 3.513 7.025 2.342 3.512-2.342-8.78-5.269-3.513 1.756Z" fill="#fff" fill-opacity=".8" /> <path d="m44.514 25.197-3.512 2.342 6.44 6.44 2.34-.586-5.268-8.196Z" fill="#898989" /> <path d="m44.514 25.197-3.512 2.342 6.44 6.44 2.34-.586-5.268-8.196Z" fill="#fff" fill-opacity=".6" /> <path d="m39.831 12.903-4.098 7.025 8.782 5.269 4.097-1.171.586-4.683-1.756-7.025-7.61.585Z" fill="#898989" /> <path d="m39.831 12.903-4.098 7.025 8.782 5.269 4.097-1.171.586-4.683-1.756-7.025-7.61.585Z" fill="#fff" fill-opacity=".6" /> <path d="m62.077 14.074-7.61 1.756 7.025 2.927.585-4.683Z" fill="#898989" /> <path d="m62.077 14.074-7.61 1.756 7.025 2.927.585-4.683Z" fill="#fff" fill-opacity=".8" /> <path d="m57.979 21.099-.585-2.927h4.098l8.78 7.025-5.268 2.341-4.683-2.341-2.342-4.098Z" fill="#898989" /> <path d="m57.979 21.099-.585-2.927h4.098l8.78 7.025-5.268 2.341-4.683-2.341-2.342-4.098Z" fill="#fff" fill-opacity=".8" /> <path d="m63.248 10.562-1.171 3.512h5.854L65.589 9.39l-2.341 1.17Z" fill="#898989" /> <path d="m63.248 10.562-1.171 3.512h5.854L65.589 9.39l-2.341 1.17Z" fill="#fff" fill-opacity=".6" /> <path d="m70.273 25.196-1.171-8.195.585-1.757-1.756-1.17-2.342-4.684L66.76 7.05l11.123 13.464-7.61 4.683Z" fill="#898989" /> <path d="m72.029 29.88-1.757-4.683 7.61-4.684v14.635L72.03 29.88Z" fill="#898989" /> <path d="m72.029 29.88-1.757-4.683 7.61-4.684v14.635L72.03 29.88Z" fill="#000" fill-opacity=".2" /> <path d="m32.22 29.88-8.78 2.342 3.512-12.88 7.025 5.855-1.756 4.683Z" fill="#898989" /> <path d="m32.22 29.88-8.78 2.342 3.512-12.88 7.025 5.855-1.756 4.683Z" fill="#fff" fill-opacity=".6" /> <path d="M39.246 46.271v15.221l1.756-2.927-1.756-12.294ZM60.906 58.565l1.756-12.294 1.273 13.465-3.029-1.17Z" fill="#898989" /> <path d="m42.758 36.905-7.61 1.17 4.098 8.197 3.512-1.757v-7.61Z" fill="#898989" /> <path d="m42.758 36.905-7.61 1.17 4.098 8.197 3.512-1.757v-7.61Z" fill="#fff" fill-opacity=".6" /> <path d="m58.565 45.1 2.927-8.195 5.854 7.61-4.684 1.757-4.097-1.171Z" fill="#898989" /> <path d="m58.565 45.1 2.927-8.195 5.854 7.61-4.684 1.757-4.097-1.171Z" fill="#fff" fill-opacity=".6" /> <path d="M20.506 65.164c-1.047.274-2.308.033-2.36-.697-.053-.73-.267-1.186.802-1.858 1.068-.671 2.337-.575 2.834.215.496.79.247 1.942-1.276 2.34Z" fill="#898989" /> <path d="m14.5 19 4.913 46.5" stroke="#FAA21E" /> <path d="m14.5 19 4.913 46.5" stroke="#000" stroke-opacity=".4" /> <path d="M14.404 24.592c-1.345-3.164-.34-5.298-.34-5.298 4.213 1.433 5.543-.34 9.533-.784 3.99-.443 5.798 3.075 11.562-.029-4.42 8.103-7.06 5.075-11.05 7.735-3.99 3.104-3.684 4.052-9.364 3.675 0 0 1.005-2.134-.34-5.299Z" fill="#D0333D" /> <path d="M14.404 24.592c-1.345-3.164-.34-5.298-.34-5.298 4.213 1.433 5.543-.34 9.533-.784 3.99-.443 5.798 3.075 11.562-.029-4.42 8.103-7.06 5.075-11.05 7.735-3.99 3.104-3.684 4.052-9.364 3.675 0 0 1.005-2.134-.34-5.299Z" fill="#000" fill-opacity=".2" /> <path d="m23.5 20.5-5 6M17 22l8 2.5" stroke="#000" /> <path d="M17.79 66.013c-.784.173-1.754-.075-1.826-.664-.072-.589-.255-.964.53-1.457.783-.492 1.753-.36 2.166.297.412.656.273 1.57-.87 1.824Z" fill="#898989" /> <path d="M17.79 66.013c-.784.173-1.754-.075-1.826-.664-.072-.589-.255-.964.53-1.457.783-.492 1.753-.36 2.166.297.412.656.273 1.57-.87 1.824Z" fill="#fff" fill-opacity=".2" /> <path d="M26.223 66.127c-.398-.15-.745-.494-.59-.715.155-.222.194-.4.693-.359.5.04.882.345.855.68-.027.336-.377.612-.958.394Z" fill="#898989" /> <path d="M26.223 66.127c-.398-.15-.745-.494-.59-.715.155-.222.194-.4.693-.359.5.04.882.345.855.68-.027.336-.377.612-.958.394Z" fill="#fff" fill-opacity=".4" /> <path d="M24.064 69.046c-.43.048-.925-.13-.918-.438.006-.307-.062-.51.392-.723.453-.212.957-.093 1.126.267.17.36.025.823-.6.894Z" fill="#898989" /> <path d="M24.064 69.046c-.43.048-.925-.13-.918-.438.006-.307-.062-.51.392-.723.453-.212.957-.093 1.126.267.17.36.025.823-.6.894Z" fill="#fff" fill-opacity=".4" /> <path d="M18.501 64.823c-.127 1.076.198 2.417 2.069 2.16 1.16-.16 3.028-.214 3.156-1.29.127-1.075-1.088-2.103-2.715-2.295-1.627-.193-2.383.35-2.51 1.425Z" fill="#898989" /> <path d="M18.501 64.823c-.127 1.076.198 2.417 2.069 2.16 1.16-.16 3.028-.214 3.156-1.29.127-1.075-1.088-2.103-2.715-2.295-1.627-.193-2.383.35-2.51 1.425Z" fill="#fff" fill-opacity=".4" /> <path d="M74.912 54v-4l3.5-1v4l-3.5 1Z" fill="#898989" /> <path d="M74.912 54v-4l3.5-1v4l-3.5 1Z" fill="#fff" fill-opacity=".2" /> <path d="m93.912 54-3 1v4H94.5l-.587-5Z" fill="#898989" /> <path d="m93.912 54-3 1v4H94.5l-.587-5Z" fill="#fff" fill-opacity=".2" /> <path d="M29 48v3.5h2.5V49L29 48Z" fill="#898989" /> <path d="M29 48v3.5h2.5V49L29 48Z" fill="#fff" fill-opacity=".2" /> <path d="m85 45-.5 3H87v-3.5l-2 .5Z" fill="#898989" /> <path d="m85 45-.5 3H87v-3.5l-2 .5Z" fill="#fff" fill-opacity=".2" /> <path d="M9 51v5h3.5l-.5-4-3-1Z" fill="#898989" /> <path d="M9 51v5h3.5l-.5-4-3-1Z" fill="#fff" fill-opacity=".2" /> </symbol> </svg>';
  44.  
  45. const parser = new DOMParser();
  46. const actionSVG = parser.parseFromString(actionSVGText, 'application/xml');
  47. const monsterSVG = "/static/media/combat_monsters_sprite.395438a8.svg"; //parser.parseFromString(GM_getResourceText("monsterSVG"), 'application/xml');
  48.  
  49. const taskBattleIndex = 99; //Battle at bottom
  50. const taskOrderIndex = {
  51. Milking: 1,
  52. Foraging: 2,
  53. Woodcutting: 3,
  54. Cheesesmithing: 4,
  55. Crafting: 5,
  56. Tailoring: 6,
  57. Cooking: 7,
  58. Brewing: 8,
  59. Alchemy: 9,
  60. Enhancing: 10,
  61. Defeat: taskBattleIndex, //Battle at bottom
  62. };
  63. const taskOrderIndex_CN = {
  64. 挤奶: 1,
  65. 采摘: 2,
  66. 伐木: 3,
  67. 奶酪锻造: 4,
  68. 制作: 5,
  69. 缝纫: 6,
  70. 烹饪: 7,
  71. 冲泡: 8,
  72. 炼金: 9,
  73. 强化: 10,
  74. 击败: taskBattleIndex, //Battle at bottom
  75. };
  76.  
  77. const allMonster = {
  78. "/monsters/abyssal_imp": {
  79. "en": "Abyssal Imp",
  80. "cn": "深渊小鬼",
  81. "zone": "/actions/combat/infernal_abyss",
  82. "dungeon": [
  83. "/actions/combat/enchanted_fortress",
  84. "/actions/combat/pirate_cove"
  85. ],
  86. "sortIndex": 11
  87. },
  88. "/monsters/acrobat": {
  89. "en": "Acrobat",
  90. "cn": "杂技师",
  91. "zone": "",
  92. "dungeon": [
  93. "/actions/combat/sinister_circus"
  94. ],
  95. "sortIndex": -1
  96. },
  97. "/monsters/alligator": {
  98. "en": "Sherlock",
  99. "cn": "夏洛克",
  100. "zone": "/actions/combat/swamp_planet",
  101. "dungeon": [
  102. "/actions/combat/chimerical_den"
  103. ],
  104. "sortIndex": 2
  105. },
  106. "/monsters/anchor_shark": {
  107. "en": "Anchor Shark",
  108. "cn": "持锚鲨",
  109. "zone": "",
  110. "dungeon": [
  111. "/actions/combat/pirate_cove"
  112. ],
  113. "sortIndex": -1
  114. },
  115. "/monsters/aquahorse": {
  116. "en": "Aquahorse",
  117. "cn": "水马",
  118. "zone": "/actions/combat/aqua_planet",
  119. "dungeon": [
  120. "/actions/combat/chimerical_den"
  121. ],
  122. "sortIndex": 3
  123. },
  124. "/monsters/black_bear": {
  125. "en": "Black Bear",
  126. "cn": "黑熊",
  127. "zone": "/actions/combat/bear_with_it",
  128. "dungeon": [
  129. "/actions/combat/enchanted_fortress",
  130. "/actions/combat/sinister_circus"
  131. ],
  132. "sortIndex": 8
  133. },
  134. "/monsters/brine_marksman": {
  135. "en": "Brine Marksman",
  136. "cn": "海盐射手",
  137. "zone": "",
  138. "dungeon": [
  139. "/actions/combat/pirate_cove"
  140. ],
  141. "sortIndex": -1
  142. },
  143. "/monsters/butterjerry": {
  144. "en": "Butterjerry",
  145. "cn": "蝶鼠",
  146. "zone": "",
  147. "dungeon": [
  148. "/actions/combat/chimerical_den"
  149. ],
  150. "sortIndex": -1
  151. },
  152. "/monsters/captain_fishhook": {
  153. "en": "Captain Cheesehook",
  154. "cn": "鱼钩船长",
  155. "zone": "",
  156. "dungeon": [
  157. "/actions/combat/pirate_cove"
  158. ],
  159. "sortIndex": -1
  160. },
  161. "/monsters/centaur_archer": {
  162. "en": "Centaur Archer",
  163. "cn": "半人马弓箭手",
  164. "zone": "/actions/combat/jungle_planet",
  165. "dungeon": [
  166. "/actions/combat/chimerical_den"
  167. ],
  168. "sortIndex": 4
  169. },
  170. "/monsters/chronofrost_sorcerer": {
  171. "en": "Chronofrost Sorcerer",
  172. "cn": "霜时巫师",
  173. "zone": "/actions/combat/sorcerers_tower",
  174. "dungeon": [],
  175. "sortIndex": 7
  176. },
  177. "/monsters/crab": {
  178. "en": "I Pinch",
  179. "cn": "螃蟹",
  180. "zone": "/actions/combat/aqua_planet",
  181. "dungeon": [
  182. "/actions/combat/chimerical_den"
  183. ],
  184. "sortIndex": 3
  185. },
  186. "/monsters/crystal_colossus": {
  187. "en": "Crystal Colossus",
  188. "cn": "水晶巨像",
  189. "zone": "/actions/combat/golem_cave",
  190. "dungeon": [],
  191. "sortIndex": 9
  192. },
  193. "/monsters/demonic_overlord": {
  194. "en": "Demonic Overlord",
  195. "cn": "恶魔霸主",
  196. "zone": "/actions/combat/infernal_abyss",
  197. "dungeon": [],
  198. "sortIndex": 11
  199. },
  200. "/monsters/deranged_jester": {
  201. "en": "Deranged Jester",
  202. "cn": "小丑皇",
  203. "zone": "",
  204. "dungeon": [
  205. "/actions/combat/sinister_circus"
  206. ],
  207. "sortIndex": -1
  208. },
  209. "/monsters/dodocamel": {
  210. "en": "Dodocamel",
  211. "cn": "渡渡驼",
  212. "zone": "",
  213. "dungeon": [
  214. "/actions/combat/chimerical_den"
  215. ],
  216. "sortIndex": -1
  217. },
  218. "/monsters/dusk_revenant": {
  219. "en": "Dusk Revenant",
  220. "cn": "黄昏亡灵",
  221. "zone": "/actions/combat/twilight_zone",
  222. "dungeon": [],
  223. "sortIndex": 10
  224. },
  225. "/monsters/elementalist": {
  226. "en": "Elementalist",
  227. "cn": "元素法师",
  228. "zone": "/actions/combat/sorcerers_tower",
  229. "dungeon": [
  230. "/actions/combat/enchanted_fortress",
  231. "/actions/combat/sinister_circus"
  232. ],
  233. "sortIndex": 7
  234. },
  235. "/monsters/enchanted_bishop": {
  236. "en": "Enchanted Bishop",
  237. "cn": "秘法之相",
  238. "zone": "",
  239. "dungeon": [
  240. "/actions/combat/enchanted_fortress"
  241. ],
  242. "sortIndex": -1
  243. },
  244. "/monsters/enchanted_king": {
  245. "en": "Enchanted King",
  246. "cn": "秘法之王",
  247. "zone": "",
  248. "dungeon": [
  249. "/actions/combat/enchanted_fortress"
  250. ],
  251. "sortIndex": -1
  252. },
  253. "/monsters/enchanted_knight": {
  254. "en": "Enchanted Knight",
  255. "cn": "秘法骑士",
  256. "zone": "",
  257. "dungeon": [
  258. "/actions/combat/enchanted_fortress"
  259. ],
  260. "sortIndex": -1
  261. },
  262. "/monsters/enchanted_pawn": {
  263. "en": "Enchanted Pawn",
  264. "cn": "秘法之兵",
  265. "zone": "",
  266. "dungeon": [
  267. "/actions/combat/enchanted_fortress"
  268. ],
  269. "sortIndex": -1
  270. },
  271. "/monsters/enchanted_queen": {
  272. "en": "Enchanted Queen",
  273. "cn": "秘法之后",
  274. "zone": "",
  275. "dungeon": [
  276. "/actions/combat/enchanted_fortress"
  277. ],
  278. "sortIndex": -1
  279. },
  280. "/monsters/enchanted_rook": {
  281. "en": "Enchanted Rook",
  282. "cn": "秘法堡垒",
  283. "zone": "",
  284. "dungeon": [
  285. "/actions/combat/enchanted_fortress"
  286. ],
  287. "sortIndex": -1
  288. },
  289. "/monsters/eye": {
  290. "en": "Eye",
  291. "cn": "独眼",
  292. "zone": "/actions/combat/planet_of_the_eyes",
  293. "dungeon": [
  294. "/actions/combat/chimerical_den",
  295. "/actions/combat/pirate_cove"
  296. ],
  297. "sortIndex": 6
  298. },
  299. "/monsters/eyes": {
  300. "en": "Eyes",
  301. "cn": "叠眼",
  302. "zone": "/actions/combat/planet_of_the_eyes",
  303. "dungeon": [
  304. "/actions/combat/chimerical_den",
  305. "/actions/combat/pirate_cove"
  306. ],
  307. "sortIndex": 6
  308. },
  309. "/monsters/flame_sorcerer": {
  310. "en": "Flame Sorcerer",
  311. "cn": "火焰巫师",
  312. "zone": "/actions/combat/sorcerers_tower",
  313. "dungeon": [
  314. "/actions/combat/enchanted_fortress",
  315. "/actions/combat/sinister_circus"
  316. ],
  317. "sortIndex": 7
  318. },
  319. "/monsters/fly": {
  320. "en": "Fly",
  321. "cn": "苍蝇",
  322. "zone": "/actions/combat/smelly_planet",
  323. "dungeon": [],
  324. "sortIndex": 1
  325. },
  326. "/monsters/frog": {
  327. "en": "Frogger",
  328. "cn": "青蛙",
  329. "zone": "/actions/combat/swamp_planet",
  330. "dungeon": [
  331. "/actions/combat/chimerical_den"
  332. ],
  333. "sortIndex": 2
  334. },
  335. "/monsters/giant_shoebill": {
  336. "en": "Giant Shoebill",
  337. "cn": "鲸头鹳",
  338. "zone": "/actions/combat/swamp_planet",
  339. "dungeon": [],
  340. "sortIndex": 2
  341. },
  342. "/monsters/gobo_boomy": {
  343. "en": "Boomy",
  344. "cn": "轰轰",
  345. "zone": "/actions/combat/gobo_planet",
  346. "dungeon": [
  347. "/actions/combat/chimerical_den",
  348. "/actions/combat/sinister_circus"
  349. ],
  350. "sortIndex": 5
  351. },
  352. "/monsters/gobo_chieftain": {
  353. "en": "Gobo Chieftain",
  354. "cn": "哥布林酋长",
  355. "zone": "/actions/combat/gobo_planet",
  356. "dungeon": [],
  357. "sortIndex": 5
  358. },
  359. "/monsters/gobo_shooty": {
  360. "en": "Shooty",
  361. "cn": "咻咻",
  362. "zone": "/actions/combat/gobo_planet",
  363. "dungeon": [
  364. "/actions/combat/chimerical_den",
  365. "/actions/combat/sinister_circus"
  366. ],
  367. "sortIndex": 5
  368. },
  369. "/monsters/gobo_slashy": {
  370. "en": "Slashy",
  371. "cn": "砍砍",
  372. "zone": "/actions/combat/gobo_planet",
  373. "dungeon": [
  374. "/actions/combat/chimerical_den",
  375. "/actions/combat/sinister_circus"
  376. ],
  377. "sortIndex": 5
  378. },
  379. "/monsters/gobo_smashy": {
  380. "en": "Smashy",
  381. "cn": "锤锤",
  382. "zone": "/actions/combat/gobo_planet",
  383. "dungeon": [
  384. "/actions/combat/chimerical_den",
  385. "/actions/combat/sinister_circus"
  386. ],
  387. "sortIndex": 5
  388. },
  389. "/monsters/gobo_stabby": {
  390. "en": "Stabby",
  391. "cn": "刺刺",
  392. "zone": "/actions/combat/gobo_planet",
  393. "dungeon": [
  394. "/actions/combat/chimerical_den",
  395. "/actions/combat/sinister_circus"
  396. ],
  397. "sortIndex": 5
  398. },
  399. "/monsters/granite_golem": {
  400. "en": "Granite Golem",
  401. "cn": "花岗魔像",
  402. "zone": "/actions/combat/golem_cave",
  403. "dungeon": [
  404. "/actions/combat/pirate_cove"
  405. ],
  406. "sortIndex": 9
  407. },
  408. "/monsters/griffin": {
  409. "en": "Griffin",
  410. "cn": "狮鹫",
  411. "zone": "",
  412. "dungeon": [
  413. "/actions/combat/chimerical_den"
  414. ],
  415. "sortIndex": -1
  416. },
  417. "/monsters/grizzly_bear": {
  418. "en": "Grizzly Bear",
  419. "cn": "棕熊",
  420. "zone": "/actions/combat/bear_with_it",
  421. "dungeon": [
  422. "/actions/combat/enchanted_fortress",
  423. "/actions/combat/sinister_circus"
  424. ],
  425. "sortIndex": 8
  426. },
  427. "/monsters/gummy_bear": {
  428. "en": "Gummy Bear",
  429. "cn": "软糖熊",
  430. "zone": "/actions/combat/bear_with_it",
  431. "dungeon": [
  432. "/actions/combat/sinister_circus"
  433. ],
  434. "sortIndex": 8
  435. },
  436. "/monsters/ice_sorcerer": {
  437. "en": "Ice Sorcerer",
  438. "cn": "冰霜巫师",
  439. "zone": "/actions/combat/sorcerers_tower",
  440. "dungeon": [
  441. "/actions/combat/enchanted_fortress",
  442. "/actions/combat/sinister_circus"
  443. ],
  444. "sortIndex": 7
  445. },
  446. "/monsters/infernal_warlock": {
  447. "en": "Infernal Warlock",
  448. "cn": "地狱术士",
  449. "zone": "/actions/combat/infernal_abyss",
  450. "dungeon": [
  451. "/actions/combat/pirate_cove"
  452. ],
  453. "sortIndex": 11
  454. },
  455. "/monsters/jackalope": {
  456. "en": "Jackalope",
  457. "cn": "鹿角兔",
  458. "zone": "",
  459. "dungeon": [
  460. "/actions/combat/chimerical_den"
  461. ],
  462. "sortIndex": -1
  463. },
  464. "/monsters/juggler": {
  465. "en": "Juggler",
  466. "cn": "杂耍者",
  467. "zone": "",
  468. "dungeon": [
  469. "/actions/combat/sinister_circus"
  470. ],
  471. "sortIndex": -1
  472. },
  473. "/monsters/jungle_sprite": {
  474. "en": "Jungle Sprite",
  475. "cn": "丛林精灵",
  476. "zone": "/actions/combat/jungle_planet",
  477. "dungeon": [
  478. "/actions/combat/chimerical_den"
  479. ],
  480. "sortIndex": 4
  481. },
  482. "/monsters/luna_empress": {
  483. "en": "Luna Empress",
  484. "cn": "月神之蝶",
  485. "zone": "/actions/combat/jungle_planet",
  486. "dungeon": [],
  487. "sortIndex": 4
  488. },
  489. "/monsters/magician": {
  490. "en": "Magician",
  491. "cn": "魔术师",
  492. "zone": "",
  493. "dungeon": [
  494. "/actions/combat/sinister_circus"
  495. ],
  496. "sortIndex": -1
  497. },
  498. "/monsters/magnetic_golem": {
  499. "en": "Magnetic Golem",
  500. "cn": "磁力魔像",
  501. "zone": "/actions/combat/golem_cave",
  502. "dungeon": [
  503. "/actions/combat/enchanted_fortress",
  504. "/actions/combat/pirate_cove"
  505. ],
  506. "sortIndex": 9
  507. },
  508. "/monsters/manticore": {
  509. "en": "Manticore",
  510. "cn": "狮蝎兽",
  511. "zone": "",
  512. "dungeon": [
  513. "/actions/combat/chimerical_den"
  514. ],
  515. "sortIndex": -1
  516. },
  517. "/monsters/marine_huntress": {
  518. "en": "Marine Huntress",
  519. "cn": "海洋猎手",
  520. "zone": "/actions/combat/aqua_planet",
  521. "dungeon": [],
  522. "sortIndex": 3
  523. },
  524. "/monsters/myconid": {
  525. "en": "Myconid",
  526. "cn": "蘑菇人",
  527. "zone": "/actions/combat/jungle_planet",
  528. "dungeon": [
  529. "/actions/combat/chimerical_den"
  530. ],
  531. "sortIndex": 4
  532. },
  533. "/monsters/nom_nom": {
  534. "en": "Nom Nom",
  535. "cn": "咬咬鱼",
  536. "zone": "/actions/combat/aqua_planet",
  537. "dungeon": [
  538. "/actions/combat/chimerical_den"
  539. ],
  540. "sortIndex": 3
  541. },
  542. "/monsters/novice_sorcerer": {
  543. "en": "Novice Sorcerer",
  544. "cn": "新手巫师",
  545. "zone": "/actions/combat/sorcerers_tower",
  546. "dungeon": [
  547. "/actions/combat/enchanted_fortress",
  548. "/actions/combat/sinister_circus"
  549. ],
  550. "sortIndex": 7
  551. },
  552. "/monsters/panda": {
  553. "en": "Panda",
  554. "cn": "熊猫",
  555. "zone": "/actions/combat/bear_with_it",
  556. "dungeon": [
  557. "/actions/combat/enchanted_fortress",
  558. "/actions/combat/sinister_circus"
  559. ],
  560. "sortIndex": 8
  561. },
  562. "/monsters/polar_bear": {
  563. "en": "Polar Bear",
  564. "cn": "北极熊",
  565. "zone": "/actions/combat/bear_with_it",
  566. "dungeon": [
  567. "/actions/combat/enchanted_fortress",
  568. "/actions/combat/sinister_circus"
  569. ],
  570. "sortIndex": 8
  571. },
  572. "/monsters/porcupine": {
  573. "en": "Porcupine",
  574. "cn": "豪猪",
  575. "zone": "/actions/combat/smelly_planet",
  576. "dungeon": [
  577. "/actions/combat/chimerical_den"
  578. ],
  579. "sortIndex": 1
  580. },
  581. "/monsters/rabid_rabbit": {
  582. "en": "Rabid Rabbit",
  583. "cn": "疯魔兔",
  584. "zone": "",
  585. "dungeon": [
  586. "/actions/combat/sinister_circus"
  587. ],
  588. "sortIndex": -1
  589. },
  590. "/monsters/rat": {
  591. "en": "Jerry",
  592. "cn": "杰瑞",
  593. "zone": "/actions/combat/smelly_planet",
  594. "dungeon": [
  595. "/actions/combat/chimerical_den"
  596. ],
  597. "sortIndex": 1
  598. },
  599. "/monsters/red_panda": {
  600. "en": "Red Panda",
  601. "cn": "小熊猫",
  602. "zone": "/actions/combat/bear_with_it",
  603. "dungeon": [],
  604. "sortIndex": 8
  605. },
  606. "/monsters/sea_snail": {
  607. "en": "Gary",
  608. "cn": "蜗牛",
  609. "zone": "/actions/combat/aqua_planet",
  610. "dungeon": [
  611. "/actions/combat/chimerical_den"
  612. ],
  613. "sortIndex": 3
  614. },
  615. "/monsters/skunk": {
  616. "en": "Skunk",
  617. "cn": "臭鼬",
  618. "zone": "/actions/combat/smelly_planet",
  619. "dungeon": [
  620. "/actions/combat/chimerical_den"
  621. ],
  622. "sortIndex": 1
  623. },
  624. "/monsters/slimy": {
  625. "en": "Slimy",
  626. "cn": "史莱姆",
  627. "zone": "/actions/combat/smelly_planet",
  628. "dungeon": [
  629. "/actions/combat/chimerical_den"
  630. ],
  631. "sortIndex": 1
  632. },
  633. "/monsters/snake": {
  634. "en": "Thnake",
  635. "cn": "蛇",
  636. "zone": "/actions/combat/swamp_planet",
  637. "dungeon": [
  638. "/actions/combat/chimerical_den"
  639. ],
  640. "sortIndex": 2
  641. },
  642. "/monsters/soul_hunter": {
  643. "en": "Soul Hunter",
  644. "cn": "灵魂猎手",
  645. "zone": "/actions/combat/infernal_abyss",
  646. "dungeon": [
  647. "/actions/combat/enchanted_fortress",
  648. "/actions/combat/pirate_cove"
  649. ],
  650. "sortIndex": 11
  651. },
  652. "/monsters/squawker": {
  653. "en": "Squawker",
  654. "cn": "鹦鹉",
  655. "zone": "",
  656. "dungeon": [
  657. "/actions/combat/pirate_cove"
  658. ],
  659. "sortIndex": -1
  660. },
  661. "/monsters/stalactite_golem": {
  662. "en": "Stalactite Golem",
  663. "cn": "钟乳石魔像",
  664. "zone": "/actions/combat/golem_cave",
  665. "dungeon": [
  666. "/actions/combat/enchanted_fortress",
  667. "/actions/combat/pirate_cove"
  668. ],
  669. "sortIndex": 9
  670. },
  671. "/monsters/swampy": {
  672. "en": "Swampy",
  673. "cn": "沼泽虫",
  674. "zone": "/actions/combat/swamp_planet",
  675. "dungeon": [
  676. "/actions/combat/chimerical_den"
  677. ],
  678. "sortIndex": 2
  679. },
  680. "/monsters/the_kraken": {
  681. "en": "The Kraken",
  682. "cn": "克拉肯",
  683. "zone": "",
  684. "dungeon": [
  685. "/actions/combat/pirate_cove"
  686. ],
  687. "sortIndex": -1
  688. },
  689. "/monsters/the_watcher": {
  690. "en": "The Watcher",
  691. "cn": "观察者",
  692. "zone": "/actions/combat/planet_of_the_eyes",
  693. "dungeon": [],
  694. "sortIndex": 6
  695. },
  696. "/monsters/tidal_conjuror": {
  697. "en": "Tidal Conjuror",
  698. "cn": "潮汐召唤师",
  699. "zone": "",
  700. "dungeon": [
  701. "/actions/combat/pirate_cove"
  702. ],
  703. "sortIndex": -1
  704. },
  705. "/monsters/treant": {
  706. "en": "Treant",
  707. "cn": "树人",
  708. "zone": "/actions/combat/jungle_planet",
  709. "dungeon": [],
  710. "sortIndex": 4
  711. },
  712. "/monsters/turtle": {
  713. "en": "Turuto",
  714. "cn": "忍者龟",
  715. "zone": "/actions/combat/aqua_planet",
  716. "dungeon": [
  717. "/actions/combat/chimerical_den"
  718. ],
  719. "sortIndex": 3
  720. },
  721. "/monsters/vampire": {
  722. "en": "Vampire",
  723. "cn": "吸血鬼",
  724. "zone": "/actions/combat/twilight_zone",
  725. "dungeon": [
  726. "/actions/combat/pirate_cove",
  727. "/actions/combat/sinister_circus"
  728. ],
  729. "sortIndex": 10
  730. },
  731. "/monsters/veyes": {
  732. "en": "Veyes",
  733. "cn": "复眼",
  734. "zone": "/actions/combat/planet_of_the_eyes",
  735. "dungeon": [
  736. "/actions/combat/chimerical_den",
  737. "/actions/combat/pirate_cove"
  738. ],
  739. "sortIndex": 6
  740. },
  741. "/monsters/werewolf": {
  742. "en": "Werewolf",
  743. "cn": "狼人",
  744. "zone": "/actions/combat/twilight_zone",
  745. "dungeon": [
  746. "/actions/combat/pirate_cove",
  747. "/actions/combat/sinister_circus"
  748. ],
  749. "sortIndex": 10
  750. },
  751. "/monsters/zombie": {
  752. "en": "Zombie",
  753. "cn": "僵尸",
  754. "zone": "/actions/combat/twilight_zone",
  755. "dungeon": [
  756. "/actions/combat/pirate_cove",
  757. "/actions/combat/sinister_circus"
  758. ],
  759. "sortIndex": 10
  760. },
  761. "/monsters/zombie_bear": {
  762. "en": "Zombie Bear",
  763. "cn": "僵尸熊",
  764. "zone": "",
  765. "dungeon": [
  766. "/actions/combat/sinister_circus"
  767. ],
  768. "sortIndex": -1
  769. }
  770. };
  771.  
  772. function getTaskDetailFromTaskName(fullTaskName) {
  773. var taskType = -1;
  774. var taskName = "";
  775.  
  776. if (/^(.+) - (.+)$/.test(fullTaskName)) {
  777. let res = /^(.+) - (.+)$/.exec(fullTaskName);
  778. if (res[1] in taskOrderIndex) {
  779. taskType = taskOrderIndex[res[1]];
  780. }
  781. else if (res[1] in taskOrderIndex_CN) {
  782. taskType = taskOrderIndex_CN[res[1]];
  783. }
  784. taskName = res[2];
  785. }
  786. if (taskType == -1) console.log("Task Parse error", fullTaskName);
  787.  
  788. return { taskType, taskName };
  789. }
  790.  
  791. function getHridFromMonsterName(name) {
  792. for (let key in allMonster) {
  793. if (allMonster[key].en === name || allMonster[key].cn === name) {
  794. return key;
  795. }
  796. }
  797. console.log("Monster not found", name);
  798. return null;
  799. }
  800. function getMapIndexFromMonsterName(name) {
  801. const key = getHridFromMonsterName(name);
  802. if (!key) {
  803. return -1;
  804. }
  805. return allMonster[key].sortIndex;
  806. }
  807.  
  808. function getTaskDetailFromElement(ele) {
  809. const div = ele.querySelector("div.RandomTask_name__1hl1b");
  810.  
  811. const translatedfrom = div.getAttribute("script_translatedfrom"); //adapt old zhCN Script
  812. if (translatedfrom) {
  813. return getTaskDetailFromTaskName(translatedfrom);
  814. }
  815.  
  816. const fullTaskName = Array.from(div.childNodes).find(node => node.nodeType === Node.TEXT_NODE).textContent.trim();
  817. return getTaskDetailFromTaskName(fullTaskName);
  818. }
  819.  
  820. function compareFn(a, b) {
  821. var { taskType: a_TypeIndex, taskName: a_taskName } = getTaskDetailFromElement(a);
  822.  
  823. var { taskType: b_TypeIndex, taskName: b_TaskName } = getTaskDetailFromElement(b);
  824.  
  825. if (a_TypeIndex === taskBattleIndex && b_TypeIndex === taskBattleIndex) {
  826. var a_MapIndex = getMapIndexFromMonsterName(a_taskName);
  827. var b_MapIndex = getMapIndexFromMonsterName(b_TaskName);
  828.  
  829. if (a_MapIndex != b_MapIndex) {
  830. return (a_MapIndex > b_MapIndex ? 1 : -1);
  831. }
  832. }
  833.  
  834. if (a_TypeIndex == b_TypeIndex) {
  835. return a_taskName == b_TaskName ? 0
  836. : (a_taskName > b_TaskName ? 1 : -1);
  837. }
  838.  
  839. return a_TypeIndex > b_TypeIndex ? 1 : -1;
  840. }
  841.  
  842. function adaptSVG(svg, objSVG, target) {
  843. svg.setAttribute('target', target);
  844. if (typeof objSVG == 'string' && objSVG.endsWith(".svg")) {
  845. const use = document.createElementNS("http://www.w3.org/2000/svg", "use");
  846. use.setAttribute("href", objSVG + '#' + target);
  847. svg.appendChild(use);
  848. } else {
  849. const targetSymbolElement = objSVG.querySelector(`symbol[id="${target}"]`);
  850. if (targetSymbolElement) {
  851. const children = targetSymbolElement.childNodes;
  852. for (let i = 0; i < children.length; i++) {
  853. svg.appendChild(children[i].cloneNode(true));
  854. }
  855. svg.setAttribute('viewBox', targetSymbolElement.getAttribute('viewBox'));
  856. svg.setAttribute('fill', 'none');
  857. }
  858. }
  859. }
  860.  
  861. function addIconToTask(div) {
  862. var { taskType, taskName } = getTaskDetailFromElement(div);
  863.  
  864. if (taskType != taskBattleIndex) {
  865. return;
  866. }
  867.  
  868. const monsterHrid = getHridFromMonsterName(taskName);
  869. if (!monsterHrid) {
  870. return;
  871. }
  872.  
  873. var offset = 5; // 5% from left and each 30% width
  874. const isShowDungeon = Object.values(globalConfig.dungeonConfig).filter(Boolean).length > 0;
  875. if (!isShowDungeon) {
  876. offset = 50;
  877. }
  878.  
  879. const backgroundDiv = document.createElement('div');
  880. backgroundDiv.id = "MonsterIcon";
  881. backgroundDiv.style.position = 'absolute';
  882. backgroundDiv.style.left = `${offset}%`; offset += 30;
  883. backgroundDiv.style.width = '30%';
  884. backgroundDiv.style.height = '100%';
  885. backgroundDiv.style.opacity = '0.3';
  886.  
  887. const monsterName = monsterHrid.split("/").pop();
  888.  
  889. const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  890. svg.setAttribute("width", "100%");
  891. svg.setAttribute("height", "100%");
  892.  
  893. adaptSVG(svg, monsterSVG, monsterName);
  894.  
  895. backgroundDiv.appendChild(svg);
  896.  
  897. div.appendChild(backgroundDiv);
  898.  
  899.  
  900. const dungeonMap = allMonster[monsterHrid]?.dungeon;
  901. if (isShowDungeon && dungeonMap) {
  902. Object.keys(globalConfig.dungeonConfig).filter(dungeon => globalConfig.dungeonConfig[dungeon]).forEach(dungeon => {
  903. if (dungeonMap.includes(dungeon)) {
  904. const dungeonDiv = document.createElement('div');
  905. dungeonDiv.id = "DungeonIcon";
  906. dungeonDiv.style.position = 'absolute';
  907. dungeonDiv.style.left = `${offset}%`; offset += 30;
  908. dungeonDiv.style.width = '30%';
  909. dungeonDiv.style.height = '100%';
  910. dungeonDiv.style.opacity = '0.3';
  911.  
  912. const dungeonName = dungeon.split("/").pop();
  913.  
  914. const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  915. svg.setAttribute("width", "100%");
  916. svg.setAttribute("height", "100%");
  917.  
  918. adaptSVG(svg, actionSVG, dungeonName);
  919.  
  920. dungeonDiv.appendChild(svg);
  921. div.appendChild(dungeonDiv);
  922. }
  923. })
  924. }
  925.  
  926. // fix button style
  927. div.style.position = 'relative';
  928. div.querySelector(".RandomTask_content__VVQva").style.zIndex = 1;
  929. div.querySelectorAll(".Item_item__2De2O").forEach(node => node.style.backgroundColor = "transparent");
  930.  
  931. }
  932.  
  933. function updateIconByConfig() {
  934. const battleIcon = document.querySelector("#BattleIcon");
  935. if (battleIcon) {
  936. if (globalConfig.isBattleIcon) {
  937. battleIcon.style.opacity = '1';
  938. battleIcon.querySelector("#taskCount").style.display = 'inline';
  939. } else {
  940. battleIcon.style.opacity = '0.3';
  941. battleIcon.querySelector("#taskCount").style.display = 'none';
  942. }
  943. }
  944.  
  945. Object.keys(globalConfig.dungeonConfig).forEach(dungeon => {
  946. const dungeonIcon = document.querySelector(`#${dungeon.split("/").pop()}`);
  947. if (dungeonIcon) {
  948. if (globalConfig.isBattleIcon && globalConfig.dungeonConfig[dungeon]) {
  949. dungeonIcon.style.opacity = '1';
  950. dungeonIcon.querySelector("#taskCount").style.display = 'inline';
  951. } else {
  952. dungeonIcon.style.opacity = '0.3';
  953. dungeonIcon.querySelector("#taskCount").style.display = 'none';
  954. }
  955. }
  956. });
  957. }
  958.  
  959. function createIcon(id, objSVG, target) {
  960.  
  961. // battle icon
  962. const div = document.createElement("div");
  963. div.id = id;
  964. div.style.height = "100%"; // 设置高度
  965.  
  966. const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  967. svg.setAttribute("role", "img");
  968. svg.setAttribute("aria-label", "Combat");
  969. svg.setAttribute("class", "Icon_icon__2LtL_ Icon_xtiny__331pI Icon_inline__1Idwv");
  970. svg.setAttribute("width", "100%");
  971. svg.setAttribute("height", "100%");
  972. svg.style.margin = "1px";
  973.  
  974. adaptSVG(svg, objSVG, target);
  975.  
  976. const divCount = document.createElement("span");
  977. divCount.id = "taskCount";
  978. divCount.textContent = "";
  979.  
  980. div.appendChild(svg);
  981. div.appendChild(divCount);
  982.  
  983. // div onclick change config
  984. div.addEventListener("click", function (evt) {
  985. if (id === "BattleIcon") {
  986. globalConfig.isBattleIcon = !globalConfig.isBattleIcon;
  987. } else {
  988. let configkey = Object.keys(globalConfig.dungeonConfig).find(key => key.split("/").pop() === id);
  989. globalConfig.dungeonConfig[configkey] = !globalConfig.dungeonConfig[configkey];
  990. }
  991. saveConfig(); //auto save when click
  992.  
  993. updateIconByConfig();
  994.  
  995. //clean all checkers to refresh statics
  996. document.querySelectorAll("#taskChekerInCoin").forEach(checker => checker.id = null);
  997. });
  998.  
  999. return div;
  1000. }
  1001.  
  1002. function addSortButtonAndStaticsBar(pannel) {
  1003. const sortButton = document.createElement("button");
  1004. sortButton.setAttribute("class", "Button_button__1Fe9z Button_small__3fqC7");
  1005. sortButton.id = "TaskSort";
  1006. sortButton.innerHTML = "TaskSort";
  1007. sortButton.addEventListener("click", function (evt) {
  1008. const list = document.querySelector("div.TasksPanel_taskList__2xh4k");
  1009. [...list.querySelectorAll("div.RandomTask_randomTask__3B9fA")]
  1010. .sort(compareFn)
  1011. .forEach(node => list.appendChild(node));
  1012. });
  1013. pannel.appendChild(sortButton);
  1014.  
  1015. // add statics bar
  1016. const battleIcon = createIcon("BattleIcon", "/static/media/misc_sprite.426c5d78.svg", "combat");
  1017. pannel.appendChild(battleIcon);
  1018.  
  1019. // add all dungeon icon
  1020. Object.keys(globalConfig.dungeonConfig).forEach(dungeon => {
  1021. const dungeonIcon = createIcon(dungeon.split("/").pop(), actionSVG, dungeon.split("/").pop());
  1022. pannel.appendChild(dungeonIcon);
  1023. });
  1024. }
  1025.  
  1026. function optimizeForMobile(pannel) {
  1027. if (/Mobi|Android/i.test(navigator.userAgent)) {
  1028. const upgradeButton = pannel.querySelector("button.Button_button__1Fe9z.Button_small__3fqC7");
  1029. if (upgradeButton) {
  1030. upgradeButton.style.display = "none";
  1031. console.log("hide upgrade button when mobile");
  1032. }
  1033. }
  1034. }
  1035.  
  1036. function refresh() {
  1037. const pannel = document.querySelector("div.TasksPanel_taskSlotCount__nfhgS");
  1038. if (pannel) {
  1039. let sortButton = pannel.querySelector("#TaskSort");
  1040. if (!sortButton) {
  1041. optimizeForMobile(pannel);
  1042. addSortButtonAndStaticsBar(pannel);
  1043. updateIconByConfig();
  1044. }
  1045. }
  1046. else {
  1047. return; //not in task board
  1048. }
  1049.  
  1050. let needRefreshTaskStatics = false;
  1051. const taskNodes = document.querySelectorAll("div.TasksPanel_taskList__2xh4k div.RandomTask_randomTask__3B9fA");
  1052. for (let node of taskNodes) {
  1053. const coinDiv = node.querySelector(".Item_count__1HVvv");
  1054. if (coinDiv && !coinDiv.querySelector("#taskChekerInCoin")) {
  1055. needRefreshTaskStatics = true;
  1056.  
  1057. //remove old and add new icon
  1058. const oldIcon = node.querySelector("#MonsterIcon");
  1059. if (oldIcon) {
  1060. oldIcon.remove();
  1061. }
  1062. const oldDungeonIcons = node.querySelectorAll("#DungeonIcon");
  1063. oldDungeonIcons.forEach(icon => icon.remove());
  1064.  
  1065. if (globalConfig.isBattleIcon) {
  1066. addIconToTask(node);
  1067. }
  1068.  
  1069. //add checker
  1070. const checker = document.createElement("div");
  1071. checker.id = "taskChekerInCoin";
  1072. coinDiv.appendChild(checker);
  1073. }
  1074. }
  1075.  
  1076. if (needRefreshTaskStatics) {
  1077. const battleIcon = document.querySelector("#BattleIcon #taskCount");
  1078. if (battleIcon) {
  1079. const battleCount = [...document.querySelectorAll("div.RandomTask_randomTask__3B9fA")].filter(node => node.querySelector("#MonsterIcon")).length;
  1080. battleIcon.textContent = battleCount > 0 ? `*${battleCount}` : '';
  1081. }
  1082.  
  1083. Object.keys(globalConfig.dungeonConfig).forEach(dungeon => {
  1084. const dungeonIcon = document.querySelector(`#${dungeon.split("/").pop()} #taskCount`);
  1085. if (dungeonIcon) {
  1086. const dungeonCount = [...document.querySelectorAll("div.RandomTask_randomTask__3B9fA")].filter(node => {
  1087. const dungeonIcons = node.querySelectorAll("#DungeonIcon svg");
  1088. return Array.from(dungeonIcons).some(svg => svg.getAttribute("target").includes(dungeon.split("/").pop()));
  1089. }).length;
  1090. dungeonIcon.textContent = dungeonCount > 0 ? `*${dungeonCount}` : '';
  1091. }
  1092. });
  1093. }
  1094. }
  1095.  
  1096. const config = { attributes: true, childList: true, subtree: true };
  1097.  
  1098. const observer = new MutationObserver(function (mutationsList, observer) {
  1099. refresh();
  1100. });
  1101.  
  1102. observer.observe(document, config);
  1103.  
  1104. })();