Parcourir la source

Merge branch 'master' into APIv2

Iñigo Valentin il y a 6 ans
Parent
commit
125c31c6a7
100 fichiers modifiés avec 2968 ajouts et 307 suppressions
  1. 1 0
      .gitignore
  2. 185 0
      LICENSE
  3. 45 0
      README.md
  4. 153 3
      application/API/v2/bin/upload_profile.py
  5. 0 1
      application/API/v2/upload_profile.php
  6. 201 0
      application/Constant.php
  7. 8 0
      application/Controller.php
  8. 7 1
      application/action/new_team.php
  9. 2 1
      application/config.php
  10. 355 0
      application/entity/Artifact.php
  11. 9 83
      application/entity/K_Area.php
  12. 11 2
      application/entity/Run.php
  13. 99 58
      application/entity/Unit.php
  14. 187 1
      application/helper/HTML_Helper.php
  15. 246 0
      application/page/Artifacts_Page.php
  16. 289 0
      application/page/Enchantments_Page.php
  17. 1 1
      application/page/Report_Skillup_Page.php
  18. BIN
      application/sw.sqlite
  19. 166 0
      application/view/artifacts.php
  20. 129 0
      application/view/enchantments.php
  21. 204 0
      application/view/inc/filter_artifacts.php
  22. 161 0
      application/view/inc/filter_enchantments.php
  23. 1 1
      application/view/inc/filter_runes.php
  24. 6 0
      application/view/inc/header.php
  25. 7 1
      application/view/monster.php
  26. 9 1
      application/view/teams.php
  27. 4 4
      install
  28. 220 128
      install_data/install_base.sql
  29. 37 3
      install_data/install_data.sql
  30. 42 0
      public/css/artifacts.css
  31. 19 0
      public/css/enchantments.css
  32. 5 3
      public/css/runs.css
  33. 159 15
      public/css/ui.css
  34. BIN
      public/img/artifact/element_dark.png
  35. BIN
      public/img/artifact/element_fire.png
  36. BIN
      public/img/artifact/element_hero.png
  37. BIN
      public/img/artifact/element_legend.png
  38. BIN
      public/img/artifact/element_light.png
  39. BIN
      public/img/artifact/element_magic.png
  40. BIN
      public/img/artifact/element_normal.png
  41. BIN
      public/img/artifact/element_rare.png
  42. BIN
      public/img/artifact/element_water.png
  43. BIN
      public/img/artifact/element_wind.png
  44. BIN
      public/img/artifact/type_attack.png
  45. BIN
      public/img/artifact/type_defense.png
  46. BIN
      public/img/artifact/type_hero.png
  47. BIN
      public/img/artifact/type_hp.png
  48. BIN
      public/img/artifact/type_legend.png
  49. BIN
      public/img/artifact/type_magic.png
  50. BIN
      public/img/artifact/type_normal.png
  51. BIN
      public/img/artifact/type_rare.png
  52. BIN
      public/img/artifact/type_support.png
  53. BIN
      public/img/skill/00001716.png
  54. BIN
      public/img/skill/00001816.png
  55. BIN
      public/img/skill/00001817.png
  56. BIN
      public/img/skill/00002117.png
  57. BIN
      public/img/skill/00002517.png
  58. BIN
      public/img/skill/00002551.png
  59. BIN
      public/img/skill/00002552.png
  60. BIN
      public/img/skill/00002553.png
  61. BIN
      public/img/skill/00002554.png
  62. BIN
      public/img/skill/00002555.png
  63. BIN
      public/img/skill/00002556.png
  64. BIN
      public/img/skill/00002557.png
  65. BIN
      public/img/skill/00002558.png
  66. BIN
      public/img/skill/00002559.png
  67. BIN
      public/img/skill/00002560.png
  68. BIN
      public/img/skill/00002561.png
  69. BIN
      public/img/skill/00002562.png
  70. BIN
      public/img/skill/00002563.png
  71. BIN
      public/img/skill/00002564.png
  72. BIN
      public/img/skill/00002565.png
  73. BIN
      public/img/skill/00002566.png
  74. BIN
      public/img/skill/00002567.png
  75. BIN
      public/img/skill/00002568.png
  76. BIN
      public/img/skill/00002569.png
  77. BIN
      public/img/skill/00002570.png
  78. BIN
      public/img/skill/00002571.png
  79. BIN
      public/img/skill/00002572.png
  80. BIN
      public/img/skill/00002573.png
  81. BIN
      public/img/skill/00002574.png
  82. BIN
      public/img/skill/00002575.png
  83. BIN
      public/img/skill/00002576.png
  84. BIN
      public/img/skill/00002577.png
  85. BIN
      public/img/skill/00002578.png
  86. BIN
      public/img/skill/00002716.png
  87. BIN
      public/img/skill/00002916.png
  88. BIN
      public/img/skill/00007119.png
  89. BIN
      public/img/skill/00007517.png
  90. BIN
      public/img/skill/00007817.png
  91. BIN
      public/img/skill/00009416.png
  92. BIN
      public/img/skill/00009417.png
  93. BIN
      public/img/skill/00009516.png
  94. BIN
      public/img/skill/00010116.png
  95. BIN
      public/img/skill/00010136.png
  96. BIN
      public/img/skill/00010716.png
  97. BIN
      public/img/skill/00010717.png
  98. BIN
      public/img/skill/00010916.png
  99. BIN
      public/img/skill/00011016.png
  100. BIN
      public/img/skill/00011221.png

+ 1 - 0
.gitignore

@@ -1,6 +1,7 @@
 # Private files
 application/config/auth.php_*
 util/
+parser/
 data/*.sqlite
 
 # Autogenerated files

+ 185 - 0
LICENSE

@@ -0,0 +1,185 @@
+GNU GENERAL PUBLIC LICENSE
+Version 3, 29 June 2007
+
+Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+Preamble
+The GNU General Public License is a free, copyleft license for software and other kinds of works.
+
+The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
+
+To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
+
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+
+Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
+
+For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
+
+Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
+
+Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+TERMS AND CONDITIONS
+0. Definitions.
+“This License” refers to version 3 of the GNU General Public License.
+
+“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
+
+“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
+
+To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
+
+A “covered work” means either the unmodified Program or a work based on the Program.
+
+To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
+
+To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
+
+An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
+
+1. Source Code.
+The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
+
+A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
+
+The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
+
+The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
+
+The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
+
+The Corresponding Source for a work in source code form is that same work.
+
+2. Basic Permissions.
+All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
+
+You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
+
+3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
+
+When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
+
+4. Conveying Verbatim Copies.
+You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
+
+5. Conveying Modified Source Versions.
+You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
+
+a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
+b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
+c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
+d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
+A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
+
+6. Conveying Non-Source Forms.
+You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
+
+a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
+b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
+c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
+d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
+e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
+A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
+
+A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
+
+“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
+
+If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
+
+The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
+
+Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
+
+7. Additional Terms.
+“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
+
+Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
+
+a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
+b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
+c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
+d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
+e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
+f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
+All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
+
+8. Termination.
+You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
+
+However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
+
+Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
+
+9. Acceptance Not Required for Having Copies.
+You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
+
+10. Automatic Licensing of Downstream Recipients.
+Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
+
+An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
+
+11. Patents.
+A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
+
+A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
+
+In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
+
+A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
+
+12. No Surrender of Others' Freedom.
+If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
+
+13. Use with the GNU Affero General Public License.
+Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
+
+14. Revised Versions of this License.
+The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
+
+If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
+
+Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
+
+15. Disclaimer of Warranty.
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. Limitation of Liability.
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+17. Interpretation of Sections 15 and 16.
+If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
+
+END OF TERMS AND CONDITIONS

+ 45 - 0
README.md

@@ -0,0 +1,45 @@
+# SWDB
+
+Assistant for Summoners War players.
+
+Keep tabs on your monsr, runes, inventory, teams, run logs, skillps...
+Get reports onwhich runes should be replaced, which monster to skillup next, or victory rate on different areas.
+
+Includes a plugin for [sw-wxporter](https://github.com/Xzandro/sw-exporter/) to easily ipmort your profile.
+
+### Requeriments
+
+ * PHP (version 7 recommended, not fuly tested on preious versions)
+ * SQLite
+
+### Setting it up
+
+1. Install the basic data. Just run the [install script](install). It will check all requeriments and initialize the databases.
+2. It is designed to run on the built-in PHP web server, but with a bit of work can be made to work on apache. By default, it runs on por 80, and it's publicly visible. Iy you want to change that, it's easy enough to edit the [config file](config). To start it, just run the `start_server` script.
+3. Create an user. As of now, there is no frontend for doing so, so it must be inserted directly into the database:
+```
+$ sqlite3 data/sw.sqlite
+sqlite> INSERT INTO player (uid, name, mail, password, api_key) VALUES('<com2us_id>', '<username>', '<email>', '<sha256sum-of-password>', '<api-key>');
+
+```
+4. Open http://localhost/ on your browser and login.
+
+### Setting up the sw-exporter plugin
+
+1. Copy the [plugin](swex-plugin/swdb.js) to the plugins directory of sw-exporter.
+2. In the configuration page, set the host and the port (usually localhost and 80) and the API key you just inserted.
+3. Enable an many options as you like.
+4. For more information about configuring sw-exporter, please, refer to the [sw-wxporter project](https://github.com/Xzandro/sw-exporter/)
+
+## Authors
+
+* [**Iñigo Valentin**](https://github.com/inigovalentin)
+
+## License
+
+This project is licensed under the GPLv3 - see the [LICENSE](LICENSE) file for details
+
+## Acknowledgments
+
+* [swarfarm](https://github.com/PeteAndersen/swarfarm).
+* [SW-Exporter](https://github.com/Xzandro/sw-exporter).

+ 153 - 3
application/API/v2/bin/upload_profile.py

@@ -110,6 +110,7 @@ def clearData(db, data):
         cursor.execute('DELETE FROM unit_skill WHERE unit IN (SELECT id FROM unit WHERE uid = ?)', [uid])
         cursor.execute('DELETE FROM unit WHERE uid = ?', [uid])
         cursor.execute('DELETE FROM rune WHERE uid = ?', [uid])
+        cursor.execute('DELETE FROM artifact WHERE uid = ?', [uid])
         cursor.execute('DELETE FROM building WHERE uid = ?', [uid])
         cursor.execute('DELETE FROM decoration WHERE uid = ?', [uid])
         cursor.execute('DELETE FROM inventory WHERE uid = ?', [uid])
@@ -714,7 +715,9 @@ def parseRunes(db, data):
             efficiency = 100;
         if max_efficiency > 100:
             max_efficiency = 100;
-        insert(db, "rune", (uid, id, assigned_to, runeset, slot, stars, ancient, level, quality, original_quality, value, efficiency, max_efficiency, main_stat, main_stat_value, innate_stat, innate_stat_value, substat_1, substat_1_value, substat_1_enchant, substat_1_grind, substat_2, substat_2_value, substat_2_enchant, substat_2_grind, substat_3, substat_3_value, substat_3_enchant, substat_3_grind, substat_4, substat_4_value, substat_4_enchant, substat_4_grind))
+        # TODO: Locked status not in JSO file.
+        locked = 0
+        insert(db, "rune", (uid, id, assigned_to, runeset, slot, stars, ancient, level, quality, original_quality, value, efficiency, max_efficiency, main_stat, main_stat_value, innate_stat, innate_stat_value, substat_1, substat_1_value, substat_1_enchant, substat_1_grind, substat_2, substat_2_value, substat_2_enchant, substat_2_grind, substat_3, substat_3_value, substat_3_enchant, substat_3_grind, substat_4, substat_4_value, substat_4_enchant, substat_4_grind, locked))
     # Equipped runes
     for mon in data["unit_list"]:
         for rune in mon["runes"]:
@@ -820,9 +823,151 @@ def parseRunes(db, data):
                 efficiency = 100;
             if max_efficiency > 100:
                 max_efficiency = 100;
-            insert(db, "rune", (uid, id, assigned_to, runeset, slot, stars, ancient, level, quality, original_quality, value, efficiency, max_efficiency, main_stat, main_stat_value, innate_stat, innate_stat_value, substat_1, substat_1_value, substat_1_enchant, substat_1_grind, substat_2, substat_2_value, substat_2_enchant, substat_2_grind, substat_3, substat_3_value, substat_3_enchant, substat_3_grind, substat_4, substat_4_value, substat_4_enchant, substat_4_grind))
+            # TODO: Locked status not in JSO file.
+            locked = 0
+            insert(db, "rune", (uid, id, assigned_to, runeset, slot, stars, ancient, level, quality, original_quality, value, efficiency, max_efficiency, main_stat, main_stat_value, innate_stat, innate_stat_value, substat_1, substat_1_value, substat_1_enchant, substat_1_grind, substat_2, substat_2_value, substat_2_enchant, substat_2_grind, substat_3, substat_3_value, substat_3_enchant, substat_3_grind, substat_4, substat_4_value, substat_4_enchant, substat_4_grind, locked))
     db.commit()
 
+"""
+Parses artifact data (table artifact).
+
+:param db: Sqlite database connection.
+:param data: Data in json format.
+"""
+def parseArtifacts(db, data):
+    print("Parsing artifacts...")
+    uid = data["wizard_info"]["wizard_id"]
+    # Unequipped artifacts
+    for artifact in data["artifacts"]:
+        id = artifact["rid"]
+        assigned_to = None
+        type = artifact["type"]
+        attribute = artifact["attribute"]
+        if attribute == 0:
+            attribute = None
+        archetype = artifact["unit_style"]
+        if archetype == 0:
+            archetype = None
+        level = artifact["level"]
+        quality = artifact["rank"]
+        original_quality = artifact["natural_rank"]
+        # TODO: Vaue not in JSON file. Can it be calculated?
+        value = 0;
+        main_stat = artifact["pri_effect"][0]
+        main_stat_value = artifact["pri_effect"][1]
+        locked = artifact["locked"]
+        if len(artifact["sec_effects"]) > 0:
+            effect_1 = artifact["sec_effects"][0][0]
+            effect_1_value = artifact["sec_effects"][0][1]
+            effect_1_enchant = artifact["sec_effects"][0][2]
+            effect_1_grind = artifact["sec_effects"][0][3]
+        else:
+            effect_1 = None
+            effect_1_value = 0
+            effect_1_enchant = 0
+            effect_1_grind = 0
+        if len(artifact["sec_effects"]) > 1:
+            effect_2 = artifact["sec_effects"][1][0]
+            effect_2_value = artifact["sec_effects"][1][1]
+            effect_2_enchant = artifact["sec_effects"][1][2]
+            effect_2_grind = artifact["sec_effects"][1][3]
+        else:
+            effect_2 = None
+            effect_2_value = 0
+            effect_2_enchant = 0
+            effect_2_grind = 0
+        if len(artifact["sec_effects"]) > 2:
+            effect_3 = artifact["sec_effects"][2][0]
+            effect_3_value = artifact["sec_effects"][2][1]
+            effect_3_enchant = artifact["sec_effects"][2][2]
+            effect_3_grind = artifact["sec_effects"][2][3]
+        else:
+            effect_3 = None
+            effect_3_value = 0
+            effect_3_enchant = 0
+            effect_3_grind = 0
+        if len(artifact["sec_effects"]) > 3:
+            effect_4 = artifact["sec_effects"][3][0]
+            effect_4_value = artifact["sec_effects"][3][1]
+            effect_4_enchant = artifact["sec_effects"][3][2]
+            effect_4_grind = artifact["sec_effects"][3][3]
+        else:
+            effect_4 = None
+            effect_4_value = 0
+            effect_4_enchant = 0
+            effect_4_grind = 0
+        # TODO: efficiences
+        efficiency = 0
+        max_efficiency = 0
+        insert(db, "artifact", (uid, id, assigned_to, type, attribute, archetype, level, quality, original_quality, value, efficiency, max_efficiency, main_stat, main_stat_value, effect_1, effect_1_value, effect_1_enchant, effect_1_grind, effect_2, effect_2_value, effect_2_enchant, effect_2_grind, effect_3, effect_3_value, effect_3_enchant, effect_3_grind, effect_4, effect_4_value, effect_4_enchant, effect_4_grind, locked))
+    # Equipped artifacts
+    for mon in data["unit_list"]:
+        for artifact in mon["artifacts"]:
+            id = artifact["rid"]
+            assigned_to = artifact["occupied_id"]
+            if assigned_to == 0:
+                assigned_to = None
+            type = artifact["type"]
+            attribute = artifact["attribute"]
+            if attribute == 0:
+                attribute = None
+            archetype = artifact["unit_style"]
+            if archetype == 0:
+                archetype = None
+            level = artifact["level"]
+            quality = artifact["rank"]
+            original_quality = artifact["natural_rank"]
+            # TODO: Vaue not in JSON file. Can it be calculated?
+            value = 0;
+            main_stat = artifact["pri_effect"][0]
+            main_stat_value = artifact["pri_effect"][1]
+            locked = artifact["locked"]
+            if len(artifact["sec_effects"]) > 0:
+                effect_1 = artifact["sec_effects"][0][0]
+                effect_1_value = artifact["sec_effects"][0][1]
+                effect_1_enchant = artifact["sec_effects"][0][2]
+                effect_1_grind = artifact["sec_effects"][0][3]
+            else:
+                effect_1 = None
+                effect_1_value = 0
+                effect_1_enchant = 0
+                effect_1_grind = 0
+            if len(artifact["sec_effects"]) > 1:
+                effect_2 = artifact["sec_effects"][1][0]
+                effect_2_value = artifact["sec_effects"][1][1]
+                effect_2_enchant = artifact["sec_effects"][1][2]
+                effect_2_grind = artifact["sec_effects"][1][3]
+            else:
+                effect_2 = None
+                effect_2_value = 0
+                effect_2_enchant = 0
+                effect_2_grind = 0
+            if len(artifact["sec_effects"]) > 2:
+                effect_3 = artifact["sec_effects"][2][0]
+                effect_3_value = artifact["sec_effects"][2][1]
+                effect_3_enchant = artifact["sec_effects"][2][2]
+                effect_3_grind = artifact["sec_effects"][2][3]
+            else:
+                effect_3 = None
+                effect_3_value = 0
+                effect_3_enchant = 0
+                effect_3_grind = 0
+            if len(artifact["sec_effects"]) > 3:
+                effect_4 = artifact["sec_effects"][3][0]
+                effect_4_value = artifact["sec_effects"][3][1]
+                effect_4_enchant = artifact["sec_effects"][3][2]
+                effect_4_grind = artifact["sec_effects"][3][3]
+            else:
+                effect_4 = None
+                effect_4_value = 0
+                effect_4_enchant = 0
+                effect_4_grind = 0
+            # TODO: efficiences
+            efficiency = 0
+            max_efficiency = 0
+            insert(db, "artifact", (uid, id, assigned_to, type, attribute, archetype, level, quality, original_quality, value, efficiency, max_efficiency, main_stat, main_stat_value, effect_1, effect_1_value, effect_1_enchant, effect_1_grind, effect_2, effect_2_value, effect_2_enchant, effect_2_grind, effect_3, effect_3_value, effect_3_enchant, effect_3_grind, effect_4, effect_4_value, effect_4_enchant, effect_4_grind, locked))
+        
+
 """
 calculates the max efficiency of a rune.
 
@@ -1132,7 +1277,12 @@ else:
     try:
         parseRunes(db, data)
     except Exception as e:
-        print("Error parsing runes data: " + str(e))
+        print("Error parsing rune data: " + str(e))
+        sys.exit(400)
+    try:
+        parseArtifacts(db, data)
+    except Exception as e:
+        print("Error parsing artifact data: " + str(e))
         sys.exit(400)
     try:
         parseRuneCraft(db, data)

+ 0 - 1
application/API/v2/upload_profile.php

@@ -62,7 +62,6 @@
         $out = [];
         $ret = 0;
         try{
-error_log ($cmd);
             exec($cmd, $out, $ret);
         }
         catch(Exception $e) {

+ 201 - 0
application/Constant.php

@@ -492,6 +492,79 @@
          */
         const NECROPOLIS = 6001;
 
+        /**
+         * Punisher's Crypt.
+         */
+        const PUNISHERS_CRYPT = 9502;
+
+        /**
+         * Steel Fortress
+         */
+        const STEEL_FORTRESS = 9602; // TODO: Find out
+
+        /**
+         * Hall of Light.
+         */
+        const HALL_OF_LIGHT = 7001;
+
+        /**
+         * Giants Keep.
+         */
+        const GIANTS_KEEP = 8001;
+
+        /**
+         * Dragons Lair.
+         */
+        const DRAGONS_LAIR = 9001;
+    };
+
+    /**
+     * Cairos Dungeons section constants.
+     *
+     * @category Data
+     */
+    final class CAIROS_DUNGEON_ID{
+
+        /**
+         * Hall of Dark.
+         */
+        const HALL_OF_DARK = 1001;
+
+        /**
+         * Hall of Fire.
+         */
+        const HALL_OF_FIRE = 2001;
+
+        /**
+         * Hall of water.
+         */
+        const HALL_OF_WATER = 3001;
+
+        /**
+         * Hall of Wind.
+         */
+        const HALL_OF_WIND = 4001;
+
+        /**
+         * Hall of Magic.
+         */
+        const HALL_OF_MAGIC = 5001;
+
+        /**
+         * Necropolis.
+         */
+        const NECROPOLIS = 6001;
+
+        /**
+         * Punisher's Crypt.
+         */
+        const PUNISHERS_CRYPT = 9502;
+
+        /**
+         * Steel Fortress
+         */
+        const STEEL_FORTRESS = 9602; // TODO: Find out
+
         /**
          * Hall of Light.
          */
@@ -508,6 +581,59 @@
         const DRAGONS_LAIR = 9001;
     };
 
+    /**
+     * Dimensional Dungeons section constants.
+     *
+     * @category Data
+     */
+    final class DIMENSION_DUNGEON_ID{
+
+        /**
+         * Sanctuary of Dreaming Fairies.
+         */
+        const SANCTUARY_OF_DREAMING_FAIRIES = 1101;
+
+        /**
+         * Ellunia Remains (Fairy).
+         */
+        const ELLUNIA_REMAINS_FAIRY = 1201;
+
+        /**
+         * Ellunia Remains (Pixie).
+         */
+        const ELLUNIA_REMAINS_PIXIE = 1202;
+
+        /**
+         * Forest of Roaring Beasts.
+         */
+        const FOREST_OF_ROARING_BEASTS = 2101;
+
+        /**
+         * Karzhan Remains (Warbear).
+         */
+        const KARZHAN_REMAINS_WARBEAR = 2201;
+
+        /**
+         * Karzhan Remains (Inugami).
+         */
+        const KARZHAN_REMAINS_INUGAMI = 2202;
+
+        /**
+         * Cliff of Tough Beast Men.
+         */
+        const CLIFF_OF_TOUGH_BEASTS_MEN = 3101;
+
+        /**
+         * Lumel Remains (Werewolf).
+         */
+        const LUMEL_REMAINS_WEREWOLF = 3201;
+
+        /**
+         * Lumel Remains (Martial Cat).
+         */
+        const LUMEL_REMAINS_MARTIAL_CAT = 3202;
+    };
+
     /**
      * Elemental Rift Dungeon constants.
      *
@@ -1372,6 +1498,49 @@
         const ACC = 12;
     };
 
+    /**
+     * Artifact types.
+     *
+     * The two types of artifacts.
+     */
+    final class ARTIFACT_TYPE{
+
+        /**
+         * Elemental attribute.
+         */
+        const ELEMENT = 1;
+
+        /**
+         * Type artifact.
+         */
+        const ARCHETYPE = 2;
+     }
+    
+    /**
+     * Artifact stat constants.
+     *
+     * The stats an artifact can have. For unit stats, see{@see $STAT_ID}.
+     *
+     * @category Data
+     */
+    final class ARTIFACT_STAT_ID{
+
+        /**
+         * HP.
+         */
+        const HP = 100;
+
+        /**
+         * ATK.
+         */
+        const ATK = 101;
+
+        /**
+         * DEF.
+         */
+        const DEF = 102;
+    }
+
     /**
      * Rune (and other items) quality constants.
      *
@@ -1775,6 +1944,38 @@
             "GROUP" => "SLOT"
         ];
 
+        /**
+         * Default values for the artifact filters.
+         */
+        const ARTIFACT = [
+            "TYPE" => 0,
+            "ELEMENT" => [],
+            "ARCHETYPE" => [],
+            "MAIN" => [],
+            "MIN_QUALITY" => QUALITY_ID::NORMAL,
+            "MAX_QUALITY" => QUALITY_ID::LEGEND,
+            "MIN_ORIGINAL_QUALITY" => QUALITY_ID::NORMAL,
+            "MAX_ORIGINAL_QUALITY" => QUALITY_ID::LEGEND,
+            "MIN_LEVEL" => 0,
+            "MAX_LEVEL" => 15,
+            "MIN_EFFICIENCY" => 0,
+            "MAX_EFFICIENCY" => 100,
+            "MIN_MAX_EFFICIENCY" => 0,
+            "MAX_MAX_EFFICIENCY" => 100,
+            "ASSIGNED" => 1
+        ];
+
+        /**
+         * Default values for the enchantment filters.
+         */
+        const ENCHANTMENT = [
+            "TYPE" => [],
+            "RUNE" => [],
+            "STAT" => [],
+            "MIN_QUALITY" => QUALITY_ID::NORMAL,
+            "MAX_QUALITY" => QUALITY_ID::LEGEND,
+        ];
+
         /**
          * Default values for the run filters.
          */

+ 8 - 0
application/Controller.php

@@ -195,6 +195,14 @@
                     require_once(PATH::PAGE . "Runes_Page.php");
                     $page = new Runes_Page();
                 }
+                elseif (strtoupper($pars[0]) == "ENCHANTMENTS"){
+                    require_once(PATH::PAGE . "Enchantments_Page.php");
+                    $page = new Enchantments_Page();
+                }
+                elseif (strtoupper($pars[0]) == "ARTIFACTS"){
+                    require_once(PATH::PAGE . "Artifacts_Page.php");
+                    $page = new Artifacts_Page();
+                }
                 elseif (strtoupper($pars[0]) == "GUILD"){
                     require_once(PATH::PAGE . "Guild_Page.php");
                     $page = new Guild_Page();

+ 7 - 1
application/action/new_team.php

@@ -64,7 +64,13 @@
                 }
                 break;
             case AREA_TYPE_ID::CAIROS_DUNGEON:
-                if ($stage < 0 || $stage > 10){
+                if ($stage < 0){
+                    return -35;
+                }
+                if ($stage > 12 && ($stage == DUNGEON_ID::GIANTS_KEEP || $stage == DUNGEON_ID::DRAGONS_LAIR || $stage == DUNGEON_ID::NECROPOLIS)){
+                    return -35;
+                }
+                if ($stage > 10 && $stage =! DUNGEON_ID::GIANTS_KEEP && $stage =! DUNGEON_ID::DRAGONS_LAIR && $stage != DUNGEON_ID::NECROPOLIS){
                     return -35;
                 }
                 $difficulty = null;

+ 2 - 1
application/config.php

@@ -26,7 +26,7 @@
          *
          * Can be any string, not just numbers.
          */
-        const VERSION = "2.1";
+        const VERSION = "3.0.0";
     }
 
     /**
@@ -65,6 +65,7 @@
             "SKILL" => BASE_URL . "img/skill/",
             "ESSENCE" => BASE_URL . "img/essence/",
             "RUNE" => BASE_URL . "img/rune/",
+            "ARTIFACT" => BASE_URL . "img/artifact/",
             "GRIND" => BASE_URL . "img/grind/",
             "ELEMENT" => BASE_URL . "img/element/",
             "SKILL_GUILD" => BASE_URL . "img/skill_guild/",

+ 355 - 0
application/entity/Artifact.php

@@ -0,0 +1,355 @@
+<?php
+    /**
+     * Artifact entity file.
+     *
+     * Creates the entity and makes it available.
+     *
+     * @category Entity
+     */
+
+    /**
+     * Require dependent entities if not present.
+     */
+    require_once(PATH::ENTITY . "Entity.php");
+
+    /**
+     * Owned artifact.
+     *
+     * Represents an object from the table 'artifac'.
+     *
+     * @category Entity
+     */
+    class Artifact extends Entity{
+
+        /**
+         * @var int Owner identifier.
+         */
+        public $uid;
+
+        /**
+         * @var int Artifact identifier.
+         */
+        public $id;
+
+        /**
+         * @var int ID of the monster the rune is assigned to.
+         */
+        public $assigned_to;
+
+        /**
+         * @var int Artifact type (null if element artifact).
+         *
+         * @see ARTIFACT_TYPE
+         */
+        public $type;
+
+        /**
+         * @var int Artifact element (null if type artifact).
+         *
+         * @see ELEMENT_ID
+         */
+        public $element;
+
+        /**
+         * @var int Artifact archetype (null if elemental artifact).
+         *
+         * @see ARCHETYPE_ID
+         */
+        public $archetype;
+
+        /**
+         * @var int Level of the rune.
+         */
+        public $level;
+
+        /**
+         * @var int Artifact quality.
+         *
+         * @see QUALITY
+         */
+        public $quality;
+
+        /**
+         * @var int Artifact original quality.
+         *
+         * @see QUALITY
+         */
+        public $original_quality;
+
+        /**
+         * @var string Artifact quality name (uppercase).
+         */
+        public $quality_name;
+
+        /**
+         * @var string Artifact original quality name (uppercase).
+         */
+        public $original_quality_name;
+
+        /**
+         * @var int Price of the artifact.
+         */
+        public $value;
+
+        /**
+         * @var float Current efficiency of the artifact.
+         */
+        public $efficiency;
+
+        /**
+         * @var float Maximum potential efficiency of the artifact.
+         */
+        public $max_efficiency;
+
+        /**
+         * @var int Main stat of the artifact.
+         *
+         * @see STAT_ID
+         */
+        public $main_stat;
+
+        /**
+         * @var string Main stat name (uppercase).
+         */
+        public $main_stat_name;
+
+        /**
+         * @var int Main stat value of the artifact.
+         */
+        public $main_stat_value;
+
+        /**
+         * @var string Extra stat value of the artifact.
+         */
+        public $innate_stat_value;
+
+        /**
+         * @var int Number of substats.
+         */
+        public $substats;
+
+        /**
+         * @var int Effect 1 of the artifact.
+         */
+        public $effect_1;
+
+        /**
+         * @var int Effect 1 value of the artifact.
+         */
+        public $effect_1_value;
+
+        /**
+         * @var string Effect 1 description.
+         */
+        public $effect_1_description;
+
+        /**
+         * @var int Effect 2 of the artifact.
+         */
+        public $effect_2;
+
+        /**
+         * @var int Effect 2 value of the artifact.
+         */
+        public $effect_2_value;
+
+        /**
+         * @var string Effect 2 description.
+         */
+        public $effect_2_description;
+
+        /**
+         * @var int Effect 3 of the artifact.
+         */
+        public $effect_3;
+
+        /**
+         * @var int Effect 3 value of the artifact.
+         */
+        public $effect_3_value;
+
+        /**
+         * @var string Effect 3 description.
+         */
+        public $effect_3_description;
+
+        /**
+         * @var int Effect 4 of the artifact.
+         */
+        public $effect_4;
+
+        /**
+         * @var int Effect 4 value of the artifact.
+         */
+        public $effect_4_value;
+
+        /**
+         * @var string Effect 4 description.
+         */
+        public $effect_4_description;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * artifact, populating it and it's items.
+         *
+         * @param int $id Artifact id.
+         * @global resource Database connection.
+         */
+        public function __construct($id){
+
+            global $db;
+
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  assigned_to, " .
+              "  type, " .
+              "  attribute, " .
+              "  archetype, " .
+              "  level, " .
+              "  quality, " .
+              "  original_quality, " .
+              "  value, " .
+              "  efficiency, " .
+              "  max_efficiency, " .
+              "  main_stat, " .
+              "  main_stat_value, " .
+              "  effect_1, " .
+              "  effect_1_value, " .
+              "  effect_1_enchant, " .
+              "  effect_1_grind, " .
+              "  effect_2, " .
+              "  effect_2_value, " .
+              "  effect_2_enchant, " .
+              "  effect_2_grind, " .
+              "  effect_3, " .
+              "  effect_3_value, " .
+              "  effect_3_enchant, " .
+              "  effect_3_grind, " .
+              "  effect_4, " .
+              "  effect_4_value, " .
+              "  effect_4_enchant, " .
+              "  effect_4_grind " .
+              "FROM artifact " .
+              "WHERE id = '$id'; ";
+            $q = $db->query($s);
+            $r = $q->fetchArray(SQLITE3_ASSOC);
+            if ($r){
+                $this->id = $r["id"];
+                $this->assigned_to = $r["assigned_to"];
+                $this->type = $r["type"];
+                $this->element = $r["attribute"];
+                $this->archetype = $r["archetype"];
+                $this->level = $r["level"];
+                $this->quality = $r["quality"];
+                $this->original_quality = $r["original_quality"];
+                $this->value = $r["value"];
+                $this->efficiency = $r["efficiency"];
+                $this->max_efficiency = $r["max_efficiency"];
+                $this->main_stat = $r["main_stat"];
+                $this->main_stat_value = $r["main_stat_value"];
+                $this->effect_1 = $r["effect_1"];
+                $this->effect_1_value = $r["effect_1_value"];
+                //$this->effect_1_enchant = $r["effect_1_enchant"];
+                //$this->effect_1_grind = $r["effect_1_grind"];
+                $this->effect_2 = $r["effect_2"];
+                $this->effect_2_value = $r["effect_2_value"];
+                //$this->effect_2_enchant = $r["effect_2_enchant"];
+                //$this->effect_2_grind = $r["effect_2_grind"];
+                $this->effect_3 = $r["effect_3"];
+                $this->effect_3_value = $r["effect_3_value"];
+                //$this->effect_3_enchant = $r["effect_3_enchant"];
+                //$this->effect_3_grind = $r["effect_3_grind"];
+                $this->effect_4 = $r["effect_4"];
+                $this->effect_4_value = $r["effect_4_value"];
+                //$this->effect_4_enchant = $r["effect_4_enchant"];
+                //$this->effect_4_grind = $r["effect_4_grind"];
+                $this->refresh_names();
+            }
+        }
+
+        /**
+         * Calculates name variables.
+         */
+        public function refresh_names(){
+            $this->main_stat_name = $this->stat_name($this->main_stat);
+            $this->effect_1_description = $this->effect_description($this->effect_1, $this->effect_1_value);
+            $this->effect_2_description = $this->effect_description($this->effect_2, $this->effect_2_value);
+            $this->effect_3_description = $this->effect_description($this->effect_3, $this->effect_3_value);
+            $this->effect_4_description = $this->effect_description($this->effect_4, $this->effect_4_value);
+            $this->quality_name = $this->get_quality_name($this->quality);
+            $this->original_quality_name = $this->get_quality_name($this->original_quality);
+        }
+
+        /**
+         * Gets a stat name from the mappings.
+         *
+         * @param int $stat Stat id.
+         * @return string Stat name (Uppercase)
+         */
+        private function stat_name($stat){
+            switch ($stat){
+                case ARTIFACT_STAT_ID::HP:
+                    return "HP";
+                case ARTIFACT_STAT_ID::ATK:
+                    return "ATK";
+                case ARTIFACT_STAT_ID::DEF:
+                    return "DEF";
+                default:
+                    return "";
+            }
+        }
+
+        /**
+         * Composes an effect description.
+         *
+         * @param int $effect Effect id.
+         * @param int $value Effect value.
+         * @return string Effect description, null if unavailable.
+         * @global resource Database connection.
+         */
+        private function effect_description($effect, $value){
+
+            global $db;
+
+            $s =
+              "SELECT name " .
+              "FROM k_artifact_effect " .
+              "WHERE id = '$effect'; ";
+            $q = $db->query($s);
+            $r = $q->fetchArray(SQLITE3_ASSOC);
+            if ($r){
+                return str_replace("{}", $value, $r["name"]);
+            }
+            else{
+                return null;
+            }
+        }
+
+        /**
+         * Gets the quality name from the mappings.
+         *
+         * @param int $q Quality id.
+         * @return string Quality (Uppercase)
+         */
+        private function get_quality_name($q){
+            switch ($q){
+                case QUALITY_ID::NORMAL:
+                    return "NORMAL";
+                case QUALITY_ID::MAGIC:
+                    return "MAGIC";
+                case QUALITY_ID::RARE:
+                    return "RARE";
+                case QUALITY_ID::HERO:
+                    return "HERO";
+                case QUALITY_ID::LEGEND:
+                    return "LEGEND";
+                default:
+                    return "";
+            }
+        }
+
+    }
+?>

+ 9 - 83
application/entity/K_Area.php

@@ -101,93 +101,19 @@
             elseif ($this->type == AREA_TYPE_ID::CAIROS_DUNGEON && APPLICATION::valid_id("DUNGEON_ID", $this->id)){
                 switch ($this->id){
                     case DUNGEON_ID::GIANTS_KEEP:
-                        switch ($stage){
-                            case 1:
-                            case 6:
-                                // Light
-                                return APPLICATION::img("UNIT", 60204);
-                                break;
-                            case 2:
-                            case 7:
-                                // Dark
-                                return APPLICATION::img("UNIT", 60204);
-                                break;
-                            case 3:
-                            case 8:
-                                // Wind
-                                return APPLICATION::img("UNIT", 60203);
-                                break;
-                            case 4:
-                            case 9:
-                                // Fire
-                                return APPLICATION::img("UNIT", 60202);
-                                break;
-                            case 5:
-                            case 10:
-                                // Water
-                                return APPLICATION::img("UNIT", 60201);
-                                break;
-                        }
+                        return APPLICATION::img("UNIT", 60201);
                         break;
                     case DUNGEON_ID::DRAGONS_LAIR:
-                        switch ($stage){
-                            case 1:
-                            case 6:
-                                // Wind
-                                return APPLICATION::img("UNIT", 60303);
-                                break;
-                                break;
-                            case 2:
-                            case 7:
-                                // Light
-                                return APPLICATION::img("UNIT", 60304);
-                                break;
-                            case 3:
-                            case 8:
-                                // Water
-                                return APPLICATION::img("UNIT", 60301);
-                                break;
-                            case 4:
-                            case 9:
-                                // Dark
-                                return APPLICATION::img("UNIT", 60305);
-                                break;
-                            case 5:
-                            case 10:
-                                // Fire
-                                return APPLICATION::img("UNIT", 60302);
-                                break;
-                        }
+                        return APPLICATION::img("UNIT", 60302);
                         break;
                     case DUNGEON_ID::NECROPOLIS:
-                        switch ($stage){
-                            case 1:
-                            case 6:
-                                // Water
-                                return APPLICATION::img("UNIT", 62101);
-                                break;
-                                break;
-                            case 2:
-                            case 7:
-                                // Fire
-                                return APPLICATION::img("UNIT", 62102);
-                                break;
-                            case 3:
-                            case 8:
-                                // Wind
-                                return APPLICATION::img("UNIT", 62103);
-                                break;
-                            case 4:
-                            case 9:
-                                // Light
-                                return APPLICATION::img("UNIT", 62104);
-                                break;
-                            case 5:
-                            case 10:
-                                // Dark
-                                return APPLICATION::img("UNIT", 62105);
-                                break;
-                        }
+                        return APPLICATION::img("UNIT", 62105);
+                        break;
+                    case DUNGEON_ID::STEEL_FORTRESS:
+                        return APPLICATION::img("UNIT", 62105); // TODO: Correct image.
+                        break;
+                    case DUNGEON_ID::PUNISHERS_CRYPT:
+                        return APPLICATION::img("UNIT", 62105); // TODO: Correct image.
                         break;
                     case DUNGEON_ID::HALL_OF_WATER:
                         return APPLICATION::img("UNIT", 60101);

+ 11 - 2
application/entity/Run.php

@@ -195,9 +195,18 @@
             elseif (APPLICATION::valid_id("ELEMENTAL_RIFT_DUNGEON_ID", $r["area"]) && $r["stage"] < 1){
                 $type = AREA_TYPE_ID::RIFT_DUNGEON;
             }
-            elseif (APPLICATION::valid_id("DUNGEON_ID", $r["area"])){
+            elseif (APPLICATION::valid_id("CAIROS_DUNGEON_ID", $r["area"])){
                 $type = AREA_TYPE_ID::CAIROS_DUNGEON;
             }
+            elseif (APPLICATION::valid_id("DIMENSION_DUNGEON_ID", $r["area"])){
+                if ($this->id == 1486){
+                    error_log("VALID AREA ID: " . $r["area"] . ", " . AREA_TYPE_ID::DIMENSIONAL_HOLE);
+                }
+                $type = AREA_TYPE_ID::DIMENSIONAL_HOLE;
+            }
+            if ($this->id == 1486){
+                error_log("INSTANCING DH AREA: " . $r["area"] . ", " . $type);
+            }
             $this->area = new K_Area($r["area"], $type);
             $this->stage = $r["stage"];
             $this->difficulty = $r["difficulty"];
@@ -213,7 +222,7 @@
                 SELECT
                   unit,
                   k_unit,
-                  (SELECT count(id) FROM unit WHERE unit.unit = k_unit) AS owned,
+                  (SELECT count(id) FROM unit WHERE unit.id = run_party.unit) AS owned,
                   leader,
                   front
                 FROM run_party

+ 99 - 58
application/entity/Unit.php

@@ -14,6 +14,7 @@
     require_once(PATH::ENTITY . "K_Unit.php");
     require_once(PATH::ENTITY . "Team.php");
     require_once(PATH::ENTITY . "Rune.php");
+    require_once(PATH::ENTITY . "Artifact.php");
     require_once(PATH::ENTITY . "Building.php");
 
     /**
@@ -185,6 +186,16 @@
          */
         public $rune = [];
 
+        /**
+         * @var Artifact Type artifact equipped.
+         */
+        public $artifact_type;
+
+        /**
+         * @var Artifact Elemental artifact equipped.
+         */
+        public $artifact_element;
+
         /**
          * @var \Team[] The Teamss the unit is on.
          */
@@ -263,65 +274,68 @@
               "  id = '$id'; ";
             $q = $db->query($s);
             $r = $q->fetchArray(SQLITE3_ASSOC);
-            $this->uid = $r["uid"];
-            $this->id = $r["id"];
-            if ($r["building"] != null && $r["building"] > 0){
-                $this->building = new Building($r["building"]);
-            }
-            if (strlen($r["unit"]) > 0){
-                $this->unit = new K_Unit($r["unit"], $complete);
-            }
-            $this->stars = $r["stars"];
-            $this->level = $r["level"];
-            $this->hp = $r["hp"];
-            $this->attack = $r["attack"];
-            $this->defense = $r["defense"];
-            $this->speed = $r["speed"];
-            $this->crit_rate = $r["crit_rate"];
-            $this->crit_damage = $r["crit_damage"];
-            $this->resistance = $r["resistance"];
-            $this->accuracy = $r["accuracy"];
-            $this->experience = $r["experience"];
-            $this->exp_gained = $r["exp_gained"];
-            $this->exp_gain_rate = $r["exp_gain_rate"];
-            $this->costume = $r["costume"];
-            $this->source = new K_Source($r["source"]);
-            $this->create_time = date_create($r["create_time"]);
-            $this->homunculus_name = $r["homunculus_name"];
-            if ($complete){
-                $this->load_runes();
-                $this->load_teams();
-                $this->check_storage();
-                $this->lock = $r["lock"];
-                $s =
-                  "SELECT level " .
-                  "FROM " .
-                  "  unit_skill, " .
-                  "  k_skill " .
-                  "WHERE " .
-                  "  k_skill.id = unit_skill.skill AND " .
-                  "  unit = '$this->id' " .
-                  "ORDER BY slot;";
-                $q = $db->query($s);
-                while ($r = $q->fetchArray(SQLITE3_ASSOC)){
-                    array_push($this->skill_levels, $r["level"]);
+            if ($r){
+                $this->uid = $r["uid"];
+                $this->id = $r["id"];
+                if ($r["building"] != null && $r["building"] > 0){
+                    $this->building = new Building($r["building"]);
+                }
+                if (strlen($r["unit"]) > 0){
+                    $this->unit = new K_Unit($r["unit"], $complete);
+                }
+                $this->stars = $r["stars"];
+                $this->level = $r["level"];
+                $this->hp = $r["hp"];
+                $this->attack = $r["attack"];
+                $this->defense = $r["defense"];
+                $this->speed = $r["speed"];
+                $this->crit_rate = $r["crit_rate"];
+                $this->crit_damage = $r["crit_damage"];
+                $this->resistance = $r["resistance"];
+                $this->accuracy = $r["accuracy"];
+                $this->experience = $r["experience"];
+                $this->exp_gained = $r["exp_gained"];
+                $this->exp_gain_rate = $r["exp_gain_rate"];
+                $this->costume = $r["costume"];
+                $this->source = new K_Source($r["source"]);
+                $this->create_time = date_create($r["create_time"]);
+                $this->homunculus_name = $r["homunculus_name"];
+                if ($complete){
+                    $this->load_runes();
+                    $this->load_artifacts();
+                    $this->load_teams();
+                    $this->check_storage();
+                    $this->lock = $r["lock"];
+                    $s =
+                      "SELECT level " .
+                      "FROM " .
+                      "  unit_skill, " .
+                      "  k_skill " .
+                      "WHERE " .
+                      "  k_skill.id = unit_skill.skill AND " .
+                      "  unit = '$this->id' " .
+                      "ORDER BY slot;";
+                    $q = $db->query($s);
+                    while ($r = $q->fetchArray(SQLITE3_ASSOC)){
+                        array_push($this->skill_levels, $r["level"]);
+                    }
+                    $s =
+                      "SELECT exp " .
+                      "FROM k_experience " .
+                      "WHERE " .
+                      "  stars = $this->stars AND " .
+                      "  level = $this->level;";
+                    $q = $db->query($s);
+                    $r = $q->fetchArray(SQLITE3_ASSOC);
+                    $this->experience_level = $r["exp"];
+                    $this->experience_level_up = $r["exp"] - $this->exp_gained;
+                }
+                if ($this->unit->homunculus){
+                    $this->title = $this->homunculus_name;
+                }
+                else{
+                    $this->title = $this->unit->title;
                 }
-                $s =
-                  "SELECT exp " .
-                  "FROM k_experience " .
-                  "WHERE " .
-                  "  stars = $this->stars AND " .
-                  "  level = $this->level;";
-                $q = $db->query($s);
-                $r = $q->fetchArray(SQLITE3_ASSOC);
-                $this->experience_level = $r["exp"];
-                $this->experience_level_up = $r["exp"] - $this->exp_gained;
-            }
-            if ($this->unit->homunculus){
-                $this->title = $this->homunculus_name;
-            }
-            else{
-                $this->title = $this->unit->title;
             }
         }
 
@@ -414,6 +428,33 @@
             $this->rune_hp = ceil($this->rune_hp);
         }
 
+        /**
+         * Loads the information about the equiped artifacts. 
+         * It is autoatically called at construction time if the
+         * $complete parameter is true (by default). No point in calling it
+         * twice.
+         *
+         * @global resource Database connection.
+         */
+        public function load_artifacts(){
+            global $db;
+            $s =
+              "SELECT id " .
+              "FROM artifact " .
+              "WHERE assigned_to = '$this->id'; ";
+            $q = $db->query($s);
+            while ($r = $q->fetchArray(SQLITE3_ASSOC)){
+                $artifact = new Artifact($r["id"]);
+                if ($artifact->type == ARTIFACT_TYPE::ARCHETYPE){
+                    $this->artifact_type = $artifact;
+                }
+                else{
+                    $this->artifact_element = $artifact;
+                }
+                $this->sum_rune_stat($artifact->main_stat, $artifact->main_stat_value);
+            }
+        }
+
         /**
          * Calculates the stat increase by a rune property.
          * 

+ 187 - 1
application/helper/HTML_Helper.php

@@ -18,6 +18,7 @@
     require_once(PATH::ENTITY . "Decoration.php");
     require_once(PATH::ENTITY . "K_Decoration.php");
     require_once(PATH::ENTITY . "Rune.php");
+    require_once(PATH::ENTITY . "Artifact.php");
     require_once(PATH::ENTITY . "Rune_Craft.php");
     require_once(PATH::ENTITY . "Inventory.php");
 
@@ -297,7 +298,7 @@
             $html .= "</tr>\n";
             $html .= "<tr>\n";
             $html .= "<td class='title'>\n";
-            $html .= "Origina q.:\n";
+            $html .= "Original q.:\n";
             $html .= "</td>\n";
             $html .= "<td class='value'>\n";
             $html .= "<span class='quality quality_" . strtolower($rune->original_quality_name) . "'>\n";
@@ -344,6 +345,191 @@
             return $html;
         }
 
+        // TODO: Icon and background selection must go in the entity code.
+        /**
+         * Generates an artifact panel.
+         * 
+         * @param Artifact artifact Entity to get the info from.
+         * @param Unit unit Optional. The unit the artifact is assigned to.
+         * @return string HTML content for an artifact panel. Empty on error.
+         */
+        public static function artifact_panel($artifact, $unit = null) {
+            if (!($artifact instanceof Artifact)){
+                return "";
+            }
+            $html = "";
+            $html .= "<div class='artifact_panel artifact_level_" . $artifact->level . " artifact_quality_" . strtolower($artifact->quality_name) . " artifact_original_quality_" . strtolower($artifact->original_quality_name) . " '>\n";
+            $background = "";
+            $icon = "";
+            if ($artifact->type == ARTIFACT_TYPE::ARCHETYPE){
+                $background = URL::IMG["ARTIFACT"] . "type_" . strtolower($artifact->quality_name) . ".png";
+                $icon = URL::IMG["ARTIFACT"] . "type_";
+                switch ($artifact->type){
+                    case ARCHETYPE_ID::ATTACK:
+                        $icon .= "attack";
+                        break;
+                    case ARCHETYPE_ID::DEFENSE:
+                        $icon .= "defense";
+                        break;
+                    case ARCHETYPE_ID::HP:
+                        $icon .= "hp";
+                        break;
+                    case ARCHETYPE_ID::SUPPORT:
+                        $icon .= "support";
+                        break;
+                }
+                $icon .= ".png";
+            }
+            else{
+                $background = URL::IMG["ARTIFACT"] . "element_" . strtolower($artifact->quality_name) . ".png";
+                $icon = URL::IMG["ARTIFACT"] . "element_";
+                switch ($artifact->element){
+                    case ELEMENT_ID::WATER:
+                        $icon .= "water";
+                        break;
+                    case ELEMENT_ID::WIND:
+                        $icon .= "wind";
+                        break;
+                    case ELEMENT_ID::FIRE:
+                        $icon .= "fire";
+                        break;
+                    case ELEMENT_ID::LIGHT:
+                        $icon .= "light";
+                        break;
+                    case ELEMENT_ID::DARK:
+                        $icon .= "dark";
+                        break;
+                }
+                $icon .= ".png";
+            }
+            $html .= "<img class='artifact_base' src='" . $background . "'/>\n";
+            $html .= "<img class='artifact_icon' src='" . $icon . "'/>\n";
+            $html .= "<span class='artifact_stars'>\n";
+            $html .= "</span>\n";
+            $html .= "<span class='artifact_level'>\n";
+            $html .= $artifact->level . "\n";
+            $html .= "</span>\n";
+            $html .= "</div>\n";
+            if ($unit instanceof Unit){
+                $html .= "<div class='assigned'>\n";
+                $html .= "<a target='blank' href='/monsters/" . $unit->id . "'>\n";
+                $html .= "<img title='" . $unit->title . "' class='monster_image border_" . $unit->unit->element_name . "' src='" . $unit->unit->get_image() . "'/>\n";
+                $html .= "</a>\n";
+                $html .= "</div>\n";
+            }
+            return $html;
+        }
+
+        /**
+         * Generates a artifact table.
+         * 
+         * @param Artifact artifact Entity to get the info from.
+         * @param Unit unit Optional. The unit the artifact is assigned to.
+         * @return string HTML content for a artifact table. Empty on error.
+         */
+        public static function artifact_table($artifact, $unit = null) {
+            if (!($artifact instanceof Artifact)){
+                return "";
+            }
+            $html = "";
+            $html .= "<table class='artifact' id='artifact-" . $artifact->id . "'>\n";
+            $html .= "<tr>\n";
+            $html .= "<td class='icon'>\n";
+            $html .= HTML::artifact_panel($artifact, $unit) . "\n";
+            $html .= "</td>\n";
+            $html .= "<td class='effects'>\n";
+            $html .= "<table>\n";
+            // Main stat
+            $html .= "<tr class='effect main_stat'>\n";
+            $html .= "<td class='effect'>\n";
+            $stat_name = $artifact->main_stat_name;
+            $stat_value = "+ " . $artifact->main_stat_value;
+            $html .= $stat_name . "\n";
+            $html .= $stat_value . "\n";
+            $html .= "</td>\n";
+            $html .= "</tr>\n";
+            $effects = array($artifact->effect_1_description, $artifact->effect_2_description, $artifact->effect_3_description, $artifact->effect_4_description);
+            for ($i = 0; $i < 4; $i ++){
+                $html .= "<tr class='effect'>\n";
+                $html .= "<td class='effect'>\n";
+                $html .= $effects[$i];
+                $html .= "</td>\n";
+                $html .= "</tr>\n";
+            }
+            $html .= "</table>\n";
+            $html .= "</td>\n";
+            // Details
+            /* TODO: Only quaity data, and for that the icon is enough
+            $html .= "<td class='details'>\n";
+            $html .= "<table class='table_details'>\n";
+            $html .= "<tr>\n";
+            $html .= "<td class='title'>\n";
+            $html .= "Quality:\n";
+            $html .= "</td>\n";
+            $html .= "<td class='value'>\n";
+            $html .= "<span class='quality quality_" . strtolower($artifact->quality_name) . "'>\n";
+            $html .= $artifact->quality_name . "\n";
+            $html .= "</span>\n";
+            $html .= "</td>\n";
+            $html .= "</tr>\n";
+            $html .= "<tr>\n";
+            $html .= "<td class='title'>\n";
+            $html .= "Original q.:\n";
+            $html .= "</td>\n";
+            $html .= "<td class='value'>\n";
+            $html .= "<span class='quality quality_" . strtolower($artifact->original_quality_name) . "'>\n";
+            $html .= $artifact->original_quality_name . "\n";
+            $html .= "</span>\n";
+            $html .= "</td>\n";
+            $html .= "</tr>\n";
+            $html .= "<tr>\n";
+            $html .= "<td class='title'>\n";
+            // TODO: No data on value yet
+            $html .= ""; //"Value:\n";
+            $html .= "</td>\n";
+            $html .= "<td class='value'>\n";
+            // TODO: No data on value yet
+            $html .= ""; //number_format($artifact->value, 0, ".", ",") . "\n";
+            $html .= "</td>\n";
+            $html .= "</tr>\n";
+            $html .= "<tr>\n";
+            $html .= "<td class='title'>\n";
+            // TODO: No data on efficiencies yet
+            $html .= ""; //"Efficiency:\n";
+            $html .= "</td>\n";
+            $html .= "<td class='value'>\n";
+            // TODO: No data on efficiencies yet
+            $html .= ""; //number_format($artifact->efficiency, 2, ".", ",") . "%\n";
+            $html .= "</td>\n";
+            $html .= "</tr>\n";
+            $html .= "<tr>\n";
+            $html .= "<td class='title'>\n";
+            // TODO: No data on efficiencies yet
+            $html .= ""; //"Max. eff.:\n";
+            $html .= "</td>\n";
+            $html .= "<td class='value'>\n";
+            // TODO: No data on efficiencies yet
+            $html .= ""; //number_format($artifact->max_efficiency, 2, ".", ",") . "%\n";
+            $html .= "</td>\n";
+            $html .= "</tr>\n";
+            $html .= "<tr>\n";
+            $html .= "<td class='title'>\n";
+            // TODO: No data on efficiencies yet
+            $html .= ""; //"Reached. eff.:\n";
+            $html .= "</td>\n";
+            $html .= "<td class='value'>\n";
+            // TODO: No data on efficiencies yet
+            $html .= ""; //number_format($artifact->efficiency * 100 / $artifact->max_efficiency, 2, ".", ",") . "%\n";
+            $html .= "</td>\n";
+            $html .= "</tr>\n";
+            $html .= "</table>\n";
+            */
+            $html .= "</td>\n";
+            $html .= "</tr>\n";
+            $html .= "</table>\n";
+            return $html;
+        }
+
         /**
          * Generates a grindstone or gem panel.
          * 

+ 246 - 0
application/page/Artifacts_Page.php

@@ -0,0 +1,246 @@
+ <?php
+ 
+    /**
+     * Artifact list page file.
+     *
+     * Provides a class with all the properties and methods to display the page.
+     *
+     * @category Page
+     */
+
+    /**
+     * Require dependent files if not present.
+     */
+    require_once(PATH::PAGE . "Page.php");
+    require_once(PATH::ENTITY . "Custom_Filter.php");
+    require_once(PATH::ENTITY . "Artifact.php");
+    require_once(PATH::ENTITY . "Unit.php");
+
+    /**
+     * Artifact list page model.
+     *
+     * @category Page
+     */
+    class Artifacts_Page extends Page{
+
+        /**
+         * @var \Artifact[] Artiffacts to show.
+         *
+         * In this case, the monster member is not the id, but a monster
+         * instance.
+         */
+        public $artifacts = [];
+
+        /**
+         * @var \Filter[] Custom filters for this page.
+         */
+        public $custom_filters = [];
+
+        /**
+         * Constructor.
+         *
+         * Retrieves the data and initializes the variables.
+         *
+         * @global int Player ID.
+         * @global resource Database connection.
+         */
+        public function __construct(){
+            global $UID;
+            global $db;
+            $this->view = PATH::VIEW . "artifacts.php";
+            $this->parse_filters();
+            if (!isset($_GET["custom_filter"])){
+                $s = $this->build_query();
+            }
+            else{
+                $s = $this->build_custom_query($_GET["custom_filter"]);
+            }
+            $q = $db->query($s);
+            while ($r = $q->fetchArray(SQLITE3_ASSOC)){
+                $artifact = new Artifact($r["id"]);
+                if (strlen($artifact->assigned_to) > 0){
+                    $artifact->assigned_to = new Unit($artifact->assigned_to, false);
+                }
+                array_push($this->artifacts, $artifact);
+            }
+            $s = "
+              SELECT id
+              FROM filter
+              WHERE
+                uid = '$UID' AND
+                page = 'ARTIFACTS';
+            ";
+            $q = $db->query($s);
+            while ($r = $q->fetchArray(SQLITE3_ASSOC)){
+                array_push($this->custom_filters, new Custom_Filter($r["id"]));
+            }
+            $this->title = "Artifacts - SWDB";
+            $this->description = "Artifact inventory";
+            $this->canonical = URL::BASE . "artifacts/";
+        }
+
+        /**
+         * Parses the request looking for the selected filters, validates them
+         * and adds them to the $filters array.
+         */
+        private function parse_filters(){
+            $this->filters = FILTER::ARTIFACT;
+            if (isset($_GET["element"])){
+                $elements = $_GET["element"];
+                foreach ($elements as $element){
+                    array_push($this->filters["ELEMENT"], intval($element));
+                }
+            }
+            if (isset($_GET["archetype"])){
+                $archetypes = $_GET["archetype"];
+                foreach ($archetypes as $archetype){
+                    array_push($this->filters["ARCHETYPE"], intval($archetype));
+                }
+            }
+            if (isset($_GET["main_stat"])){
+                $mains = $_GET["main_stat"];
+                foreach ($mains as $main){
+                    array_push($this->filters["MAIN"], intval($main));
+                }
+            }
+            if (isset($_GET["min_level"]) && intval($_GET["min_level"]) >= 0 && intval($_GET["min_level"]) <= 15){
+                $this->filters["MIN_LEVEL"] = $_GET["min_level"];
+            }
+            if (isset($_GET["max_level"]) && intval($_GET["max_level"]) >= 0 && intval($_GET["max_level"]) <= 15){
+                $this->filters["MAX_LEVEL"] = $_GET["max_level"];
+            }
+            if (isset($_GET["min_quality"]) && intval($_GET["min_quality"]) >= QUALITY_ID::NORMAL && intval($_GET["min_quality"]) <= QUALITY_ID::LEGEND){
+                $this->filters["MIN_QUALITY"] = $_GET["min_quality"];
+            }
+            if (isset($_GET["max_quality"]) && intval($_GET["max_quality"]) >= QUALITY_ID::NORMAL && intval($_GET["max_quality"]) <= QUALITY_ID::LEGEND){
+                $this->filters["MAX_QUALITY"] = $_GET["max_quality"];
+            }
+            if (isset($_GET["min_original_quality"]) && intval($_GET["min_original_quality"]) >= QUALITY_ID::NORMAL && intval($_GET["min_original_quality"]) <= QUALITY_ID::LEGEND){
+                $this->filters["MIN_ORIGINAL_QUALITY"] = $_GET["min_original_quality"];
+            }
+            if (isset($_GET["max_original_quality"]) && intval($_GET["max_original_quality"]) >= QUALITY_ID::NORMAL && intval($_GET["max_original_quality"]) <= QUALITY_ID::LEGEND){
+                $this->filters["MAX_ORIGINAL_QUALITY"] = $_GET["max_original_quality"];
+            }
+            if (isset($_GET["assigned"]) && intval($_GET["assigned"]) >= 0 && intval($_GET["assigned"]) <= 4){
+                $this->filters["ASSIGNED"] = $_GET["assigned"];
+            }
+        }
+
+        /**
+         * Builds the query to the artifact table using the a custom filter.
+         * 
+         * @param int $filter Custom filter ID.
+         * @return string The query to be executed.
+         * @global int Player ID.
+         * @global resource Database connection.
+         */
+        private function build_custom_query($filter){
+            global $UID;
+            global $db;
+            $s = "
+              SELECT condition
+              FROM filter
+              WHERE
+                uid = '$UID' AND
+                id = $filter;
+            ";
+            $q = $db->query($s);
+            $r = $q->fetchArray(SQLITE3_ASSOC);
+            $cond = $r["condition"];
+            $s = "
+              SELECT
+                id,
+                assigned_to
+              FROM artifact
+              WHERE uid = '$UID' AND (
+                $cond
+              )
+              ORDER BY slot, type, stars DESC, original_quality DESC, quality DESC, level;
+            ";
+            return $s;
+        }
+
+        /**
+         * Builds the query to the artifact table using the selected or default
+         * filters.
+         * 
+         * @return string The query to be executed.
+         * @global int Player ID.
+         */
+        private function build_query(){
+            global $UID;
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  assigned_to " .
+              "FROM artifact " .
+              "WHERE " .
+              "  uid = '$UID' AND " .
+              "  level >= " . $this->filters["MIN_LEVEL"] . " AND " .
+              "  level <= " . $this->filters["MAX_LEVEL"] . " AND " .
+              "  quality >= " . $this->filters["MIN_QUALITY"] . " AND " .
+              "  quality <= " . $this->filters["MAX_QUALITY"] . " AND " .
+              "  original_quality >= " . $this->filters["MIN_ORIGINAL_QUALITY"] . " AND " .
+              "  original_quality <= " . $this->filters["MAX_ORIGINAL_QUALITY"] . " AND " .
+              "  efficiency >= " . $this->filters["MIN_EFFICIENCY"] . " AND " .
+              "  efficiency <= " . $this->filters["MAX_EFFICIENCY"] . " AND " .
+              "  max_efficiency >= " . $this->filters["MIN_MAX_EFFICIENCY"] . " AND " .
+              "  max_efficiency <= " . $this->filters["MAX_MAX_EFFICIENCY"] . " ";
+            if (count($this->filters["MAIN"]) > 0){
+                $s = $s . " AND main_stat IN ( ";
+                foreach($this->filters["MAIN"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1) ";
+            }
+            if (count($this->filters["ELEMENT"]) == 0 && count($this->filters["ARCHETYPE"]) == 0){
+                // No element/archetype conditions
+            }
+            elseif (count($this->filters["ELEMENT"]) > 0 && count($this->filters["ARCHETYPE"]) == 0){
+                // Only selected elements
+                $s = $s . " AND attribute IN ( ";
+                foreach($this->filters["ELEMENT"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1) ";
+            }
+            elseif (count($this->filters["ELEMENT"]) == 0 && count($this->filters["ARCHETYPE"]) > 0){
+                // Only selected types
+                $s = $s . " AND archetype IN ( ";
+                foreach($this->filters["ARCHETYPE"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1) ";
+            }
+            elseif (count($this->filters["ELEMENT"]) > 0 && count($this->filters["ARCHETYPE"]) > 0){
+                // Selected elements and selected types
+                $s = $s . " AND (archetype IN ( ";
+                foreach($this->filters["ARCHETYPE"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1) OR attribute IN ( ";
+                foreach($this->filters["ELEMENT"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1)) ";
+            }
+            switch ($this->filters["ASSIGNED"]){
+                case 1:
+                    $s = $s . " AND assigned_to IS NOT NULL ";
+                    break;
+                case 2:
+                    $s = $s . " AND assigned_to IS NULL ";
+                    break;
+                case 3:
+                    $s = $s . " AND (assigned_to IS NULL OR assigned_to IN (SELECT DISTINCT id FROM unit WHERE building <> " . BUILDING_ID::MONSTER_STORAGE . ")) ";
+                    break;
+                case 4:
+                    $s = $s . " AND assigned_to IN (SELECT DISTINCT id FROM unit WHERE building <> " . BUILDING_ID::MONSTER_STORAGE . ") ";
+                    break;
+            }
+            $s = $s . " ORDER BY type, attribute, archetype, level DESC, original_quality DESC;";
+            error_log($s);
+            return $s;
+        }
+    }
+?>

+ 289 - 0
application/page/Enchantments_Page.php

@@ -0,0 +1,289 @@
+ <?php
+ 
+    /**
+     * Enchantment list page file.
+     *
+     * Provides a class with all the properties and methods to display the page.
+     *
+     * @category Page
+     */
+
+    /**
+     * Require dependent files if not present.
+     */
+    require_once(PATH::PAGE . "Page.php");
+    require_once(PATH::ENTITY . "Custom_Filter.php");
+    require_once(PATH::ENTITY . "Rune_Craft.php");
+
+    /**
+     * Enchantment list page model.
+     *
+     * @category Page
+     */
+    class Enchantments_Page extends Page{
+
+        /**
+         * @var \Rune_Craft[] Owned enchantment gems.
+         */
+        public $gems = [];
+
+        /**
+         * @var \Rune_Craft[] Owned enchantment grindstones.
+         */
+        public $grindstones = [];
+
+        /**
+         * @var \Filter[] Custom filters for this page.
+         */
+        public $custom_filters = [];
+
+        /**
+         * Constructor.
+         *
+         * Retrieves the data and initializes the variables.
+         *
+         * @global int Player ID.
+         * @global resource Database connection.
+         */
+        public function __construct(){
+            global $UID;
+            global $db;
+            $this->view = PATH::VIEW . "enchantments.php";
+            $this->parse_filters();
+            if (!isset($_GET["custom_filter"])){
+                $s = $this->build_query();
+            }
+            else{
+                $s = $this->build_custom_query($_GET["custom_filter"]);
+            }
+            $q = $db->query($s);
+            while ($r = $q->fetchArray(SQLITE3_ASSOC)){
+                $enchantment = new Rune_Craft($r["id"]);
+                //if ($enchantment->gem == true){
+                //   array_push($this->gems, $enchantment);
+                //}
+                //else{
+                    array_push($this->grindstones, $enchantment);
+                //}
+            }
+            $s = "
+              SELECT id
+              FROM filter
+              WHERE
+                uid = '$UID' AND
+                page = 'ENCHANTMENTS';
+            ";
+            $q = $db->query($s);
+            while ($r = $q->fetchArray(SQLITE3_ASSOC)){
+                array_push($this->custom_filters, new Custom_Filter($r["id"]));
+            }
+            $this->title = "Enchantments - SWDB";
+            $this->description = "Enchantment inventory";
+            $this->canonical = URL::BASE . "enchantments/";
+        }
+
+        /**
+         * Parses the request looking for the selected filters, validates them
+         * and adds them to the $filters array.
+         */
+        private function parse_filters(){
+            $this->filters = FILTER::ENCHANTMENT;
+            if (isset($_GET["min_quality"]) && intval($_GET["min_quality"]) >= QUALITY_ID::NORMAL && intval($_GET["min_quality"]) <= QUALITY_ID::LEGEND){
+                $this->filters["MIN_QUALITY"] = $_GET["min_quality"];
+            }
+            if (isset($_GET["max_quality"]) && intval($_GET["max_quality"]) >= QUALITY_ID::NORMAL && intval($_GET["max_quality"]) <= QUALITY_ID::LEGEND){
+                $this->filters["MAX_QUALITY"] = $_GET["max_quality"];
+            }
+            if (isset($_GET["stat"])){
+                $stats = $_GET["stat"];
+                foreach ($stats as $stat){
+                    array_push($this->filters["STAT"], intval($stat));
+                }
+            }
+            if (isset($_GET["rune"])){
+                $runes = $_GET["rune"];
+                foreach ($runes as $rune){
+                    array_push($this->filters["RUNE"], intval($rune));
+                }
+            }
+            if (isset($_GET["type"])){
+                $types = $_GET["type"];
+                foreach ($types as $type){
+                    array_push($this->filters["TYPE"], $type);
+                }
+            }
+            // TODO
+            /*
+            if (isset($_GET["archetype"])){
+                $archetypes = $_GET["archetype"];
+                foreach ($archetypes as $archetype){
+                    array_push($this->filters["ARCHETYPE"], intval($archetype));
+                }
+            }
+            
+            if (isset($_GET["min_level"]) && intval($_GET["min_level"]) >= 0 && intval($_GET["min_level"]) <= 15){
+                $this->filters["MIN_LEVEL"] = $_GET["min_level"];
+            }
+            if (isset($_GET["max_level"]) && intval($_GET["max_level"]) >= 0 && intval($_GET["max_level"]) <= 15){
+                $this->filters["MAX_LEVEL"] = $_GET["max_level"];
+            }
+            if (isset($_GET["min_original_quality"]) && intval($_GET["min_original_quality"]) >= QUALITY_ID::NORMAL && intval($_GET["min_original_quality"]) <= QUALITY_ID::LEGEND){
+                $this->filters["MIN_ORIGINAL_QUALITY"] = $_GET["min_original_quality"];
+            }
+            if (isset($_GET["max_original_quality"]) && intval($_GET["max_original_quality"]) >= QUALITY_ID::NORMAL && intval($_GET["max_original_quality"]) <= QUALITY_ID::LEGEND){
+                $this->filters["MAX_ORIGINAL_QUALITY"] = $_GET["max_original_quality"];
+            }
+            if (isset($_GET["assigned"]) && intval($_GET["assigned"]) >= 0 && intval($_GET["assigned"]) <= 4){
+                $this->filters["ASSIGNED"] = $_GET["assigned"];
+            }*/
+        }
+
+        /**
+         * Builds the query to the artifact table using the a custom filter.
+         * 
+         * @param int $filter Custom filter ID.
+         * @return string The query to be executed.
+         * @global int Player ID.
+         * @global resource Database connection.
+         */
+        private function build_custom_query($filter){
+            global $UID;
+            global $db;
+            $s = "
+              SELECT condition
+              FROM filter
+              WHERE
+                uid = '$UID' AND
+                id = $filter;
+            ";
+            $q = $db->query($s);
+            $r = $q->fetchArray(SQLITE3_ASSOC);
+            $cond = $r["condition"];
+            $s = "
+              SELECT
+                id
+              FROM rune_craft
+              WHERE uid = '$UID' AND (
+                $cond
+              )
+              ORDER BY type, rune DESC, quality DESC;
+            ";
+            return $s;
+        }
+
+        /**
+         * Builds the query to the artifact table using the selected or default
+         * filters.
+         * 
+         * @return string The query to be executed.
+         * @global int Player ID.
+         */
+        private function build_query(){
+            global $UID;
+            $s = "
+              SELECT id
+              FROM rune_craft
+              WHERE
+                uid = '$UID' AND
+                quality >= " . $this->filters["MIN_QUALITY"] . " AND
+                quality <= " . $this->filters["MAX_QUALITY"] . "
+            ";
+            if (count($this->filters["STAT"]) > 0){
+                $s = $s . " AND stat IN ( ";
+                foreach($this->filters["STAT"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1) ";
+            }
+            if (count($this->filters["RUNE"]) > 0){
+                $s = $s . " AND (rune IN ( ";
+                foreach($this->filters["RUNE"] as $t){
+                    $s = $s . "'$t', ";
+                }
+                $s = $s . "'DUMMY0') ";
+                if (in_array('0', $this->filters["RUNE"])){
+                    // Include inmemorials
+                    $s .= " OR type in (3, 4)) ";
+                }
+                else{
+                    $s .= ") ";
+                }
+            }
+            error_log( print_r($this->filters["TYPE"], TRUE) );
+            if (count($this->filters["TYPE"]) == 1){
+                // Only one selectd, it's either gems or grindstones
+                if (in_array("GEM", $this->filters["TYPE"])){
+                    $s .= " AND type IN (1, 3, 5) "; // Gems.
+                }
+                else{
+                    $s .= " AND type IN (2, 4, 6) "; // Grindstones.
+                }
+            }
+            $s = $s . "
+              ORDER BY
+                type = 3 DESC,  -- Inmemorial Grindstone
+                type = 4 DESC,  -- Inmemorial Gem
+                rune,
+                type,
+                quality DESC,
+                stat
+            ";
+            /*if (count($this->filters["MAIN"]) > 0){
+                $s = $s . " AND main_stat IN ( ";
+                foreach($this->filters["MAIN"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1) ";
+            }
+            if (count($this->filters["ELEMENT"]) == 0 && count($this->filters["ARCHETYPE"]) == 0){
+                // No element/archetype conditions
+            }
+            elseif (count($this->filters["ELEMENT"]) > 0 && count($this->filters["ARCHETYPE"]) == 0){
+                // Only selected elements
+                $s = $s . " AND attribute IN ( ";
+                foreach($this->filters["ELEMENT"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1) ";
+            }
+            elseif (count($this->filters["ELEMENT"]) == 0 && count($this->filters["ARCHETYPE"]) > 0){
+                // Only selected types
+                $s = $s . " AND archetype IN ( ";
+                foreach($this->filters["ARCHETYPE"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1) ";
+            }
+            elseif (count($this->filters["ELEMENT"]) > 0 && count($this->filters["ARCHETYPE"]) > 0){
+                // Selected elements and selected types
+                $s = $s . " AND (archetype IN ( ";
+                foreach($this->filters["ARCHETYPE"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1) OR attribute IN ( ";
+                foreach($this->filters["ELEMENT"] as $t){
+                    $s = $s . "$t, ";
+                }
+                $s = $s . "-1)) ";
+            }
+            switch ($this->filters["ASSIGNED"]){
+                case 1:
+                    $s = $s . " AND assigned_to IS NOT NULL ";
+                    break;
+                case 2:
+                    $s = $s . " AND assigned_to IS NULL ";
+                    break;
+                case 3:
+                    $s = $s . " AND (assigned_to IS NULL OR assigned_to IN (SELECT DISTINCT id FROM unit WHERE building <> " . BUILDING_ID::MONSTER_STORAGE . ")) ";
+                    break;
+                case 4:
+                    $s = $s . " AND assigned_to IN (SELECT DISTINCT id FROM unit WHERE building <> " . BUILDING_ID::MONSTER_STORAGE . ") ";
+                    break;
+            }
+            $s = $s . " ORDER BY type, attribute, archetype, level DESC, original_quality DESC;";
+            */
+            error_log($s);
+            return $s;
+        }
+    }
+?>

+ 1 - 1
application/page/Report_Skillup_Page.php

@@ -112,7 +112,7 @@
                 unit.uid = '$UID' AND
                 unit.unit = k_unit.id AND
                 unit_skill.unit = unit.id AND
-                unit_skill.skill = k_unit_skill.skill AND
+                --unit_skill.skill = k_unit_skill.skill AND
                 k_unit.id = k_unit_skill.unit AND
                 k_skill.id = k_unit_skill.skill AND
                 k_skill.max_level > 1 AND

BIN
application/sw.sqlite


+ 166 - 0
application/view/artifacts.php

@@ -0,0 +1,166 @@
+<?php
+    /**
+     * Artifacts view.
+     *
+     * Contains the view layout and ome code to present the data.
+     *
+     * @category View
+     * @property_read Artifacts_Page $page The page model.
+     */
+?>
+<!DOCTYPE html>
+<html lang='en'>
+    <head>
+        <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
+        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
+        <title><?=$page->title?></title>
+        <link rel='shortcut icon' href='<?=$page->favicon?>'/>
+        <!-- CSS files -->
+        <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>artifacts.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>filters.css'/>
+        <!-- Meta tags -->
+        <link rel='canonical' href='<?=$page->canonical?>'/>
+        <link rel='author' href='<?=$page->author?>'/>
+        <link rel='publisher' href='<?=$page->author?>'/>
+        <meta name='description' content='<?=$page->description?>'/>
+        <meta property='og:title' content='<?=$page->title?>'/>
+        <meta property='og:url' content='<?=$page->canonical?>'/>
+        <meta property='og:description' content='<?=$page->description?>'/>
+        <meta property='og:image' content='<?=$page->icon?>'/>
+        <meta property='og:site_name' content='<?=$page->name?>'/>
+        <meta property='og:type' content='website'/>
+        <meta property='og:locale' content='en'/>
+        <meta name='twitter:card' content='summary'/>
+        <meta name='twitter:title' content='<?=$page->title?>'/>
+        <meta name='twitter:description' content='<?=$page->description?>'/>
+        <meta name='twitter:image' content='<?=$page->icon?>'/>
+        <meta name='twitter:url' content='<?=$page->canonical?>'/>
+        <meta name='robots' content='index follow'/>
+        <script>
+
+            /**
+             * Shows or hiddes the filters panel.
+             */
+            function toggleFilters(){
+                var content = document.getElementById('filters_content');
+                var slid = document.getElementById('filters_slid');
+                if (content.style.maxHeight != '55em'){
+                    content.style.maxHeight = '55em';
+                    slid.style.transform = 'rotate(90deg)';
+                }
+                else{
+                    content.style.maxHeight = '0px';
+                    slid.style.transform = 'rotate(0deg)';
+                }
+            };
+        </script>
+    </head>
+    <body>
+<?php
+        include __DIR__ . "/inc/header.php";
+?>
+        <section class='filters'>
+            <h2 id='filters_title' onClick='toggleFilters();'>
+                <img id='filters_slid' id='filters_slid' alt=' ' src='<?=URL::IMG["ICON"]?>slid.png'/>
+                Artifact filters
+            </h2>
+            <article id='filters_content'>
+<?php
+                $filters = $page->filters;
+                $custom_filters = $page->custom_filters;
+                include __DIR__ . "/inc/filter_artifacts.php";
+?>
+            </article>
+
+        </section> <!-- #filters -->
+<?php
+            $prev_group = "";
+            $group = "";
+            $group_title = "";
+            $group_image = "";
+            foreach ($page->artifacts as $artifact){
+                $group = $artifact->type . "-" . $artifact->element . "-" . $artifact->archetype;
+                
+                if ($prev_group != $group){
+                    switch ($artifact->type){
+                        case ARTIFACT_TYPE::ELEMENT:
+                            switch ($artifact->element){
+                                case ELEMENT_ID::WATER:
+                                    $group_title = "Water";
+                                    $group_image = URL::IMG["ARTIFACT"] . "element_water.png";
+                                    break;
+                                case ELEMENT_ID::FIRE:
+                                    $group_title = "Fire";
+                                    $group_image = URL::IMG["ARTIFACT"] . "element_fire.png";
+                                    break;
+                                case ELEMENT_ID::WIND:
+                                    $group_title = "Wind";
+                                    $group_image = URL::IMG["ARTIFACT"] . "element_wind.png";
+                                    break;
+                                case ELEMENT_ID::LIGHT:
+                                    $group_title = "Light";
+                                    $group_image = URL::IMG["ARTIFACT"] . "element_light.png";
+                                    break;
+                                case ELEMENT_ID::DARK:
+                                    $group_title = "Dark";
+                                    $group_image = URL::IMG["ARTIFACT"] . "element_dark.png";
+                                    break;
+                            }
+                            break;
+                        case ARTIFACT_TYPE::ARCHETYPE:
+                            switch ($artifact->archetype){
+                                case ARCHETYPE_ID::ATTACK:
+                                    $group_title = "Attack";
+                                    $group_image = URL::IMG["ARTIFACT"] . "type_attack.png";
+                                    break;
+                                case ARCHETYPE_ID::DEFENSE:
+                                    $group_title = "Defense";
+                                    $group_image = URL::IMG["ARTIFACT"] . "type_defense.png";
+                                    break;
+                                case ARCHETYPE_ID::SUPPORT:
+                                    $group_title = "Support";
+                                    $group_image = URL::IMG["ARTIFACT"] . "type_support.png";
+                                    break;
+                                case ARCHETYPE_ID::HP:
+                                    $group_title = "HP";
+                                    $group_image = URL::IMG["ARTIFACT"] . "type_hp.png";
+                                    break;
+                            }
+                    }
+                    if ($prev_group == ""){
+?>
+                        <section class='list'>
+<?php
+                    }
+                    else{
+?>
+                            </article>
+                        </section>
+                        <section class='list'>
+<?php
+                    }
+                    $prev_group = $group;
+?>
+                    <h2>
+                        <img class='group_image_<?=$group?>' alt='<?=$group_title?>' src='<?=$group_image?>'>
+                        <span>
+                            <?=$group_title?>
+                        </span>
+                    </h2>
+                    <article>
+<?php
+                }
+?>
+                <?=HTML::artifact_table($artifact, $artifact->assigned_to)?>
+<?php
+            }
+?>
+            </article> <!-- Close last group -->
+        </section>
+
+<?php
+        include __DIR__ . "/inc/footer.php";
+?>
+    </body>
+</html>

+ 129 - 0
application/view/enchantments.php

@@ -0,0 +1,129 @@
+<?php
+    /**
+     * Artifacts view.
+     *
+     * Contains the view layout and ome code to present the data.
+     *
+     * @category View
+     * @property_read Artifacts_Page $page The page model.
+     */
+?>
+<!DOCTYPE html>
+<html lang='en'>
+    <head>
+        <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
+        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
+        <title><?=$page->title?></title>
+        <link rel='shortcut icon' href='<?=$page->favicon?>'/>
+        <!-- CSS files -->
+        <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>enchantments.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>filters.css'/>
+        <!-- Meta tags -->
+        <link rel='canonical' href='<?=$page->canonical?>'/>
+        <link rel='author' href='<?=$page->author?>'/>
+        <link rel='publisher' href='<?=$page->author?>'/>
+        <meta name='description' content='<?=$page->description?>'/>
+        <meta property='og:title' content='<?=$page->title?>'/>
+        <meta property='og:url' content='<?=$page->canonical?>'/>
+        <meta property='og:description' content='<?=$page->description?>'/>
+        <meta property='og:image' content='<?=$page->icon?>'/>
+        <meta property='og:site_name' content='<?=$page->name?>'/>
+        <meta property='og:type' content='website'/>
+        <meta property='og:locale' content='en'/>
+        <meta name='twitter:card' content='summary'/>
+        <meta name='twitter:title' content='<?=$page->title?>'/>
+        <meta name='twitter:description' content='<?=$page->description?>'/>
+        <meta name='twitter:image' content='<?=$page->icon?>'/>
+        <meta name='twitter:url' content='<?=$page->canonical?>'/>
+        <meta name='robots' content='index follow'/>
+        <script>
+
+            /**
+             * Shows or hiddes the filters panel.
+             */
+            function toggleFilters(){
+                var content = document.getElementById('filters_content');
+                var slid = document.getElementById('filters_slid');
+                if (content.style.maxHeight != '55em'){
+                    content.style.maxHeight = '55em';
+                    slid.style.transform = 'rotate(90deg)';
+                }
+                else{
+                    content.style.maxHeight = '0px';
+                    slid.style.transform = 'rotate(0deg)';
+                }
+            };
+        </script>
+    </head>
+    <body>
+<?php
+        include __DIR__ . "/inc/header.php";
+?>
+        <section class='filters'>
+            <h2 id='filters_title' onClick='toggleFilters();'>
+                <img id='filters_slid' id='filters_slid' alt=' ' src='<?=URL::IMG["ICON"]?>slid.png'/>
+                Artifact filters
+            </h2>
+            <article id='filters_content'>
+<?php
+                $filters = $page->filters;
+                $custom_filters = $page->custom_filters;
+                include __DIR__ . "/inc/filter_enchantments.php";
+?>
+            </article>
+
+        </section> <!-- #filters -->
+<?php
+            $prev_group = "";
+            $group = "";
+            $group_title = "";
+            $group_image = "";
+            foreach ($page->grindstones as $grindstone){
+                //$group = $grindstone->rune->id . "-" . $grindstone->gem . "-" . $grindstone->inmemorial;
+                $group = $grindstone->rune->id . "-" . $grindstone->inmemorial;
+                if ($prev_group != $group){
+                    if ($grindstone->inmemorial == 1){
+                        $group_title = "Inmemorial";
+                        $group_image = URL::IMG["ICON"] . "star.png";
+                    }
+                    else{
+                        $group_title = $grindstone->rune->name;
+                        $group_image = URL::IMG["RUNE"] . str_pad($grindstone->rune->id, 2, '0', STR_PAD_LEFT) . ".png";
+                    }
+                    if ($prev_group == ""){
+?>
+                        <section class='list'>
+<?php
+                    }
+                    else{
+?>
+                            </article>
+                        </section>
+                        <section class='list'>
+<?php
+                    }
+                    $prev_group = $group;
+?>
+                    <h2>
+                        <img class='group_image_<?=$group?>' alt='<?=$group_title?>' src='<?=$group_image?>'>
+                        <span>
+                            <?=$group_title?>
+                        </span>
+                    </h2>
+                    <article>
+<?php
+                }
+?>
+                <?=HTML::craft_panel($grindstone)?>
+<?php
+            }
+?>
+            </article> <!-- Close last group -->
+        </section>
+
+<?php
+        include __DIR__ . "/inc/footer.php";
+?>
+    </body>
+</html>

+ 204 - 0
application/view/inc/filter_artifacts.php

@@ -0,0 +1,204 @@
+<?php
+    /**
+     * Artifact filter view.
+     *
+     * To be included from the artifact view.
+     *
+     * @category View
+     * @property_read mixed[] $filters Selected filters.
+     * @property_read int $page Player ID.
+     */
+
+    if (count($custom_filters) > 0){
+?>
+        <script>
+            /**
+             * Changes the filter description.
+             *
+             * @param id Filter id.
+             */
+            function customFilterDescription(id){
+                switch (id){
+<?php
+                    foreach($custom_filters AS $filter){
+?>
+                        case '<?=$filter->id?>':
+                            document.getElementById("custom_filter_description").style.display = 'block';
+                            document.getElementById("custom_filter_description").innerHTML = '<?=$filter->description?>';
+                            break;
+<?php
+                    }
+?>
+                }
+            }
+        </script>
+        <form action='/<?=$UID?>/artifacts/' method='get' id='custom_filter_artifacts' class='custom_filter'>
+            <span class='custom_filter_title'>Custom filters:</span>
+            <select name='custom_filter' onChange='customFilterDescription(this.value);' onload='customFilterDescription("<?=filter_input(INPUT_GET, 'custom_filter')?>");'>
+                <option> </option>
+<?php
+                 foreach($custom_filters AS $filter){
+                    if (filter_input(INPUT_GET, 'custom_filter') == $filter->id){
+                        $selected = "selected='selected'";
+                    }
+                    else{
+                        $selected = "";
+                    }
+?>
+                    <option value='<?=$filter->id?>' <?=$selected?>><?=$filter->name?></option>
+<?php
+                 }
+?>
+            </select>
+            <input type='submit' value='Apply'/>
+            <p id='custom_filter_description'> </p>
+            <script>
+                customFilterDescription("<?=filter_input(INPUT_GET, 'custom_filter')?>");
+            </script>
+        </form>
+<?php
+    }
+?>
+<form action='/<?=$UID?>/artifacts/' method='get' id='filter_artifacts' class='filter'>
+    <div class='custom_filters'>
+    <table>
+        <tr>
+            <td class='filter'>
+                <span>Element:</span>
+                <select multiple name='element[]' id='filter_element'>
+<?php
+                    $reflect = new ReflectionClass("ELEMENT_ID");
+                    foreach($reflect->getConstants() as $name => $id){
+                        if ($id != ELEMENT_ID::PURE){
+                            $selected = "";
+                            if (in_array($id, $filters["ELEMENT"])){
+                                $selected = "selected='selected'";
+                            }
+?>
+                            <option value='<?=$id?>' <?=$selected?>><?=$name?></option>
+<?php
+                        }
+                    }
+?>
+                </select>
+            </td>
+            <td class='filter'>
+                <span>Type:</span>
+                <select multiple name='archetype[]' id='filter_archetype'>
+<?php
+                    $reflect = new ReflectionClass("ARCHETYPE_ID");
+                    foreach($reflect->getConstants() as $name => $id){
+                        if ($id != ARCHETYPE_ID::NONE && $id != ARCHETYPE_ID::MATERIAL){
+                            $selected = "";
+                            if (in_array($id, $filters["ARCHETYPE"])){
+                                $selected = "selected='selected'";
+                            }
+?>
+                            <option value='<?=$id?>' <?=$selected?>><?=$name?></option>
+<?php
+                        }
+                    }
+?>
+                </select>
+            </td>
+            <td class='filter'>
+                <span>Main stat:</span>
+                <select multiple name='main_stat[]' id='filter_main_stat'>
+<?php
+                    $reflect = new ReflectionClass("ARTIFACT_STAT_ID");
+                    foreach($reflect->getConstants() as $name => $id){
+                        $selected = "";
+                        if (in_array($id, $filters["MAIN"])){
+                            $selected = "selected='selected'";
+                        }
+?>
+                        <option value='<?=$id?>' <?=$selected?>><?=$name?></option>
+<?php
+                    }
+?>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter'>
+                <span>Level:</span>
+                <input type='number' name='min_level' id='filter_level_min' min='0' max='15' value='<?=$filters["MIN_LEVEL"]?>'/>
+                -
+                <input type='number' name='max_level' id='filter_level_max' min='0' max='15' value='<?=$filters["MAX_LEVEL"]?>'/>
+            </td>
+            <td class='filter' colspan='2'>
+                <span>Quality:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["MIN_QUALITY"] - 1] = "selected";
+?>
+                <select name='min_quality' id='filter_quality_min'>
+                    <option value='<?=QUALITY_ID::NORMAL?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=QUALITY_ID::MAGIC?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=QUALITY_ID::RARE?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=QUALITY_ID::HERO?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=QUALITY_ID::LEGEND?>' <?=$selected[4]?>>Legend</option>
+                </select>
+                -
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["MAX_QUALITY"] - 1] = "selected";
+?>
+                <select name='max_quality' id='filter_quality_max'>
+                    <option value='<?=QUALITY_ID::NORMAL?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=QUALITY_ID::MAGIC?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=QUALITY_ID::RARE?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=QUALITY_ID::HERO?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=QUALITY_ID::LEGEND?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter'>
+                <span>
+                    Assigned:
+                </span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["ASSIGNED"]] = "selected";
+?>
+                <select name='assigned' id='filter_assigned'>
+                    <option value='0' <?=$selected[0]?>>All</option>
+                    <option value='1' <?=$selected[1]?>>Assigned</option>
+                    <option value='2' <?=$selected[2]?>>Unassigned</option>
+                    <option value='3' <?=$selected[3]?>>All (no storage)</option>
+                    <option value='4' <?=$selected[4]?>>Assigned (no storage)</option>
+                </select>
+            </td>
+            <td class='filter' colspan='2'>
+                <span>Original quality:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["MIN_ORIGINAL_QUALITY"] - 1] = "selected";
+?>
+                <select name='min_original_quality' id='filter_original_quality_min'>
+                    <option value='<?=QUALITY_ID::NORMAL?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=QUALITY_ID::MAGIC?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=QUALITY_ID::RARE?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=QUALITY_ID::HERO?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=QUALITY_ID::LEGEND?>' <?=$selected[4]?>>Legend</option>
+                </select>
+                -
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["MAX_ORIGINAL_QUALITY"] - 1] = "selected";
+?>
+                <select name='max_original_quality' id='filter_original_quality_max'>
+                    <option value='<?=QUALITY_ID::NORMAL?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=QUALITY_ID::MAGIC?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=QUALITY_ID::RARE?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=QUALITY_ID::HERO?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=QUALITY_ID::LEGEND?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+        </tr>
+    </table>
+    <div id='filter_apply'>
+        <input type='submit' value='Apply'/>
+    </div>
+</form>

+ 161 - 0
application/view/inc/filter_enchantments.php

@@ -0,0 +1,161 @@
+<?php
+    /**
+     * Artifact filter view.
+     *
+     * To be included from the artifact view.
+     *
+     * @category View
+     * @property_read mixed[] $filters Selected filters.
+     * @property_read int $page Player ID.
+     */
+
+    if (count($custom_filters) > 0){
+?>
+        <script>
+            /**
+             * Changes the filter description.
+             *
+             * @param id Filter id.
+             */
+            function customFilterDescription(id){
+                switch (id){
+<?php
+                    foreach($custom_filters AS $filter){
+?>
+                        case '<?=$filter->id?>':
+                            document.getElementById("custom_filter_description").style.display = 'block';
+                            document.getElementById("custom_filter_description").innerHTML = '<?=$filter->description?>';
+                            break;
+<?php
+                    }
+?>
+                }
+            }
+        </script>
+        <form action='/<?=$UID?>/enchantments/' method='get' id='custom_filter_artifacts' class='custom_filter'>
+            <span class='custom_filter_title'>Custom filters:</span>
+            <select name='custom_filter' onChange='customFilterDescription(this.value);' onload='customFilterDescription("<?=filter_input(INPUT_GET, 'custom_filter')?>");'>
+                <option> </option>
+<?php
+                 foreach($custom_filters AS $filter){
+                    if (filter_input(INPUT_GET, 'custom_filter') == $filter->id){
+                        $selected = "selected='selected'";
+                    }
+                    else{
+                        $selected = "";
+                    }
+?>
+                    <option value='<?=$filter->id?>' <?=$selected?>><?=$filter->name?></option>
+<?php
+                 }
+?>
+            </select>
+            <input type='submit' value='Apply'/>
+            <p id='custom_filter_description'> </p>
+            <script>
+                customFilterDescription("<?=filter_input(INPUT_GET, 'custom_filter')?>");
+            </script>
+        </form>
+<?php
+    }
+?>
+<form action='/<?=$UID?>/enchantments/' method='get' id='filter_artifacts' class='filter'>
+    <div class='custom_filters'>
+    <table>
+        <tr>
+            <td class='filter'>
+                <span>Type:</span>
+                <select multiple name='type[]' id='filter_type'>
+<?php
+                    $selected = "";
+                    if (in_array("GRI", $filters["TYPE"])){
+                        $selected = "selected='selected'";
+                    }
+?>
+                    <option value='GRI' <?=$selected?>>Grindstone</option>
+<?php
+                    $selected = "";
+                    if (in_array("GEM", $filters["TYPE"])){
+                        $selected = "selected='selected'";
+                    }
+?>
+                    <option value='GEM' <?=$selected?>>Gem</option>
+                </select>
+            </td>
+            <td class='filter' colspan='2'>
+                <span>Quality:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["MIN_QUALITY"] - 1] = "selected";
+?>
+                <select name='min_quality' id='filter_quality_min'>
+                    <option value='<?=QUALITY_ID::NORMAL?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=QUALITY_ID::MAGIC?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=QUALITY_ID::RARE?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=QUALITY_ID::HERO?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=QUALITY_ID::LEGEND?>' <?=$selected[4]?>>Legend</option>
+                </select>
+                -
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["MAX_QUALITY"] - 1] = "selected";
+?>
+                <select name='max_quality' id='filter_quality_max'>
+                    <option value='<?=QUALITY_ID::NORMAL?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=QUALITY_ID::MAGIC?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=QUALITY_ID::RARE?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=QUALITY_ID::HERO?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=QUALITY_ID::LEGEND?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter'>
+                <span>Rune:</span>
+                <select multiple name='rune[]' id='filter_rune'>
+<?php
+                    $selected = "";
+                    if (in_array(0, $filters["RUNE"])){
+                        $selected = "selected='selected'";
+                    }
+?>
+                    <option value='0' <?=$selected?>>Inmemorial</option>
+<?php
+                    $reflect = new ReflectionClass("RUNE_SET_ID");
+                    foreach($reflect->getConstants() as $name => $id){
+                        $selected = "";
+                        if (in_array($id, $filters["RUNE"])){
+                            $selected = "selected='selected'";
+                        }
+?>
+                        <option value='<?=$id?>' <?=$selected?>><?=$name?></option>
+<?php
+                    }
+?>
+                </select>
+            </td>
+            <td class='filter'>
+                <span>Stat:</span>
+                <select multiple name='stat[]' id='filter_stat'>
+<?php
+                    $reflect = new ReflectionClass("RUNE_STAT_ID");
+                    foreach($reflect->getConstants() as $name => $id){
+                        $selected = "";
+                        if (in_array($id, $filters["STAT"])){
+                            $selected = "selected='selected'";
+                        }
+                        $name_format = ucwords(str_replace("_P", "%", $name));
+?>
+                        <option value='<?=$id?>' <?=$selected?>><?=$name_format?></option>
+<?php
+                    }
+?>
+                </select>
+            </td>
+        </tr>
+    </table>
+    <div id='filter_apply'>
+        <input type='submit' value='Apply'/>
+    </div>
+    </div>
+</form>

+ 1 - 1
application/view/inc/filter_runes.php

@@ -34,7 +34,7 @@
         </script>
         <form action='/<?=$UID?>/runes/' method='get' id='custom_filter_runes' class='custom_filter'>
             <span class='custom_filter_title'>Custom filters:</span>
-            <select name='custom_filter' onChange='customFilterDescription(this.value);' onload='alert("LOAD");customFilterDescription("<?=filter_input(INPUT_GET, 'custom_filter')?>");'>
+            <select name='custom_filter' onChange='customFilterDescription(this.value);' onload='customFilterDescription("<?=filter_input(INPUT_GET, 'custom_filter')?>");'>
                 <option> </option>
 <?php
                  foreach($custom_filters AS $filter){

+ 6 - 0
application/view/inc/header.php

@@ -33,6 +33,12 @@
             <a href='/<?=$UID?>/runes/'>
                 Runes
             </a>
+            <a href='/<?=$UID?>/enchantments/'>
+                Enchantments
+            </a>
+            <a href='/<?=$UID?>/artifacts/'>
+                Artifacts
+            </a>
             <a href='/<?=$UID?>/fusion/'>
                 Fusion
             </a>

+ 7 - 1
application/view/monster.php

@@ -445,9 +445,15 @@
         <section id='runes' class='list'>
             <h2>
                 <span>
-                    Runes
+                    Runes and Artifacts
                 </span>
             </h2>
+            <article>
+                <?=HTML::artifact_table($page->unit->artifact_type)?>
+            </article>
+            <article>
+                <?=HTML::artifact_table($page->unit->artifact_element)?>
+            </article>
 <?php
             $total_efficiency = 0;
             $total_max_efficiency = 0;

+ 9 - 1
application/view/teams.php

@@ -576,7 +576,13 @@
                         break;
                     case '<?=AREA_TYPE_ID::CAIROS_DUNGEON?>':
                         document.getElementById('new_area_stage').style.display = 'inline';
-                        populateStage(10);
+                        var area = document.getElementById('new_area_cairos_dungeon').options[document.getElementById('new_area_cairos_dungeon').selectedIndex].value;
+                        if (area == <?=DUNGEON_ID::GIANTS_KEEP?> || area == <?=DUNGEON_ID::DRAGONS_LAIR?> || area == <?=DUNGEON_ID::NECROPOLIS?>){
+                            populateStage(12);
+                        }
+                        else{
+                            populateStage(10);
+                        }
                         populateDifficulty();
                         break;
                     case '<?=AREA_TYPE_ID::RIFT_DUNGEON?>':
@@ -792,6 +798,8 @@
                                 <option value='<?=DUNGEON_ID::GIANTS_KEEP?>'>Giant&#39;s Keep</option>
                                 <option value='<?=DUNGEON_ID::DRAGONS_LAIR?>'>Dragon&#39;s Lair</option>
                                 <option value='<?=DUNGEON_ID::NECROPOLIS?>'>Necropolis</option>
+                                <option value='<?=DUNGEON_ID::STEEL_FORTRESS?>'>Steel Fortress</option>
+                                <option value='<?=DUNGEON_ID::PUNISHERS_CRYPT?>'>Punisher&#39;s Crypt</option>
                                 <option value='<?=DUNGEON_ID::HALL_OF_MAGIC?>'>Hall of Magic</option>
                                 <option value='<?=DUNGEON_ID::HALL_OF_FIRE?>'>Hall of Fire</option>
                                 <option value='<?=DUNGEON_ID::HALL_OF_WATER?>'>Hall of Water</option>

+ 4 - 4
install

@@ -80,8 +80,8 @@ then
     echo "Key database exist. It will not be overwritten. Use the --clear-keys argument to override."
 else
     echo "Setting up keys..."
-    #rm $SCRIPTPATH/application/sw.sqlite
-    #sqlite3 $SCRIPTPATH/application/sw.sqlite < $SCRIPTPATH/install_data/install_base.sql
+    rm $SCRIPTPATH/application/sw.sqlite
+    sqlite3 $SCRIPTPATH/application/sw.sqlite < $SCRIPTPATH/install_data/install_base.sql
 fi
 
 if [ -f $SCRIPTPATH/data/sw.sqlite ] && [ $clear_data == 0 ]
@@ -89,8 +89,8 @@ then
     echo "User data database exist. It will not be overwritten. Use the --clear-data argument to override."
 else
     echo "Setting up user tables..."
-    #rm $SCRIPTPATH/data/sw.sqlite
-    #sqlite3 $SCRIPTPATH/data/sw.sqlite < $SCRIPTPATH/install_data/install_data.sql
+    rm $SCRIPTPATH/data/sw.sqlite
+    sqlite3 $SCRIPTPATH/data/sw.sqlite < $SCRIPTPATH/install_data/install_data.sql
 fi
 
 echo "All done. You can start the web server by typing ./start_server or edit the config file for the server options"

+ 220 - 128
install_data/install_base.sql

@@ -563,6 +563,52 @@ INSERT INTO k_quality VALUES(2,'Magic');
 INSERT INTO k_quality VALUES(3,'Rare');
 INSERT INTO k_quality VALUES(4,'Hero');
 INSERT INTO k_quality VALUES(5,'Legend');
+CREATE TABLE k_artifact_effect(
+    id INT NOT NULL PRIMARY KEY,
+    name TEXT UNIQUE
+);
+INSERT INTO k_artifact_effect VALUES (200, 'ATK+ Proportional to Lost HP up to {}%');
+INSERT INTO k_artifact_effect VALUES (201, 'DEF+ Proportional to Lost HP up to {}%');
+INSERT INTO k_artifact_effect VALUES (202, 'SPD+ Proportional to Lost HP up to {}%');
+INSERT INTO k_artifact_effect VALUES (203, 'SPD Under Inability +{}%');
+INSERT INTO k_artifact_effect VALUES (204, 'ATK Increasing Effect +{}%');
+INSERT INTO k_artifact_effect VALUES (205, 'DEF Increasing Effect +{}%');
+INSERT INTO k_artifact_effect VALUES (206, 'SPD Increasing Effect +{}%');
+INSERT INTO k_artifact_effect VALUES (207, 'CRIT Rate Increasing Effect +{}%');
+INSERT INTO k_artifact_effect VALUES (208, 'Damage Dealt by Counterattack +{}%');
+INSERT INTO k_artifact_effect VALUES (209, 'Damage Dealt by Attacking Together +{}%');
+INSERT INTO k_artifact_effect VALUES (210, 'Bomb Damage +{}%');
+INSERT INTO k_artifact_effect VALUES (211, 'Damage Dealt by Reflect DMG +{}%');
+INSERT INTO k_artifact_effect VALUES (212, 'Crushing Hit DMG +{}%');
+INSERT INTO k_artifact_effect VALUES (213, 'Damage Received Under Inability -{}%');
+INSERT INTO k_artifact_effect VALUES (214, 'CRIT DMG Received -{}%');
+INSERT INTO k_artifact_effect VALUES (215, 'Life Drain +{}%');
+INSERT INTO k_artifact_effect VALUES (216, 'HP when Revived +{}%');
+INSERT INTO k_artifact_effect VALUES (217, 'Attack Bar when Revived +{}%');
+INSERT INTO k_artifact_effect VALUES (218, 'Additional Damage by {}% of HP');
+INSERT INTO k_artifact_effect VALUES (219, 'Additional Damage by {}% of ATK');
+INSERT INTO k_artifact_effect VALUES (220, 'Additional Damage by {}% of DEF');
+INSERT INTO k_artifact_effect VALUES (221, 'Additional Damage by {}% of SPD');
+INSERT INTO k_artifact_effect VALUES (300, 'Damage Dealt on Fire +{}%');
+INSERT INTO k_artifact_effect VALUES (301, 'Damage Dealt on Water +{}%');
+INSERT INTO k_artifact_effect VALUES (302, 'Damage Dealt on Wind +{}%');
+INSERT INTO k_artifact_effect VALUES (303, 'Damage Dealt on Light +{}%');
+INSERT INTO k_artifact_effect VALUES (304, 'Damage Dealt on Dark +{}%');
+INSERT INTO k_artifact_effect VALUES (305, 'Damage Received from Fire -{}%');
+INSERT INTO k_artifact_effect VALUES (306, 'Damage Received from Water -{}%');
+INSERT INTO k_artifact_effect VALUES (307, 'Damage Received from Wind -{}%');
+INSERT INTO k_artifact_effect VALUES (308, 'Damage Received from Light -{}%');
+INSERT INTO k_artifact_effect VALUES (309, 'Damage Received from Dark -{}%');
+INSERT INTO k_artifact_effect VALUES (400, '[Skill 1] CRIT DMG +{}%');
+INSERT INTO k_artifact_effect VALUES (401, '[Skill 2] CRIT DMG +{}%');
+INSERT INTO k_artifact_effect VALUES (402, '[Skill 3] CRIT DMG +{}%');
+INSERT INTO k_artifact_effect VALUES (403, '[Skill 4] CRIT DMG +{}%');
+INSERT INTO k_artifact_effect VALUES (404, '[Skill 1] Recovery +{}%');
+INSERT INTO k_artifact_effect VALUES (405, '[Skill 2] Recovery +{}%');
+INSERT INTO k_artifact_effect VALUES (406, '[Skill 3] Recovery +{}%');
+INSERT INTO k_artifact_effect VALUES (407, '[Skill 1] Accuracy +{}%');
+INSERT INTO k_artifact_effect VALUES (408, '[Skill 2] Accuracy +{}%');
+INSERT INTO k_artifact_effect VALUES (409, '[Skill 3] Accuracy +{}%');
 CREATE TABLE k_craft(
     id INT NOT NULL PRIMARY KEY,
     name TEXT UNIQUE
@@ -1099,6 +1145,7 @@ INSERT INTO k_effect VALUES(73,'Vampire',1,'Adds HP absorb to attacks');
 INSERT INTO k_effect VALUES(74,'Detonate Continuous Damage',1,'Immediately apply the remaining Continuous Damage, consuming the effect');
 INSERT INTO k_effect VALUES(75,'Absorb ATB',1,'Steal ATB from the enemy and add it to yourself');
 INSERT INTO k_effect VALUES(76,'Buff Bonus Damage',0,'Deals increased damage per positive effect on target monster');
+INSERT INTO k_effect VALUES(77,'Seal',1,'Remove enemy from battle');
 CREATE TABLE k_skill(
     id INT PRIMARY KEY NOT NULL,
     name TEXT NOT NULL,
@@ -1484,7 +1531,7 @@ INSERT INTO k_skill VALUES(6702,'Absorb Mana','Attacks the enemy and recovers th
 INSERT INTO k_skill VALUES(6703,'Absorb Mana','Attacks the enemy and recovers the HP by 30% of the damage dealt. This attack will deal more damage according to your MAX HP.',1,NULL,1,0,0,7,'1.8*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(6705,'Absorb Mana','Attacks the enemy and recovers the HP by 30% of the damage dealt. This attack will deal more damage according to your MAX HP.',1,NULL,1,0,0,7,'1.8*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(6704,'Absorb Mana','Attacks the enemy and recovers the HP by 30% of the damage dealt. This attack will deal more damage according to your MAX HP.',1,NULL,1,0,0,7,'1.8*{ATK} + 0.12*{MAX HP}');
-INSERT INTO k_skill VALUES(6707,'Fill','Recovers the HP of the 2 allies with the lowest HP ratio by 25% and 15%.',2,4,1,0,0,5,'');
+INSERT INTO k_skill VALUES(6707,'Fill','Recovers the HP of the 2 allies with the lowest HP ratio by 25% and 15%.',2,4,1,0,1,5,'');
 INSERT INTO k_skill VALUES(6708,'Block Flow','Extends the time of the beneficial effects and shortens the time of the harmful effects granted on all allies, and recovers their HP by 10% each. The recovery amount increases by 5% per harmful effect or beneficial effect granted on the allies.',2,4,1,0,1,5,'');
 INSERT INTO k_skill VALUES(6710,'Block Flow','Extends the time of the beneficial effects and shortens the time of the harmful effects granted on all allies, and recovers their HP by 10% each. The recovery amount increases by 5% per harmful effect or beneficial effect granted on the allies.',2,4,1,0,1,5,'');
 INSERT INTO k_skill VALUES(6712,'Fanatic','All allies are invincible for 1 turn and gain Immunity for 2 turns.',3,7,1,0,1,3,'');
@@ -1649,17 +1696,17 @@ INSERT INTO k_skill VALUES(6801,'Magic Arrow','Attacks the enemy with a magical
 INSERT INTO k_skill VALUES(6803,'Magic Arrow','Attacks the enemy with a magical arrow which casts various harmful effects according to the attribute relation between you and the enemy. The damage of this effect increases by 15% for each harmful effect on the enemy.',1,NULL,1,0,0,6,'3.7*{ATK}');
 INSERT INTO k_skill VALUES(6805,'Magic Arrow','Attacks the enemy with a magical arrow which casts various harmful effects according to the attribute relation between you and the enemy. The damage of this effect increases by 15% for each harmful effect on the enemy.',1,NULL,1,0,0,6,'3.7*{ATK}');
 INSERT INTO k_skill VALUES(6804,'Magic Arrow','Attacks the enemy with a magical arrow which casts various harmful effects according to the attribute relation between you and the enemy. The damage of this effect increases by 15% for each harmful effect on the enemy.',1,NULL,1,0,0,6,'3.7*{ATK}');
-INSERT INTO k_skill VALUES(6810,'Wedge Arrow','Drives in a wedge into all enemies, decreasing their Attack Speed for 2 turns with a 50% chance.',2,4,1,0,1,5,'2.9*{ATK}');
-INSERT INTO k_skill VALUES(6806,'Wedge Arrow','Drives in a wedge into all enemies, decreasing their Attack Speed for 2 turns with a 50% chance.',2,4,1,0,1,5,'2.9*{ATK}');
-INSERT INTO k_skill VALUES(6807,'Wedge Arrow','Drives in a wedge into all enemies, decreasing their Attack Speed for 2 turns with a 50% chance.',2,4,1,0,1,5,'2.9*{ATK}');
+INSERT INTO k_skill VALUES(6810,'Wedge Arrow','Drives in a wedge into all enemies, decreasing their Attack Speed for 2 turns with a 50% chance.',2,4,1,0,1,5,'3.2*{ATK}');
+INSERT INTO k_skill VALUES(6806,'Wedge Arrow','Drives in a wedge into all enemies, decreasing their Attack Speed for 2 turns with a 50% chance.',2,4,1,0,1,5,'3.2*{ATK}');
+INSERT INTO k_skill VALUES(6807,'Wedge Arrow','Drives in a wedge into all enemies, decreasing their Attack Speed for 2 turns with a 50% chance.',2,4,1,0,1,5,'3.2*{ATK}');
 INSERT INTO k_skill VALUES(6808,'Light Arrow','Attacks with an arrow that''s lightning fast. The damage increases according to Attack Speed.',2,3,1,0,0,6,'{ATK}*({SPD} + 100)/40');
 INSERT INTO k_skill VALUES(6809,'Light Arrow','Attacks with an arrow that''s lightning fast. The damage increases according to Attack Speed.',2,3,1,0,0,6,'{ATK}*({SPD} + 100)/40');
 INSERT INTO k_skill VALUES(6812,'Hell Flame Arrow','Attacks all enemies 2 times each with burning arrows and inflicts Continuous Damage for 3 turns with a 35% chance on each attack.',3,6,1,0,1,7,'2.0*{ATK}');
 INSERT INTO k_skill VALUES(6811,'Arrow of Water','Attacks with 3 water arrows, each having a 15% chance to stun the enemy. The damage increases according to Defense.',3,5,3,0,0,7,'2.0*{ATK} + 2.0*{DEF}');
 INSERT INTO k_skill VALUES(6813,'Keenness (Passive)','Your Critical Rate is increased by 25%, and your Critical Damage increases accordingly to how much HP you''ve lost. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(6814,'Critical Arrow','Attacks the enemy with powerful magic arrows to stun and decrease the target''s Defense for 2 turns with a 60% chance each.',3,5,1,0,0,7,'7.5*{ATK}');
-INSERT INTO k_skill VALUES(6815,'Shadow Arrow','Attacks consecutively with 2 arrows. Each attack has a 30% chance to ignore the enemy''s Defense.',3,4,1,0,0,6,'3.0*{ATK}');
-INSERT INTO k_skill VALUES(6816,'Light Wedged Arrow','Shoots wedged arrows at all enemies and decreases their attack speed for 2 turns if you get a critical hit. Increases your critical rate by 50%.',2,4,1,0,1,5,'2.9*{ATK}');
+INSERT INTO k_skill VALUES(6814,'Critical Arrow','Attacks the enemy with powerful magic arrows to stun and decrease the target''s Defense for 2 turns with a 60% chance each. After attacking, recovers a turn instantly if the enemy is not stunned.',3,5,1,0,0,7,'7.5*{ATK}');
+INSERT INTO k_skill VALUES(6815,'Shadow Arrow','Attacks consecutively with 2 arrows. Each attack has a 30% chance to ignore the enemy''s Defense. Increases the chance by 15% for each harmful effect granted on the enemy.',3,4,2,0,0,6,'3.0*{ATK}');
+INSERT INTO k_skill VALUES(6816,'Light Wedged Arrow','Shoots wedged arrows at all enemies and decreases their attack speed for 2 turns if you get a critical hit. Increases your critical rate by 50%.',2,4,1,0,1,5,'3.2*{ATK}');
 INSERT INTO k_skill VALUES(6102,'Energy Punch','Attacks with a spinning punch and stuns the enemy for 1 turn with a 30% chance.',1,NULL,1,0,0,6,'3.8*{ATK}');
 INSERT INTO k_skill VALUES(6101,'Energy Punch','Attacks with a spinning punch and stuns the enemy for 1 turn with a 30% chance.',1,NULL,1,0,0,6,'3.8*{ATK}');
 INSERT INTO k_skill VALUES(6103,'Energy Punch','Attacks with a spinning punch and stuns the enemy for 1 turn with a 30% chance.',1,NULL,1,0,0,6,'3.8*{ATK}');
@@ -1726,9 +1773,9 @@ INSERT INTO k_skill VALUES(2303,'Sonic Boom','Attacks the enemy with a strong so
 INSERT INTO k_skill VALUES(2316,'Sonic Boom','Strikes the enemy with a strong sound wave, removing a beneficial effect with a 75% chance and attacks consecutively with a 30% chance. The damage of this attack is proportionate to your MAX HP.',1,NULL,1,0,0,4,'1.7*{ATK} + 0.15*{MAX HP}');
 INSERT INTO k_skill VALUES(2307,'Fire Blast','Attacks the enemy 3 times with energy balls. Each attack has a 30% chance to decrease the target''s Attack Bar by 30%. The damage increases accordingly to your MAX HP.',2,3,3,0,0,5,'0.8*{ATK} + 0.08*{MAX HP}');
 INSERT INTO k_skill VALUES(2306,'Ice Blast','Attacks the enemy 3 times with energy balls. Each attack has a 30% chance to decrease the target''s Attack Bar by 30%. The damage increases accordingly to your MAX HP.',2,3,3,0,0,5,'0.8*{ATK} + 0.08*{MAX HP}');
-INSERT INTO k_skill VALUES(2308,'Thunder Blast','Attacks all enemies to decrease their Attack Speed for 2 turns. The damage of this skill will increase according to your MAX HP.',2,3,1,0,0,5,'{ATK} + 0.16*{MAX HP}');
+INSERT INTO k_skill VALUES(2308,'Thunder Blast','Attacks all enemies to decrease their Attack Speed for 2 turns. The damage of this skill will increase according to your MAX HP.',2,3,1,0,1,5,'{ATK} + 0.16*{MAX HP}');
 INSERT INTO k_skill VALUES(2309,'Light Blast','Attacks the enemy 3 times with energy balls. Each attack has a 30% chance to decrease the target''s Attack Bar by 30%. The damage increases accordingly to your MAX HP.',2,3,3,0,0,5,'0.8*{ATK} + 0.08*{MAX HP}');
-INSERT INTO k_skill VALUES(2310,'Dark Blast','Attacks all enemies to decrease their Attack Speed for 2 turns. The damage of this skill will increase according to your MAX HP.',2,3,1,0,0,5,'{ATK} + 0.16*{MAX HP}');
+INSERT INTO k_skill VALUES(2310,'Dark Blast','Attacks all enemies to decrease their Attack Speed for 2 turns. The damage of this skill will increase according to your MAX HP.',2,3,1,0,1,5,'{ATK} + 0.16*{MAX HP}');
 INSERT INTO k_skill VALUES(2312,'Revenge','Provokes all enemies for 1 turn and returns 30% of the incoming damage to the attacker for 3 turns.',3,5,1,0,1,3,'');
 INSERT INTO k_skill VALUES(2311,'Tidal Wave','Inflicts damage proportional to the MAX HP to all enemies and reduces their Attack Bars by 30%.',3,4,1,0,1,4,'0.28*{MAX HP}');
 INSERT INTO k_skill VALUES(2313,'Blessing (Passive)','Reduces damage dealt by Fire attributes by 50%. [Automatic Effect]',3,NULL,0,1,0,1,'');
@@ -1815,14 +1862,14 @@ INSERT INTO k_skill VALUES(4704,'Flying Cards','Throws a sharp card to attack an
 INSERT INTO k_skill VALUES(4705,'Flying Cards','Throws a sharp card to attack and disturbs the enemy''s HP recovery for 2 turns with a 70% chance.',1,NULL,1,0,0,6,'3.6*{ATK}');
 INSERT INTO k_skill VALUES(4707,'Surprise Bomb','Mounts a bomb on all enemies which detonates after 2 turns. This skill receives 50% additional Accuracy.',2,5,1,0,1,5,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(4710,'Surprise Bomb','Mounts a bomb on all enemies which detonates after 2 turns. This skill receives 50% additional Accuracy.',2,5,1,0,1,5,'4.0*{ATK}');
-INSERT INTO k_skill VALUES(4706,'Surprise Box','Summons a surprise box that inflicts damage and grants 1 random harmful effect among Stun, Glancing Hit Rate Increase, and Attack Speed Decrease to all enemies.',2,4,1,0,1,5,'2.4*{ATK}');
+INSERT INTO k_skill VALUES(4706,'Surprise Bomb','Mounts a bomb on all enemies which detonates after 2 turns. This skill receives 50% additional Accuracy.',2,5,0,0,1,5,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(4708,'Surprise Box','Summons a surprise box that inflicts damage and grants 1 random harmful effect among Stun, Glancing Hit Rate Increase, and Attack Speed Decrease to all enemies.',2,4,1,0,1,5,'2.4*{ATK}');
 INSERT INTO k_skill VALUES(4709,'Surprise Box','Summons a surprise box that inflicts damage and grants 1 random harmful effect among Stun, Glancing Hit Rate Increase, and Attack Speed Decrease to all enemies.',2,4,1,0,1,5,'2.4*{ATK}');
 INSERT INTO k_skill VALUES(4712,'Fire Magic','Summons a wall of fire and inflicts Continuous Damage for 3 turns.',3,5,1,0,0,4,'4.2*{ATK}');
 INSERT INTO k_skill VALUES(4711,'Revival Magic (Passive)','Revives with invincibility and Immunity for 1 turn at the moment of death with 25% HP. [Automatic Effect]',3,8,1,1,0,4,'');
 INSERT INTO k_skill VALUES(4713,'Amputation Magic','Throws a number of cards and inflicts damage to all enemies, ignoring their Defense.',3,5,3,0,1,5,'0.68*{ATK}');
 INSERT INTO k_skill VALUES(4714,'Camouflage (Passive)','Cancels incoming damage with a 25% chance. 1 Beneficial Effect on the targeted enemy will be removed everytime you perform an attack. [Automatic Effect]',3,NULL,0,1,0,1,'');
-INSERT INTO k_skill VALUES(4715,'Shadow Revenge (Passive)','Counterattacks the enemy to inflict damage proportionate to your Attack Power and decreases the skill cooldown when you''re attacked (counterattacks excluded). [Automatic Effect]',3,NULL,1,1,0,1,'3.2*{ATK}');
+INSERT INTO k_skill VALUES(4715,'Shadow Revenge (Passive)','Counterattacks to inflict damage proportionate to your Attack Power and decreases the skill cooldown when you''re attacked (counterattacks excluded). [Automatic Effect]',3,NULL,1,1,0,1,'3.2*{ATK}');
 INSERT INTO k_skill VALUES(8902,'Firecracker','Attacks the enemy with a bomb. The damage increases by 15% for each harmful effect on the enemy.',1,NULL,3,0,0,5,'1.3*{ATK}');
 INSERT INTO k_skill VALUES(8901,'Firecracker','Attacks the enemy with a bomb. The damage increases by 15% for each harmful effect on the enemy.',1,NULL,3,0,0,5,'1.3*{ATK}');
 INSERT INTO k_skill VALUES(8903,'Firecracker','Attacks the enemy with a bomb. The damage increases by 15% for each harmful effect on the enemy.',1,NULL,3,0,0,5,'1.3*{ATK}');
@@ -1878,25 +1925,25 @@ INSERT INTO k_skill VALUES(10608,'Magic Surge','Attacks the target that isn''t g
 INSERT INTO k_skill VALUES(10609,'Magic Surge','Attacks the target that isn''t granted with any beneficial effects with 3 magic bullets and Silences the target for 2 turns with a 75% chance each. The target under the Silence Effect won''t be able to use skills with cooldown time excluding the passive skills.',2,3,3,0,0,6,'2.1*{ATK}');
 INSERT INTO k_skill VALUES(10610,'Magic Shot','Shoots 4 magic bullets that seek enemies with low HP ratio. The bullets have a 50% chance to decrease the target''s Defense for 2 turns each.',2,3,4,0,1,5,'1.9*{ATK}');
 INSERT INTO k_skill VALUES(10606,'Magic Shot','Shoots 4 magic bullets that seek enemies with low HP ratio. The bullets have a 50% chance to decrease the target''s Defense for 2 turns each.',2,3,4,0,1,5,'1.9*{ATK}');
-INSERT INTO k_skill VALUES(10612,'Vengeful Fire(Passive)','Your Attack Speed increases as your HP gets lower, and you deal 50% more damage if the enemy has more HP than you. [Automatic Effect]',3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(10612,'Vengeful Fire(Passive)','Your Attack Speed increases as your HP gets lower, and you deal 100% more damage if the enemy has more HP than you. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(10611,'Retrieve Magic','Steals the magical power from all enemies, recovering HP according to the damage dealt. Also absorbs 25% of the Attack Bar.',3,3,1,0,1,5,'4.0*{ATK}');
-INSERT INTO k_skill VALUES(10613,'Tempest Sword','Attacks the enemy target 2 times and attacks all enemies on the 3rd attack to inflict damage that''s proportionate to the enemy''s MAX HP. Decreases the Attack Bar by 30% each.',3,4,1,0,0,5,'{ATK} + 0.06*{Target MAX HP}');
+INSERT INTO k_skill VALUES(10613,'Tempest Sword','Attacks the enemy target 2 times to inflict damage that''s proportionate to the enemy''s MAX HP and decreases the Attack Bar by 30% each. And attacks all enemies on the 3rd attack to absorb their Attack Bar by 30% each.',3,4,3,0,1,5,'{ATK} + 0.06*{Target MAX HP}');
 INSERT INTO k_skill VALUES(10614,'Sweet Revenge(Passive)','Removes 1 beneficial effect each with a 35% chance and recovers the ally with the lowest HP by 15% when you attack on your turn. [Automatic Effect]',3,NULL,0,1,0,6,'');
-INSERT INTO k_skill VALUES(10615,'Gravity Shot','Attacks a target with a massive magic bullet, dealing damage according to the target''s MAX HP. This attack also heals all allies for 30% of the damage dealt.',3,5,1,0,0,5,'7.0*{ATK} + 0.16*{Target MAX HP}');
+INSERT INTO k_skill VALUES(10615,'Gravity Shot','Attacks a target with a massive magic bullet, dealing damage according to the target''s MAX HP. This attack also heals all allies for 30% of the damage dealt.',3,5,1,0,1,5,'7.0*{ATK} + 0.16*{Target MAX HP}');
 INSERT INTO k_skill VALUES(10405,'Mana Bubble','Bursts a mana bubble that deals damage to an enemy and removes a beneficial effect with a 50% chance. The damage of this skill increases according to your MAX HP.',1,NULL,1,0,0,5,'2.5*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(10402,'Mana Bubble','Bursts a mana bubble that deals damage to an enemy and removes a beneficial effect with a 50% chance. The damage of this skill increases according to your MAX HP.',1,NULL,1,0,0,5,'2.5*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(10404,'Mana Bubble','Bursts a mana bubble that deals damage to an enemy and removes a beneficial effect with a 50% chance. The damage of this skill increases according to your MAX HP.',1,NULL,1,0,0,5,'2.5*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(10401,'Mana Bubble','Bursts a mana bubble that deals damage to an enemy and removes a beneficial effect with a 50% chance. The damage of this skill increases according to your MAX HP.',1,NULL,1,0,0,5,'2.5*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(10403,'Mana Bubble','Bursts a mana bubble that deals damage to an enemy and removes a beneficial effect with a 50% chance. The damage of this skill increases according to your MAX HP.',1,NULL,1,0,0,5,'2.5*{ATK} + 0.12*{MAX HP}');
-INSERT INTO k_skill VALUES(10407,'Grant Life','Recovers the HP and Attack Bar of an ally target by 30% each. This skill may revive a dead ally with 30% HP at the cost of 3 additional turns being added to the cool time.',2,4,0,0,0,4,'');
-INSERT INTO k_skill VALUES(10410,'Grant Life','Recovers the HP and Attack Bar of an ally target by 30% each. This skill may revive a dead ally with 30% HP at the cost of 3 additional turns being added to the cool time.',2,4,0,0,0,4,'');
-INSERT INTO k_skill VALUES(10406,'Air Shield','Removes all harmful effects on an ally target and casts a shield that lasts for 3 turns. The shield amount is proportionate to the Monster''s level.',2,4,0,0,0,5,'130.0*{Level}');
-INSERT INTO k_skill VALUES(10408,'Air Shield','Removes all harmful effects on an ally target and casts a shield that lasts for 3 turns. The shield amount is proportionate to the Monster''s level.',2,4,0,0,0,5,'130.0*{Level}');
-INSERT INTO k_skill VALUES(10409,'Air Shield','Removes all harmful effects on an ally target and casts a shield that lasts for 3 turns. The shield amount is proportionate to the Monster''s level.',2,4,0,0,0,5,'130.0*{Level}');
+INSERT INTO k_skill VALUES(10407,'Grant Life','Recovers the ally target''s HP and Attack Bar by 30% each. If the skill is used on the dead ally, the ally will be revived with 30% HP and 30% Attack Bar but adds 3 turns of cooldown time.',2,4,0,0,0,4,'');
+INSERT INTO k_skill VALUES(10410,'Grant Life','Recovers the ally target''s HP and Attack Bar by 30% each. If the skill is used on the dead ally, the ally will be revived with 30% HP and 30% Attack Bar but adds 3 turns of cooldown time.',2,4,0,0,0,4,'');
+INSERT INTO k_skill VALUES(10406,'Air Shield','Removes all harmful effects on the ally target and casts a shield that''s proportionate to 25% of your MAX HP for 3 turns.',2,4,0,0,0,5,'0.25*{MAX HP}');
+INSERT INTO k_skill VALUES(10408,'Air Shield','Removes all harmful effects on the ally target and casts a shield that''s proportionate to 25% of your MAX HP for 3 turns.',2,4,0,0,0,5,'0.25*{MAX HP}');
+INSERT INTO k_skill VALUES(10409,'Air Shield','Removes all harmful effects on the ally target and casts a shield that''s proportionate to 25% of your MAX HP for 3 turns.',2,4,0,0,0,5,'0.25*{MAX HP}');
 INSERT INTO k_skill VALUES(10412,'Burning Hearts','Attacks an enemy, stunning the enemy for 1 turn and sets back all of the target''s skills to MAX cooldown with an 80% chance each. If your HP is at 50% or lower, stuns the enemy for 2 turns.',3,4,1,0,0,6,'8.0*{ATK}');
 INSERT INTO k_skill VALUES(10411,'Song of the Sirens(Passive)','Reduces the time of all harmful effects, except inability effects, granted on all allies by 1 turn and recovers the ally with the lowest HP status by 10% of your HP every turn. [Automatic Effect]',3,NULL,0,1,1,2,'');
-INSERT INTO k_skill VALUES(10413,'Crushed Hopes','Attacks the enemy target 3 times to remove the beneficial effect with the 1st attack. Decreases the Defense for 2 turns, and increases the skill cooldown by 2 turns with a 50% chance with each attack.',3,4,3,0,0,6,'2.8*{ATK}');
-INSERT INTO k_skill VALUES(10414,'Glaring Mists(Passive)','Increases the enemy''s chances of landing a Glancing Hit on an ally target by 20%, and recovers an ally with the lowest HP ratio by 10%. [Automatic Effect]',3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(10413,'Crushed Hopes','Attacks the enemy target 3 times with first attack removing beneficial effects. The second attack decreases the Defense for 2 turns with an 80% chance and the third attack increases the skill cooldown time by 2 turns with an 80% chance.',3,4,3,0,0,6,'2.8*{ATK}');
+INSERT INTO k_skill VALUES(10414,'Glaring Mists(Passive)','Increases the chances of allies receiving a Glancing Hit by 20% and recovers HP of the ally with the worst HP status by 25%. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(10415,'Serenity','Recovers the HP of all allies by 15% each, decreases their chance of receiving a Critical Hit for 2 turns, and grants them Immunity for 2 turns as well.',3,6,1,0,1,5,'');
 INSERT INTO k_skill VALUES(2202,'Will-o''-the-Wisp','Attacks the enemy 3 times with a shimmering light.',1,NULL,3,0,0,5,'1.3*{ATK}');
 INSERT INTO k_skill VALUES(2201,'Will-o''-the-Wisp','Attacks the enemy 3 times with a shimmering light.',1,NULL,3,0,0,5,'1.3*{ATK}');
@@ -1925,7 +1972,7 @@ INSERT INTO k_skill VALUES(4804,'Ninja Stars','Throws ninja stars to attack and
 INSERT INTO k_skill VALUES(4805,'Ninja Stars','Throws ninja stars to attack and inflicts Continuous Damage for 1 turn. This attack will deal more damage according to your Attack Speed.',1,NULL,1,0,0,5,'{ATK}*({SPD} + 145)/65');
 INSERT INTO k_skill VALUES(4810,'Dragon Attack','Throws an uppercut punch to an enemy 2 times. Each attack has a 50% chance to stun the enemy.',2,3,1,0,0,7,'3.6*{ATK}');
 INSERT INTO k_skill VALUES(4807,'Dragon Attack','Throws an uppercut punch to an enemy 2 times. Each attack has a 50% chance to stun the enemy.',2,3,2,0,0,7,'3.6*{ATK}');
-INSERT INTO k_skill VALUES(4815,'Simple Solution','Attacks an enemy 3 times dealing lethal damage. Your Attack Bar recovers for 30% for each strike that lands as a Critical Hit.',3,4,1,0,0,4,'3.6*{ATK}');
+INSERT INTO k_skill VALUES(4815,'Simple Solution','Attacks the enemy target 4 consecutive times, with each attack having a 50% chance to weaken the Defense for 2 turns. Your Attack Bar increases by 25% for each attack that lands as a Critical Hit.',3,4,4,0,0,4,'2.7*{ATK}');
 INSERT INTO k_skill VALUES(4814,'Sensation','Blows up a ray of light to inflict damage 2 times to all enemies. Each attack has a 50% chance to increase the enemy''s chances of landing a Glancing Hit for 3 turns.',3,5,1,0,1,5,'2.3*{ATK}');
 INSERT INTO k_skill VALUES(4813,'Storm and Gale','Rapidly throws 6 ninja stars consecutively, inflicting Continuous Damage for 1 turn if you get a Critical Hit. This attack will deal more damage according to your Attack Speed.',3,5,1,0,0,4,'{ATK}*({SPD} + 320)/300');
 INSERT INTO k_skill VALUES(4811,'Clear Water (Passive)','Reduces the odds of receiving a Critical Hit by 50% and increases your Resistance by 50%. [Automatic Effect]',3,NULL,0,1,0,1,'');
@@ -1974,10 +2021,10 @@ INSERT INTO k_skill VALUES(10206,'Pirate''s Strike','Deals a powerful attack to
 INSERT INTO k_skill VALUES(10208,'Pirate''s Strike','Deals a powerful attack to an enemy and absorbs 30% of its Attack Bar.',2,3,1,0,0,5,'5.4*{ATK}');
 INSERT INTO k_skill VALUES(10209,'Pirate''s Strike','Deals a powerful attack to an enemy and absorbs 30% of its Attack Bar.',2,3,1,0,0,5,'5.4*{ATK}');
 INSERT INTO k_skill VALUES(10222,'Detonation Shot','Fires a carefully aimed shot that deals great damage. This attack sets off the bomb effects on the target. Instantly gains another turn if you set off the bomb.',3,4,1,0,0,5,'8.0*{ATK}');
-INSERT INTO k_skill VALUES(10221,'Time to Loot','Unleashes a battle cry that increases the Attack Power of all allies for 2 turns, and decreases the defense of the enemy for 2 turns with a 75% chance at the same time.',3,5,1,0,0,4,'');
+INSERT INTO k_skill VALUES(10221,'Time to Loot','Unleashes a battle cry that increases the Attack Power of all allies for 2 turns, and decreases the defense of the enemy for 2 turns with a 75% chance at the same time.',3,5,1,0,1,4,'');
 INSERT INTO k_skill VALUES(10223,'Shoot n'' Slash','Performs a Backspin Slash which connects to a Pirate''s Strike on an enemy target.',3,4,1,0,0,2,'');
 INSERT INTO k_skill VALUES(10224,'Disarm','Attacks an enemy target and decreases its Attack Power and Defense while preventing the target from receiving beneficial effects for 2 turns with a 75% chance.',3,4,1,0,0,6,'8.0*{ATK}');
-INSERT INTO k_skill VALUES(10225,'Full Speed Ahead','Increases the Attack Bar of all allies by 50% each, and reduces the cool time of their skills by 1 turn each.',3,5,0,0,0,2,'');
+INSERT INTO k_skill VALUES(10225,'Full Speed Ahead','Increases the Attack Bar of all allies by 50% each, and reduces the cool time of their skills by 1 turn each.',3,5,0,0,1,2,'');
 INSERT INTO k_skill VALUES(6902,'Swing','Attacks the enemy with a whip, decreasing the enemy''s Attack Speed for 2 turns with a 50% chance. The damage increases according to Attack Speed.',1,NULL,1,0,0,7,'{ATK}*({SPD} + 80)/45');
 INSERT INTO k_skill VALUES(6901,'Swing','Attacks the enemy with a whip, decreasing the enemy''s Attack Speed for 2 turns with a 50% chance. The damage increases according to Attack Speed.',1,NULL,1,0,0,7,'{ATK}*({SPD} + 80)/45');
 INSERT INTO k_skill VALUES(6903,'Swing','Attacks the enemy with a whip, decreasing the enemy''s Attack Speed for 2 turns with a 50% chance. The damage increases according to Attack Speed.',1,NULL,1,0,0,7,'{ATK}*({SPD} + 80)/45');
@@ -2022,7 +2069,7 @@ INSERT INTO k_skill VALUES(9107,'Amuse','Recovers all allies by 20% of my MAX HP
 INSERT INTO k_skill VALUES(9108,'Amuse','Recovers all allies by 20% of my MAX HP and increases the Attack Power for 2 turns.',2,4,0,0,1,5,'0.2*{MAX HP}');
 INSERT INTO k_skill VALUES(9110,'Amuse','Recovers the allies by 20% of my MAX HP and increases the Attack Power for 2 turns.',2,4,0,0,1,5,'0.2*{MAX HP}');
 INSERT INTO k_skill VALUES(9116,'Amuse','Recovers the allies and increases the Attack Power for 3 turns. The recovery power is in proportion to the Attack Power.',2,4,0,0,1,5,'2.5*{ATK}');
-INSERT INTO k_skill VALUES(9117,'Amuse','Recovers the allies and increases the Attack Power for 3 turns. The recovery power is in proportion to the Attack Power.',2,4,0,0,1,5,'2.5*{ATK}');
+INSERT INTO k_skill VALUES(9117,'Amuse','Recovers the HP of all allies by 20% of your MAX HP and increases their Attack Power for 2 turns. In addition, increases the Attack Bar of the allies with full HP by 15%.',2,4,0,0,1,5,'0.2*{MAX HP}');
 INSERT INTO k_skill VALUES(9106,'Blade Fan','Throws a fan to attack the enemy 3 times, with each attack having a 50% chance to remove one of the enemy''s beneficial effect. Increases the Attack Bar of all allies by 15% each per beneficial effect removed. The damage is proportionate to the attack speed.',2,4,3,0,0,5,'{ATK}*({SPD} + 66)/99');
 INSERT INTO k_skill VALUES(9109,'Blade Fan','Throws a fan to attack the enemy 3 times, with each attack having a 50% chance to remove one of the enemy''s beneficial effect. Increases the Attack Bar of all allies by 15% each per beneficial effect removed. The damage is proportionate to the attack speed.',2,4,3,0,0,5,'{ATK}*({SPD} + 66)/99');
 INSERT INTO k_skill VALUES(9112,'Pride Will Fall','Dances to attack the enemies randomly. Becomes instantly reusable if an enemy dies.',3,5,1,0,0,4,'2.2*{ATK}');
@@ -2097,7 +2144,7 @@ INSERT INTO k_skill VALUES(2617,'Fire Drop','Attacks an enemy with a small flame
 INSERT INTO k_skill VALUES(2607,'Fire Frenzy','Attacks all enemies with a fire pillar and disturbs their HP recovery for 2 turns with a 50% chance. Additionally, this attack will heal an ally with the lowest HP by 25%.',2,4,1,0,1,5,'2.8*{ATK} + 150');
 INSERT INTO k_skill VALUES(2606,'Aqua Frenzy','Attacks all enemies with a burst of water pillar and increases their chance of Glancing Hits for 2 turns with a 50% chance. Additionally, this attack will heal an ally with the lowest HP by 25%.',2,4,1,0,1,5,'2.8*{ATK} + 150');
 INSERT INTO k_skill VALUES(2610,'Dark Frenzy','Attacks all enemies with a dark pillar and decreases the Attack Bar by 30% with a 50% chance. Additionally, this attack will heal an ally with the lowest HP by 25%.',2,4,1,0,1,5,'2.8*{ATK} + 150');
-INSERT INTO k_skill VALUES(2612,'Share Life','Evenly matches the percentage of the HP of all allies. Additionally, all allies recover 25% of their HP.',3,5,1,0,0,5,'{Life Share (AOE)} (Fixed)');
+INSERT INTO k_skill VALUES(2612,'Share Life','Evenly matches the percentage of the HP of all allies. Additionally, all allies recover 25% of their HP.',3,5,1,0,1,5,'{Life Share (AOE)} (Fixed)');
 INSERT INTO k_skill VALUES(2611,'Revive','Revives a dead ally with 40% HP and grants immunity for 1 turn. If this skill is used on yourself, you receive a Soul Protection for 3 turns.',3,7,1,0,0,3,'0.4*{Target MAX HP} (Fixed)');
 INSERT INTO k_skill VALUES(2613,'Spirit''s Blessing','Removes all harmful effects on all allies, also granting Immunity for 2 turns and recovering 30% of their HP.',3,5,1,0,1,2,'');
 INSERT INTO k_skill VALUES(2614,'Absolute Defense','Removes up to 2 harmful effects on the ally target and makes the target Invincible for 3 turns.',3,7,0,0,0,3,'');
@@ -2129,7 +2176,7 @@ INSERT INTO k_skill VALUES(6310,'Punishment','Deals damage with flames of punish
 INSERT INTO k_skill VALUES(6306,'Archangel''s Blessing','Recovers an ally''s HP by 50%.',2,5,0,0,0,3,'');
 INSERT INTO k_skill VALUES(6311,'Holy Water','Fills up the Attack Bar of all allies by 20% each and recovers their HP by 40% each. Additionally, recovers 15% HP each turn for 3 turns.',3,5,1,0,1,4,'');
 INSERT INTO k_skill VALUES(6313,'Archangel''s Mercy','Revives the target dead ally and fills up its HP to the maximum amount and also revives other dead allies with 30% of their HP. Consumes your HP by half and consumes your HP additionally by 15% per revived ally.',3,8,0,0,0,3,'{Target MAX HP} (Fixed)');
-INSERT INTO k_skill VALUES(6314,'Judge (Passive)','Counterattacks instantly when you or an ally is attacked with a critical hit and increases your Attack Bar by 10%. Increases your Defense by 10% each whenever [Judge (Passive)] is activated. (Accumulates up to 10 times) [Automatic Effect]',3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(6314,'Judge (Passive)','Counterattacks the enemy instantly when you or an ally is attacked with a critical hit and increases your Attack Bar by 10%. Increases your Defense by 10% each whenever [Judge (Passive)] is activated. (Accumulates up to 10 times) [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(6315,'Dominator (Passive)','The damage you receive decreases as more allies survive and the damage you inflict increases as more allies die. Additionally, the enemy you attack will be provoked for 1 turn. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(6312,'Sanctuary','Removes all harmful effects on all allies, granting them Immunity for 3 turns, and increasing the Attack Bar by 30%.',3,6,1,0,1,3,'');
 INSERT INTO k_skill VALUES(8302,'Crushing Blow','Strikes the enemy and increases your attack speed for 2 turns with a critical hit.',1,NULL,1,0,0,5,'4.2*{ATK}');
@@ -2142,14 +2189,14 @@ INSERT INTO k_skill VALUES(8316,'Crushing Blow','Smashes the enemy and stuns the
 INSERT INTO k_skill VALUES(8318,'Crushing Blow','Smashes the enemy and provokes the target for 1 turn with a 50% chance. The damage of this skill is proportionate to your MAX HP and this attack will increase your Attack Speed for 2 turns if it lands as a Critical Hit.',1,NULL,1,0,0,5,'1.1*{ATK} + 0.18*{MAX HP}');
 INSERT INTO k_skill VALUES(8319,'Crushing Blow','Smashes the enemy and decreases the target''s Defense for 2 turns. The damage of this skill is proportionate to your MAX HP and this attack will increase your Attack Speed for 2 turns if it lands as a Critical Hit.',1,NULL,1,0,0,5,'1.1*{ATK} + 0.18*{MAX HP}');
 INSERT INTO k_skill VALUES(8320,'Crushing Blow','Slams the enemy hard, granting a Branding Effect for 1 turn. The damage increases accordingly to your MAX HP and increases the Attack Speed for 2 turns if you land a Critical Hit.',1,NULL,1,0,0,5,'1.1*{ATK} + 0.18*{MAX HP}');
-INSERT INTO k_skill VALUES(8307,'Meditate','Recovers 40% of the MAX HP through meditation. This skill will heal the ally with the lowest HP ratio instead, if your HP is more than 50%.',2,5,0,0,0,3,'0.4*{MAX HP} (Fixed)');
-INSERT INTO k_skill VALUES(8308,'Meditate','Recovers 40% of the MAX HP through meditation. This skill will heal the ally with the lowest HP ratio instead, if your HP is more than 50%.',2,5,0,0,0,3,'0.4*{MAX HP} (Fixed)');
-INSERT INTO k_skill VALUES(8309,'Meditate','Recovers 40% of the MAX HP through meditation. This skill will heal the ally with the lowest HP ratio instead, if your HP is more than 50%.',2,5,0,0,0,3,'0.4*{MAX HP} (Fixed)');
+INSERT INTO k_skill VALUES(8307,'Meditate','Removes harmful effects granted on yourself and recovers 40% of the MAX HP through meditation. This skill will heal the ally with the lowest HP ratio instead, if your HP is more than 50%.',2,5,0,0,0,3,'0.4*{MAX HP} (Fixed)');
+INSERT INTO k_skill VALUES(8308,'Meditate','Removes harmful effects granted on yourself and recovers 40% of the MAX HP through meditation. This skill will heal the ally with the lowest HP ratio instead, if your HP is more than 50%.',2,5,0,0,0,3,'0.4*{MAX HP} (Fixed)');
+INSERT INTO k_skill VALUES(8309,'Meditate','Removes harmful effects granted on yourself and recovers 40% of the MAX HP through meditation. This skill will heal the ally with the lowest HP ratio instead, if your HP is more than 50%.',2,5,0,0,0,3,'0.4*{MAX HP} (Fixed)');
 INSERT INTO k_skill VALUES(8306,'Defend','Escorts the ally target for 3 turns and instantly recovers your turn. Receives half of the damage inflicted on the escorted target while making the damage dealt to the escorted target to 0 and counterattacks the enemy target.',2,5,0,0,0,2,'');
 INSERT INTO k_skill VALUES(8310,'Defend','Escorts the ally target for 3 turns and instantly recovers your turn. Receives half of the damage inflicted on the escorted target while making the damage dealt to the escorted target to 0 and counterattacks the enemy target.',2,5,0,0,0,2,'');
 INSERT INTO k_skill VALUES(8312,'Trick of Fire','Attacks all enemies with a spell that summons the power of fire and Silences them for 2 turns with a 75% chance. The damage of this skill is proportionate to your MAX HP.',3,5,1,0,1,6,'0.29*{MAX HP}');
 INSERT INTO k_skill VALUES(8311,'Trick of Water','Attacks all enemies with a spell that summons the power of water. This attack has an 80% chance to decrease the target''s Attack Speed for 2 turns. The damage of this skill is proportionate to your MAX HP.',3,5,1,0,1,7,'0.28*{MAX HP}');
-INSERT INTO k_skill VALUES(8313,'Trick of Wind','Attacks all enemies with a spell that summons the power of wind. This attack has a 50% chance to decrease the target''s Defense for 2 turns. The damage of this skill is proportionate to your MAX HP.',3,5,1,0,1,6,'0.3*{MAX HP}');
+INSERT INTO k_skill VALUES(8313,'Trick of Wind','Attacks all enemies with a spell that summons the power of wind. This attack has a 75% chance to decrease the target''s Defense for 2 turns. The damage of this skill is proportionate to your MAX HP.',3,5,1,0,1,6,'0.3*{MAX HP}');
 INSERT INTO k_skill VALUES(8314,'Trick of Light','Attacks all enemies with a spell that summons the power of light to increase the enemy''s chances of landing a Glancing Hit for 2 turns with a 75% chance and to provoke them for 1 turn with a 75% chance. The damage of this skill is proportionate to your MAX HP.',3,5,1,0,1,6,'0.3*{MAX HP}');
 INSERT INTO k_skill VALUES(8315,'Trick of Darkness','Attacks all enemies with a spell that summons the power of darkness. This attack has a 75% chance to remove beneficial effects and a 75% chance to block beneficial effects from being granted on them for 2 turns. The damage of this skill is proportionate to your MAX HP.',3,5,1,0,1,6,'0.29*{MAX HP}');
 INSERT INTO k_skill VALUES(4202,'Trample','Pins down the enemy and inflicts Continuous Damage for 1 turn.',1,NULL,1,0,0,5,'3.8*{ATK}');
@@ -2219,7 +2266,7 @@ INSERT INTO k_skill VALUES(10007,'Triple Crush','Attacks the enemy 3 times with
 INSERT INTO k_skill VALUES(10006,'Triple Crush','Attacks the enemy 3 times with magic and weakens the Defense for 2 turns with a 50% chance for each attack.',2,3,3,0,0,6,'1.9*{ATK}');
 INSERT INTO k_skill VALUES(10010,'Super Crush','Attacks all enemies and stuns them with a 30% chance. The damage is proportionate to my MAX HP.',2,4,1,0,1,7,'1.2*{ATK} + 0.16*{MAX HP}');
 INSERT INTO k_skill VALUES(10008,'Super Crush','Attacks all enemies and stuns them with a 30% chance. The damage is proportionate to my MAX HP.',2,4,1,0,1,7,'1.2*{ATK} + 0.16*{MAX HP}');
-INSERT INTO k_skill VALUES(10011,'Ancient Power (Passive)','Increases the damage inflicted on enemies with harmful effects by 30% and makes an enemy (Boss monsters excluded) oblivious for 2 turns with each attack. Passive skills aren''t activated in oblivion state. [Automatic Effect]',3,NULL,0,1,0,1,'');
+INSERT INTO k_skill VALUES(10011,'Ancient Power (Passive)','Decreases the damage dealt from enemies with no harmful effects by 30% and increases the damage inflicted on enemies with harmful effects by 30%. Makes an enemy (Boss monsters excluded) oblivious for 2 turns with each attack. Passive skills aren''t activated in oblivion state. [Automatic Effect]',3,NULL,0,1,0,1,'');
 INSERT INTO k_skill VALUES(10012,'Elemental King (Passive)','Always gains attribute advantage when attacking an enemy. When you receive fatal attacks, you will be immune to death for 1 turn. [Automatic Effect]',3,10,1,1,0,1,'');
 INSERT INTO k_skill VALUES(10013,'Mach Crush','Attacks all enemies with powerful magical energy. The damage increases by 30% for each harmful effect on the enemies. The damage increases by 50% if there''s only one harmful effect on the enemies.',3,4,2,0,1,5,'2.2*{ATK}');
 INSERT INTO k_skill VALUES(10015,'Conversion of Magic (Passive)',replace('Removes a harmful effect, except inability effects, on all allies each turn and the allies will recover their HP by 3% for each harmful effect removed. \n[Automatic Effect]','\n',char(10)),3,NULL,0,1,0,1,'');
@@ -2228,15 +2275,15 @@ INSERT INTO k_skill VALUES(7901,'Monkey Wand','Attacks with the Monkey Wand and
 INSERT INTO k_skill VALUES(7903,'Monkey Wand','Attacks with the Monkey Wand and stuns the enemy for 1 turn with a 35% chance.',1,NULL,1,0,0,5,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(7904,'Monkey Wand','Attacks with the Monkey Wand and stuns the enemy for 1 turn with a 35% chance.',1,NULL,1,0,0,5,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(7905,'Monkey Wand','Attacks with the Monkey Wand and stuns the enemy for 1 turn with a 35% chance.',1,NULL,1,0,0,5,'4.0*{ATK}');
-INSERT INTO k_skill VALUES(7907,'Fire Monkey Wand','Attacks and decreases the Defense for 2 turns with a 75% chance and recovers your HP by 15%.',2,4,1,0,0,6,'7.2*{ATK}');
-INSERT INTO k_skill VALUES(7908,'Lightning Monkey Wand','Attacks and decreases the Defense for 2 turns with a 75% chance and recovers your Attack Bar by 50%.',2,4,1,0,0,6,'7.2*{ATK}');
-INSERT INTO k_skill VALUES(7910,'Dark Monkey Wand','Attacks the enemy to decrease the Defense for 2 turns and to steal 1 beneficial effect with a 75% chance each.',2,4,1,0,0,6,'7.2*{ATK}');
+INSERT INTO k_skill VALUES(7907,'Fire Monkey Wand','Attacks and decreases the Defense for 2 turns with a 75% chance and recovers your HP by 15%.',2,3,1,0,0,6,'7.2*{ATK}');
+INSERT INTO k_skill VALUES(7908,'Lightning Monkey Wand','Attacks and decreases the Defense for 2 turns with a 75% chance and recovers your Attack Bar by 50%.',2,3,1,0,0,6,'7.2*{ATK}');
+INSERT INTO k_skill VALUES(7910,'Dark Monkey Wand','Attacks the enemy to decrease the Defense for 2 turns and to steal 1 beneficial effect with a 75% chance each.',2,3,1,0,0,6,'7.2*{ATK}');
 INSERT INTO k_skill VALUES(7906,'All or Nothing','Attacks all enemies and stuns them for 1 turn with a 75% chance. Increases your Attack Bar by 25% per stunned enemy after the attack.',2,4,1,0,1,5,'3.3*{ATK}');
 INSERT INTO k_skill VALUES(7909,'All or Nothing','Attacks all enemies and stuns them for 1 turn with a 75% chance. Increases your Attack Bar by 25% per stunned enemy after the attack.',2,4,1,0,1,5,'3.3*{ATK}');
 INSERT INTO k_skill VALUES(7912,'Gold Headband (Passive)',replace('Gains immunity against inability effects and increases your Resistance by 5% and Attack Power by 20% whenever you''re attacked. Accumulated up to 10 times. \n[Automatic Effect]','\n',char(10)),3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(7911,'Alter Ego Attack','Summons an alter ego that attacks the enemy 4 times, granting you invincibility for 1 turn and immunity for 2 turns. Removes a beneficial effect granted on the enemy when an attack lands as a Critical Hit.',3,4,4,0,0,5,'2.2*{ATK}');
+INSERT INTO k_skill VALUES(7911,'Alter Ego Attack','Summons an alter ego that attacks the enemy 6 times, granting you invincibility for 1 turn and immunity for 2 turns. Removes a beneficial effect granted on the enemy when an attack lands as a Critical Hit.',3,4,6,0,0,5,'1.5*{ATK}');
 INSERT INTO k_skill VALUES(7913,'Stone Monkey (Passive)','Decreases the incoming damage by 35% and counterattacks with a 35% chance when an ally is attacked. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(7914,'Giant Net','Attacks all enemies with a giant net and puts them to sleep for 1 turn and decreases the Attack Speed for 2 turns with an 80% chance each. The damage of this skill will increase according to your MAX HP.',3,5,1,0,1,5,'2.7*{ATK} + 0.18*{MAX HP}');
+INSERT INTO k_skill VALUES(7914,'Giant Net','Attacks all enemies with the damage that increases according to your MAX HP and puts them to sleep for 1 turn and decreases the Attack Speed for 2 turns with an 80% chance each. In addition, decreases the target''s Attack Bar by 50% per harmful effect granted on each enemy.',3,5,1,0,1,5,'2.7*{ATK} + 0.18*{MAX HP}');
 INSERT INTO k_skill VALUES(7915,'Summon Clouds','Attacks all enemies with a giant storm cloud to decrease their Defense for 2 turns and stuns them for 1 turn with a 50% chance. The damage of this skill will increase according to your MAX HP.',3,5,1,0,0,5,'2.7*{ATK} + 0.18*{MAX HP}');
 INSERT INTO k_skill VALUES(7202,'Help Me, Teddy','Summons a teddy bear to attack the enemy. This attack has a 25% chance to forcibly put the enemy to sleep for 1 turn. Acquires another turn if the enemy falls asleep.',1,NULL,1,0,0,6,'3.8*{ATK}');
 INSERT INTO k_skill VALUES(7201,'Help Me, Teddy','Summons a teddy bear to attack the enemy. This attack has a 25% chance to forcibly put the enemy to sleep for 1 turn. Acquires another turn if the enemy falls asleep.',1,NULL,1,0,0,6,'3.8*{ATK}');
@@ -2258,9 +2305,9 @@ INSERT INTO k_skill VALUES(7101,'Passing Time','Attacks 3 times and recovers 15%
 INSERT INTO k_skill VALUES(7103,'Passing Time','Attacks 3 times and recovers 15% of the Attack Bar each time the attack lands as a Critical Hit.',1,NULL,3,0,0,4,'1.3*{ATK}');
 INSERT INTO k_skill VALUES(7104,'Passing Time','Attacks 3 times and recovers 15% of the Attack Bar each time the attack lands as a Critical Hit.',1,NULL,3,0,0,4,'1.3*{ATK}');
 INSERT INTO k_skill VALUES(7105,'Passing Time','Attacks 3 times and recovers 15% of the Attack Bar each time the attack lands as a Critical Hit.',1,NULL,3,0,0,4,'1.3*{ATK}');
-INSERT INTO k_skill VALUES(7106,'Predicted Future','Attacks all enemies with an 80% chance to remove beneficial effects, inflicting Continuous Damage equal to the number of removed beneficial effects for 2 turns.',2,4,1,0,0,6,'3.0*{ATK}');
-INSERT INTO k_skill VALUES(7109,'Predicted Future','Attacks all enemies with an 80% chance to remove beneficial effects, inflicting Continuous Damage equal to the number of removed beneficial effects for 2 turns.',2,4,1,0,0,6,'3.0*{ATK}');
-INSERT INTO k_skill VALUES(7107,'Predicted Future','Attacks all enemies with an 80% chance to remove beneficial effects, inflicting Continuous Damage equal to the number of removed beneficial effects for 2 turns.',2,4,1,0,0,6,'3.0*{ATK}');
+INSERT INTO k_skill VALUES(7106,'Predicted Future','Attacks all enemies with an 80% chance to remove beneficial effects, inflicting Continuous Damage equal to the number of removed beneficial effects for 2 turns.',2,4,1,0,1,6,'3.0*{ATK}');
+INSERT INTO k_skill VALUES(7109,'Predicted Future','Attacks all enemies with an 80% chance to remove beneficial effects, inflicting Continuous Damage equal to the number of removed beneficial effects for 2 turns.',2,4,1,0,1,6,'3.0*{ATK}');
+INSERT INTO k_skill VALUES(7107,'Predicted Future','Attacks all enemies with an 80% chance to remove beneficial effects, inflicting Continuous Damage equal to the number of removed beneficial effects for 2 turns.',2,4,1,0,1,6,'3.0*{ATK}');
 INSERT INTO k_skill VALUES(7108,'Fate of Destruction','Inflicts Continuous Damage for 2 turns to the target enemy and sets up a bomb to blow up after 2 turns. Instantly gains another turn after using this skill.',2,4,1,0,1,5,'5.0*{ATK}');
 INSERT INTO k_skill VALUES(7110,'Fate of Destruction','Inflicts Continuous Damage for 2 turns to the target enemy and sets up a bomb to blow up after 2 turns. Instantly gains another turn after using this skill.',2,4,1,0,1,5,'5.0*{ATK}');
 INSERT INTO k_skill VALUES(7112,'Loss of Cause and Effect (Passive)','Removes all harmful effects if you start the turn with harmful effects. Recovers HP of all allies by 10% of your MAX HP for each removed harmful effect. [Automatic Effect]',3,NULL,1,1,0,1,'');
@@ -2324,7 +2371,7 @@ INSERT INTO k_skill VALUES(10506,'Sweeping Waves','Attacks all enemies with migh
 INSERT INTO k_skill VALUES(10508,'Sweeping Waves','Attacks all enemies with mighty waves, Silencing them for 2 turns. The enemies under the Silence Effect won''t be able to use skills with cooldown time excluding the passive skills.',2,5,2,0,1,2,'3.0*{ATK}');
 INSERT INTO k_skill VALUES(10509,'Sweeping Waves','Attacks all enemies with mighty waves, Silencing them for 2 turns. The enemies under the Silence Effect won''t be able to use skills with cooldown time excluding the passive skills.',2,5,2,0,1,2,'3.0*{ATK}');
 INSERT INTO k_skill VALUES(10512,'Rain of Stones','Attacks the enemies multiple times with flaming meteoroids with each attack having a 25% chance to stun the target for 1 turn. Your Attack Bar will be recovered by 25% for each enemy stunned by this attack.',3,5,1,0,1,6,'{ATK}');
-INSERT INTO k_skill VALUES(10511,'Maelstrom','Attacks all enemies to inflict damage proportionate to your Attack Speed and decreases their Attack Bar to 0. Also decreases their attack speed for 2 turns.',3,5,1,0,1,5,'{ATK}*({SPD} + 350)/100');
+INSERT INTO k_skill VALUES(10511,'Maelstrom','Attacks all enemies with the attack that won''t land as a Glancing Hit to inflict damage proportionate to your Attack Speed and decreases their Attack Bar to 0. Also decreases their attack speed for 2 turns.',3,5,1,0,1,5,'{ATK}*({SPD} + 350)/100');
 INSERT INTO k_skill VALUES(10513,'Mega Tsunami','Attacks all enemies with a massive tidal wave, removing all beneficial effects on the enemies and decreases the Attack Bar of each enemy by 25%.',3,6,1,0,1,6,'4.4*{ATK}');
 INSERT INTO k_skill VALUES(10514,'Holy Ground','Removes all harmful effects on all allies and grants them Immunity and Invincibility for 1 turn. Increases the Immunity effect up to 3 turns proportionate to the no. of harmful effects removed from each ally.',3,6,1,0,1,3,'');
 INSERT INTO k_skill VALUES(10515,'King of the Ruins(Passive)','Attacks will deal 50% increased damage on enemies under harmful effects. Also, attacks will deal 50% increased damage on enemies with no beneficial effects. Additionally, decreases the HP of all enemies except the target by 30% of the damage dealt after every attack. [Automatic Effect]',3,NULL,1,1,0,1,'');
@@ -2366,8 +2413,8 @@ INSERT INTO k_skill VALUES(10905,'Preemptive Strike','Attacks the enemy 2 times.
 INSERT INTO k_skill VALUES(10907,'Cutting Magic','Attacks an enemy and then removes all beneficial effects on the target. If there are 2 or more beneficial effects removed, the Attack Bar of all allies will be increased by 20% each.',2,4,2,0,0,5,'2.8*{ATK}');
 INSERT INTO k_skill VALUES(10906,'Cutting Magic','Attacks an enemy and then removes all beneficial effects on the target. If there are 2 or more beneficial effects removed, the Attack Bar of all allies will be increased by 20% each.',2,4,2,0,0,5,'2.8*{ATK}');
 INSERT INTO k_skill VALUES(10910,'Cutting Magic','Attacks an enemy and then removes all beneficial effects on the target. If there are 2 or more beneficial effects removed, the Attack Bar of all allies will be increased by 20% each.',2,4,2,0,0,5,'2.8*{ATK}');
-INSERT INTO k_skill VALUES(10908,'Briefing','Removes all harmful effects on an ally target and fills up the ally''s Attack Bar.',2,4,0,0,1,3,'');
-INSERT INTO k_skill VALUES(10909,'Briefing','Removes all harmful effects on an ally target and fills up the ally''s Attack Bar.',2,4,0,0,1,3,'');
+INSERT INTO k_skill VALUES(10908,'Briefing','Removes all harmful effects on an ally target and fills up the ally''s Attack Bar.',2,4,0,0,0,3,'');
+INSERT INTO k_skill VALUES(10909,'Briefing','Removes all harmful effects on an ally target and fills up the ally''s Attack Bar.',2,4,0,0,0,3,'');
 INSERT INTO k_skill VALUES(10912,'Attack Command','Removes all harmful effects on all allies. After that, 3 randomly selected allies will attack an enemy target.',3,6,3,0,1,3,'');
 INSERT INTO k_skill VALUES(10911,'Medical Support','Heals all allies by 30% of your MAX HP and increases their Defense for 2 turns. This skill generates a shield that lasts for 2 turns and is equivalent of half of the excessive heal.',3,6,1,0,1,5,'0.3*{MAX HP}');
 INSERT INTO k_skill VALUES(10913,'Lock Down','Attacks the enemy 2 times with each attack decreasing the target''s Attack Bar by 25%. Additionally, this attack will increase the Defense of all allies for 3 turns.',3,5,1,0,0,5,'3.8*{ATK}');
@@ -2464,7 +2511,7 @@ INSERT INTO k_skill VALUES(11315,'Deadly Charm(Passive)','Increases your skill a
 INSERT INTO k_skill VALUES(11308,'Sweet Dreams','Attacks an enemy. This attack has a 75% chance to remove all beneficial effect and puts the target to sleep for 1 turn.',2,4,1,0,0,7,'5.2*{ATK}');
 INSERT INTO k_skill VALUES(11309,'Sweet Dreams','Attacks an enemy. This attack has a 75% chance to remove all beneficial effect and puts the target to sleep for 1 turn.',2,4,1,0,0,7,'5.2*{ATK}');
 INSERT INTO k_skill VALUES(11312,'Charming Voice','Attacks an enemy, stealing all beneficial effects and sets all of the enemy''s skills on max cooldown time. Decreases the cooldown time of the [Charming Voice] skill by the number of beneficial effects stolen from the enemy. If the skill didn''t set the enemy''s skills on max cooldown time, the cooldown time of the [Charming Voice] will reset.',3,5,1,0,0,3,'7.2*{ATK}');
-INSERT INTO k_skill VALUES(11311,'Oasis''s Blessing','Increases the Attack Bar of all allies by 25% each. This skill will also create a shield that absorbs damage and increases your Attack Power for 3 turns. The Shield amount is proportionate to your level.',3,5,1,0,0,4,'120*{Level}');
+INSERT INTO k_skill VALUES(11311,'Oasis''s Blessing','Increases the Attack Bar of all allies by 25% each. This skill will also create a shield that absorbs damage and increases your Attack Power for 3 turns. The Shield amount is proportionate to your level.',3,5,1,0,1,4,'120*{Level}');
 INSERT INTO k_skill VALUES(11313,'Delayed Promise','Resets the Attack Bar of the enemy target and decreases the Attack Bar of the other enemies by 30% each. Also puts all enemies to sleep for 2 turns.',3,7,1,0,1,3,'');
 INSERT INTO k_skill VALUES(11314,'Gaze of Oblivion','Silences all enemies and puts them in Oblivion state for 2 turns. Passive skills aren''t activated in Oblivion state and enemies under the Silence Effect won''t be able to use skills with cooldown time excluding the passive skills.',3,7,1,0,1,3,'');
 INSERT INTO k_skill VALUES(11602,'Hammer Punch','Attacks the enemy 2 times and deals damage proportionate to your Defense. Each attack has a 25% chance to stun the enemy for 1 turn. If the target is not suffering any harmful effects, 1 additional attack is added.',1,NULL,3,0,0,7,'1.8*{DEF}');
@@ -2474,9 +2521,9 @@ INSERT INTO k_skill VALUES(11604,'Hammer Punch','Attacks the enemy 2 times and d
 INSERT INTO k_skill VALUES(11605,'Hammer Punch','Attacks the enemy 2 times and deals damage proportionate to your Defense. Each attack has a 25% chance to stun the enemy for 1 turn. If the target is not suffering any harmful effects, 1 additional attack is added.',1,NULL,3,0,0,7,'1.8*{DEF}');
 INSERT INTO k_skill VALUES(11607,'Body Press','Crushes all enemies and decreases the Attack Bar of each enemy by 30%. The damage of this attack is proportionate to your MAX HP and Defense.',2,4,1,0,1,5,'0.15*{MAX HP} + 1.25*{DEF}');
 INSERT INTO k_skill VALUES(11609,'Body Press','Crushes all enemies and decreases the Attack Bar of each enemy by 30%. The damage of this attack is proportionate to your MAX HP and Defense.',2,4,1,0,1,5,'0.15*{MAX HP} + 1.25*{DEF}');
-INSERT INTO k_skill VALUES(11606,'Taunt','Unleashes a devastating shout which has a 50% chance to provoke the enemy for 1 turn.',2,4,0,0,0,5,'');
-INSERT INTO k_skill VALUES(11608,'Taunt','Unleashes a devastating shout which has a 50% chance to provoke the enemy for 1 turn.',2,4,0,0,0,5,'');
-INSERT INTO k_skill VALUES(11610,'Taunt','Unleashes a devastating shout which has a 50% chance to provoke the enemy for 1 turn.',2,4,0,0,0,5,'');
+INSERT INTO k_skill VALUES(11606,'Taunt','Unleashes a devastating shout which has a 50% chance to provoke the enemy for 1 turn.',2,4,0,0,1,5,'');
+INSERT INTO k_skill VALUES(11608,'Taunt','Unleashes a devastating shout which has a 50% chance to provoke the enemy for 1 turn.',2,4,0,0,1,5,'');
+INSERT INTO k_skill VALUES(11610,'Taunt','Unleashes a devastating shout which has a 50% chance to provoke the enemy for 1 turn.',2,4,0,0,1,5,'');
 INSERT INTO k_skill VALUES(11612,'Full Power Punch','Strikes with every last bit of power left in the body. This attack will ignore the target''s Defense, but you will be stunned for 1 turn after performing this attack. The damage of this attack increases according to your Defense.',3,5,2,0,0,5,'1.6*{DEF}');
 INSERT INTO k_skill VALUES(11611,'Twisted Senses (Passive)','Becomes immune against Defense decreasing effects. Your Attack Bar is filled up by 30% each time you get hit by a Critical Hit. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(11613,'Strange Reversible Reaction (Passive)','Your Defense is increased by 25% for every beneficial effect on you and your Attack Speed is increased by 25 for every harmful effect you suffer. [Automatic Effect]',3,NULL,1,1,0,1,'');
@@ -2489,12 +2536,12 @@ INSERT INTO k_skill VALUES(11505,'Trickster','Attacks an enemy 3 times. Each att
 INSERT INTO k_skill VALUES(11504,'Trickster','Attacks an enemy 3 times. Each attack has a 30% chance to decrease the enemy''s Attack Speed for 2 turns. This attack will deal more damage according to your Attack Speed.',1,NULL,3,0,0,7,'{ATK}*({SPD} + 180)/230');
 INSERT INTO k_skill VALUES(11507,'Ghost Appearance','Calls upon the wandering souls to attack the target 4 times. Each hit has a 30% chance to cast one random effect among weaken the Defense, weaken the Attack Power or disturb recovery for 2 turns. This attack will deal more damage according to your Attack Speed.',2,4,4,0,0,6,'{ATK}*({SPD} + 180)/230');
 INSERT INTO k_skill VALUES(11509,'Ghost Appearance','Calls upon the wandering souls to attack the target 4 times. Each hit has a 30% chance to cast one random effect among weaken the Defense, weaken the Attack Power or disturb recovery for 2 turns. This attack will deal more damage according to your Attack Speed.',2,4,4,0,0,6,'{ATK}*({SPD} + 180)/230');
-INSERT INTO k_skill VALUES(11506,'Song of the Night Wind','Increases the Attack Speed and Critical Rate of all allies for 2 turns.',2,4,0,0,0,2,'');
-INSERT INTO k_skill VALUES(11508,'Song of the Night Wind','Increases the Attack Speed and Critical Rate of all allies for 2 turns.',2,4,0,0,0,2,'');
+INSERT INTO k_skill VALUES(11506,'Song of the Night Wind','Increases the Attack Speed and Critical Rate of all allies for 2 turns.',2,4,0,0,1,2,'');
+INSERT INTO k_skill VALUES(11508,'Song of the Night Wind','Increases the Attack Speed and Critical Rate of all allies for 2 turns.',2,4,0,0,1,2,'');
 INSERT INTO k_skill VALUES(11510,'Song of the Night Wind','Increases the Attack Speed and Critical Rate of all allies for 2 turns.',2,4,0,0,1,2,'');
 INSERT INTO k_skill VALUES(11512,'Fire Starter','Attacks all enemies 2 times. The first attack has a 75% chance to inflict Continuous Damage for 1 turn and the second attack has a 25% chance to increase the duration of Continuous Damage inflicted on them by 1 turn.',3,5,2,0,1,5,'2.2*{ATK}');
 INSERT INTO k_skill VALUES(11511,'The Cunning (Passive)','Steals a beneficial effect from the enemy target when landing an attack. Your Attack Speed increases according to the number of beneficial effects currently on you. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(11513,'The Shadow of the Moon (Passive)','Creates a shield that''s equivalent to 10% of your MAX HP for 1 turn on all allies when being attacked by an enemy. This effect only activates once a turn. [Automatic Effect]',3,NULL,1,1,0,3,'');
+INSERT INTO k_skill VALUES(11513,'The Shadow of the Moon (Passive)','Creates a shield that''s equivalent to 10% of your MAX HP for 1 turn on all allies when you''re attacked. This effect only activates once a turn. [Automatic Effect]',3,NULL,1,1,0,3,'');
 INSERT INTO k_skill VALUES(11514,'Long Waiting (Passive)','Becomes immune against inability effects. Your Attack Power is increased by 15%, up to 150%, whenever an enemy''s turn ends. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(11515,'The Night''s Comfort (Passive)','If your turn ends without attacking any enemies, a shield that is proportionate to your level and lasts for 3 turns is generated on all allies. While having the shield, all damage you deal is increased by 50%. [Automatic Effect]',3,NULL,0,1,1,4,'');
 INSERT INTO k_skill VALUES(4009,'Crushing Rocks','Attacks with 4 strong consecutive strikes. Each strike has a 30% chance to decrease the enemy''s Defense for 2 turns.',2,3,4,0,0,6,'1.3*{ATK}');
@@ -2532,15 +2579,15 @@ INSERT INTO k_skill VALUES(11810,'Wood Vine','Attacks the enemy, decreases the t
 INSERT INTO k_skill VALUES(11811,'Hedgehog''s Thorn','Increases the Critical Rate of all allies and decreases their chances of receiving a Critical Hit for 2 turns.',3,5,0,0,1,3,'');
 INSERT INTO k_skill VALUES(11813,'Deer''s Song','Removes all harmful effects on all allies and grants immunity on the allies with no harmful effects to be removed for 2 turns. Afterwards, creates a shield that''s proportionate to your Defense on all allies for 3 turns.',3,5,0,0,1,4,'2.5*{DEF}');
 INSERT INTO k_skill VALUES(11814,'Buddy (Passive)','Becomes best friends with an ally with the lowest HP when the battle begins. Grants one of Increase ATK/Recovery/Endure effects according to the friend''s HP status for 1 turn. [Automatic Effect]',3,NULL,0,1,0,1,'');
-INSERT INTO k_skill VALUES(11815,'Owl''s Hoot','Increases the Attack Speed of all allies and recovers their HP by 15% in each turn for 3 turns.',3,6,0,0,0,3,'');
+INSERT INTO k_skill VALUES(11815,'Owl''s Hoot','Increases the Attack Speed of all allies and recovers their HP by 15% in each turn for 3 turns.',3,6,0,0,1,3,'');
 INSERT INTO k_skill VALUES(11902,'Serenity','Attacks the enemy 2 times and increases the chances of the enemy to land a Glancing Hit for 2 turns with a 30% chance on each strike.',1,NULL,2,0,0,6,'1.8*{ATK}');
 INSERT INTO k_skill VALUES(11901,'Serenity','Attacks the enemy 2 times and increases the chances of the enemy to land a Glancing Hit for 2 turns with a 30% chance on each strike.',1,NULL,2,0,0,6,'1.8*{ATK}');
 INSERT INTO k_skill VALUES(11903,'Serenity','Attacks the enemy 2 times and increases the chances of the enemy to land a Glancing Hit for 2 turns with a 30% chance on each strike.',1,NULL,2,0,0,6,'1.8*{ATK}');
 INSERT INTO k_skill VALUES(11904,'Serenity','Attacks the enemy 2 times and increases the chances of the enemy to land a Glancing Hit for 2 turns with a 30% chance on each strike.',1,NULL,2,0,0,6,'1.8*{ATK}');
 INSERT INTO k_skill VALUES(11905,'Serenity','Attacks the enemy 2 times and increases the chances of the enemy to land a Glancing Hit for 2 turns with a 30% chance on each strike.',1,NULL,2,0,0,6,'1.8*{ATK}');
-INSERT INTO k_skill VALUES(11907,'Overwhelm','Attacks all enemies and increases their cooldowns by 1 turn each with a 70% chance.',2,4,1,0,0,5,'3.2*{ATK}');
-INSERT INTO k_skill VALUES(11906,'Overwhelm','Attacks all enemies and increases their cooldowns by 1 turn each with a 70% chance.',2,4,1,0,0,5,'3.2*{ATK}');
-INSERT INTO k_skill VALUES(11910,'Overwhelm','Attacks all enemies and increases their cooldowns by 1 turn each with a 70% chance.',2,4,1,0,0,5,'3.2*{ATK}');
+INSERT INTO k_skill VALUES(11907,'Overwhelm','Attacks all enemies and increases their cooldowns by 1 turn each with a 70% chance.',2,4,1,0,1,5,'3.2*{ATK}');
+INSERT INTO k_skill VALUES(11906,'Overwhelm','Attacks all enemies and increases their cooldowns by 1 turn each with a 70% chance.',2,4,1,0,1,5,'3.2*{ATK}');
+INSERT INTO k_skill VALUES(11910,'Overwhelm','Attacks all enemies and increases their cooldowns by 1 turn each with a 70% chance.',2,4,1,0,1,5,'3.2*{ATK}');
 INSERT INTO k_skill VALUES(11908,'Ventilate','Instantly readies all skills of an ally except yourself. [Ventilate] will not be affected by other cooldown reduction or increasing skills.',2,4,0,0,0,2,'');
 INSERT INTO k_skill VALUES(11909,'Ventilate','Instantly readies all skills of an ally except yourself. [Ventilate] will not be affected by other cooldown reduction or increasing skills.',2,4,0,0,0,2,'');
 INSERT INTO k_skill VALUES(11912,'Hellfire','Removes all beneficial effects granted on the enemy and weakens the enemy''s Defense for 1 turn if you successfully remove the beneficial effects. Decreases the HP of yourself and the enemy target by 30% each with a flame and decreases the HP by 15% each if it''s a Boss. Inflicts great damage to the target and creates a shield that''s 50% of the inflicted damage for 3 turns afterwards.',3,4,1,0,0,5,'8.6*{ATK}');
@@ -2577,14 +2624,14 @@ INSERT INTO k_skill VALUES(9909,'Purify','Removes all harmful effects on the tar
 INSERT INTO k_skill VALUES(6309,'Archangel''s Blessing','Recovers an ally''s HP by 50%.',2,5,0,0,0,3,'');
 INSERT INTO k_skill VALUES(6107,'Counterattack','Increases the critical rate for 2 turns and counterattacks when attacked. The Attack Bar is increased by 50%, and the damage you receive will be reduced by half when you get attacked while this skill is on cooldown.',2,4,0,0,0,2,'');
 INSERT INTO k_skill VALUES(4609,'Dispel!','Removes all of the harmful effects on you and the target ally and recovers 20% of your HP.',2,3,0,0,1,5,'0.15*{Target MAX HP}');
-INSERT INTO k_skill VALUES(6709,'Fill','Recovers the HP of the 2 allies with the lowest HP ratio by 25% and 15%.',2,4,1,0,0,5,'');
+INSERT INTO k_skill VALUES(6709,'Fill','Recovers the HP of the 2 allies with the lowest HP ratio by 25% and 15%.',2,4,1,0,1,5,'');
 INSERT INTO k_skill VALUES(4610,'Heal!','Removes all harmful effects on the target ally and recovers both your HP and the target''s HP by 20%.',2,3,0,0,1,5,'0.15*{Target MAX HP}');
 INSERT INTO k_skill VALUES(6210,'Plague','Spreads a plague to all enemies with an 80% chance to inflict 2 Continuous Damage effects that lasts for 2 turns.',2,5,0,0,1,5,'');
 INSERT INTO k_skill VALUES(5609,'Predator''s Cry','Recovers the HP of all allies by 15% each and increases their Attack Speed for 2 turns.',2,4,0,0,1,5,'0.15*{Target MAX HP} (Fixed)');
 INSERT INTO k_skill VALUES(7310,'Toad Poison','Covers the enemy with poison, removes 1 beneficial effect, and prevents the target from receiving beneficial effects for 1 turn with a 75% chance.',2,4,0,0,0,6,'5.3*{ATK}');
 INSERT INTO k_skill VALUES(99006,'Best Ingredient (Passive)','The XP granted will additionally increase by 50% when used as Power-up material for Monsters with the same attribute.',2,NULL,0,1,0,1,'');
 INSERT INTO k_skill VALUES(4607,'Heal!','Removes all harmful effects on the target ally and recovers both your HP and the target''s HP by 20%.',2,3,0,0,1,5,'0.15*{Target MAX HP}');
-INSERT INTO k_skill VALUES(6706,'Fill','Recovers the HP of the 2 allies with the lowest HP ratio by 25% and 15%.',2,4,1,0,0,5,'');
+INSERT INTO k_skill VALUES(6706,'Fill','Recovers the HP of the 2 allies with the lowest HP ratio by 25% and 15%.',2,4,1,0,1,5,'');
 INSERT INTO k_skill VALUES(8024,'Wield','Quickly draws the sword to attack the enemy, decreasing the target''s Defense for 2 turns with a 50% chance. This skill has a 20% chance to activate the Sword of the Supreme Sky Wolf, and the activation chance increases by 10% additionally when you land a Critical Hit.',1,NULL,1,0,0,6,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(8025,'Wield','Quickly draws the sword to attack the enemy, decreasing the target''s Defense for 2 turns with a 50% chance. This skill has a 20% chance to activate the Sword of the Supreme Sky Wolf, and the activation chance increases by 10% additionally when you land a Critical Hit.',1,NULL,1,0,0,6,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(8023,'Wield','Quickly draws the sword to attack the enemy, decreasing the target''s Defense for 2 turns with a 50% chance. This skill has a 20% chance to activate the Sword of the Supreme Sky Wolf, and the activation chance increases by 10% additionally when you land a Critical Hit.',1,NULL,1,0,0,6,'4.0*{ATK}');
@@ -2706,7 +2753,7 @@ INSERT INTO k_skill VALUES(12205,'Tempting Dream','Attacks the enemy target to a
 INSERT INTO k_skill VALUES(12206,'Nightmare Melody','Puts all enemies to sleep for 1 turn with a 50% chance and inflicts Continuous Damage for 2 turns with a 50% chance.',2,4,0,0,1,5,'');
 INSERT INTO k_skill VALUES(12207,'Healing Music','Removes harmful effects of an ally target, recovers the HP of all allies by 20% each, and grants immunity for 1 turn.',2,4,0,0,1,5,'');
 INSERT INTO k_skill VALUES(12208,'Healing Music','Removes harmful effects of an ally target, recovers the HP of all allies by 20% each, and grants immunity for 1 turn.',2,4,0,0,1,5,'');
-INSERT INTO k_skill VALUES(12209,'Nightmare Melody','Puts all enemies to sleep for 1 turn with a 50% chance and inflicts Continuous Damage for 2 turns with a 50% chance.',2,4,0,0,0,5,'');
+INSERT INTO k_skill VALUES(12209,'Nightmare Melody','Puts all enemies to sleep for 1 turn with a 50% chance and inflicts Continuous Damage for 2 turns with a 50% chance.',2,4,0,0,1,5,'');
 INSERT INTO k_skill VALUES(12210,'Healing Music','Removes harmful effects of an ally target, recovers the HP of all allies by 20% each, and grants immunity for 1 turn.',2,4,0,0,1,5,'');
 INSERT INTO k_skill VALUES(12211,'Distorted Healing Music','Attacks all enemies to put them to sleep for 1 turn and creates a shield that''s equivalent to 30% of the damage on all allies for 2 turns. The damage of this skill increases accordingly to your MAX HP.',3,6,1,0,1,3,'{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(12212,'Unwanted Harmony','Evens the HP of the enemy target, excluding the Boss, and the ally with the lowest HP. Decreases the HP of the enemy target by 15% and recovers the HP of the ally target by 15%.',3,6,0,0,0,3,'15 (Fixed)');
@@ -2715,9 +2762,9 @@ INSERT INTO k_skill VALUES(12214,'Dreamy Leader (Passive)','Removes a random ben
 INSERT INTO k_skill VALUES(12215,'Song of Switched Destiny','Switches the current Attack Bar and HP of the enemy, excluding the Boss, or another ally target and puts yourself into sleep for 1 turn. This effect can''t be resisted and ignores the immunity.',3,7,0,0,0,3,'');
 INSERT INTO k_skill VALUES(11216,'Pierce Soul','Attacks the enemy 2 times to disturb the HP recovery for 2 turns with a 30% chance each. The damage also increases as the enemy''s HP decreases.',1,NULL,2,0,0,6,'{ATK}*(4.0 - 2.0*{Target Current HP %})');
 INSERT INTO k_skill VALUES(11217,'Pierce Soul','Attacks the enemy 2 times to disturb the HP recovery for 2 turns with a 30% chance each. The damage also increases according to your Attack Speed.',1,NULL,2,0,0,6,'{ATK}*({SPD} + 120)/110');
-INSERT INTO k_skill VALUES(11218,'Pierce Soul','Attacks the enemy 2 times to disturb the HP recovery for 2 turns and stuns the enemy for 1 turn with a 30% chance each.',1,NULL,2,0,0,6,'2.0*{ATK}');
+INSERT INTO k_skill VALUES(11218,'Pierce Soul','Attacks the enemy 2 times to disturb the HP recovery for 2 turns and stuns the enemy for 1 turn with a 30% chance each.',-1,NULL,2,0,0,6,'2.0*{ATK}');
 INSERT INTO k_skill VALUES(11219,'Pierce Soul','Attacks the enemy 2 times to decrease the Defense for 2 turns with a 30% chance each and disturbs the HP recovery.',1,NULL,2,0,0,6,'2.0*{ATK}');
-INSERT INTO k_skill VALUES(11220,'Pierce Soul','Attacks the enemy 2 times to disturb the HP recovery for 2 turns with a 30% chance each. The damage increases according to your MAX HP.',1,NULL,2,0,0,6,'0.5*{ATK} + 0.1*{MAX HP}');
+INSERT INTO k_skill VALUES(11220,'Pierce Soul','Attacks the enemy 2 times to disturb the HP recovery for 2 turns with a 30% chance each. The damage increases according to your MAX HP.',-1,NULL,2,0,0,6,'2.0*{ATK}');
 INSERT INTO k_skill VALUES(12301,'Ice Horn','Attacks the enemy and Freezes the target for 1 turn with a 25% chance. This attack will deal more damage according to your MAX HP.',1,NULL,1,0,0,7,'1.8*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(12302,'Fire Horn','Attacks and Stuns the enemy for 1 turn with a 25% chance. The damage increases accordingly to your MAX HP.',1,NULL,1,0,0,7,'1.8*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(12303,'Lightning Horn','Attacks and Stuns the enemy for 1 turn with a 25% chance. The damage increases accordingly to your MAX HP.',1,NULL,1,0,0,7,'1.8*{ATK} + 0.12*{MAX HP}');
@@ -2728,9 +2775,9 @@ INSERT INTO k_skill VALUES(12307,'Nature''s Protection','Creates a shield that''
 INSERT INTO k_skill VALUES(12308,'Nature''s Protection','Creates a shield that''s 30% of your MAX HP for 3 turns and creates a shield that''s 20% of your MAX HP on all other allies for 2 turns.',2,5,1,0,1,6,'');
 INSERT INTO k_skill VALUES(12309,'Fierce Charge','Attacks the enemy to Provoke for 1 turn with a 75% chance and counterattacks the enemy for 2 turns whenever you''re attacked. The damage increases accordingly to your MAX HP.',2,5,1,0,0,7,'3.0*{ATK} + 0.2*{MAX HP}');
 INSERT INTO k_skill VALUES(12310,'Nature''s Protection','Creates a shield that''s 30% of your MAX HP for 3 turns and creates a shield that''s 20% of your MAX HP on all other allies for 2 turns.',2,5,1,0,1,6,'');
-INSERT INTO k_skill VALUES(12311,'Protection Wings (Passive)','Recovers your HP by 10% each turn and increases Defense for 2 turns when you''re attacked by an enemy. This effect only activates once a turn. [Automatic Effect]',3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(12311,'Protection Wings (Passive)','Recovers your HP by 10% each turn and increases Defense for 2 turns when you''re attacked. This effect only activates once a turn. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(12312,'Eternal Flame (Passive)','Recovers HP by 10% of your MAX HP when you attack on your turn and reduces damage dealt by Water attribute by 50%. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(12313,'Messenger of the Wind (Passive)','Increases your Attack Bar by 15% each when other allies are attacked by the enemies. [Automatic Effect]',3,NULL,1,1,0,1,'15.0000000000000 (Fixed)');
+INSERT INTO k_skill VALUES(12313,'Messenger of the Wind (Passive)','Increases your Attack Bar by 15% each when other allies are attacked. [Automatic Effect]',3,NULL,1,1,0,1,'15.0000000000000 (Fixed)');
 INSERT INTO k_skill VALUES(12314,'Dazzling Flesh (Passive)','Increase the enemy''s chances of landing a Glancing Hit by 15% and decreases the chances of being inflicted with a critical hit by 50% on yourself additionally when allies are attacked. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(12315,'Other Side of the Moon (Passive)','Reflects 30% of the received damage back to the enemy. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(12316,'Transformation: Human Form','Transforms into a Human Form and you''ll be able to use a new skill. The Attack Speed will be increased proportionate to your MAX HP in Human Form, but your MAX HP will be decreased by 30%. Instantly gains another turn after the transformation.',4,2,1,0,0,1,'');
@@ -2764,7 +2811,7 @@ INSERT INTO k_skill VALUES(12323,'Lightning Horn','Attacks and Stuns the enemy f
 INSERT INTO k_skill VALUES(12324,'Holy Horn','Attacks and Stuns the enemy for 1 turn with a 25% chance. The damage increases accordingly to your MAX HP.',1,NULL,1,0,0,7,'1.8*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(12325,'Dark Horn','Attacks and Stuns the enemy for 1 turn with a 25% chance. The damage increases accordingly to your MAX HP.',1,NULL,1,0,0,7,'1.8*{ATK} + 0.12*{MAX HP}');
 INSERT INTO k_skill VALUES(12326,'Fierce Charge','Attacks the enemy to Provoke for 1 turn with a 75% chance and counterattacks the enemy for 2 turns whenever you''re attacked. The damage increases accordingly to your MAX HP.',2,5,1,0,0,7,'3.0*{ATK} + 0.2*{MAX HP}');
-INSERT INTO k_skill VALUES(12327,'Nature''s Protection','Creates a shield that''s 30% of your MAX HP for 3 turns and creates a shield that''s 20% of your MAX HP on all other allies for 2 turns.',2,5,1,0,0,6,'');
+INSERT INTO k_skill VALUES(12327,'Nature''s Protection','Creates a shield that''s 30% of your MAX HP for 3 turns and creates a shield that''s 20% of your MAX HP on all other allies for 2 turns.',2,5,1,0,1,6,'');
 INSERT INTO k_skill VALUES(12328,'Nature''s Protection','Creates a shield that''s 30% of your MAX HP for 3 turns and creates a shield that''s 20% of your MAX HP on all other allies for 2 turns.',2,5,1,0,1,6,'');
 INSERT INTO k_skill VALUES(12329,'Fierce Charge','Attacks the enemy to Provoke for 1 turn with a 75% chance and counterattacks the enemy for 2 turns whenever you''re attacked. The damage increases accordingly to your MAX HP.',2,5,1,0,0,7,'3.0*{ATK} + 0.2*{MAX HP}');
 INSERT INTO k_skill VALUES(12330,'Nature''s Protection','Creates a shield that''s 30% of your MAX HP for 3 turns and creates a shield that''s 20% of your MAX HP on all other allies for 2 turns.',2,5,1,0,1,6,'');
@@ -2820,7 +2867,7 @@ INSERT INTO k_skill VALUES(6409,'Triple Crush','Attacks an enemy 3 times. Each a
 INSERT INTO k_skill VALUES(6410,'Super Crush','Attacks and stuns all enemies with a 25% chance. The damage increases according to Defense.',2,4,1,0,0,6,'1.4*{ATK} + 1.4*{DEF}');
 INSERT INTO k_skill VALUES(6411,'Conversion of Magic (Passive)','Removes one harmful effect on allies every turn and recovers HP by 10% if you succeed in removing a harmful effect. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(6412,'Lava Skin (Passive)','Decreases the chances of receiving a Critical Hit by 75%. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(6413,'Mach Crush','Emits magical energy to attack all enemies. The damage increases by 20% for each harmful effect on the enemies.',3,5,1,0,0,4,'2.0*{ATK}');
+INSERT INTO k_skill VALUES(6413,'Mach Crush','Emits magical energy to attack all enemies. The damage increases by 20% for each harmful effect on the enemies.',3,5,1,0,1,4,'2.0*{ATK}');
 INSERT INTO k_skill VALUES(6414,'Flash Attack','Attacks all enemies with great speed. The damage increases according to Attack Speed.',3,5,1,0,0,4,'{ATK}*({SPD} + 160)/210');
 INSERT INTO k_skill VALUES(6415,'Rune Protector (Passive)','Offsets the incoming damage with a 30% chance. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(7416,'Deadly Blow','Unleashes a fatal blow on an enemy, disturbing the target''s HP recovery for 2 turns with a 50% chance.',1,NULL,1,0,0,7,'4.0*{ATK}');
@@ -2976,7 +3023,7 @@ INSERT INTO k_skill VALUES(110016,'Damage All Crystals','Attacks all enemies and
 INSERT INTO k_skill VALUES(111001,'Recovery Disturbance Crystal','Disturbs the HP Recovery of the enemies for 2 turns by a certain chance.',1,NULL,1,0,0,1,'');
 INSERT INTO k_skill VALUES(111002,'Acceleration Crystal','Increases the Attack Bar of the Boss by a certain amount.',1,NULL,1,0,0,1,'');
 INSERT INTO k_skill VALUES(10416,'Mana Bubble','Bursts a mana bubble that deals damage to an enemy and removes a beneficial effect. The damage of this skill increases according to your MAX HP.',1,NULL,1,0,0,5,'2.5*{ATK} + 0.12*{MAX HP}');
-INSERT INTO k_skill VALUES(10417,'Air Shield','Removes all harmful effects on an ally target and casts a shield which is equivalent to 20% of your MAX HP for 3 turns.',2,3,0,0,0,5,'0.2*{MAX HP}');
+INSERT INTO k_skill VALUES(10417,'Air Shield','Removes all harmful effects on an ally target and casts a shield which is equivalent to 20% of your MAX HP for 3 turns.',-1,3,0,0,0,5,'0.2*{MAX HP}');
 INSERT INTO k_skill VALUES(99007,'Ultimate Material (Passive)','Your Monster will reach the MAX Lv. of the current grade when you use this as a power-up material. You can''t use it on the MAX Lv. Monster.',1,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(10616,'Blade Surge','Attacks the enemy target 2 times and attacks all enemies with even more powerful attack on the 3rd attack. Decreases the enemy''s Attack Bar by 25% every hit with a 50% chance.',1,NULL,3,0,1,5,'{ATK}');
 INSERT INTO k_skill VALUES(10618,'Blade Surge','Attacks the enemy target 2 times and attacks all enemies with even more powerful attack on the 3rd attack. Decreases the enemy''s attack speed for 2 turns every hit with a 50% chance.',1,NULL,3,0,1,5,'{ATK}');
@@ -3009,7 +3056,7 @@ INSERT INTO k_skill VALUES(12605,'Crescent Moon Slash','Attacks the enemy 2 time
 INSERT INTO k_skill VALUES(12606,'Spirit Focus','Removes all harmful effects granted on yourself and increases your Attack Power for 2 turns. You instantly gain another turn after using the skill.',2,5,0,0,0,3,'');
 INSERT INTO k_skill VALUES(12607,'Chakram Crush','Attacks all enemies with chakrams 2 times and stuns them for 1 turn with a 30% chance each.',2,4,2,0,1,6,'1.7*{ATK}');
 INSERT INTO k_skill VALUES(12608,'Double Strike','Attacks the enemy 2 times to decrease the Defense with the first attack and decreases the Attack Power afterwards with a 50% chance each.',2,3,2,0,0,4,'2.7*{ATK}');
-INSERT INTO k_skill VALUES(12609,'Chakram Crush','Attacks all enemies with chakrams 2 times and stuns them for 1 turn with a 30% chance each.',2,4,2,0,0,6,'1.7*{ATK}');
+INSERT INTO k_skill VALUES(12609,'Chakram Crush','Attacks all enemies with chakrams 2 times and stuns them for 1 turn with a 30% chance each.',2,4,2,0,1,6,'1.7*{ATK}');
 INSERT INTO k_skill VALUES(12610,'Spirit Focus','Removes all harmful effects granted on yourself and increases your Attack Power for 2 turns. You instantly gain another turn after using the skill.',2,5,0,0,0,3,'');
 INSERT INTO k_skill VALUES(12611,'Deadly Dance','Attacks an enemy target 2 times and the damage dealt to the enemy with half or less HP increases by 50%. The damage that Boomerang Warrior inflicts on the target increases by 50% when they attack together.',3,5,2,0,0,4,'3.8*{ATK}');
 INSERT INTO k_skill VALUES(12612,'Precision (Passive)','The Accuracy will be increased by 25%. Weakens the enemy''s Defense for 1 turn with every attack. If there''s Boomerang Warrior included in the ally team, the Boomerang Warrior''s Accuracy will also be increased by 25%. [Automatic Effect]',3,NULL,1,1,1,1,'');
@@ -3027,7 +3074,7 @@ INSERT INTO k_skill VALUES(12708,'Spirit Focus','Removes all harmful effects gra
 INSERT INTO k_skill VALUES(12709,'Spirit Focus','Removes all harmful effects granted on yourself and increases your Attack Power for 2 turns. You instantly gain another turn after using the skill.',2,5,0,0,0,3,'');
 INSERT INTO k_skill VALUES(12710,'Triple Strike','Attacks the enemy 3 times to decrease the Defense and Attack Power for 1 turn with a 50% chance each and disturbs the HP recovery.',2,3,3,0,0,6,'1.8*{ATK}');
 INSERT INTO k_skill VALUES(12711,'Female Warrior (Passive)','Receives 20% less damage from enemies granted with beneficial effects and inflicts 20% more damage on enemies with no beneficial effects. Chakram Dancer will be granted with the same effect if she''s included in the ally team. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(12712,'Flame Drive','Attacks all enemies with a boomerang and stuns them for 1 turn. The enemy target attacked by Chakram Dancer is guaranteed to be stunned when they attack together.',3,5,1,0,0,4,'4.8*{ATK}');
+INSERT INTO k_skill VALUES(12712,'Flame Drive','Attacks all enemies with a boomerang and stuns them for 1 turn. The enemy target attacked by Chakram Dancer is guaranteed to be stunned when they attack together.',3,5,1,0,1,4,'4.8*{ATK}');
 INSERT INTO k_skill VALUES(12713,'Vacuum Boomerang','Attacks the enemy to stun the target for 1 turn and increases the harmful effect granted on the enemy by 1 turn. Chakram Dancer''s attack will increase the enemy''s harmful effect duration by 1 turn each with a 50% chance when they attack together.',3,5,1,0,0,4,'6.3*{ATK}');
 INSERT INTO k_skill VALUES(12714,'Lightning Flash','Attacks all enemies to inflict damage that''s proportionate to your attack speed and increases your Attack Bar by 10% each when you land a Critical Hit. Chakram Dancer''s Attack Bar will increase by 20% each when her attack lands as a Critical Hit while they attack together.',3,5,1,0,1,4,'{ATK}*({SPD} + 150)/70');
 INSERT INTO k_skill VALUES(12715,'Absorb Shadow (Passive)','Steals 1 of the beneficial effects granted on the enemy with every attack. The damage will be increased by 10% each up to 15 times whenever this effect occurs. The stolen beneficial effect(s) will also be granted on Chakram Dancer if she''s included in the ally team. [Automatic Effect]',3,NULL,1,1,0,1,'');
@@ -3043,10 +3090,10 @@ INSERT INTO k_skill VALUES(12807,'Honey Bee Friends','Honey bees will transfer a
 INSERT INTO k_skill VALUES(12808,'Earth Friends','Attacks all enemies to decrease their Attack Speed for 2 turns with a 50% chance and their Attack Bar by 50%.',2,4,1,0,1,6,'3.5*{ATK}');
 INSERT INTO k_skill VALUES(12809,'Honey Bee Friends','Honey bees will transfer all harmful effects granted on the allies to the target enemy. If the allies don''t have any harmful effects, all allies will recover their HP by 20%.',2,4,1,0,1,5,'');
 INSERT INTO k_skill VALUES(12810,'Earth Friends','Attacks all enemies to decrease their Attack Speed for 2 turns with a 50% chance and their Attack Bar by 50%.',2,4,1,0,1,6,'3.5*{ATK}');
-INSERT INTO k_skill VALUES(12811,'Tree of Loss','Attacks an enemy to decrease the Attack Bar by 50% and puts the target in Oblivion state for 3 turns. Passive skills aren''t activated in Oblivion state.',3,5,1,0,0,6,'4.3*{ATK}');
+INSERT INTO k_skill VALUES(12811,'Tree of Loss','Attacks the enemy to decrease the Attack Bar by 50%, weakens the Defense for 3 turns and puts the target in Oblivion state for 3 turns. Passive skills aren''t activated in Oblivion state.',3,5,1,0,0,6,'4.3*{ATK}');
 INSERT INTO k_skill VALUES(12812,'Flower Fog','Attacks all enemies to shorten the time of beneficial effects granted on them by 1 turn each. If the enemy doesn''t have any beneficial effect, prevents the enemy from gaining beneficial effects for 2 turns.',3,5,1,0,1,6,'4.0*{ATK}');
-INSERT INTO k_skill VALUES(12813,'Thorn Tree (Passive)','Inflicts Continuous Damage on the target for 2 turns with every attack. If you attack an enemy who already has Continuous Damage, additionally inflicts Continuous Damage for 1 turn. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(12814,'Deep Rooted Tree (Passive)','Recovers HP of the allies granted with harmful effects by 15% every turn. Creates a shield that''s equivalent to 15% of your HP on the allies with no harmful effects for 2 turns. [Automatic Effect]',3,NULL,1,1,0,5,'');
+INSERT INTO k_skill VALUES(12813,'Thorn Tree (Passive)','Inflicts Continuous Damage on the target for 2 turns with every attack. If you attack an enemy who already has Continuous Damage, additionally inflicts Continuous Damage for 2 turns. [Automatic Effect]',3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(12814,'Deep Rooted Tree (Passive)','Recovers HP of the allies granted with harmful effects by 15% every turn. Creates a shield that''s equivalent to 15% of your HP on the allies with no harmful effects for 2 turns. [Automatic Effect]',3,NULL,1,1,1,5,'');
 INSERT INTO k_skill VALUES(12815,'Mandrake','Attacks all enemies to increase the enemies'' harmful effect duration by 1 turn and decrease the enemies'' beneficial effect duration by 1 turn.',3,5,1,0,1,6,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(12901,'Touch of Punishment','Attacks an enemy and stuns the target for 1 turn with a 35% chance.',1,NULL,1,0,0,5,'3.8*{ATK}');
 INSERT INTO k_skill VALUES(12902,'Touch of Punishment','Attacks an enemy and stuns the target for 1 turn with a 35% chance.',1,NULL,1,0,0,5,'3.8*{ATK}');
@@ -3068,7 +3115,7 @@ INSERT INTO k_skill VALUES(12917,'Moonlight Flood','Attacks all enemies and infl
 INSERT INTO k_skill VALUES(12918,'Wild Blow','Attacks an enemy to inflict damage that increases according to your Defense and recovers 30% of the inflicted damage as HP. In addition, when used in Beast Form, the damage you inflict will be increased by 20% and then transforms into Druid Form.',2,3,1,0,0,6,'4.0*{ATK} + 4.0*{DEF}');
 INSERT INTO k_skill VALUES(12919,'Moonlight Flood','Attacks all enemies and inflicts Continuous Damage for 2 turns. In addition, when used in Beast Form, attacks 2 times and transforms into Druid Form after the attack.',2,4,2,0,1,5,'3.0*{ATK}');
 INSERT INTO k_skill VALUES(12920,'Wild Blow','Attacks an enemy to inflict damage that increases according to your MAX HP and recovers 30% of the inflicted damage as HP. In addition, when used in Beast Form, the damage you inflict will be increased by 20% and then transforms into Druid Form.',2,3,1,0,0,6,'4.0*{ATK} + 0.25*{MAX HP}');
-INSERT INTO k_skill VALUES(12921,'Wild Cure','Recovers HP of all allies by 30%. In addition, when used in Druid Form, increases the Attack Bar of all allies by 15% and then transforms into Beast Form to Provoke all enemies for 1 turn with a 50% chance.',3,5,1,0,0,5,'');
+INSERT INTO k_skill VALUES(12921,'Wild Cure','Recovers HP of all allies by 30%. In addition, when used in Druid Form, increases the Attack Bar of all allies by 15% and then transforms into Beast Form to Provoke all enemies for 1 turn with a 50% chance.',3,5,1,0,1,5,'');
 INSERT INTO k_skill VALUES(12922,'Wild Roar','Attacks all enemies and weakens their Attack Power for 2 turns. In addition, when used in Druid Form, weakens the Defense of all enemies for 2 turns and then transforms into Beast Form to Provoke all enemies for 1 turn with a 50% chance.',3,6,1,0,1,7,'4.5*{ATK}');
 INSERT INTO k_skill VALUES(12923,'Forest of Living','Revives a dead ally target with 30% HP. If the ally target is alive, casts Soul Protection for 3 turns. In addition, when used in Druid Form, increases the Defense of all allies for 3 turns and then transforms into Beast Form to Provoke all enemies for 1 turn with a 50% chance.',3,8,1,0,1,3,'');
 INSERT INTO k_skill VALUES(12924,'Rage of Mother Nature','Attacks all enemies and removes all beneficial effects granted on them. In addition, when used in Druid Form, increases their chances of landing a glancing hit for 2 turns and then transforms into Beast Form to Provoke all enemies for 1 turn with a 50% chance.',3,6,1,0,1,5,'4.5*{ATK}');
@@ -3150,28 +3197,28 @@ INSERT INTO k_skill VALUES(13108,'Gain Knowledge (Passive)','Gains Knowledge by
 INSERT INTO k_skill VALUES(13109,'Learn Knowledge (Passive)','Gains Knowledge by the number of granted beneficial effects when you or an enemy is granted with a beneficial effect. You can have up to 5 Knowledge. [Automatic Effect]',2,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(13110,'Gain Knowledge (Passive)','Gains Knowledge by the number of granted beneficial effects when you''re granted with a beneficial effect. Gains 3 Knowledge when an enemy or an ally gets defeated. You can have up to 5 Knowledge. [Automatic Effect]',2,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(13111,'Forbidden Galdr','Decreases the current HP of the enemy target (bosses excluded) by 10% for every Knowledge you have. If you have 5 Knowledge, decreases the target''s MAX HP by 50% instead. After that, heals all allies by the decreased HP. This skill can be used when you have at least 1 Knowledge, and all Knowledge will be consumed once you use the skill.',3,NULL,1,0,0,1,'10 (Fixed)');
-INSERT INTO k_skill VALUES(13112,'Start of Apocalypse','Attacks the enemies in the order of low HP ratio to high HP ratio by the number of Knowledge you have, and the damage increases as you attack. If you have 5 Knowledge, destroys the enemy''s MAX HP by 50% of the damage dealt. This skill can be used when you have at least 1 Knowledge, and all Knowledge will be consumed once you use the skill.',3,NULL,5,0,0,4,'4.0*{ATK}');
+INSERT INTO k_skill VALUES(13112,'Start of Apocalypse','Attacks the enemies in the order of low HP ratio to high HP ratio by the number of Knowledge you have, and the damage increases as you attack. If you have 5 Knowledge, destroys the enemy''s MAX HP by 50% of the damage dealt. This skill can be used when you have at least 1 Knowledge, and all Knowledge will be consumed once you use the skill.',3,NULL,5,0,1,4,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(13113,'Legacy of Knowledge (Passive)','Attacks the enemy while ignoring the enemy''s Defense by 15% for every Knowledge you have whenever you attack. If you have 5 Knowledge, uses all of your Knowledge to attack while ignoring the enemy''s Defense. In addition, if you get defeated while having Knowledge, you will use all of your Knowledge to be revived with 20% HP per Knowledge used. [Automatic Effect]',3,11,1,1,0,4,'');
 INSERT INTO k_skill VALUES(13114,'Eye of Pioneer (Passive)','If an ally is attacked by an enemy, uses one of your Knowledge to heal the ally by 35% of the damage received. If you have 5 Knowledge, the ally will be healed by 70% of the damage received. [Automatic Effect]',3,NULL,1,1,0,4,'');
 INSERT INTO k_skill VALUES(13115,'Endless Desire','Absorbs 25% (10% instead if it''s a Boss) of your Attack Power and Defense per Knowledge from the enemy target''s Attack Power and Defense. In addition, if you have 5 Knowledge, steals all beneficial effects granted on the enemy and instantly gains another turn. This skill can be used when you have at least 1 Knowledge, and all Knowledge will be consumed once you use the skill. (Accumulates up to 10 times)',3,NULL,1,0,0,1,'0.250000000000000 (Fixed)');
-INSERT INTO k_skill VALUES(13201,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'3.8*{ATK}');
-INSERT INTO k_skill VALUES(13202,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'3.8*{ATK}');
-INSERT INTO k_skill VALUES(13203,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'3.8*{ATK}');
-INSERT INTO k_skill VALUES(13204,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'3.8*{ATK}');
-INSERT INTO k_skill VALUES(13205,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'3.8*{ATK}');
+INSERT INTO k_skill VALUES(13201,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'4.2*{ATK}');
+INSERT INTO k_skill VALUES(13202,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'4.2*{ATK}');
+INSERT INTO k_skill VALUES(13203,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'4.2*{ATK}');
+INSERT INTO k_skill VALUES(13204,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'4.2*{ATK}');
+INSERT INTO k_skill VALUES(13205,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'4.2*{ATK}');
 INSERT INTO k_skill VALUES(13206,'Suppressive Fire','Attacks the enemy to remove all beneficial effects granted on the target with a 70% chance. The damage increases according the number of beneficial effects removed.',2,4,1,0,0,6,'5.0*{ATK}');
-INSERT INTO k_skill VALUES(13207,'Hidden Aim','Strikes the [Hidden Aim] pose. Increases the chances of receiving a glancing hit by 50% and the damage dealing to an enemy by 200% if you''re attacked while in this pose. The [Hidden Aim] pose disables after you attack on your turn.',2,6,1,0,0,4,'');
-INSERT INTO k_skill VALUES(13208,'Hidden Aim','Strikes the [Hidden Aim] pose. Increases the chances of receiving a glancing hit by 50% and the damage dealing to an enemy by 200% if you''re attacked while in this pose. The [Hidden Aim] pose disables after you attack on your turn.',2,6,1,0,0,4,'');
+INSERT INTO k_skill VALUES(13207,'Hidden Aim','Strikes the [Hidden Aim] pose. Increases the chances of receiving a glancing hit by 50% and the damage dealing to an enemy by 200% if you''re attacked while in this pose. The [Hidden Aim] pose disables after you attack on your turn.',2,5,1,0,0,4,'');
+INSERT INTO k_skill VALUES(13208,'Hidden Aim','Strikes the [Hidden Aim] pose. Increases the chances of receiving a glancing hit by 50% and the damage dealing to an enemy by 200% if you''re attacked while in this pose. The [Hidden Aim] pose disables after you attack on your turn.',2,5,1,0,0,4,'');
 INSERT INTO k_skill VALUES(13209,'Suppressive Fire','Attacks the enemy to remove all beneficial effects granted on the target with a 70% chance. The damage increases according the number of beneficial effects removed.',2,4,1,0,0,6,'5.0*{ATK}');
-INSERT INTO k_skill VALUES(13210,'Hidden Aim','Strikes the [Hidden Aim] pose. Increases the chances of receiving a glancing hit by 50% and the damage dealing to an enemy by 200% if you''re attacked while in this pose. The [Hidden Aim] pose disables after you attack on your turn.',2,6,1,0,0,4,'');
+INSERT INTO k_skill VALUES(13210,'Hidden Aim','Strikes the [Hidden Aim] pose. Increases the chances of receiving a glancing hit by 50% and the damage dealing to an enemy by 200% if you''re attacked while in this pose. The [Hidden Aim] pose disables after you attack on your turn.',2,5,1,0,0,4,'');
 INSERT INTO k_skill VALUES(13211,'Head Shot','Aims the enemy''s head and inflicts damage that ignores the target''s Defense.',3,5,1,0,0,3,'4.0*{ATK}');
-INSERT INTO k_skill VALUES(13212,'Dead Eye (Passive)','Decreases a random target''s Defense for 1 turn at the start of each turn. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(13213,'Veteran (Passive)',replace('Increases the Attack Bar by 50% each and increases the Attack Power for 1 turn when the enemy''s attack lands as a glancing hit. \n[Automatic Effect]','\n',char(10)),3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(13212,'Dead Eye (Passive)','Decreases the Defense of the enemy with the worst HP status for 1 turn at the start of each turn. [Automatic Effect]',3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(13213,'Veteran (Passive)','Increases the Attack Bar by 100% and increases the Attack Power for 1 turn when the enemy''s attack lands as a Glancing Hit. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(13214,'Snipe Preparation (Passive)','Increases the Attack Bar by 25% whenever an enemy gains a beneficial effect from a skill. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(13215,'Reloading (Passive)','Maintains the [Hidden Aim] pose when you defeat an enemy while in the pose. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(13217,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'3.8*{ATK}');
-INSERT INTO k_skill VALUES(13218,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'3.8*{ATK}');
-INSERT INTO k_skill VALUES(13220,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'3.8*{ATK}');
+INSERT INTO k_skill VALUES(13215,'Reloading (Passive)','Maintains the [Hidden Aim] pose and increases the Attack Bar by 50% when you defeat an enemy while in the pose. [Automatic Effect]',3,NULL,0,1,0,1,'');
+INSERT INTO k_skill VALUES(13217,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'4.2*{ATK}');
+INSERT INTO k_skill VALUES(13218,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'4.2*{ATK}');
+INSERT INTO k_skill VALUES(13220,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',1,NULL,1,0,0,7,'4.2*{ATK}');
 INSERT INTO k_skill VALUES(13301,'Fire!','Attacks the enemy 3 times. Each attack has a 30% chance to decrease the Attack Bar by 30%.',1,NULL,3,0,0,5,'1.2*{ATK}');
 INSERT INTO k_skill VALUES(13302,'Fire!','Attacks the enemy 3 times. Each attack has a 30% chance to decrease the Attack Bar by 30%.',1,NULL,3,0,0,5,'1.2*{ATK}');
 INSERT INTO k_skill VALUES(13303,'Fire!','Attacks the enemy 3 times. Each attack has a 30% chance to decrease the Attack Bar by 30%.',1,NULL,3,0,0,5,'1.2*{ATK}');
@@ -3205,7 +3252,7 @@ INSERT INTO k_skill VALUES(1156,'Purify','Removes all harmful effects on the tar
 INSERT INTO k_skill VALUES(1157,'Double Arrow','Shoots two arrows to attack a target enemy and a random enemy and stuns them with a 50% chance each. Guarantees to stun the enemy if both arrows hit the same target.',2,2,2,0,0,3,'4.2*{ATK}');
 INSERT INTO k_skill VALUES(1158,'Purify','Removes all harmful effects on the target ally and recovers its HP. The recovery amount is proportionate to the Attack Power.',2,2,0,0,0,3,'4.8*{ATK}');
 INSERT INTO k_skill VALUES(1159,'Purify','Removes all harmful effects on the target ally and recovers the ally''s HP by 20% of your MAX HP.',2,2,1,0,0,3,'0.2*{MAX HP}');
-INSERT INTO k_skill VALUES(1160,'Double Arrow','Shoots two arrows to attack a target enemy and a random enemy and removes a beneficial effect granted on them with an 80% chance each. Guarantees to stun the enemy if both arrows hit the same target.',2,2,2,0,0,3,'4.2*{ATK}');
+INSERT INTO k_skill VALUES(1160,'Double Arrow','Shoots two arrows to attack a target enemy and a random enemy and removes a beneficial effect granted on them with an 80% chance each. Guarantees to stun the enemy if both arrows hit the same target.',2,2,2,0,1,3,'4.2*{ATK}');
 INSERT INTO k_skill VALUES(1161,'Sleep Spell','Puts the enemy to sleep for 2 turns. Effect is removed if the enemy is attacked.',3,3,0,0,0,2,'7.0*{ATK}');
 INSERT INTO k_skill VALUES(1162,'Arrow Attack','Shoots a flurry of arrows, attacking all enemies 4 - 6 times. Each attack has a 20% chance to remove a beneficial effect and reduce their Attack Speed for 2 turns.',3,4,6,0,1,2,'{ATK}');
 INSERT INTO k_skill VALUES(1163,'Spirit''s Wrath (Passive)','The inflicting damage is increased by 30% for each harmful effect on the enemy. [Automatic Effect]',3,NULL,1,1,0,1,'');
@@ -3226,7 +3273,7 @@ INSERT INTO k_skill VALUES(1359,'Ignite','Attacks the enemy with the flames of p
 INSERT INTO k_skill VALUES(1360,'Decelerate','Attacks all enemies to decrease their Attack Speed for 2 turns. Also increases their skill cooldown time by 1 turn each with an 80% chance.',2,3,1,0,1,4,'2.5*{ATK}');
 INSERT INTO k_skill VALUES(1361,'Shooting Star','Summons shooting stars that attack enemies randomly and blocks beneficial effects to be granted on them for 2 turns with an 80% chance. The inflicted damage increases as the same target gets hit again.',3,3,1,0,1,3,'2.2*{ATK}');
 INSERT INTO k_skill VALUES(1362,'Incinerate','Attacks all enemies to inflict damage. In addition, blows up the Continuous Damage granted on each target to inflict damage that''s equivalent to the target''s Continuous Damage.',3,3,1,0,0,3,'4.2*{ATK}');
-INSERT INTO k_skill VALUES(1363,'Pep Talk','Increases the Attack Power and Defense of all allies for 3 turns.',3,4,1,0,0,1,'');
+INSERT INTO k_skill VALUES(1363,'Pep Talk','Increases the Attack Power and Defense of all allies for 3 turns.',3,4,1,0,1,1,'');
 INSERT INTO k_skill VALUES(1364,'Holy Call','Revives a dead ally and fills up the ally''s HP by 30%. Revives another ally with a 30% chance. All skills of the revived allies are ready to be used.',3,6,1,0,0,1,'');
 INSERT INTO k_skill VALUES(1365,'Absorb Energy','Attacks the enemy 2 times with spirit balls, having each attack to increase the skill cooldown for 1 turn, and recovers HP by 50% of the inflicted damage. The cooldown time of [Absorb Energy] decreases by 1 turn whenever you increase the enemy''s skill cooldown time.',3,3,2,0,0,2,'4.35*{ATK}');
 INSERT INTO k_skill VALUES(1366,'Spirit Ball','Attacks the enemy with an Energy ball. The attack has a 75% chance of increasing the enemy''s chance to land a Glancing Hit for 2 turns.',1,NULL,1,0,0,3,'4.4*{ATK}');
@@ -3354,25 +3401,25 @@ INSERT INTO k_skill VALUES(13408,'Devil''s Bargain','Absorbs all other allies''
 INSERT INTO k_skill VALUES(13409,'Devil''s Bargain','Absorbs all other allies'' HP by 10% to attack all enemies dealing damage that''s proportionate to the absorbed HP. Recovers the Attack Bar of all allies by 20% afterwards.',2,5,1,0,1,7,'3.4*{ATK}');
 INSERT INTO k_skill VALUES(13410,'Madness Judgement','Consumes half of your current HP to attack the enemy target. This attack will ignore a portion of the enemy''s Defense as your HP status worsens.',2,5,1,0,0,7,'5.4*{ATK}');
 INSERT INTO k_skill VALUES(13411,'Repeated Nightmare (Passive)','Revives with little HP and creates a shield that''s proportionate to your level for 1 turn if allies and enemies act for 12 turns when you are dead. Additionally, fills up your Attack Bar by 100%. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(13412,'Flames of Hell','Always perform an attack that has an attribute advantage on all enemies. Inflicts the number of Continuous Damage that''s proportionate to the amount of damage dealt for 2 turns.',3,5,1,0,0,4,'5.0*{ATK}');
+INSERT INTO k_skill VALUES(13412,'Flames of Hell','Always perform an attack that has an attribute advantage on all enemies. Inflicts the number of Continuous Damage that''s proportionate to the amount of damage dealt for 2 turns.',3,5,1,0,0,4,'5.4*{ATK}');
 INSERT INTO k_skill VALUES(13413,'Soul Stealer (Passive)','No one can be revived while you are on the battlefield. In addition, the damage you inflict on enemies will be increased by 20% each when an enemy or ally dies. (Accumulates up to 5 times) [Automatic Effect]',3,NULL,1,1,1,1,'');
 INSERT INTO k_skill VALUES(13414,'Red Battlefield (Passive)','The Attack Bar of all allies will be increased by the proportion to the damage dealt, and the damage you deal on enemies will be increased by 50% at the most whenever all enemies and allies on the battlefield receive damage. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(13415,'Purgatory (Passive)','If you kill an enemy with your attack, you will revive one of dead allies with HP that''s the same amount of the damage you dealt on the enemy target. If other ally dies when you are dead, you will be revived with little HP and 100% Attack Bar. [Automatic Effect]',3,5,1,1,0,3,'');
 INSERT INTO k_skill VALUES(13416,'Repeated Nightmare (Passive)','Revives with little HP and fills up your Attack Bar by 100% if allies and enemies act for 12 turns when you are dead. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(13501,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
-INSERT INTO k_skill VALUES(13502,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
-INSERT INTO k_skill VALUES(13503,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
-INSERT INTO k_skill VALUES(13504,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
-INSERT INTO k_skill VALUES(13505,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
+INSERT INTO k_skill VALUES(13501,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and stuns the enemy for 1 turn with a 30% chance. In addition, increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
+INSERT INTO k_skill VALUES(13502,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and stuns the enemy for 1 turn with a 30% chance. In addition, increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
+INSERT INTO k_skill VALUES(13503,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and stuns the enemy for 1 turn with a 30% chance. In addition, increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
+INSERT INTO k_skill VALUES(13504,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and stuns the enemy for 1 turn with a 30% chance. In addition, increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
+INSERT INTO k_skill VALUES(13505,'Stone Claws','Attacks the enemy to inflict damage that increases according to your Defense and stuns the enemy for 1 turn with a 30% chance. In addition, increases your Defense by 30%. (Accumulates up to 5 times)',1,NULL,1,0,0,7,'1.8*{ATK} + 2.9*{DEF}');
 INSERT INTO k_skill VALUES(13506,'Earth Strike','Inflicts damage on all enemies in proportion to your Defense and provokes them for 1 turn with an 80% chance each. Afterwards, you will be turned into a statue until the next turn starts. While you are a statue, you won''t be able to move. But you will gain immunity against inability effects, receive 30% less damage and recover your HP by 10% until the statue state is gone.',2,4,1,0,1,6,'3.4*{DEF}');
-INSERT INTO k_skill VALUES(13507,'Destructive Claws','Inflicts damage on the enemy in proportion to your Defense and destroys the target''s HP by the amount of damage dealt. Afterwards, you will be turned into a statue until the next turn starts. While you are a statue, you won''t be able to move. But you will gain immunity against inability effects, receive 30% less damage and recover your HP by 10% until the statue state is gone.',2,5,1,0,0,3,'1.35*{DEF} (Fixed)');
+INSERT INTO k_skill VALUES(13507,'Destructive Claws','Inflicts damage on the enemy in proportion to your Defense, destroys the target''s HP by the amount of damage dealt and provokes for 1 turn. Afterwards, you will be turned into a statue until the next turn starts. While you are a statue, you won''t be able to move. But you will gain immunity against inability effects, receive 30% less damage and recover your HP by 10% until the statue state is gone.',2,5,1,0,0,3,'1.35*{DEF} (Fixed)');
 INSERT INTO k_skill VALUES(13508,'Earth Strike','Inflicts damage on all enemies in proportion to your Defense and provokes them for 1 turn with an 80% chance each. Afterwards, you will be turned into a statue until the next turn starts. While you are a statue, you won''t be able to move. But you will gain immunity against inability effects, receive 30% less damage and recover your HP by 10% until the statue state is gone.',2,4,1,0,1,6,'3.6*{DEF}');
 INSERT INTO k_skill VALUES(13509,'Earth Strike','Inflicts damage on all enemies in proportion to your Defense and provokes them for 1 turn with an 80% chance each. Afterwards, you will be turned into a statue until the next turn starts. While you are a statue, you won''t be able to move. But you will gain immunity against inability effects, receive 30% less damage and recover your HP by 10% until the statue state is gone.',2,4,1,0,1,6,'3.6*{DEF}');
-INSERT INTO k_skill VALUES(13510,'Destructive Claws','Inflicts damage on the enemy in proportion to your Defense and destroys the target''s HP by the amount of damage dealt. Afterwards, you will be turned into a statue until the next turn starts. While you are a statue, you won''t be able to move. But you will gain immunity against inability effects, receive 30% less damage and recover your HP by 10% until the statue state is gone.',2,5,1,0,0,3,'1.35*{DEF} (Fixed)');
-INSERT INTO k_skill VALUES(13511,'Statue of Robust (Passive)','If your turn ends with less than 30% HP, you will be turned into a statue until the next turn starts. The target that attacks you will have its Attack Power decreased for 2 turns when the target attacks you when you are turned into a statue. [Automatic Effect]',3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(13510,'Destructive Claws','Inflicts damage on the enemy in proportion to your Defense, destroys the target''s HP by the amount of damage dealt and provokes for 1 turn. Afterwards, you will be turned into a statue until the next turn starts. While you are a statue, you won''t be able to move. But you will gain immunity against inability effects, receive 30% less damage and recover your HP by 10% until the statue state is gone.',2,5,1,0,0,3,'1.35*{DEF} (Fixed)');
+INSERT INTO k_skill VALUES(13511,'Statue of Robust (Passive)','If your turn ends with less than 50% HP, you will be turned into a statue until the next turn starts. The target that attacks you will have its Attack Power decreased for 2 turns when the target attacks you when you are turned into a statue. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(13512,'Statue of Protection (Passive)','If your turn ends with 70% or higher HP, you will be turned into a statue until the next turn starts. The damage dealt on allies will be reduced gradually if the ally gets attacked with multiple hits when you are turned into a statue. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(13513,'Statue of Pain (Passive)','When you are turned into a statue, inflicts damage that''s proportionate to your Defense to the target that attacks you. Also decreases your skill cooldown time when you get attacked with a critical hit. [Automatic Effect]',3,NULL,1,1,0,1,'');
-INSERT INTO k_skill VALUES(13514,'Statue of Trial (Passive)','When you are turned into a statue, increases the skill cooldown time of the target that attacks you by 2 turns. [Automatic Effect]',3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(13513,'Statue of Pain (Passive)','When you are turned into a statue, inflicts damage that''s proportionate to your Defense to the target that attacks you. Also decreases your skill cooldown time when you get attacked. [Automatic Effect]',3,NULL,1,1,0,1,'');
+INSERT INTO k_skill VALUES(13514,'Statue of Trial (Passive)','When you are turned into a statue, increases the skill cooldown time of the target that attacks you by 2 turns. The cooldown time can be increased over the MAX cooldown time for Monsters excluding the bosses. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(13515,'Statue of Immortal (Passive)','When your turn ends, you will be turned into a statue until the next turn starts with a 30% chance. You can''t get defeated when you are turned into a statue. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(6516,'Vampire Bat','Attacks 2 times with a vampire bat, each attack having a 50% chance to remove 1 beneficial effect of the enemy, and recovers HP by 30% of the inflicted damage.',1,NULL,2,0,0,5,'2.0*{ATK}');
 INSERT INTO k_skill VALUES(5651,'Merciless Claws','Attacks the enemy with claws and disturbs the enemy''s HP recovery for 1 turn. The damage of this attack increases according to your MAX HP.',1,NULL,1,0,0,3,'2.5*{ATK} + 0.16*{MAX HP}');
@@ -3469,9 +3516,9 @@ INSERT INTO k_skill VALUES(13607,'Fast Link','The faster your Attack Speed, the
 INSERT INTO k_skill VALUES(13608,'Critical Link','The faster your Attack Speed, the greater the damage becomes. Attacks the enemy with the beast 2 times. The beast''s attack changes all beneficial effects granted on the target to Continuous Damage for 1 turn, and the rider''s attack inflicts damage that increases by 15% for each harmful effect granted on the target.',2,5,2,0,0,6,'{ATK}*({SPD} + 120)/100');
 INSERT INTO k_skill VALUES(13609,'Critical Link','The faster your Attack Speed, the greater the damage becomes. Attacks the enemy with the beast 2 times. The beast''s attack changes all beneficial effects granted on the target to Continuous Damage for 1 turn, and the rider''s attack inflicts damage that increases by 15% for each harmful effect granted on the target.',2,5,2,0,0,6,'{ATK}*({SPD} + 120)/100');
 INSERT INTO k_skill VALUES(13610,'Fast Link','The faster your Attack Speed, the greater the damage becomes. Attacks the enemy with the beast 2 times. The beast''s attack weakens the enemy''s Defense for 1 turn, and the rider''s attack absorbs the enemy''s Attack Bar by 25% for each harmful effect granted on the target, up to 100%.',2,5,2,0,0,6,'{ATK}*({SPD} + 150)/100');
-INSERT INTO k_skill VALUES(13611,'Start of Attacking','Attacks the enemy with the beast 2 times. The beast''s attack removes all beneficial effects granted on the enemy, and the rider''s attack ignores the enemy''s Defense by 35% for each beneficial effect the beast removed. Afterwards, the Attack Bar of other allies will be increased, up to 50%, in proportion to the enemy''s lost HP from this attack.',3,6,2,0,0,4,'3.8*{ATK}');
+INSERT INTO k_skill VALUES(13611,'Start of Attacking','Attacks the enemy with the beast 2 times. The beast''s attack removes all beneficial effects granted on the enemy, and the rider''s attack ignores the enemy''s Defense by 25% for each beneficial effect the beast removed. Afterwards, the Attack Bar of other allies will be increased, up to 50%, in proportion to the enemy''s lost HP from this attack.',3,6,2,0,0,4,'3.8*{ATK}');
 INSERT INTO k_skill VALUES(13612,'Wild Steps (Passive)','The Attack Bar increasing skill effect granted on yourself increases by 50%, and the Attack Bar decreasing skill effect granted on yourself decreases by 50%. Also, your Attack Speed increases by 15% whenever your Attack Bar increases due to skills, up to 5 times. [Automatic Effect]',3,NULL,0,1,0,1,'');
-INSERT INTO k_skill VALUES(13613,'Gigantic Roar','The rider increases the Attack Speed of all allies for 2 turns, and the beast attacks all enemies. Weakens the enemy''s Defense for 2 turns if the enemy''s Defense is lower than your Attack Power, and sets the enemy''s Attack Bar to 0 if the enemy''s Attack Speed is slower than yours.',3,6,1,0,1,4,'4.5*{ATK}');
+INSERT INTO k_skill VALUES(13613,'Gigantic Roar','The rider increases the Attack Speed of all allies for 2 turns, and the beast attacks all enemies. Weakens the enemy''s Defense for 2 turns if the enemy''s Defense is lower than your Attack Power, and decreases the enemy''s Attack Bar by 75% if the enemy''s Attack Speed is slower than yours.',3,6,1,0,1,4,'4.5*{ATK}');
 INSERT INTO k_skill VALUES(13614,'Wild Chase (Passive)','The Attack Speed increases by 35% for each time an enemy gains a turn, up to 5 times. The increased Attack Speed resets when your turn ends. In addition, decreases the enemy''s Attack Bar by 30% with each attack. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(13615,'Late Night Ambush','Attacks all enemies with the beast 2 times. The beast''s attack sets the enemies'' Attack Bar to 0, and the rider''s attack inflicts damage that increases up to 100% in proportion to the Attack Bar that the beast decreased.',3,6,2,0,1,4,'2.2*{ATK}');
 INSERT INTO k_skill VALUES(13616,'Rider (Passive)','Dismounts the beast to battle when you''re inflicted with damage that may cause you to die. [Automatic Effect]',4,NULL,1,1,0,1,'');
@@ -3531,8 +3578,8 @@ INSERT INTO k_skill VALUES(12817,'skill_12817','꿀벌 친구들(추가연출)',
 INSERT INTO k_skill VALUES(12818,'skill_12818','꿀벌 친구들(추가연출)',-1,4,1,0,0,5,'');
 INSERT INTO k_skill VALUES(13018,'Atlas Stone','Throws the weapon up in the sky and shares damage with all enemies by the amount of your MAX HP on your next turn. This attack can''t be counterattacked.',-1,6,1,0,0,3,'{MAX HP}/{Alive Enemies} (Fixed)');
 INSERT INTO k_skill VALUES(13020,'Atlas Stone','Throws the weapon up in the sky and shares damage with all enemies by the amount of your MAX HP on your next turn. This attack can''t be counterattacked.',-1,6,1,0,0,3,'{MAX HP}/{Alive Enemies} (Fixed)');
-INSERT INTO k_skill VALUES(13216,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',-1,NULL,1,0,0,7,'3.8*{ATK}');
-INSERT INTO k_skill VALUES(13219,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',-1,NULL,1,0,0,7,'3.8*{ATK}');
+INSERT INTO k_skill VALUES(13216,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',-1,NULL,1,0,0,7,'4.2*{ATK}');
+INSERT INTO k_skill VALUES(13219,'Accurate Fire','Attacks the enemy to inflict damage that ignores all damage reduction effects.',-1,NULL,1,0,0,7,'4.2*{ATK}');
 INSERT INTO k_skill VALUES(13316,'Fatal Extinctive Bullet','Attacks the enemy with a cannon gun and removes all beneficial effects granted on the target. Afterwards, inflicts damage on all enemies and decreases their Attack Bar by 70%.',-1,NULL,1,0,0,4,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(13317,'Fatal Mortar Bullet','Attacks the enemy with a cannon gun and weakens the Defense for 1 turn with a 90% chance. Afterwards, inflicts damage on all enemies and destroys their MAX HP by 50% of the inflicted damage.',-1,NULL,1,0,0,5,'4.0*{ATK}');
 INSERT INTO k_skill VALUES(13319,'Fatal Armor Bullet','Attacks the enemy with a cannon gun and decreases the Attack Bar to 0. Afterwards, inflicts damage on all enemies and stuns them for 1 turn with a 30% chance.',-1,NULL,1,0,0,5,'4.0*{ATK}');
@@ -3756,21 +3803,21 @@ INSERT INTO k_skill VALUES(13710,'Moon Drawn by Clouds','Attacks all enemies to
 INSERT INTO k_skill VALUES(13711,'Art of Blank Space (Passive)','When enemies remove harmful effects, the Attack Bar of all allies will be increased by 25%. [Automatic Effect]',3,NULL,0,1,1,1,'');
 INSERT INTO k_skill VALUES(13712,'Blossom Painting','Attacks all enemies to remove all of their beneficial effects. Increases the Attack Power of all allies for 2 turns afterwards.',3,5,1,0,1,5,'4.3*{ATK}');
 INSERT INTO k_skill VALUES(13713,'Serious Matter','Attacks all enemies 3 times to decrease their Attack Bar by 50% with each attack. Increases the skill cooldown time by 1 turn if the target''s Attack Bar is 0.',3,5,3,0,1,4,'1.7*{ATK}');
-INSERT INTO k_skill VALUES(13714,'Final Touch','Draws a giant dragon to attack all enemies. This attack cannot be counterattacked and all passive skills of the enemies are not activated.',3,5,1,0,0,5,'3.8*{ATK}');
+INSERT INTO k_skill VALUES(13714,'Final Touch','Draws a giant dragon to attack all enemies. This attack cannot be counterattacked and all passive skills of the enemies (bosses excluded) are not activated.',3,5,1,0,0,5,'3.8*{ATK}');
 INSERT INTO k_skill VALUES(13715,'Mask of Devil','Removes the harmful effects granted on all allies and the selected target will go under Threat state while the enemies attack 2 times. You will gain a turn afterwards.',3,6,1,0,0,3,'');
 INSERT INTO k_skill VALUES(13801,'Flower Blooming Song','Attacks the enemy to increase the chance of landing a Glancing Hit for 2 turns with a 50% chance.',1,NULL,1,0,0,7,'3.9*{ATK}');
 INSERT INTO k_skill VALUES(13802,'Flower Blooming Song','Attacks the enemy to increase the chance of landing a Glancing Hit for 2 turns with a 50% chance.',1,NULL,1,0,0,7,'3.9*{ATK}');
 INSERT INTO k_skill VALUES(13803,'Flower Blooming Song','Attacks the enemy to increase the chance of landing a Glancing Hit for 2 turns with a 50% chance.',1,NULL,1,0,0,7,'3.9*{ATK}');
 INSERT INTO k_skill VALUES(13804,'Flower Blooming Song','Attacks the enemy to increase the chance of landing a Glancing Hit for 2 turns with a 50% chance.',1,NULL,1,0,0,7,'3.9*{ATK}');
 INSERT INTO k_skill VALUES(13805,'Flower Blooming Song','Attacks the enemy to increase the chance of landing a Glancing Hit for 2 turns with a 50% chance.',1,NULL,1,0,0,7,'3.9*{ATK}');
-INSERT INTO k_skill VALUES(13806,'Dissonance','Attacks all enemies 3 times to Stun them for 1 turn with a 15% chance with each attack. Decreases the Attack Bar by 10% each if the target is under inability effect.',2,4,3,0,0,5,'1.1*{ATK}');
+INSERT INTO k_skill VALUES(13806,'Dissonance','Attacks all enemies 3 times to Stun them for 1 turn with a 15% chance with each attack. Decreases the Attack Bar by 10% each if the target is under inability effect.',2,4,3,0,1,5,'1.1*{ATK}');
 INSERT INTO k_skill VALUES(13807,'Melody of Resentment','Plays a song that decreases the HP of the enemy that gets a turn by 5% each and decreases the Attack Power for 1 turn with a 50% chance until the next turn starts. You cannot attack together or counterattack while playing the song.',2,4,0,0,1,5,'');
 INSERT INTO k_skill VALUES(13808,'Melody of Resentment','Plays a song that decreases the HP of the enemy that gets a turn by 5% each and decreases the Attack Power for 1 turn with a 50% chance until the next turn starts. You cannot attack together or counterattack while playing the song.',2,4,0,0,1,5,'');
 INSERT INTO k_skill VALUES(13809,'Melody of Resentment','Plays a song that decreases the HP of the enemy that gets a turn by 5% each and decreases the Attack Power for 1 turn with a 50% chance until the next turn starts. You cannot attack together or counterattack while playing the song.',2,4,0,0,1,5,'');
 INSERT INTO k_skill VALUES(13810,'Dissonance','Attacks all enemies 3 times to Stun them for 1 turn with a 15% chance with each attack. Decreases the Attack Bar by 10% each if the target is under inability effect.',2,4,3,0,1,5,'1.1*{ATK}');
 INSERT INTO k_skill VALUES(13811,'Admiration of String Sound','Plays a song that grants Immunity on yourself for 1 turn and blocks the enemies from getting beneficial effects until the next turn starts. You cannot attack together or counterattack while playing the song.',3,6,1,0,0,3,'');
 INSERT INTO k_skill VALUES(13812,'Millennium Melody','Plays a song that increases the Attack Bar of all allies, excluding yourself, by 15% each, recovers the HP of the ally that gets a turn by 15% each and increases the Attack Power for 1 turn until the next turn starts. You cannot attack together or counterattack while playing the song.',3,5,0,0,1,3,'');
-INSERT INTO k_skill VALUES(13813,'Master Hands (Passive)','Uses the [Melody of Resentment] when attacked by the enemies while not playing the song. The damage you receive will be decreased by 30% while playing the song. [Automatic Effect]',3,6,1,1,0,3,'');
+INSERT INTO k_skill VALUES(13813,'Master Hands (Passive)','Uses the [Melody of Resentment] when you''re attacked while not playing the song. The damage you receive will be decreased by 30% while playing the song. [Automatic Effect]',3,6,1,1,0,3,'');
 INSERT INTO k_skill VALUES(13814,'Solo String (Passive)','Your Attack Bar is decreased by 10% when an enemy gains a turn while playing the song. Your Attack Bar is increased by 20% when an enemy gains a turn while not playing the song. [Automatic Effect]',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(13815,'Cursed Music','Plays a song that increases the Attack Speed of all allies, excluding yourself, for 2 turns and increases the damage of all allies and enemies by 25% until the next turn starts. You cannot attack together or counterattack while playing the song.',3,6,0,0,0,3,'');
 INSERT INTO k_skill VALUES(103501,'Fire Breath','Attacks all enemies with fire breaths and inflicts Continuous Damage for 2 turns.',1,NULL,1,0,0,1,'3.0*{ATK}');
@@ -3779,6 +3826,9 @@ INSERT INTO k_skill VALUES(103503,'Fiery Claw (Passive)','Inflicts additional da
 INSERT INTO k_skill VALUES(103504,'Dragon''s Energy (Passive)','Recovers the boss'' HP every turn.',3,NULL,1,1,0,1,'');
 INSERT INTO k_skill VALUES(110017,'Weaken Defense Crystal','Weakens the Defense of all enemies for 2 turns.',1,NULL,1,0,0,1,'');
 INSERT INTO k_skill VALUES(110018,'Strengthen Attack Crystal','Increases the Attack Power of boss for 2 turns.',1,NULL,1,0,0,1,'');
+INSERT INTO k_skill VALUES(11221,'Soul Devourer','Inflicts damage that''s proportionate to your MAX HP to the enemy target and recovers the HP of all allies by 30% of the damage dealt. The damage increases as the enemy''s HP status decreases.',2,3,1,0,1,5,'{MAX HP}*(0.7 - 0.3*{Target Current HP %})');
+INSERT INTO k_skill VALUES(11222,'Brand of Hell','Attacks the enemy 3 times, with each attack having a 50% chance to grant Oblivion and Branding effects for 2 turns. The damage increases as the enemy''s HP status decreases.',2,4,3,0,0,5,'{ATK}*(4.4 - 2.2*{Target Current HP %})');
+INSERT INTO k_skill VALUES(12017,'Calm Mind','Removes the harmful effects granted on all allies and recovers their HP by 15% each turn for 2 turns. In addition, you will counterattack whenever you''re attacked for 2 turns.',2,5,0,0,1,3,'');
 UPDATE k_skill SET cooltime = 0 WHERE cooltime IS NULL;
 CREATE TABLE k_skill_level(
     skill INT NOT NULL REFERENCES k_skill(id),
@@ -14648,6 +14698,19 @@ INSERT INTO k_skill_level VALUES(103503,1,'');
 INSERT INTO k_skill_level VALUES(103504,1,'');
 INSERT INTO k_skill_level VALUES(110017,1,'');
 INSERT INTO k_skill_level VALUES(110018,1,'');
+INSERT INTO k_skill_level VALUES(11221,1,'');
+INSERT INTO k_skill_level VALUES(11221,2,'Damage +5%');
+INSERT INTO k_skill_level VALUES(11221,3,'Damage +10%');
+INSERT INTO k_skill_level VALUES(11221,4,'Damage +10%');
+INSERT INTO k_skill_level VALUES(11221,5,'Cooltime Turn -1');
+INSERT INTO k_skill_level VALUES(11222,1,'');
+INSERT INTO k_skill_level VALUES(11222,2,'Damage +10%');
+INSERT INTO k_skill_level VALUES(11222,3,'Effect Rate +10%');
+INSERT INTO k_skill_level VALUES(11222,4,'Damage +10%');
+INSERT INTO k_skill_level VALUES(11222,5,'Cooltime Turn -1');
+INSERT INTO k_skill_level VALUES(12017,1,'');
+INSERT INTO k_skill_level VALUES(12017,2,'Cooltime Turn -1');
+INSERT INTO k_skill_level VALUES(12017,3,'Cooltime Turn -1');
 CREATE TABLE k_skill_effect(
     skill INT NOT NULL REFERENCES k_skill(id),
     effect INT NOT NULL REFERENCES k_effect(id)
@@ -15225,6 +15288,8 @@ INSERT INTO k_skill_effect VALUES(6807,21);
 INSERT INTO k_skill_effect VALUES(6811,28);
 INSERT INTO k_skill_effect VALUES(6814,28);
 INSERT INTO k_skill_effect VALUES(6814,20);
+INSERT INTO k_skill_effect VALUES(6814,39);
+INSERT INTO k_skill_effect VALUES(6815,38);
 INSERT INTO k_skill_effect VALUES(6816,21);
 INSERT INTO k_skill_effect VALUES(6102,28);
 INSERT INTO k_skill_effect VALUES(6101,28);
@@ -15425,9 +15490,7 @@ INSERT INTO k_skill_effect VALUES(4704,29);
 INSERT INTO k_skill_effect VALUES(4705,29);
 INSERT INTO k_skill_effect VALUES(4707,23);
 INSERT INTO k_skill_effect VALUES(4710,23);
-INSERT INTO k_skill_effect VALUES(4706,28);
-INSERT INTO k_skill_effect VALUES(4706,21);
-INSERT INTO k_skill_effect VALUES(4706,18);
+INSERT INTO k_skill_effect VALUES(4706,23);
 INSERT INTO k_skill_effect VALUES(4708,28);
 INSERT INTO k_skill_effect VALUES(4708,18);
 INSERT INTO k_skill_effect VALUES(4708,21);
@@ -15510,6 +15573,8 @@ INSERT INTO k_skill_effect VALUES(10608,30);
 INSERT INTO k_skill_effect VALUES(10609,30);
 INSERT INTO k_skill_effect VALUES(10610,29);
 INSERT INTO k_skill_effect VALUES(10606,29);
+INSERT INTO k_skill_effect VALUES(10613,33);
+INSERT INTO k_skill_effect VALUES(10613,75);
 INSERT INTO k_skill_effect VALUES(10615,35);
 INSERT INTO k_skill_effect VALUES(10405,37);
 INSERT INTO k_skill_effect VALUES(10402,37);
@@ -15534,8 +15599,10 @@ INSERT INTO k_skill_effect VALUES(10412,28);
 INSERT INTO k_skill_effect VALUES(10411,53);
 INSERT INTO k_skill_effect VALUES(10411,35);
 INSERT INTO k_skill_effect VALUES(10413,20);
-INSERT INTO k_skill_effect VALUES(10413,29);
-INSERT INTO k_skill_effect VALUES(10413,30);
+INSERT INTO k_skill_effect VALUES(10413,44);
+INSERT INTO k_skill_effect VALUES(10413,37);
+INSERT INTO k_skill_effect VALUES(10414,18);
+INSERT INTO k_skill_effect VALUES(10414,35);
 INSERT INTO k_skill_effect VALUES(2220,35);
 INSERT INTO k_skill_effect VALUES(2217,26);
 INSERT INTO k_skill_effect VALUES(2216,27);
@@ -15566,6 +15633,8 @@ INSERT INTO k_skill_effect VALUES(4804,26);
 INSERT INTO k_skill_effect VALUES(4805,26);
 INSERT INTO k_skill_effect VALUES(4810,28);
 INSERT INTO k_skill_effect VALUES(4807,28);
+INSERT INTO k_skill_effect VALUES(4815,20);
+INSERT INTO k_skill_effect VALUES(4815,17);
 INSERT INTO k_skill_effect VALUES(4809,33);
 INSERT INTO k_skill_effect VALUES(4808,33);
 INSERT INTO k_skill_effect VALUES(4806,33);
@@ -15678,6 +15747,7 @@ INSERT INTO k_skill_effect VALUES(9116,35);
 INSERT INTO k_skill_effect VALUES(9116,1);
 INSERT INTO k_skill_effect VALUES(9117,35);
 INSERT INTO k_skill_effect VALUES(9117,1);
+INSERT INTO k_skill_effect VALUES(9117,17);
 INSERT INTO k_skill_effect VALUES(9106,37);
 INSERT INTO k_skill_effect VALUES(9106,17);
 INSERT INTO k_skill_effect VALUES(9109,37);
@@ -15842,8 +15912,11 @@ INSERT INTO k_skill_effect VALUES(8319,20);
 INSERT INTO k_skill_effect VALUES(8320,5);
 INSERT INTO k_skill_effect VALUES(8320,31);
 INSERT INTO k_skill_effect VALUES(8307,35);
+INSERT INTO k_skill_effect VALUES(8307,34);
 INSERT INTO k_skill_effect VALUES(8308,35);
+INSERT INTO k_skill_effect VALUES(8308,34);
 INSERT INTO k_skill_effect VALUES(8309,35);
+INSERT INTO k_skill_effect VALUES(8309,34);
 INSERT INTO k_skill_effect VALUES(8306,14);
 INSERT INTO k_skill_effect VALUES(8306,39);
 INSERT INTO k_skill_effect VALUES(8306,7);
@@ -15851,6 +15924,7 @@ INSERT INTO k_skill_effect VALUES(8310,14);
 INSERT INTO k_skill_effect VALUES(8310,39);
 INSERT INTO k_skill_effect VALUES(8310,7);
 INSERT INTO k_skill_effect VALUES(8312,30);
+INSERT INTO k_skill_effect VALUES(8313,20);
 INSERT INTO k_skill_effect VALUES(8314,18);
 INSERT INTO k_skill_effect VALUES(8314,24);
 INSERT INTO k_skill_effect VALUES(8315,37);
@@ -15947,6 +16021,7 @@ INSERT INTO k_skill_effect VALUES(10010,28);
 INSERT INTO k_skill_effect VALUES(10008,28);
 INSERT INTO k_skill_effect VALUES(10011,32);
 INSERT INTO k_skill_effect VALUES(10011,67);
+INSERT INTO k_skill_effect VALUES(10011,59);
 INSERT INTO k_skill_effect VALUES(10012,13);
 INSERT INTO k_skill_effect VALUES(10012,55);
 INSERT INTO k_skill_effect VALUES(10013,67);
@@ -15973,6 +16048,7 @@ INSERT INTO k_skill_effect VALUES(7911,37);
 INSERT INTO k_skill_effect VALUES(7913,59);
 INSERT INTO k_skill_effect VALUES(7914,25);
 INSERT INTO k_skill_effect VALUES(7914,21);
+INSERT INTO k_skill_effect VALUES(7914,33);
 INSERT INTO k_skill_effect VALUES(7915,20);
 INSERT INTO k_skill_effect VALUES(7915,28);
 INSERT INTO k_skill_effect VALUES(7202,25);
@@ -16111,6 +16187,8 @@ INSERT INTO k_skill_effect VALUES(10510,44);
 INSERT INTO k_skill_effect VALUES(10506,30);
 INSERT INTO k_skill_effect VALUES(10508,30);
 INSERT INTO k_skill_effect VALUES(10509,30);
+INSERT INTO k_skill_effect VALUES(10511,33);
+INSERT INTO k_skill_effect VALUES(10511,21);
 INSERT INTO k_skill_effect VALUES(10515,67);
 INSERT INTO k_skill_effect VALUES(6002,43);
 INSERT INTO k_skill_effect VALUES(6001,43);
@@ -16227,7 +16305,6 @@ INSERT INTO k_skill_effect VALUES(10110,37);
 INSERT INTO k_skill_effect VALUES(10115,65);
 INSERT INTO k_skill_effect VALUES(10114,33);
 INSERT INTO k_skill_effect VALUES(10114,20);
-INSERT INTO k_skill_effect VALUES(99003,47);
 INSERT INTO k_skill_effect VALUES(11102,26);
 INSERT INTO k_skill_effect VALUES(11101,26);
 INSERT INTO k_skill_effect VALUES(11103,26);
@@ -16860,6 +16937,7 @@ INSERT INTO k_skill_effect VALUES(12810,21);
 INSERT INTO k_skill_effect VALUES(12810,33);
 INSERT INTO k_skill_effect VALUES(12811,33);
 INSERT INTO k_skill_effect VALUES(12811,32);
+INSERT INTO k_skill_effect VALUES(12811,20);
 INSERT INTO k_skill_effect VALUES(12812,22);
 INSERT INTO k_skill_effect VALUES(12812,68);
 INSERT INTO k_skill_effect VALUES(12813,26);
@@ -16998,6 +17076,7 @@ INSERT INTO k_skill_effect VALUES(13211,38);
 INSERT INTO k_skill_effect VALUES(13212,20);
 INSERT INTO k_skill_effect VALUES(13213,17);
 INSERT INTO k_skill_effect VALUES(13214,17);
+INSERT INTO k_skill_effect VALUES(13215,17);
 INSERT INTO k_skill_effect VALUES(13217,65);
 INSERT INTO k_skill_effect VALUES(13218,65);
 INSERT INTO k_skill_effect VALUES(13220,65);
@@ -17156,15 +17235,22 @@ INSERT INTO k_skill_effect VALUES(13415,36);
 INSERT INTO k_skill_effect VALUES(13416,36);
 INSERT INTO k_skill_effect VALUES(13416,17);
 INSERT INTO k_skill_effect VALUES(13501,2);
+INSERT INTO k_skill_effect VALUES(13501,28);
 INSERT INTO k_skill_effect VALUES(13502,2);
+INSERT INTO k_skill_effect VALUES(13502,28);
 INSERT INTO k_skill_effect VALUES(13503,2);
+INSERT INTO k_skill_effect VALUES(13503,28);
 INSERT INTO k_skill_effect VALUES(13504,2);
+INSERT INTO k_skill_effect VALUES(13504,28);
 INSERT INTO k_skill_effect VALUES(13505,2);
+INSERT INTO k_skill_effect VALUES(13505,28);
 INSERT INTO k_skill_effect VALUES(13506,24);
 INSERT INTO k_skill_effect VALUES(13507,57);
+INSERT INTO k_skill_effect VALUES(13507,24);
 INSERT INTO k_skill_effect VALUES(13508,24);
 INSERT INTO k_skill_effect VALUES(13509,24);
 INSERT INTO k_skill_effect VALUES(13510,57);
+INSERT INTO k_skill_effect VALUES(13510,24);
 INSERT INTO k_skill_effect VALUES(13511,19);
 INSERT INTO k_skill_effect VALUES(13512,61);
 INSERT INTO k_skill_effect VALUES(13513,43);
@@ -17248,8 +17334,8 @@ INSERT INTO k_skill_effect VALUES(13609,26);
 INSERT INTO k_skill_effect VALUES(13610,20);
 INSERT INTO k_skill_effect VALUES(13610,75);
 INSERT INTO k_skill_effect VALUES(13611,37);
-INSERT INTO k_skill_effect VALUES(13611,38);
 INSERT INTO k_skill_effect VALUES(13611,17);
+INSERT INTO k_skill_effect VALUES(13611,38);
 INSERT INTO k_skill_effect VALUES(13612,5);
 INSERT INTO k_skill_effect VALUES(13613,5);
 INSERT INTO k_skill_effect VALUES(13613,20);
@@ -17322,6 +17408,12 @@ INSERT INTO k_skill_effect VALUES(13812,35);
 INSERT INTO k_skill_effect VALUES(13812,1);
 INSERT INTO k_skill_effect VALUES(13813,59);
 INSERT INTO k_skill_effect VALUES(13815,5);
+INSERT INTO k_skill_effect VALUES(11221,35);
+INSERT INTO k_skill_effect VALUES(11222,32);
+INSERT INTO k_skill_effect VALUES(11222,31);
+INSERT INTO k_skill_effect VALUES(12017,34);
+INSERT INTO k_skill_effect VALUES(12017,6);
+INSERT INTO k_skill_effect VALUES(12017,7);
 CREATE TABLE k_leader_skill(
     id INT NOT NULL PRIMARY KEY,
     stat INT NOT NULL REFERENCES k_stat(id),
@@ -18124,8 +18216,8 @@ INSERT INTO k_unit VALUES(16603,16600,'Dragon Knight',3,4,5,5,1,1,'Increases Res
 INSERT INTO k_unit VALUES(16613,16600,'Leo',3,4,6,5,1,1,'',9,148,11850,714,637,100,15,50,40,0,72,65,58,11850,714,637,16603,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(17903,17900,'Hell Lady',3,1,5,5,1,1,'Increases SPD by 15',14,154,7635,492,452,103,15,50,15,0,63,61,56,10380,670,615,NULL,17913,0,0,NULL);
 INSERT INTO k_unit VALUES(17913,17900,'Ethna',3,1,6,5,1,1,'',14,154,10380,845,604,119,15,50,15,0,63,77,55,10380,845,604,17903,NULL,0,0,NULL);
-INSERT INTO k_unit VALUES(19203,19200,'Ifrit',3,1,5,5,1,1,'Increases CRI Rate by 15%',15,157,6660,557,452,99,15,50,15,0,55,69,56,9060,758,615,NULL,19213,0,0,NULL);
-INSERT INTO k_unit VALUES(19213,19200,'Akhamamir',3,1,6,5,1,1,'',15,157,11370,812,571,100,30,50,15,0,69,74,52,11370,812,571,19203,NULL,0,0,NULL);
+INSERT INTO k_unit VALUES(19203,19200,'Ifrit',3,1,5,5,1,1,'Increases CRI Rate by 15%',15,144,6660,557,452,99,15,50,15,0,55,69,56,9060,758,615,NULL,19213,0,0,NULL);
+INSERT INTO k_unit VALUES(19213,19200,'Akhamamir',3,1,6,5,1,1,'',15,144,11370,812,571,100,30,50,15,0,69,74,52,11370,812,571,19203,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(16803,16800,'Monkey King',3,3,5,5,1,1,'Increases SPD by 15',9,143,7875,460,468,101,15,50,15,0,65,57,58,10710,626,637,NULL,16813,0,0,NULL);
 INSERT INTO k_unit VALUES(16813,16800,'Xing Zhe',3,3,6,5,1,1,'',9,143,11700,703,659,117,15,50,15,0,71,64,60,11700,703,659,16803,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(16103,16100,'Occult Girl',3,1,5,5,1,1,'Increases Accuracy by 25%',13,160,7635,509,436,104,15,50,15,0,63,63,54,10380,692,593,NULL,16113,0,0,NULL);
@@ -18319,8 +18411,8 @@ INSERT INTO k_unit VALUES(11615,11600,'Tilasha',5,4,5,4,1,1,'',8,127,7020,517,46
 INSERT INTO k_unit VALUES(17005,17000,'Archangel',5,2,5,5,1,1,'Increases CRI Rate by 15%',7,137,7500,420,533,94,15,50,15,0,62,52,66,10215,571,725,NULL,17015,0,0,NULL);
 INSERT INTO k_unit VALUES(17405,17400,'Beast Monk',5,3,5,5,1,1,'Strengthen Skill: Crushing Blow',10,141,8595,468,412,95,15,50,15,0,71,58,51,11700,637,560,NULL,17415,0,0,NULL);
 INSERT INTO k_unit VALUES(17415,17400,'Rahul',5,3,6,5,1,1,'',10,141,12840,659,626,96,15,50,15,0,78,60,57,12840,659,626,17405,NULL,0,0,NULL);
-INSERT INTO k_unit VALUES(14605,14600,'Chimera',5,1,5,5,1,1,'Increases Resistance by 25%',6,137,7500,484,468,94,15,50,15,0,62,60,58,10215,659,637,NULL,14615,0,0,NULL);
-INSERT INTO k_unit VALUES(14615,14600,'Zeratu',5,1,6,5,1,1,'',6,137,10710,790,637,95,15,50,40,0,65,72,58,10710,790,637,14605,NULL,0,0,NULL);
+INSERT INTO k_unit VALUES(14605,14600,'Chimera',5,1,5,5,1,1,'Increases CRI Rate by 15%',6,137,7500,484,468,94,15,50,15,0,62,60,58,10215,659,637,NULL,14615,0,0,NULL);
+INSERT INTO k_unit VALUES(14615,14600,'Zeratu',5,1,6,5,1,1,'',6,137,10710,790,637,95,30,50,15,0,65,72,58,10710,790,637,14605,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(14405,14400,'Dragon',5,1,5,5,1,1,'Increases CRI Rate by 15%',11,146,7755,468,468,94,15,50,15,0,64,58,58,10545,637,637,NULL,14415,0,0,NULL);
 INSERT INTO k_unit VALUES(14415,14400,'Grogen',5,1,6,5,1,1,'',11,146,10380,801,648,95,30,50,15,0,63,73,59,10380,801,648,14405,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(16605,16600,'Dragon Knight',5,4,5,5,1,1,'Increases CRI Rate by 15%',9,151,7755,476,460,99,15,50,15,0,64,59,57,10545,648,626,NULL,16615,0,0,NULL);
@@ -18385,12 +18477,12 @@ INSERT INTO k_unit VALUES(19414,19400,'Brig',4,1,5,4,1,1,'',14,113,6900,581,412,
 INSERT INTO k_unit VALUES(19415,19400,'Frigate',5,4,5,4,1,1,'',11,75,8355,436,460,108,15,50,15,0,69,54,57,11370,593,626,19405,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(19602,19600,'Mermaid',2,4,4,4,1,1,'Strengthen Skill: Mana Bubble',12,NULL,5340,345,279,94,15,50,15,0,60,58,47,9885,637,516,NULL,19612,0,0,NULL);
 INSERT INTO k_unit VALUES(19601,19600,'Mermaid',1,4,4,4,1,1,'Increases SPD by 15',9,NULL,4995,303,345,94,15,50,15,0,56,51,58,9225,560,637,NULL,19611,0,0,NULL);
-INSERT INTO k_unit VALUES(19603,19600,'Mermaid',3,4,4,4,1,1,'Strengthen Skill: Air Shield',13,NULL,5610,374,232,94,15,50,15,0,63,63,39,10380,692,428,NULL,19613,0,0,NULL);
+INSERT INTO k_unit VALUES(19603,19600,'Mermaid',3,4,4,4,1,1,'Increases SPD by 15',13,NULL,5610,374,232,94,15,50,15,0,63,63,39,10380,692,428,NULL,19613,0,0,NULL);
 INSERT INTO k_unit VALUES(19604,19600,'Mermaid',4,4,4,4,1,1,'Increases Resistance by 25%',8,NULL,5085,297,345,94,15,50,15,0,57,50,58,9390,549,637,NULL,19614,0,0,NULL);
 INSERT INTO k_unit VALUES(19605,19600,'Mermaid',5,4,4,4,1,1,'Increases SPD by 15',11,NULL,5340,267,356,94,15,50,15,0,60,45,60,9885,494,659,NULL,19615,0,0,NULL);
 INSERT INTO k_unit VALUES(19612,19600,'Platy',2,4,5,4,1,1,'',12,NULL,8235,444,460,95,15,50,15,0,68,55,57,11205,604,626,19602,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(19611,19600,'Tetra',1,4,5,4,1,1,'',9,NULL,7755,428,509,110,15,50,15,0,64,53,63,10545,582,692,19601,NULL,0,0,NULL);
-INSERT INTO k_unit VALUES(19613,19600,'Cichlid',3,4,5,4,1,1,'',13,NULL,8475,476,412,95,15,50,15,0,70,59,51,11535,648,560,19603,NULL,0,0,NULL);
+INSERT INTO k_unit VALUES(19613,19600,'Cichlid',3,4,5,4,1,1,'',13,NULL,8475,476,412,110,15,50,15,0,70,59,51,11535,648,560,19603,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(19614,19600,'Molly',4,4,5,4,1,1,'',8,NULL,8235,363,541,95,15,50,40,0,68,45,67,11205,494,736,19604,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(19615,19600,'Betta',5,4,5,4,1,1,'',11,NULL,8235,379,525,110,15,50,15,0,68,47,65,11205,516,714,19605,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(19702,19700,'Sea Emperor',2,1,5,5,1,1,'Increases CRI Rate by 15%',13,157,7260,500,468,100,15,50,15,0,60,62,58,9885,681,637,NULL,19712,0,0,NULL);
@@ -18466,10 +18558,10 @@ INSERT INTO k_unit VALUES(20313,20300,'Namib',3,3,4,3,1,1,'',8,172,5610,297,309,
 INSERT INTO k_unit VALUES(20314,20300,'Sahara',4,3,4,3,1,1,'',10,171,5880,255,333,97,15,50,15,0,66,43,56,10875,472,615,20304,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(20315,20300,'Karakum',5,3,4,3,1,1,'',11,174,5610,309,297,97,15,50,15,0,63,52,50,10380,571,549,20305,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(20402,20400,'Anubis',2,4,4,4,1,1,'Strengthen Skill: Pierce Soul',12,76,5175,309,327,100,15,50,15,0,58,52,55,9555,571,604,NULL,20412,0,0,NULL);
-INSERT INTO k_unit VALUES(20403,20400,'Anubis',3,1,4,4,1,1,'Strengthen Skill: Pierce Soul',12,113,4635,351,321,100,15,50,15,0,52,59,54,8565,648,593,NULL,20413,0,0,NULL);
+INSERT INTO k_unit VALUES(20403,20400,'Anubis',3,1,4,4,1,1,'Strengthen Skill: Brand of Hell',12,113,4635,351,321,100,15,50,15,0,52,59,54,8565,648,593,NULL,20413,0,0,NULL);
 INSERT INTO k_unit VALUES(20401,20400,'Anubis',1,1,4,4,1,1,'Strengthen Skill: Pierce Soul',9,77,4905,345,309,100,15,50,15,0,55,58,52,9060,637,571,NULL,20411,0,0,NULL);
 INSERT INTO k_unit VALUES(20404,20400,'Anubis',4,4,4,4,1,1,'Strengthen Skill: Pierce Soul',12,73,4995,333,315,100,15,50,15,0,56,56,53,9225,615,582,NULL,20414,0,0,NULL);
-INSERT INTO k_unit VALUES(20405,20400,'Anubis',5,3,5,5,1,1,'Strengthen Skill: Pierce Soul',12,74,8355,468,428,100,15,50,15,0,69,58,53,11370,637,582,NULL,20415,0,0,NULL);
+INSERT INTO k_unit VALUES(20405,20400,'Anubis',5,3,5,5,1,1,'Strengthen Skill: Soul Devourer',12,74,8355,468,428,100,15,50,15,0,69,58,53,11370,637,582,NULL,20415,0,0,NULL);
 INSERT INTO k_unit VALUES(20415,20400,'Thebae',5,3,6,5,1,1,'',12,74,12675,692,604,101,15,50,15,0,77,63,55,12675,692,604,20405,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(20414,20400,'Amarna',4,4,5,4,1,1,'',12,73,7260,500,468,101,15,50,15,0,60,62,58,9885,681,637,20404,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(20413,20400,'Iunu',3,1,5,4,1,1,'',12,113,6780,541,460,101,15,50,15,0,56,67,57,9225,736,626,20403,NULL,0,0,NULL);
@@ -18545,8 +18637,8 @@ INSERT INTO k_unit VALUES(21114,21100,'Oberon',4,1,6,5,1,1,'',10,152,10050,790,6
 INSERT INTO k_unit VALUES(21113,21100,'Ganymede',3,4,6,5,1,1,'',11,155,10710,736,692,113,15,50,15,0,65,67,63,10710,736,692,21103,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(21111,21100,'Psamathe',1,1,6,5,1,1,'',15,167,9720,856,637,98,30,50,15,0,59,78,58,9720,856,637,21101,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(21112,21100,'Daphnis',2,1,6,5,1,1,'',13,154,9885,834,648,98,15,50,15,25,60,76,59,9885,834,648,21102,NULL,0,0,NULL);
-INSERT INTO k_unit VALUES(21202,21200,'Panda Warrior',2,2,5,5,1,1,'Increases Resistance by 25%',13,158,7260,428,541,95,15,50,15,0,60,53,67,9885,582,736,NULL,21212,0,0,NULL);
-INSERT INTO k_unit VALUES(21212,21200,'Xiong Fei',2,2,6,5,1,1,'',13,158,10545,615,823,96,15,50,40,0,64,56,75,10545,615,823,21202,NULL,0,0,NULL);
+INSERT INTO k_unit VALUES(21202,21200,'Panda Warrior',2,2,5,5,1,1,'Strengthen Skill: Calm Mind',13,158,7260,428,541,95,15,50,15,0,60,53,67,9885,582,736,NULL,21212,0,0,NULL);
+INSERT INTO k_unit VALUES(21212,21200,'Xiong Fei',2,2,6,5,1,1,'',13,158,10545,615,823,96,15,50,15,0,64,56,75,10545,615,823,21202,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(21201,21200,'Panda Warrior',1,3,5,5,1,1,'Increases Accuracy by 25%',13,143,8235,452,452,95,15,50,15,0,68,56,56,11205,615,615,NULL,21211,0,0,NULL);
 INSERT INTO k_unit VALUES(21211,21200,'Mo Long',1,3,6,5,1,1,'',13,143,12675,648,648,96,15,50,15,25,77,59,59,12675,648,648,21201,NULL,0,0,NULL);
 INSERT INTO k_unit VALUES(21213,21200,'Feng Yan',3,2,6,5,1,1,'',11,181,10215,659,801,96,30,50,15,0,62,60,73,10215,659,801,21203,NULL,0,0,NULL);
@@ -21436,7 +21528,7 @@ INSERT INTO k_unit_skill VALUES(19611,10401);
 INSERT INTO k_unit_skill VALUES(19611,10406);
 INSERT INTO k_unit_skill VALUES(19611,10411);
 INSERT INTO k_unit_skill VALUES(19613,10403);
-INSERT INTO k_unit_skill VALUES(19613,10417);
+INSERT INTO k_unit_skill VALUES(19613,10408);
 INSERT INTO k_unit_skill VALUES(19613,10413);
 INSERT INTO k_unit_skill VALUES(19614,10404);
 INSERT INTO k_unit_skill VALUES(19614,10409);
@@ -21672,14 +21764,14 @@ INSERT INTO k_unit_skill VALUES(20404,11214);
 INSERT INTO k_unit_skill VALUES(20405,11205);
 INSERT INTO k_unit_skill VALUES(20405,11210);
 INSERT INTO k_unit_skill VALUES(20405,11215);
-INSERT INTO k_unit_skill VALUES(20415,11220);
-INSERT INTO k_unit_skill VALUES(20415,11210);
+INSERT INTO k_unit_skill VALUES(20415,11205);
+INSERT INTO k_unit_skill VALUES(20415,11221);
 INSERT INTO k_unit_skill VALUES(20415,11215);
 INSERT INTO k_unit_skill VALUES(20414,11219);
 INSERT INTO k_unit_skill VALUES(20414,11209);
 INSERT INTO k_unit_skill VALUES(20414,11214);
-INSERT INTO k_unit_skill VALUES(20413,11218);
-INSERT INTO k_unit_skill VALUES(20413,11208);
+INSERT INTO k_unit_skill VALUES(20413,11203);
+INSERT INTO k_unit_skill VALUES(20413,11222);
 INSERT INTO k_unit_skill VALUES(20413,11213);
 INSERT INTO k_unit_skill VALUES(20411,11216);
 INSERT INTO k_unit_skill VALUES(20411,11206);
@@ -21901,7 +21993,7 @@ INSERT INTO k_unit_skill VALUES(21202,12002);
 INSERT INTO k_unit_skill VALUES(21202,12007);
 INSERT INTO k_unit_skill VALUES(21202,12012);
 INSERT INTO k_unit_skill VALUES(21212,12002);
-INSERT INTO k_unit_skill VALUES(21212,12007);
+INSERT INTO k_unit_skill VALUES(21212,12017);
 INSERT INTO k_unit_skill VALUES(21212,12012);
 INSERT INTO k_unit_skill VALUES(21201,12001);
 INSERT INTO k_unit_skill VALUES(21201,12006);

+ 37 - 3
install_data/install_data.sql

@@ -91,7 +91,7 @@ CREATE TABLE rune(
     efficiency FLOAT NOT NULL CHECK(efficiency BETWEEN 0 AND 100),
     max_efficiency FLOAT NOT NULL CHECK(max_efficiency BETWEEN 0 AND 100),
     main_stat INT NOT NULL REFERENCES k_rune_stat(id),
-    main_stat_value INT NOT NULL CHECK(value > 0),
+    main_stat_value INT NOT NULL CHECK(main_stat_value > 0),
     innate_stat INT REFERENCES k_rune_stat(id),
     innate_stat_value INT CHECK(innate_stat_value >= 0),
     substat_1 INT REFERENCES k_rune_stat(id),
@@ -109,7 +109,41 @@ CREATE TABLE rune(
     substat_4 INT REFERENCES k_rune_stat(id),
     substat_4_value INT CHECK(substat_4_value >= 0),
     substat_4_enchant INT CHECK(substat_4_enchant IN (0, 1)),
-    substat_4_grind INT CHECK(substat_4_grind >= 0)
+    substat_4_grind INT CHECK(substat_4_grind >= 0),
+    locked INT NOT NULL CHECK(locked IN (0, 1))
+);
+CREATE TABLE artifact(
+    uid INT NOT NULL REFERENCES player(id),
+    id INT PRIMARY KEY NOT NULL,
+    assigned_to INT REFERENCES unit(id),
+    type INT REFERENCES k_archetype(id),
+    attribute INT REFERENCES k_element(id),
+    archetype INT REFERENCES k_archetype(id),
+    level INT NOT NULL CHECK(level BETWEEN 0 AND 15),
+    quality INT NOT NULL REFERENCES k_quality(id),
+    original_quality INT NOT NULL REFERENCES k_quality(id),
+    value INT NOT NULL CHECK(value >= 0),
+    efficiency FLOAT NOT NULL CHECK(efficiency BETWEEN 0 AND 100),
+    max_efficiency FLOAT NOT NULL CHECK(max_efficiency BETWEEN 0 AND 100),
+    main_stat INT NOT NULL REFERENCES k_stat(id),
+    main_stat_value INT NOT NULL CHECK(main_stat_value > 0),
+    effect_1 INT REFERENCES k_artiffact_effect(id),
+    effect_1_value INT CHECK(effect_1_value >= 0),
+    effect_1_enchant INT,
+    effect_1_grind INT,
+    effect_2 INT REFERENCES k_artiffact_effect(id),
+    effect_2_value INT CHECK(effect_2_value >= 0),
+    effect_2_enchant INT,
+    effect_2_grind INT,
+    effect_3 INT REFERENCES k_artiffact_effect(id),
+    effect_3_value INT CHECK(effect_3_value >= 0),
+    effect_3_enchant INT,
+    effect_3_grind INT,
+    effect_4 INT REFERENCES k_artiffact_effect(id),
+    effect_4_value INT CHECK(effect_4_value >= 0),
+    effect_4_enchant INT,
+    effect_4_grind INT,
+    locked INT NOT NULL CHECK(locked IN (0, 1))
 );
 CREATE TABLE inventory(
     uid INT NOT NULL REFERENCES player(id),
@@ -149,7 +183,7 @@ CREATE TABLE guild_member(
 CREATE TABLE rune_craft(
     uid INT NOT NULL REFERENCES player(id),
     id INT NOT NULL PRIMARY KEY,
-    type INT NOT NULL CHECK(type BETWEEN 1 AND 4),
+    type INT NOT NULL,
     quality INT NOT NULL REFERENCES k_quality(id),
     rune INT NOT NULL REFERENCES k_rune_set(id),
     stat INT NOT NULL REFERENCES k_rune_stat(id),

+ 42 - 0
public/css/artifacts.css

@@ -0,0 +1,42 @@
+section.filters td.filter select#filter_element{
+    overflow: hidden;
+    height: 7em;
+}
+section.filters td.filter select#filter_archetype{
+    height: 6em;
+    overflow: hidden;
+}
+section.filters td.filter select#filter_main_stat{
+    height: 5em;
+    overflow: hidden;
+}
+section.filters td.filter select#filter_sub_stat{
+    height: 5em;
+    overflow: hidden;
+}
+
+section h2 img, span{
+    display: inline-block;
+    vertical-align: middle;
+}
+section h2 img{
+    height: 1.5em;
+}
+section h2 img.group_image_1{
+    transform: rotate(0deg);
+}
+section h2 img.group_image_2{
+    transform: rotate(57deg);
+}
+section h2 img.group_image_3{
+    transform: rotate(123deg);
+}
+section h2 img.group_image_4{
+    transform: rotate(180deg);
+}
+section h2 img.group_image_5{
+    transform: rotate(237deg);
+}
+section h2 img.group_image_6{
+    transform: rotate(303deg);
+}

+ 19 - 0
public/css/enchantments.css

@@ -0,0 +1,19 @@
+section.filters td.filter select#filter_type{
+    height: 2.5em;
+    overflow: hidden;
+}
+section.filters td.filter select#filter_rune{
+    height: 26em;
+    overflow: hidden;
+}
+section.filters td.filter select#filter_stat{
+    height: 13em;
+    overflow: hidden;
+}
+section h2 img, span{
+    display: inline-block;
+    vertical-align: middle;
+}
+section h2 img{
+    height: 1.5em;
+}

+ 5 - 3
public/css/runs.css

@@ -23,12 +23,14 @@ table#runs td.area div.area img.area{
 
 table#runs td.area div.area span.stage{
     position: relative;
-    left: -1.85em;
-    top: -0.4em;
+    right: -1.5em;
+    bottom: 1.5em;
     font-size: 80%;
-    text-align: right;
     text-shadow: 0 0 0.3em #000, 0 0 0.3em #000, 0 0 0.3em #000, 0 0 0.2em #000, 0 0 0.1em #000, 0 0 0.1em #000;
     pointer-events: none;
+    text-align: right;
+    width: 2em;
+    display: block;
 }
 
 table#runs td.area div.area span.difficulty{

+ 159 - 15
public/css/ui.css

@@ -417,19 +417,19 @@ div.rune_panel{
     position: relative;
     text-align: center;
 }
-div.rune_panel.rune_quality_normal{ /* Normal */
+div.rune_panel.rune_original_quality_normal{ /* Normal */
     background-image: repeating-radial-gradient(#ffffff, #cccccc 30%, #ffffff 60%);
 }
-div.rune_panel.rune_quality_magic{ /* Magic */
+div.rune_panel.rune_original_quality_magic{ /* Magic */
     background-image: repeating-radial-gradient(#aaffaa, #88cc88 30%, #aaffaa 60%);
 }
-div.rune_panel.rune_quality_rare{ /* Rare */
+div.rune_panel.rune_original_quality_rare{ /* Rare */
     background-image: repeating-radial-gradient(#aaaaff, #8888cc 30%, #aaaaff 60%);
 }
-div.rune_panel.rune_quality_hero{ /* Hero */
+div.rune_panel.rune_original_quality_hero{ /* Hero */
     background-image: repeating-radial-gradient(#ffaacc, #cc88aa 30%, #ffaacc 60%);
 }
-div.rune_panel.rune_quality_legend{ /* Legend */
+div.rune_panel.rune_original_quality_legend{ /* Legend */
     background-image: repeating-radial-gradient(#f48200, #b76201 30%, #f48200 60%);
 }
 div.rune_panel img.rune_base{
@@ -475,11 +475,11 @@ div.rune_panel.rune_slot_6 img.rune_icon{
     top: 2.9em;
     left: 3.3em;
 }
-div.rune_panel.rune_original_quality_normal img.rune_icon{filter: sepia(100%) saturate(500%) grayscale(100%);}
-div.rune_panel.rune_original_quality_magic img.rune_icon{filter: sepia(100%) saturate(500%) hue-rotate(60deg);}
-div.rune_panel.rune_original_quality_rare img.rune_icon{filter: sepia(100%) saturate(500%) hue-rotate(120deg);}
-div.rune_panel.rune_original_quality_hero img.rune_icon{filter: sepia(100%) saturate(500%) hue-rotate(230deg);}
-div.rune_panel.rune_original_quality_legend img.rune_icon{filter: sepia(100%) saturate(500%) hue-rotate(330deg);}
+div.rune_panel.rune_quality_normal img.rune_icon{filter: sepia(100%) saturate(500%) grayscale(100%);}
+div.rune_panel.rune_quality_magic img.rune_icon{filter: sepia(100%) saturate(500%) hue-rotate(60deg);}
+div.rune_panel.rune_quality_rare img.rune_icon{filter: sepia(100%) saturate(500%) hue-rotate(120deg);}
+div.rune_panel.rune_quality_hero img.rune_icon{filter: sepia(100%) saturate(500%) hue-rotate(230deg);}
+div.rune_panel.rune_quality_legend img.rune_icon{filter: sepia(100%) saturate(500%) hue-rotate(330deg);}
 div.rune_panel span.rune_stars{
     position: absolute;
     width: 9em;
@@ -511,6 +511,64 @@ div.rune_panel.rune_level_15 span.rune_level{color: #ff6f2d;}
  */
 
 
+/**
+ * Artifact boxes
+ */
+div.artifact_panel{
+    width: 8em;
+    height: 8em;
+    border: 0.2em solid #000000;
+    border-radius: 1em;
+    position: relative;
+    text-align: center;
+}
+div.artifact_panel.artifact_original_quality_normal{ /* Normal */
+    background-image: repeating-radial-gradient(#ffffff, #cccccc 30%, #ffffff 60%);
+}
+div.artifact_panel.artifact_original_quality_magic{ /* Magic */
+    background-image: repeating-radial-gradient(#aaffaa, #88cc88 30%, #aaffaa 60%);
+}
+div.artifact_panel.artifact_original_quality_rare{ /* Rare */
+    background-image: repeating-radial-gradient(#aaaaff, #8888cc 30%, #aaaaff 60%);
+}
+div.artifact_panel.artifact_original_quality_hero{ /* Hero */
+    background-image: repeating-radial-gradient(#ffaacc, #cc88aa 30%, #ffaacc 60%);
+}
+div.artifact_panel.artifact_original_quality_legend{ /* Legend */
+    background-image: repeating-radial-gradient(#f48200, #b76201 30%, #f48200 60%);
+}
+div.artifact_panel img.artifact_base{
+    position: absolute;
+    width: 8em;
+    height: 8em;
+    margin: 0;
+    top: 0.1em;
+    left: 0;
+}
+div.artifact_panel img.artifact_icon{
+    position: absolute;
+    height: 4em;
+    top: 2em;
+    left: 2em;
+}
+div.artifact_panel.artifact_level_15 span.artifact_stars img.star{filter: sepia(100%) saturate(300%) hue-rotate(320deg) saturate(400%) drop-shadow(0 0 0.1em #000000) drop-shadow(0 0 0.1em #000000);}
+div.artifact_panel span.artifact_level{
+    font-size: 130%;
+    font-weight: bold;
+    text-shadow: 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.2em #000000;
+    position: relative;
+    top: 4.7em;
+    left: 1.5em;
+}
+div.artifact_panel span.artifact_level::before {
+  content: "+";
+}
+div.artifact_panel.artifact_level_15 span.artifact_level{color: #ff6f2d;}
+/**
+ * /Artifact boxes
+ */
+
+
 /**
  * Monster panel
  */
@@ -656,9 +714,9 @@ div.monster_transformation_panel img.monster_transformation{
  */
  
  
- /**
-  * Rune table
-  */
+/**
+ * Rune table
+ */
 table.rune{
     border-collapse: collapse;
     display: inline-block;
@@ -671,12 +729,16 @@ table.rune{
     font-size: 70%;
     border: 0.3em solid #3c2929;
 }
+table.rune td.icon{
+    vertical-align: top;
+    padding-top: 0.3em;
+}
 table.rune td.icon div.assigned{
     max-width: 2.5em;
     max-height: 2.5em;
     position: absolute;
-    left: 0.5em;
-    bottom: 1em;
+    left: 0.2em;
+    top: 3.6em;
 }
 table.rune td.icon div.assigned img.monster_image{
     width: 2.5em;
@@ -754,6 +816,88 @@ table.rune td.details table.table_details span.quality.quality_legend{background
  */
 
 
+/**
+ * Artifact table
+ */
+table.artifact{
+    border-collapse: collapse;
+    display: inline-block;
+    vertical-align: top;
+    font-size: 80%;
+    position: relative;
+    border-radius: 1em;
+    margin: 0.5em;
+    background-color: #7d6640;
+    font-size: 70%;
+    border: 0.3em solid #3c2929;
+}
+table.artifact td.icon{
+    vertical-align: top;
+    padding-top: 0.3em;
+}
+table.artifact td.icon div.assigned{
+    max-width: 2.5em;
+    max-height: 2.5em;
+    position: absolute;
+    left: 0.2em;
+    top: 3.6em;
+}
+table.artifact td.icon div.assigned img.monster_image{
+    width: 2.5em;
+    height: 2.5em;
+    border-style: solid;
+    border-width: 0.2em;
+    border-radius: 15%;
+}
+table.artifact td.icon div.artifact_panel{font-size: 70%;}
+/* TODO: While no details panel, stats can be wider. Normaly is 8em*/
+table.artifact td.effects{
+    width: 21.5em;
+    text-align: left;
+}
+
+table.artifact td.effects table{font-size: 90%;}
+
+table.artifact td.effects table tr.main_stat{
+    font-weight: bold;
+    font-size: 110%;
+}
+
+table.artifact td.details{
+    padding-left: 0.5em;
+    width: 16em;
+    font-size: 80%;
+}
+
+table.artifact td.details table.table_details td.title{text-align: right;}
+table.artifact td.details table.table_details td.value{
+    text-align: left;
+    padding-left: 1em;
+}
+
+table.artifact td.details table.table_details span.quality{
+    border: 0.1em solid #000000;
+    border-radius: 0.2em;
+    font-weight: bold;
+    text-shadow: 0 0 0.1em #000000;
+    padding: 0 0.3em;
+    width: 5em;
+}
+
+table.artifact td.details table.table_details span.quality.quality_normal{background-color: #cccccc;}
+
+table.artifact td.details table.table_details span.quality.quality_magic{background-color: #55ff55;}
+
+table.artifact td.details table.table_details span.quality.quality_rare{background-color: #15c6e1;}
+
+table.artifact td.details table.table_details span.quality.quality_hero{background-color: #ad7fa8;}
+
+table.artifact td.details table.table_details span.quality.quality_legend{background-color: #f57900;}
+/**
+ * /Artifact table
+ */
+
+
 
 /**
  * Craft item panel

BIN
public/img/artifact/element_dark.png


BIN
public/img/artifact/element_fire.png


BIN
public/img/artifact/element_hero.png


BIN
public/img/artifact/element_legend.png


BIN
public/img/artifact/element_light.png


BIN
public/img/artifact/element_magic.png


BIN
public/img/artifact/element_normal.png


BIN
public/img/artifact/element_rare.png


BIN
public/img/artifact/element_water.png


BIN
public/img/artifact/element_wind.png


BIN
public/img/artifact/type_attack.png


BIN
public/img/artifact/type_defense.png


BIN
public/img/artifact/type_hero.png


BIN
public/img/artifact/type_hp.png


BIN
public/img/artifact/type_legend.png


BIN
public/img/artifact/type_magic.png


BIN
public/img/artifact/type_normal.png


BIN
public/img/artifact/type_rare.png


BIN
public/img/artifact/type_support.png


BIN
public/img/skill/00001716.png


BIN
public/img/skill/00001816.png


BIN
public/img/skill/00001817.png


BIN
public/img/skill/00002117.png


BIN
public/img/skill/00002517.png


BIN
public/img/skill/00002551.png


BIN
public/img/skill/00002552.png


BIN
public/img/skill/00002553.png


BIN
public/img/skill/00002554.png


BIN
public/img/skill/00002555.png


BIN
public/img/skill/00002556.png


BIN
public/img/skill/00002557.png


BIN
public/img/skill/00002558.png


BIN
public/img/skill/00002559.png


BIN
public/img/skill/00002560.png


BIN
public/img/skill/00002561.png


BIN
public/img/skill/00002562.png


BIN
public/img/skill/00002563.png


BIN
public/img/skill/00002564.png


BIN
public/img/skill/00002565.png


BIN
public/img/skill/00002566.png


BIN
public/img/skill/00002567.png


BIN
public/img/skill/00002568.png


BIN
public/img/skill/00002569.png


BIN
public/img/skill/00002570.png


BIN
public/img/skill/00002571.png


BIN
public/img/skill/00002572.png


BIN
public/img/skill/00002573.png


BIN
public/img/skill/00002574.png


BIN
public/img/skill/00002575.png


BIN
public/img/skill/00002576.png


BIN
public/img/skill/00002577.png


BIN
public/img/skill/00002578.png


BIN
public/img/skill/00002716.png


BIN
public/img/skill/00002916.png


BIN
public/img/skill/00007119.png


BIN
public/img/skill/00007517.png


BIN
public/img/skill/00007817.png


BIN
public/img/skill/00009416.png


BIN
public/img/skill/00009417.png


BIN
public/img/skill/00009516.png


BIN
public/img/skill/00010116.png


BIN
public/img/skill/00010136.png


BIN
public/img/skill/00010716.png


BIN
public/img/skill/00010717.png


BIN
public/img/skill/00010916.png


BIN
public/img/skill/00011016.png


BIN
public/img/skill/00011221.png


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff