<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://oldwiki.devbox.themanaworld.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fate</id>
	<title>The Mana World - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://oldwiki.devbox.themanaworld.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fate"/>
	<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/wiki/Special:Contributions/Fate"/>
	<updated>2026-05-06T06:06:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate/Becoming_a_developer&amp;diff=13737</id>
		<title>User:Fate/Becoming a developer</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate/Becoming_a_developer&amp;diff=13737"/>
		<updated>2009-11-02T18:37:22Z</updated>

		<summary type="html">&lt;p&gt;Fate: New page: Since this question keeps popping up, I&amp;#039;ve decided to put together a brief summary of how (in my experience) someone can become a developer in a Free Software project.  Note that different...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since this question keeps popping up, I&#039;ve decided to put together a brief summary of how (in my experience) someone can become a developer in a Free Software project.  Note that different projects have different cultures, so this advice may not be universal.&lt;br /&gt;
&lt;br /&gt;
As developer, your goal is to &#039;&#039;&#039;maximise your use to the project&#039;&#039;&#039; within what your real life constraints and obligations to other projects allow.  Keep this in mind for all of the following.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
First, make sure that you are familiar with the project&#039;s&lt;br /&gt;
* aim&lt;br /&gt;
* principal communication channels&lt;br /&gt;
* organisation&lt;br /&gt;
* technical choices&lt;br /&gt;
&lt;br /&gt;
The last two points, &#039;&#039;organisation&#039;&#039; and &#039;&#039;technical choices&#039;&#039; you need only understand as far as needed for actually interacting with development.&lt;br /&gt;
&lt;br /&gt;
== Starting out ==&lt;br /&gt;
&lt;br /&gt;
Free software developers must be self-reliant.  If you have an idea, chances are that nobody will like it until you&#039;ve finished implementing it (people are silly like that.)&lt;br /&gt;
If you are just starting out, you cannot expect help from the existing developers.&lt;br /&gt;
&lt;br /&gt;
Try to follow the following rules of thumb:&lt;br /&gt;
* Figure things out on your own as much as possible&lt;br /&gt;
* Manage and sanity-check your ideas&lt;br /&gt;
* Allocate time&lt;br /&gt;
** To learn&lt;br /&gt;
** To implement&lt;br /&gt;
&lt;br /&gt;
== Figuring things out ==&lt;br /&gt;
* If you can google for it, don&#039;t ask about it.&lt;br /&gt;
* If it&#039;s documented, don&#039;t ask about it, unless it&#039;s broken.&lt;br /&gt;
* If it&#039;s not in the project&#039;s best interest, don&#039;t even consider it.&lt;br /&gt;
&lt;br /&gt;
== Managing your ideas ==&lt;br /&gt;
* If you think you have a good idea, write it down for yourself first.&lt;br /&gt;
* Check: does this idea introduce security issues or other exploits?&lt;br /&gt;
* Check: is this idea actually useful (or entertaining, for a game)?&lt;br /&gt;
* Check: is this idea usable?&lt;br /&gt;
* Check: does this idea really add something new?&lt;br /&gt;
* Check: does this idea integrate well with the rest of the project?&lt;br /&gt;
* Check: does this idea integrate well with the project&#039;s aim and projected plan?&lt;br /&gt;
* Check: is this idea technically feasible?&lt;br /&gt;
* Check: &#039;&#039;do you have the resources to implement this idea yourself&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
You can try to answer these questions for yourself or talk them through with your friends.&lt;br /&gt;
If you are just starting out, try to rely on the existing developers&#039; help as little as possible.&lt;br /&gt;
If you need other people&#039;s help, make sure to ask for help politely.  Don&#039;t waste your time on ideas that you cannot implement yourself and that you cannot find help for.  As for requesting help, remember:&lt;br /&gt;
&lt;br /&gt;
* Don&#039;t expect anyone to do your work for you, &#039;&#039;ever&#039;&#039;:&lt;br /&gt;
** Let me repeat that: implementing things is hard work.  Don&#039;t ever expect people to do hard work for you for free.  No matter what you may think, you are not &#039;&#039;that&#039;&#039; brilliant.&lt;br /&gt;
** If you want an idea implemented, show that you are serious about working on it yourself.&lt;br /&gt;
*** Don&#039;t repeat yourself or go into unnecessary detail.&lt;br /&gt;
*** Do check your idea, read up on technical aspects you are not aware of, build prototypes, draw sketches, criticise yourself and revise your idea.&lt;br /&gt;
*** Acquire the skills needed to make your idea a reality.&lt;br /&gt;
&lt;br /&gt;
== Learning and Time Management ==&lt;br /&gt;
Free software development is &#039;&#039;mostly&#039;&#039; about learning, especially at the beginning, so be prepared to learn new languages, radically new ideas, and new techniques in tools that you have been using for years.&lt;br /&gt;
&lt;br /&gt;
Remember:&lt;br /&gt;
* The first revision of anything you try will usually be horrible.&lt;br /&gt;
* The second revision will usually be too bad to be practical.&lt;br /&gt;
* The third revision may or may not be good enough.&lt;br /&gt;
* At any time you may find that you did something very silly and need to read up and start over from the beginning.&lt;br /&gt;
&lt;br /&gt;
Make sure to allocate a lot of time to accommodate for all of this.&lt;br /&gt;
&lt;br /&gt;
== Joining the team ==&lt;br /&gt;
Now that we&#039;ve covered the basics, how can you join a Free Software project&#039;s team?  The most important thing is to show that you are indeed useful to the project.  If you have programming skills, solve an existing problem or limitation of the project using your skills and submit a patch.  If you have writing skills, try to see if there is something you can write for the project.  If you have pixelling or drawing skills, produce some graphics that may help the project.  If you don&#039;t have any of these skills, try to acquire them.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have any skills nor time to acquire them, then test and submit bug reports, or try to answer newbie questions that you know the answers to.  This last step will not make you a developer, but it will give you a starting point in case you do manage to find time later on.&lt;br /&gt;
Also, you help the project by freeing up developer time, so that&#039;s a good thing.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:GM_Guidelines&amp;diff=13347</id>
		<title>Archive:GM Guidelines</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:GM_Guidelines&amp;diff=13347"/>
		<updated>2009-09-21T17:07:59Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Status_red}}&lt;br /&gt;
{{Opinions|&lt;br /&gt;
{{Pro|Wombat}}&lt;br /&gt;
{{Pro|kai_62656}}&lt;br /&gt;
{{Pro|Kage}}&lt;br /&gt;
{{Pro|doorsman}}&lt;br /&gt;
{{Pro|Delasia}}&lt;br /&gt;
{{Pro|Jaxad0127}}&lt;br /&gt;
|&lt;br /&gt;
{{Contra|Fate}} (Lacking in several aspects:  there is no mention of a procedure for resolving and disseminating `common sense&#039; rulings and turning them into binding precedents.  Also lacking:  an explicit statement that using GM commands for any reason other than to enforce the rules and maintain the peace is inacceptable, and a general code of conduct (no mudslinging, no getting involved with player disputes, no favouritism.  Also does not mention how GMs should react if they have made a mistake (apologies, restitution, ...), nor explain when a GM would be stripped of their powers.  IMO, the GM team is too big now to go without these things.)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Being a GM (game master) is a responsible job. In part, your actions affect what the community will be like. Hence, here are some basic guidelines to help you make decisions.&lt;br /&gt;
&lt;br /&gt;
=== General guidelines ===&lt;br /&gt;
&lt;br /&gt;
# Use your own common sense. You are a GM because we have trust in your judgment.&lt;br /&gt;
&lt;br /&gt;
=== Enforcing the rules ===&lt;br /&gt;
&lt;br /&gt;
If a situation arises not covered in the rules, you might want to request players to follow your temporary guidelines to restore order. Use the usual @t warning to log the event. GMs are encouraged to explain the offense and the possible punishment. Usually &#039;common sense&#039; rulings spawn controversy so be careful in your measurement of punishment. Keep it as mild as possible to restore order.&lt;br /&gt;
&lt;br /&gt;
==== Rules and punishment for breaking them ====&lt;br /&gt;
&lt;br /&gt;
The primary job of a GM is to keep people happy with the game by enforcing [[User:Jaxad0127/Rules_Dialog|The Rules]]. The rules below are suggested and may differ case-by-case.  Standard punishment for each rule varies:&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;Do not abuse other players&#039;&#039;&#039; (insults, swearing, and the like directed to a particular person or persons)&lt;br /&gt;
::Punishment: &#039;&#039;&#039;Request the player(s) ignore each other or an hour ban for excessive abuse.  Punishment may increase should abuse continue.&#039;&#039;&#039;  &#039;&#039;Reason for punishment: To calm down a player dispute.  To encourage a player to not use derogatory language against other players or directed at groups of people (such as racist, sexist, homophobic language).&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;No bots&#039;&#039;&#039; (and botting means ANY unauthorized activity while away from keyboard, automated activity with one or more players or multi-boxing)&lt;br /&gt;
::Punishment: &#039;&#039;&#039;Permanent ban.&#039;&#039;&#039;  &#039;&#039;Reason for punishment: To encourage a social environment in the game.  AFK killing takes up an area where monsters typically spawn and prevents players that are actively playing the game from having access to the monsters.  It creates an unfair advantage over other players that play the game without botting.  It discourages social interaction and the party system.  It grants monster drop scavengers an advantage of growing in wealth without having killed monsters to receive it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. &#039;&#039;&#039;No game abuse&#039;&#039;&#039; (this includes, but is not limited to spamming, flooding, lagging and bug abuse)&lt;br /&gt;
::Punishment: &#039;&#039;&#039;Talk spam: automatic ban, 1 hour.  Other similar effects can be punished by warping, kicking, or banning the offender for an hour.  Continued offenses can result in longer punishments, including a permanent ban.&#039;&#039;&#039;  &#039;&#039;Reason for punishment: Game abuse can cause clients to slow or crash and log out of the server.  It also can be an annoyance to people in the area that are attempting to interact socially.  Players can be encouraged to ignore a chat spammer, but should this not work (the offender is moving or standing in a way to make click and ignore difficult, the offender is spamming in an area with a large number of people, some of who might not be computer savvy enough to handle the spam) punishment may become necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. &#039;&#039;&#039;No begging&#039;&#039;&#039;&lt;br /&gt;
::Punishment: &#039;&#039;&#039;Kicking the offender or an hour ban.  Continued offenses can result in longer punishments.&#039;&#039;&#039; &#039;&#039;Reason for Punishment: Primarily an annoyance, it can also grant a player an unfair advantage without fighting the monsters.  Begging sometimes can be considered chat spam, but not always.  It also causes players that might otherwise be good natured to become less social in the game and resent players that might need actual assistance in the game.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5. &#039;&#039;&#039;Speak English on public chat&#039;&#039;&#039;&lt;br /&gt;
::Punishment: &#039;&#039;&#039;Request players whisper privately in public spaces or move to another area to talk.  Not speaking English may not be an automatic offense if a player is unfamiliar with English and is requesting assistance.  Refusing to speak English can result in kicking, an hour ban or longer punishment should the offender continue.&#039;&#039;&#039;  &#039;&#039;Reason for Punishment: Social interaction, understanding the rules and other problems that may occur in the game may not be understood, so players are usually encouraged to understand some English in order to interact with the game.  Without understanding this rule, some players may abuse the rules and then claim to not understand the GM when the GM is attempting to enforce the rules.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Keeping track of who is banned, why and when ====&lt;br /&gt;
The [http://server.themanaworld.org/gm GM Log] and the [http://forums.themanaworld.org/viewforum.php?f=20 Court House] helps to keep track of who was banned and why.  GMs are encouraged to make note of the reason for a ban for the GM Log and announce bans longer than an hour in the Court House for the sake of transparency.&lt;br /&gt;
&lt;br /&gt;
Once a player is banned, a player often comes to the Court House to ask to be unbanned.  In the case of some permanent bans (typically first time botting) the player&#039;s character may be reset, at the GM&#039;s discretion.&lt;br /&gt;
&lt;br /&gt;
== Command reference ==&lt;br /&gt;
&lt;br /&gt;
There are many command commands GMs use. All of them are logged. Here is a selection of the more important ones:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;@ban &amp;lt;time&amp;gt; &amp;lt;player name&amp;gt;&amp;lt;/code&amp;gt; â€” Ban temporarily an account &lt;br /&gt;
*: Where &amp;lt;code&amp;gt;&amp;lt;time&amp;gt;&amp;lt;/code&amp;gt; is a numerical value and an unit of time (&amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mn&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;m&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;), eg. &amp;lt;code&amp;gt;1h&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;3d&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;@unban &amp;lt;player name&amp;gt;&amp;lt;/code&amp;gt; â€” Unban an account&lt;br /&gt;
* &amp;lt;code&amp;gt;@block &amp;lt;player name&amp;gt;&amp;lt;/code&amp;gt; â€” Used for permanent bans for botting and hacking&lt;br /&gt;
* &amp;lt;code&amp;gt;@charreset &amp;lt;player name&amp;gt;&amp;lt;/code&amp;gt; â€” Reset stats &#039;&#039;&#039;and&#039;&#039;&#039; skills of a character&lt;br /&gt;
* &amp;lt;code&amp;gt;@charbaselvl &amp;lt;#&amp;gt; &amp;lt;player name&amp;gt;&amp;lt;/code&amp;gt; â€” Adjust a character&#039;s base level, a number of &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; &#039;&#039;&#039;adds&#039;&#039;&#039; a level and &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; takes a level&lt;br /&gt;
* &amp;lt;code&amp;gt;@spawn &amp;lt;monster&amp;gt; [&amp;lt;number to spawn&amp;gt;]&amp;lt;/code&amp;gt; â€” Spawn a number of monsters (default is one monster)&lt;br /&gt;
*: Where &amp;lt;code&amp;gt;&amp;lt;monster&amp;gt;&amp;lt;/code&amp;gt; is either the ID or label, eg. the Alizarin Plant can be given as &amp;lt;code&amp;gt;1032&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AlizarinPlant&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;@hide&amp;lt;/code&amp;gt; â€” Make yourself invisible to monsters and on the list of users online&lt;br /&gt;
* &amp;lt;code&amp;gt;@warp &amp;lt;map&amp;gt; &amp;lt;x&amp;gt; &amp;lt;y&amp;gt;&amp;lt;/code&amp;gt; â€” Warps yourself to map at location, eg. &amp;lt;code&amp;gt;@warp new_3-1 30 30&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;@charwarp &amp;lt;map&amp;gt; &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;player name&amp;gt;&amp;lt;/code&amp;gt; â€” Same as above, but warps the given player instead of yourself&lt;br /&gt;
* &amp;lt;code&amp;gt;@recall &amp;lt;player name&amp;gt;&amp;lt;/code&amp;gt; â€” Warps the player to you&lt;br /&gt;
* &amp;lt;code&amp;gt;@goto &amp;lt;player name&amp;gt;&amp;lt;/code&amp;gt; â€” Warps you to the player&lt;br /&gt;
* &amp;lt;code&amp;gt;@die&amp;lt;/code&amp;gt; â€” Kills your own character&lt;br /&gt;
* &amp;lt;code&amp;gt;@log &amp;lt;text&amp;gt;&amp;lt;/code&amp;gt; â€” Write some text to the GM log; can also use &amp;lt;code&amp;gt;@l&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;@tee &amp;lt;text&amp;gt;&amp;lt;/code&amp;gt; â€” Same as &amp;lt;code&amp;gt;@log&amp;lt;/code&amp;gt;, but also sends the text to normal chat; can also use &amp;lt;code&amp;gt;@t&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;@invisible&amp;lt;/code&amp;gt; â€” Makes you completely invisible&lt;br /&gt;
* &amp;lt;code&amp;gt;@visible&amp;lt;/code&amp;gt; â€” Turns off invisibility&lt;br /&gt;
&lt;br /&gt;
The information above is based on the &amp;lt;tt&amp;gt;[http://gitorious.org/tmw-eathena-data/mainline/blobs/raw/master/conf/help.txt.example conf/help.txt]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[http://gitorious.org/tmw-eathena-data/mainline/blobs/raw/master/conf/atcommand_local.conf.example conf/atcommand_local.conf]&amp;lt;/tt&amp;gt; files.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Freeyorp/Patches/Add_spells_to_display_Magic_experience_and_Life_Magic_experience&amp;diff=12000</id>
		<title>User talk:Freeyorp/Patches/Add spells to display Magic experience and Life Magic experience</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Freeyorp/Patches/Add_spells_to_display_Magic_experience_and_Life_Magic_experience&amp;diff=12000"/>
		<updated>2009-05-03T17:06:41Z</updated>

		<summary type="html">&lt;p&gt;Fate: New page: I strongly disapprove of the intention behind this patch.  There already are too many visible numbers in the game.  On the off-chance that there actually &amp;#039;&amp;#039;is&amp;#039;&amp;#039; a need for more detailed fe...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I strongly disapprove of the intention behind this patch.  There already are too many visible numbers in the game.  On the off-chance that there actually &#039;&#039;is&#039;&#039; a need for more detailed feedback, the existing feedback mechanisms (Mana Seed, Elanore) could be made more precise, or other NPCs could point to and explain these feedback mechanisms as needed.&lt;br /&gt;
--[[User:Fate|Fate]] 17:06, 3 May 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate&amp;diff=11535</id>
		<title>User:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate&amp;diff=11535"/>
		<updated>2009-01-22T22:43:51Z</updated>

		<summary type="html">&lt;p&gt;Fate: Updated status&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Former eAthena and content developer.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Developers&amp;diff=11469</id>
		<title>Development:Developers</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Developers&amp;diff=11469"/>
		<updated>2009-01-12T15:11:18Z</updated>

		<summary type="html">&lt;p&gt;Fate: Added myself to the list of retired developers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Active ==&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border-bottom: 2px solid #efdead&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; | Occupation&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Location&lt;br /&gt;
&lt;br /&gt;
{{dev2| [[User:Exceptionfault|Andreas Habel (Exceptionfault)]] | Programmer | Germany}}&lt;br /&gt;
{{dev1| [[User:Av3nger|Av3nger]]                 | Pixel art, map creation, translations | Brazil}}&lt;br /&gt;
{{dev2| [[User:Bertram|Bertram]]                 | Programmer | France}}&lt;br /&gt;
{{dev1| [[User:BjÃ¸rn|BjÃ¸rn Lindeijer]]           | Lead Programmer | The Netherlands}}&lt;br /&gt;
{{dev2| [[User:Kage|Chuck Miller (Kage)]]        | Programmer | USA}}&lt;br /&gt;
{{dev1| [[User:Crush|Philipp Sehmisch (Crush)]]  | Pixel artist, mapper, programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:Dabe|David Del Re (Dabe)]]        | Story and Geography writer | USA}}&lt;br /&gt;
{{dev1| [[User:Doener|Doener]]                   | Programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:ElvenProgrammer|Eugenio Favalli (ElvenProgrammer)]] | Project leader, programmer | Italy}}&lt;br /&gt;
{{dev1| [[User:Jaxad0127|Jared Adams (Jaxad0127)]] | Content Manager Task Force member, mapper, minor programming | USA}}&lt;br /&gt;
{{dev2| [[User:maci|maci]]                       | User support | Germany}}&lt;br /&gt;
{{dev1| [[User:hackgrid|Matt]]                   | Blabbering idiot | Germany}}&lt;br /&gt;
{{dev2| [[User:Modanung|Modanung]]               | Pixel artist, concept artist | The Netherlands}}&lt;br /&gt;
{{dev1| [[User:Pajarico|Pajarico]]               | Art, writer | Spain}}&lt;br /&gt;
{{dev2| [[User:the-me|Patrick MatthÃ¤i]]          | Debian package maintainer | Germany}}&lt;br /&gt;
{{dev1| [[User:Pauan|Pauan]]                     | Graphics artist (painting, pixel art, interface design, etc.) | USA}}&lt;br /&gt;
{{dev2| [[User:Peavey|Dennis Friis (peavey)]]    | Programmer | Denmark}}&lt;br /&gt;
{{dev1| [[User:Platyna|Platyna]]                 | Slackware package maintainer | Poland}}&lt;br /&gt;
{{dev2| [[User:Avaniel|Rogier Polak (Avaniel)]]  | Programmer | The Netherlands}}&lt;br /&gt;
{{dev1| Quiche_On_A_leash                        | Content Management |}}&lt;br /&gt;
{{dev2| [[User:Rotonen|Joni Orponen (Rotonen)]]  | Head of art, story and music | Finland}}&lt;br /&gt;
{{dev1| [[User:Irukard|Krzysztof Daszuta (Irukard)]]                 | Pixel artist | Poland}}&lt;br /&gt;
{{dev2| [[User:Trapdoor|trapdoor]]               | Programmer | England}}&lt;br /&gt;
{{dev1| [[User:Tuxtgz|Tuxtgz]]                   | Web-interface Programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:Usiu|Mateusz Kaduk (Usiu)]]       | Programmer | Poland}}&lt;br /&gt;
{{dev1| [[User:VictorSan|VictorSan]]             | Programmer | Spain}}&lt;br /&gt;
{{dev2| [[User:Yosuhara|Yosuhara]]               | Pixel artist | Slovakia}}&lt;br /&gt;
{{dev1| [[User:Zipon|Zipon]]                     | Mapper | Denmark}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Retired ==&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border-bottom: 2px solid #efdead&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; | Occupation&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Location&lt;br /&gt;
&lt;br /&gt;
{{dev1| [[User:Gagaofdeath|Andrej Sinicyn]]      | Programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:Bear|Bear]]                       | Scripter | USA}}&lt;br /&gt;
{{dev1| [[User:Catfish_Man|Catfish_Man]]         | Mac port | USA}}&lt;br /&gt;
{{dev2| Chetic                                   | Mapper | }}&lt;br /&gt;
{{dev1| [[User:Clef|Clef]]                       | Pixel artist | }}&lt;br /&gt;
{{dev2| [[User:Demon|Demon]]                     | Pixel artist | }}&lt;br /&gt;
{{dev1| [[User:deviexx|deviexx]]                 | Content manager | }}&lt;br /&gt;
{{dev2| Fate                                     | Content and eAthena developer | }}&lt;br /&gt;
{{dev1| [[User:Golgo|Golgo]]                     | Pixel artist | }}&lt;br /&gt;
{{dev2| Gnulia                                   | Concept artist | }}&lt;br /&gt;
{{dev1| [[User:Silene|Guillaume Melquiond (Silene)]] | Programmer | France}}&lt;br /&gt;
{{dev2| Igor Morgado (imorgado)                  | Tester | }}&lt;br /&gt;
{{dev1| [[User:Javila|Javila]]                   | Programmer | Brazil}}&lt;br /&gt;
{{dev2| [[User:JoshLangley|JoshLangley]]         | Client Programmer | Australia}}&lt;br /&gt;
{{dev1| [[User:kindjal|kindjal]]                 | Programmer | France, currently Italy}}&lt;br /&gt;
{{dev2| [[User:Kinetic|Kinetic]]                 | Pixel artist | USA}}&lt;br /&gt;
{{dev1| Alexander Baldeck (kth5/Shura)           | Programmer | }}&lt;br /&gt;
{{dev2| [[User:Kyokai|Kyokai]]                   | Game systems designer | }}&lt;br /&gt;
{{dev1| [[User:Maester Pixel|Maester Pixel]]     | Pixel artist | USA}}&lt;br /&gt;
{{dev2| [[User:Magick|Magick]]                   | Musician | }}&lt;br /&gt;
{{dev1| [[User:Mkael|Mkael]]                     | Concept artist | Finland}}&lt;br /&gt;
{{dev2| [[User:Mra|Mra]]                         | Programmer | Germany}}&lt;br /&gt;
{{dev1| [[User:Neko-mon|Neko-mon]]               | Pixel artist | Brazil}}&lt;br /&gt;
{{dev2| Neorice                                  | Pixel artist | }}&lt;br /&gt;
{{dev1| [[User:Nym|nym]]                         | Programmer | Australia}}&lt;br /&gt;
{{dev2| Rodney Dawes (dobey)                     | Packager (install process) | }}&lt;br /&gt;
{{dev1| Romulo Fernandes (razor85)               | Artist | }}&lt;br /&gt;
{{dev2| Simon Edwardsson (simonedw/simedw)       | Packager (Mac) | }}&lt;br /&gt;
{{dev1| [[User:Sora|Sora]]                       | Pixel artist | Poland}}&lt;br /&gt;
{{dev2| [[User:Sull|Sull]]                       | Pixel artist and hosting | Canada}}&lt;br /&gt;
{{dev1| [[User:Talaroc|Talaroc]]                 | Pixel artist | }}&lt;br /&gt;
{{dev2| Ti Sing Hao                              | Musician | }}&lt;br /&gt;
{{dev1| Ultramichy                               | Hosting | }}&lt;br /&gt;
{{dev2| Vlady                                    | Artist | }}&lt;br /&gt;
{{dev1| zenogais (bitshift2002)                  | Programmer | }}&lt;br /&gt;
{{dev2| [[User:Len|L Pabin (len)]]               | Pixel artist, concept artist, mapper, and Head of Pixellation| USA}}&lt;br /&gt;
{{dev1| [[User:Axltrozz|Alex Argumedo (Axltrozz)]]               | Pixel artist | USA, born in El Salvador}}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Developers&amp;diff=11468</id>
		<title>Development:Developers</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Developers&amp;diff=11468"/>
		<updated>2009-01-12T15:09:38Z</updated>

		<summary type="html">&lt;p&gt;Fate: Removed myself from the list of active developers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Active ==&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border-bottom: 2px solid #efdead&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; | Occupation&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Location&lt;br /&gt;
&lt;br /&gt;
{{dev2| [[User:Exceptionfault|Andreas Habel (Exceptionfault)]] | Programmer | Germany}}&lt;br /&gt;
{{dev1| [[User:Av3nger|Av3nger]]                 | Pixel art, map creation, translations | Brazil}}&lt;br /&gt;
{{dev2| [[User:Bertram|Bertram]]                 | Programmer | France}}&lt;br /&gt;
{{dev1| [[User:BjÃ¸rn|BjÃ¸rn Lindeijer]]           | Lead Programmer | The Netherlands}}&lt;br /&gt;
{{dev2| [[User:Kage|Chuck Miller (Kage)]]        | Programmer | USA}}&lt;br /&gt;
{{dev1| [[User:Crush|Philipp Sehmisch (Crush)]]  | Pixel artist, mapper, programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:Dabe|David Del Re (Dabe)]]        | Story and Geography writer | USA}}&lt;br /&gt;
{{dev1| [[User:Doener|Doener]]                   | Programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:ElvenProgrammer|Eugenio Favalli (ElvenProgrammer)]] | Project leader, programmer | Italy}}&lt;br /&gt;
{{dev1| [[User:Jaxad0127|Jared Adams (Jaxad0127)]] | Content Manager Task Force member, mapper, minor programming | USA}}&lt;br /&gt;
{{dev2| [[User:maci|maci]]                       | User support | Germany}}&lt;br /&gt;
{{dev1| [[User:hackgrid|Matt]]                   | Blabbering idiot | Germany}}&lt;br /&gt;
{{dev2| [[User:Modanung|Modanung]]               | Pixel artist, concept artist | The Netherlands}}&lt;br /&gt;
{{dev1| [[User:Pajarico|Pajarico]]               | Art, writer | Spain}}&lt;br /&gt;
{{dev2| [[User:the-me|Patrick MatthÃ¤i]]          | Debian package maintainer | Germany}}&lt;br /&gt;
{{dev1| [[User:Pauan|Pauan]]                     | Graphics artist (painting, pixel art, interface design, etc.) | USA}}&lt;br /&gt;
{{dev2| [[User:Peavey|Dennis Friis (peavey)]]    | Programmer | Denmark}}&lt;br /&gt;
{{dev1| [[User:Platyna|Platyna]]                 | Slackware package maintainer | Poland}}&lt;br /&gt;
{{dev2| [[User:Avaniel|Rogier Polak (Avaniel)]]  | Programmer | The Netherlands}}&lt;br /&gt;
{{dev1| Quiche_On_A_leash                        | Content Management |}}&lt;br /&gt;
{{dev2| [[User:Rotonen|Joni Orponen (Rotonen)]]  | Head of art, story and music | Finland}}&lt;br /&gt;
{{dev1| [[User:Irukard|Krzysztof Daszuta (Irukard)]]                 | Pixel artist | Poland}}&lt;br /&gt;
{{dev2| [[User:Trapdoor|trapdoor]]               | Programmer | England}}&lt;br /&gt;
{{dev1| [[User:Tuxtgz|Tuxtgz]]                   | Web-interface Programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:Usiu|Mateusz Kaduk (Usiu)]]       | Programmer | Poland}}&lt;br /&gt;
{{dev1| [[User:VictorSan|VictorSan]]             | Programmer | Spain}}&lt;br /&gt;
{{dev2| [[User:Yosuhara|Yosuhara]]               | Pixel artist | Slovakia}}&lt;br /&gt;
{{dev1| [[User:Zipon|Zipon]]                     | Mapper | Denmark}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Retired ==&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border-bottom: 2px solid #efdead&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; | Occupation&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Location&lt;br /&gt;
&lt;br /&gt;
{{dev1| [[User:Gagaofdeath|Andrej Sinicyn]]      | Programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:Bear|Bear]]                       | Scripter | USA}}&lt;br /&gt;
{{dev1| [[User:Catfish_Man|Catfish_Man]]         | Mac port | USA}}&lt;br /&gt;
{{dev2| Chetic                                   | Mapper | }}&lt;br /&gt;
{{dev1| [[User:Clef|Clef]]                       | Pixel artist | }}&lt;br /&gt;
{{dev2| [[User:Demon|Demon]]                     | Pixel artist | }}&lt;br /&gt;
{{dev1| [[User:deviexx|deviexx]]                 | Content manager | }}&lt;br /&gt;
{{dev2| [[User:Golgo|Golgo]]                     | Pixel artist | }}&lt;br /&gt;
{{dev1| Gnulia                                   | Concept artist | }}&lt;br /&gt;
{{dev2| [[User:Silene|Guillaume Melquiond (Silene)]] | Programmer | France}}&lt;br /&gt;
{{dev1| Igor Morgado (imorgado)                  | Tester | }}&lt;br /&gt;
{{dev2| [[User:Javila|Javila]]                   | Programmer | Brazil}}&lt;br /&gt;
{{dev1| [[User:JoshLangley|JoshLangley]]         | Client Programmer | Australia}}&lt;br /&gt;
{{dev2| [[User:kindjal|kindjal]]                 | Programmer | France, currently Italy}}&lt;br /&gt;
{{dev1| [[User:Kinetic|Kinetic]]                 | Pixel artist | USA}}&lt;br /&gt;
{{dev2| Alexander Baldeck (kth5/Shura)           | Programmer | }}&lt;br /&gt;
{{dev1| [[User:Kyokai|Kyokai]]                   | Game systems designer | }}&lt;br /&gt;
{{dev2| [[User:Maester Pixel|Maester Pixel]]     | Pixel artist | USA}}&lt;br /&gt;
{{dev1| [[User:Magick|Magick]]                   | Musician | }}&lt;br /&gt;
{{dev2| [[User:Mkael|Mkael]]                     | Concept artist | Finland}}&lt;br /&gt;
{{dev1| [[User:Mra|Mra]]                         | Programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:Neko-mon|Neko-mon]]               | Pixel artist | Brazil}}&lt;br /&gt;
{{dev1| Neorice                                  | Pixel artist | }}&lt;br /&gt;
{{dev2| [[User:Nym|nym]]                         | Programmer | Australia}}&lt;br /&gt;
{{dev1| Rodney Dawes (dobey)                     | Packager (install process) | }}&lt;br /&gt;
{{dev2| Romulo Fernandes (razor85)               | Artist | }}&lt;br /&gt;
{{dev1| Simon Edwardsson (simonedw/simedw)       | Packager (Mac) | }}&lt;br /&gt;
{{dev2| [[User:Sora|Sora]]                       | Pixel artist | Poland}}&lt;br /&gt;
{{dev1| [[User:Sull|Sull]]                       | Pixel artist and hosting | Canada}}&lt;br /&gt;
{{dev2| [[User:Talaroc|Talaroc]]                 | Pixel artist | }}&lt;br /&gt;
{{dev1| Ti Sing Hao                              | Musician | }}&lt;br /&gt;
{{dev2| Ultramichy                               | Hosting | }}&lt;br /&gt;
{{dev1| Vlady                                    | Artist | }}&lt;br /&gt;
{{dev2| zenogais (bitshift2002)                  | Programmer | }}&lt;br /&gt;
{{dev1| [[User:Len|L Pabin (len)]]               | Pixel artist, concept artist, mapper, and Head of Pixellation| USA}}&lt;br /&gt;
{{dev2| [[User:Axltrozz|Alex Argumedo (Axltrozz)]]               | Pixel artist | USA, born in El Salvador}}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate&amp;diff=11193</id>
		<title>User:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate&amp;diff=11193"/>
		<updated>2008-12-26T16:14:12Z</updated>

		<summary type="html">&lt;p&gt;Fate: Updated personal status&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Content developer, close to retirement.  Please don&#039;t assign any more tasks to me.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10912</id>
		<title>User talk:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10912"/>
		<updated>2008-12-06T21:51:10Z</updated>

		<summary type="html">&lt;p&gt;Fate: Added `frame&amp;#039; option&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed status effect file:  eAthena supports 255 `stun effects&#039; (which, if enabled, indicate that the player can&#039;t move) and 32 status effects.  Presently, 5 stun effects and 14 status effects are being used, though our tmw setup only exploits one of the status effect flags (concentration).&lt;br /&gt;
&lt;br /&gt;
To visualise status effects, I propose five possible measures:&lt;br /&gt;
* start/stop text messages&lt;br /&gt;
* icons on the top of the screen&lt;br /&gt;
* particle effects for startup/during the effect and at the end&lt;br /&gt;
* sound effects during startup and at the end (and possibly looping during the effect)&lt;br /&gt;
* full-sprite dyeing, i.e., applying a colour filter, to base sprite, equipment sprites, or all sprites.  (This is potentially expensive-- unless we cache, it increases the number of blits from one to three per modified image.)&lt;br /&gt;
&lt;br /&gt;
status-effects.xml:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;status-effects&amp;gt;&lt;br /&gt;
    &amp;lt;stun-effect id=... &amp;amp;rest; /&amp;gt;&lt;br /&gt;
    &amp;lt;status-effect id=... &amp;amp;rest; /&amp;gt;&lt;br /&gt;
  &amp;lt;/status-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;amp;rest; is a set of name-value pairs out of the following&lt;br /&gt;
* &#039;&#039;&#039;icon&#039;&#039;&#039;= ... (animation xml or png file)&lt;br /&gt;
* &#039;&#039;&#039;dye&#039;&#039;&#039;= ... (dye colour-- this is potentially expensive and might be toggled in the gfx options)&lt;br /&gt;
* &#039;&#039;&#039;dye-alpha&#039;&#039;&#039;= ... (dye alpha value, default 128)&lt;br /&gt;
* &#039;&#039;&#039;dye-range&#039;&#039;&#039;= body | equipment | all (whether to dye the player&#039;s body sprite/face, equipment, or both)&lt;br /&gt;
* &#039;&#039;&#039;frame&#039;&#039;&#039;=... (frame name for the Being to show while under that effect)&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-particle&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;audio&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-audio&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;message&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-message&#039;&#039;&#039;= ...&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10910</id>
		<title>User talk:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10910"/>
		<updated>2008-12-06T19:52:41Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed status effect file:  eAthena supports 255 `stun effects&#039; (which, if enabled, indicate that the player can&#039;t move) and 32 status effects.  Presently, 5 stun effects and 14 status effects are being used, though our tmw setup only exploits one of the status effect flags (concentration).&lt;br /&gt;
&lt;br /&gt;
To visualise status effects, I propose five possible measures:&lt;br /&gt;
* start/stop text messages&lt;br /&gt;
* icons on the top of the screen&lt;br /&gt;
* particle effects for startup/during the effect and at the end&lt;br /&gt;
* sound effects during startup and at the end (and possibly looping during the effect)&lt;br /&gt;
* full-sprite dyeing, i.e., applying a colour filter, to base sprite, equipment sprites, or all sprites.  (This is potentially expensive-- unless we cache, it increases the number of blits from one to three per modified image.)&lt;br /&gt;
&lt;br /&gt;
status-effects.xml:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;status-effects&amp;gt;&lt;br /&gt;
    &amp;lt;stun-effect id=... &amp;amp;rest; /&amp;gt;&lt;br /&gt;
    &amp;lt;status-effect id=... &amp;amp;rest; /&amp;gt;&lt;br /&gt;
  &amp;lt;/status-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;amp;rest; is a set of name-value pairs out of the following&lt;br /&gt;
* &#039;&#039;&#039;icon&#039;&#039;&#039;= ... (animation xml or png file)&lt;br /&gt;
* &#039;&#039;&#039;dye&#039;&#039;&#039;= ... (dye colour-- this is potentially expensive and might be toggled in the gfx options)&lt;br /&gt;
* &#039;&#039;&#039;dye-alpha&#039;&#039;&#039;= ... (dye alpha value, default 128)&lt;br /&gt;
* &#039;&#039;&#039;dye-range&#039;&#039;&#039;= body | equipment | all (whether to dye the player&#039;s body sprite/face, equipment, or both)&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-particle&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;audio&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-audio&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;message&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-message&#039;&#039;&#039;= ...&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10909</id>
		<title>User talk:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10909"/>
		<updated>2008-12-06T19:32:34Z</updated>

		<summary type="html">&lt;p&gt;Fate: Removed drawing order notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed status effect file:  eAthena supports 255 `stun effects&#039; (which, if enabled, indicate that the player can&#039;t move) and 32 status effects.  Presently, 5 stun effects and 14 status effects are being used, though our tmw setup only exploits one of the status effect flags (concentration).&lt;br /&gt;
&lt;br /&gt;
To visualise status effects, I propose five possible measures:&lt;br /&gt;
* start/stop text messages&lt;br /&gt;
* icons on the top of the screen&lt;br /&gt;
* particle effects for startup/during the effect and at the end&lt;br /&gt;
* sound effects during startup and at the end (and possibly looping during the effect)&lt;br /&gt;
* full-sprite dyeing, i.e., applying a colour filter, to base sprite, equipment sprites, or all sprites.  (This is potentially expensive-- unless we cache, it increases the number of blits from one to three per modified image.)&lt;br /&gt;
&lt;br /&gt;
status-effects.xml:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;status-effects&amp;gt;&lt;br /&gt;
    &amp;lt;stun-effect id=... &amp;amp;rest; /&amp;gt;&lt;br /&gt;
    &amp;lt;status-effect id=... &amp;amp;rest; /&amp;gt;&lt;br /&gt;
  &amp;lt;/status-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;amp;rest; is a set of name-value pairs out of the following&lt;br /&gt;
* &#039;&#039;&#039;icon-id&#039;&#039;&#039;= ... (icon id index into a status icon file graphics/sprites/status-icons.xml / graphics/sprites/status-icons.png)&lt;br /&gt;
* &#039;&#039;&#039;dye&#039;&#039;&#039;= ... (dye colour-- this is potentially expensive and might be toggled in the gfx options)&lt;br /&gt;
* &#039;&#039;&#039;dye-alpha&#039;&#039;&#039;= ... (dye alpha value, default 128)&lt;br /&gt;
* &#039;&#039;&#039;dye-range&#039;&#039;&#039;= body | equipment | all (whether to dye the player&#039;s body sprite/face, equipment, or both)&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-particle&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;audio&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-audio&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;message&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-message&#039;&#039;&#039;= ...&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate/current-drawing-order&amp;diff=10908</id>
		<title>User talk:Fate/current-drawing-order</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate/current-drawing-order&amp;diff=10908"/>
		<updated>2008-12-06T19:32:16Z</updated>

		<summary type="html">&lt;p&gt;Fate: Moved drawing order notes here&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Item drawing order and item IDs:&lt;br /&gt;
&lt;br /&gt;
 [(BASE, -), (BOOTS, 64), (PANTS, 1), (SHIRT, 512), (MISC1, 16), (MISC2, 128), (HAIR, -), (HAT, 256), (CAPE, 8), (GLOVES, 4), (WEAPON, 2), (SHIELD, 32)]&lt;br /&gt;
&lt;br /&gt;
I propose using MISC1 as an `amulet&#039; slot and MISC2 as a ring slot.  (MISC2 is currently used by the wedding ring.)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10886</id>
		<title>User talk:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10886"/>
		<updated>2008-12-06T07:14:28Z</updated>

		<summary type="html">&lt;p&gt;Fate: added status effects file proposal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Item drawing order and item IDs:&lt;br /&gt;
&lt;br /&gt;
 [(BASE, -), (BOOTS, 64), (PANTS, 1), (SHIRT, 512), (MISC1, 16), (MISC2, 128), (HAIR, -), (HAT, 256), (CAPE, 8), (GLOVES, 4), (WEAPON, 2), (SHIELD, 32)]&lt;br /&gt;
&lt;br /&gt;
I propose using MISC1 as an `amulet&#039; slot and MISC2 as a ring slot.  (MISC2 is currently used by the wedding ring.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------&lt;br /&gt;
&lt;br /&gt;
Proposed status effect file:  eAthena supports 255 `stun effects&#039; (which, if enabled, indicate that the player can&#039;t move) and 32 status effects.  Presently, 5 stun effects and 14 status effects are being used, though our tmw setup only exploits one of the status effect flags (concentration).&lt;br /&gt;
&lt;br /&gt;
To visualise status effects, I propose five possible measures:&lt;br /&gt;
* start/stop text messages&lt;br /&gt;
* icons on the top of the screen&lt;br /&gt;
* particle effects for startup/during the effect and at the end&lt;br /&gt;
* sound effects during startup and at the end (and possibly looping during the effect)&lt;br /&gt;
* full-sprite dyeing, i.e., applying a colour filter, to base sprite, equipment sprites, or all sprites.  (This is potentially expensive-- unless we cache, it increases the number of blits from one to three per modified image.)&lt;br /&gt;
&lt;br /&gt;
status-effects.xml:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;status-effects&amp;gt;&lt;br /&gt;
    &amp;lt;stun-effect id=... &amp;amp;rest; /&amp;gt;&lt;br /&gt;
    &amp;lt;status-effect id=... &amp;amp;rest; /&amp;gt;&lt;br /&gt;
  &amp;lt;/status-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;amp;rest; is a set of name-value pairs out of the following&lt;br /&gt;
* &#039;&#039;&#039;icon-id&#039;&#039;&#039;= ... (icon id index into a status icon file graphics/sprites/status-icons.xml / graphics/sprites/status-icons.png)&lt;br /&gt;
* &#039;&#039;&#039;dye&#039;&#039;&#039;= ... (dye colour-- this is potentially expensive and might be toggled in the gfx options)&lt;br /&gt;
* &#039;&#039;&#039;dye-alpha&#039;&#039;&#039;= ... (dye alpha value, default 128)&lt;br /&gt;
* &#039;&#039;&#039;dye-range&#039;&#039;&#039;= body | equipment | all (whether to dye the player&#039;s body sprite/face, equipment, or both)&lt;br /&gt;
* &#039;&#039;&#039;particle&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-particle&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;audio&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-audio&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;message&#039;&#039;&#039;= ...&lt;br /&gt;
* &#039;&#039;&#039;end-message&#039;&#039;&#039;= ...&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Rune_combination&amp;diff=10792</id>
		<title>Archive:Rune combination</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Rune_combination&amp;diff=10792"/>
		<updated>2008-11-18T20:01:48Z</updated>

		<summary type="html">&lt;p&gt;Fate: Added `summon-partner&amp;#039; spell note&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Status_yellow}}&lt;br /&gt;
The spell runes that can be engraved in equipment to cast spells (see [[Magic system]]) each represent a word in the ancient language of magic. In the runewriting language each words is represented by a single rune which is a combination of multiple syllable runes.&lt;br /&gt;
&lt;br /&gt;
The syllable runes can be learned through quests. A spellcaster can combine the learned syllable runes to spell runes in a special GUI window. When she found a valid combination she can save this combination to engrave it into equipment. When wearing equipment with runes engraved by someone else that contain syllables unknown to the spellcaster she can not use these spells (the meaning of the runes is unknown to her and thus she can not read them).&lt;br /&gt;
&lt;br /&gt;
Glossary:&lt;br /&gt;
;Mana Cost: The total mana energy needed to recharge the spell (see [[Magic system]])&lt;br /&gt;
;Slots: How many rune slots the finished rune will take up in equipment. The slots of all rune particles are added.&lt;br /&gt;
;Level: The skill level requirement of the spell rune. The requirements of all particles are added.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that all numbers on this page are only guesses. In practice they will most likely require a lot of fine tuning through beta testing to get the perfect game balance.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Effect syllables==&lt;br /&gt;
Every finished spell rune needs one effect syllable. It determines what kind of damage the spell inflicts, how much basic damage and the basic mana cost. The first effect syllable should be acquired through the tutorial (I suggest heat). The others are accquired through one long series of quests for each element. These quests should be very straight-forward and easy to follow (although not necessarily easy to complete) because the effect syllables are very important for the progress of a spellcaster character.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Element&lt;br /&gt;
!Name&lt;br /&gt;
!Slots&lt;br /&gt;
!Level&lt;br /&gt;
!damage&lt;br /&gt;
!cost&lt;br /&gt;
|-style=&amp;quot;background:#FFEEEE;&amp;quot;&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot; |Fire&lt;br /&gt;
|Heat&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|10&lt;br /&gt;
|10&lt;br /&gt;
|-style=&amp;quot;background:#FFDDDD;&amp;quot;&lt;br /&gt;
|Flame&lt;br /&gt;
|2&lt;br /&gt;
|20&lt;br /&gt;
|20&lt;br /&gt;
|30&lt;br /&gt;
|-style=&amp;quot;background:#FFCCCC;&amp;quot;&lt;br /&gt;
|Fire&lt;br /&gt;
|3&lt;br /&gt;
|40&lt;br /&gt;
|40&lt;br /&gt;
|100&lt;br /&gt;
|-style=&amp;quot;background:#FFBBBB;&amp;quot;&lt;br /&gt;
|Hellfire&lt;br /&gt;
|4&lt;br /&gt;
|60&lt;br /&gt;
|80&lt;br /&gt;
|300&lt;br /&gt;
|-style=&amp;quot;background:#EEFFFF;&amp;quot;&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot; |Water&lt;br /&gt;
|Bubble&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|10&lt;br /&gt;
|10&lt;br /&gt;
|-style=&amp;quot;background:#DDFFFF;&amp;quot;&lt;br /&gt;
|Splash&lt;br /&gt;
|2&lt;br /&gt;
|20&lt;br /&gt;
|20&lt;br /&gt;
|30&lt;br /&gt;
|-style=&amp;quot;background:#CCFFFF;&amp;quot;&lt;br /&gt;
|Water&lt;br /&gt;
|3&lt;br /&gt;
|40&lt;br /&gt;
|40&lt;br /&gt;
|100&lt;br /&gt;
|-style=&amp;quot;background:#BBFFFF;&amp;quot;&lt;br /&gt;
|Tsunami&lt;br /&gt;
|4&lt;br /&gt;
|60&lt;br /&gt;
|80&lt;br /&gt;
|300&lt;br /&gt;
|-style=&amp;quot;background:#FFFFEE;&amp;quot;&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot; |Earth&lt;br /&gt;
|Sand&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|10&lt;br /&gt;
|10&lt;br /&gt;
|-style=&amp;quot;background:#FFFFDD;&amp;quot;&lt;br /&gt;
|Mud&lt;br /&gt;
|2&lt;br /&gt;
|20&lt;br /&gt;
|20&lt;br /&gt;
|30&lt;br /&gt;
|-style=&amp;quot;background:#FFFFCC;&amp;quot;&lt;br /&gt;
|Earth&lt;br /&gt;
|3&lt;br /&gt;
|40&lt;br /&gt;
|40&lt;br /&gt;
|100&lt;br /&gt;
|-style=&amp;quot;background:#FFFFBB;&amp;quot;&lt;br /&gt;
|Stone&lt;br /&gt;
|4&lt;br /&gt;
|60&lt;br /&gt;
|80&lt;br /&gt;
|300&lt;br /&gt;
|-style=&amp;quot;background:#EEEEFF;&amp;quot;&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot; |Air&lt;br /&gt;
|Wind&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|10&lt;br /&gt;
|10&lt;br /&gt;
|-style=&amp;quot;background:#DDDDFF;&amp;quot;&lt;br /&gt;
|Tornado&lt;br /&gt;
|2&lt;br /&gt;
|20&lt;br /&gt;
|20&lt;br /&gt;
|30&lt;br /&gt;
|-style=&amp;quot;background:#CCCCFF;&amp;quot;&lt;br /&gt;
|Air&lt;br /&gt;
|3&lt;br /&gt;
|40&lt;br /&gt;
|40&lt;br /&gt;
|100&lt;br /&gt;
|-style=&amp;quot;background:#BBBBFF;&amp;quot;&lt;br /&gt;
|Sonic&lt;br /&gt;
|4&lt;br /&gt;
|60&lt;br /&gt;
|80&lt;br /&gt;
|300&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Combined effect syllables==&lt;br /&gt;
Two effect syllables with the same slot number, damage and mana cost that do different elemental damage can be combined to one effect syllable of a combined element. All properties stay the same but the element is a combined one.&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Element&lt;br /&gt;
!Rune 1&lt;br /&gt;
!Rune 2&lt;br /&gt;
!Combined&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot; |Metal&lt;br /&gt;
|Heat&lt;br /&gt;
|Sand&lt;br /&gt;
|Spike&lt;br /&gt;
|-&lt;br /&gt;
|Flame&lt;br /&gt;
|Mud&lt;br /&gt;
|Blade&lt;br /&gt;
|-&lt;br /&gt;
|Fire&lt;br /&gt;
|Earth&lt;br /&gt;
|Metal&lt;br /&gt;
|-&lt;br /&gt;
|Hellfire&lt;br /&gt;
|Stone&lt;br /&gt;
|Razor&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot; |Lightning&lt;br /&gt;
|Wind&lt;br /&gt;
|Heat&lt;br /&gt;
|Spark&lt;br /&gt;
|-&lt;br /&gt;
|Tornado&lt;br /&gt;
|Flame&lt;br /&gt;
|Volt&lt;br /&gt;
|-&lt;br /&gt;
|Air&lt;br /&gt;
|Fire&lt;br /&gt;
|Lightning&lt;br /&gt;
|-&lt;br /&gt;
|Sonic&lt;br /&gt;
|Hellfire&lt;br /&gt;
|Thunder&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot; |Ice&lt;br /&gt;
|Bubble&lt;br /&gt;
|Wind&lt;br /&gt;
|Cold&lt;br /&gt;
|-&lt;br /&gt;
|Splash&lt;br /&gt;
|Tornado&lt;br /&gt;
|Frost&lt;br /&gt;
|-&lt;br /&gt;
|Water&lt;br /&gt;
|Wind&lt;br /&gt;
|Ice&lt;br /&gt;
|-&lt;br /&gt;
|Tzunami&lt;br /&gt;
|Sonic&lt;br /&gt;
|Blizzard&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;4&amp;quot; |Nature&lt;br /&gt;
|Sand&lt;br /&gt;
|Bubble&lt;br /&gt;
|Thorn&lt;br /&gt;
|-&lt;br /&gt;
|Mud&lt;br /&gt;
|Splash&lt;br /&gt;
|Poison&lt;br /&gt;
|-&lt;br /&gt;
|Earth&lt;br /&gt;
|Water&lt;br /&gt;
|Nature&lt;br /&gt;
|-&lt;br /&gt;
|Stone&lt;br /&gt;
|Tzunami&lt;br /&gt;
|Acid&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Application syllable==&lt;br /&gt;
Each finished rune can, but doesn&#039;t has to, include one application syllable. This rune decides the area of effect of the spell. They also affect the mana cost, damage of the spell, cast time and after cast delay. Usually the easier to use the higher the mana cost and the lower the damage.&lt;br /&gt;
&lt;br /&gt;
Application syllables are learned from wizard NPCs. The NPCs are usually not hard to find and will usually send the character on a short quest before he will teach it to the character.&lt;br /&gt;
&lt;br /&gt;
===Attack spells===&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Rune&lt;br /&gt;
! cost&lt;br /&gt;
! damage&lt;br /&gt;
! level&lt;br /&gt;
! slots&lt;br /&gt;
! cast time&lt;br /&gt;
! cooldown time&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| None&lt;br /&gt;
| 1.0&lt;br /&gt;
| 1.0&lt;br /&gt;
| +0&lt;br /&gt;
| +0&lt;br /&gt;
| low&lt;br /&gt;
| low&lt;br /&gt;
| When no application syllable is used the attack becomes a touch-range attack that only affects an enemy that is exactly in front of the character.&lt;br /&gt;
|-&lt;br /&gt;
| Bolt&lt;br /&gt;
| 1.2&lt;br /&gt;
| 0.8&lt;br /&gt;
| +5&lt;br /&gt;
| +0&lt;br /&gt;
| low&lt;br /&gt;
| medium&lt;br /&gt;
| The bolt syllable makes the spell a projectile that flies forward and hits the first enemy it collides with. It is slightly weaker and costlier than a touch attack but much more usable. The bolt rune should be the first application syllable a new character obtains so that a new mage has the choice between using its first effect syllable as touch attack or as bolt attack.&lt;br /&gt;
|-&lt;br /&gt;
| Ray&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Hits all enemies that stand in a line from the caster to the targeted point.&lt;br /&gt;
|-&lt;br /&gt;
| Cone&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Hits all enemies in a 45Â° angle in front of the caster.&lt;br /&gt;
|-&lt;br /&gt;
| Ball&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Medium&lt;br /&gt;
| Medium&lt;br /&gt;
| Projectile that causes a small area of effect.&lt;br /&gt;
|-&lt;br /&gt;
| Blast&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Medium&lt;br /&gt;
| High&lt;br /&gt;
| Free positioned, small area of effect.&lt;br /&gt;
|-&lt;br /&gt;
| Storm&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| High&lt;br /&gt;
| High&lt;br /&gt;
| Free-positioned, large area of effect.&lt;br /&gt;
|-&lt;br /&gt;
| Nova&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Medium&lt;br /&gt;
| Medium&lt;br /&gt;
| small AoE around caster.&lt;br /&gt;
|-&lt;br /&gt;
| Inferno&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| large AoE around caster.&lt;br /&gt;
|-&lt;br /&gt;
| Apocalypse&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| extremely large AoE around caster.&lt;br /&gt;
|-&lt;br /&gt;
| Strike&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| An attack for spellcaster/fighter crossclass characters. The character performs a normal attack with the currently equipped weapon. Hitting and dodging are calculated normally. The attack deals magical damage with the element of the effect particle and calculated by a special formula that includes weapon damage, weapon skill, spell damage, spell skill, strength and willpower.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Support spells===&lt;br /&gt;
&lt;br /&gt;
Support spells improve the combat powers of allies or decrease the combat powers of enemies. Note that a spell which decreases the enemies attributes directly is absent. This is intentional - there is an enhancement syllable to add an attribute decrease effect to an attack spell.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Rune&lt;br /&gt;
! cost&lt;br /&gt;
! level&lt;br /&gt;
! slots&lt;br /&gt;
! cast time&lt;br /&gt;
! cooldown time&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| Soul&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| A spell with touch-range which gives the affected creature an [[Elements|elemental modifier]] and thus makes it more vulnerable to one element but less vulnerable to another. Depending on the situation this can either be a positive or a negative effect. The effect time depends on the casters magical attack while the height of the elemental modifier depends on the grade of the effect rune:&lt;br /&gt;
*grade 1 - 1.25&lt;br /&gt;
*grade 2 - 1.50&lt;br /&gt;
*grade 3 - 2.00&lt;br /&gt;
*grade 4 - 3.00&lt;br /&gt;
|-&lt;br /&gt;
| Barrier&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| A supportive spell with touch-range which creates a protective shield around another being which persists for a limited amount of time. Some of the shields have a negative side effect on the victim allowing to use them offensive. &lt;br /&gt;
&lt;br /&gt;
To avoid griefplay characters should always be able to dispell a barrier which has been cast on them by a friendly or neutral character.&lt;br /&gt;
&lt;br /&gt;
Only one barrier can be active at the same time. Before a new barrier can be cast on the same character the old one has to expire or has to be dispelled. Its effect depends on the used element syllable. Enhancement syllables can not be added to barrier runes.&lt;br /&gt;
;Fire: Creates a firestorm around the character which damages nearby enemies.&lt;br /&gt;
;Water: Creates a bubble around the character allowing it to breath under water.&lt;br /&gt;
;Earth: A solid force field protects from physical attacks but also lowers physical attack power.&lt;br /&gt;
;Air: Creates a whirlwind around the character which increases its [[hitting and dodging|evade]] a lot but also lowers its own [[hitting and dodging|hit chance]].&lt;br /&gt;
;Metal: Summons blades which fly around the character. Whenever an enemy in a quite large radius around the character attacks it one of the blades flys towards the attacker and inflicts damage. (long-range counter attack)&lt;br /&gt;
;Lightning: A mental force field protects from magical attacks but also lowers magical attack power.&lt;br /&gt;
;Ice: Encloses the target in a block of ice making it almost immune to physical and magical damage but unable to move, attack or act in any way.&lt;br /&gt;
;Nature: Engulfes the target in thorny vines which don&#039;t hinder movement but deal damage to everyone who attacks the target in close combat (short-range counter attack)&lt;br /&gt;
|-&lt;br /&gt;
| Blessing&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| A spell which increases an derived attribute of an ally&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Summon spells===&lt;br /&gt;
&lt;br /&gt;
These spells summon creatures that aid the caster in battle. Every summoned creature consumes part of the mana regeneration of the character it was summoned by. Thus the number of creatures that can be summoned at the same time is limited. The caster receives experience for the magic skill used to summon the creatures when they contribute to killing a monster.&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Spell&lt;br /&gt;
! cast time&lt;br /&gt;
! cooldown time&lt;br /&gt;
! controllable&lt;br /&gt;
! Further description&lt;br /&gt;
|-&lt;br /&gt;
| [[Races#Elementals|Elemental]]&lt;br /&gt;
| medium&lt;br /&gt;
| low&lt;br /&gt;
| no&lt;br /&gt;
| Summons an aggressive elemental spirit that attacks enemies, the caster and its party members alike (other players should only be attacked in pvp zones to avoid griefplay)&lt;br /&gt;
|-&lt;br /&gt;
| [[Races#Golems|Golem]]&lt;br /&gt;
| high&lt;br /&gt;
| high&lt;br /&gt;
| yes&lt;br /&gt;
| Summons a golem that follows and protects the caster (maybe can be commanded to some extend). Should require expensive ingredients to create.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enhancement syllables==&lt;br /&gt;
Enhancement syllables give an attack spell more exotic properties but usully make it weaker and costlier. Any number of enhancement syllables can be used for a rune. They can not be applied to support spells.&lt;br /&gt;
&lt;br /&gt;
The quests to obtain these syllables are all hidden very well and usually require some thinking outside of the box to complete.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Rune&lt;br /&gt;
!cost&lt;br /&gt;
!damage&lt;br /&gt;
!effect&lt;br /&gt;
|-&lt;br /&gt;
|silent&lt;br /&gt;
|200%&lt;br /&gt;
|50%&lt;br /&gt;
|When a silent spell is cast it can not be seen by other characters. They only see that they are damaged but not what causes the damage.&lt;br /&gt;
|-&lt;br /&gt;
|vampiric&lt;br /&gt;
|150%&lt;br /&gt;
|75%&lt;br /&gt;
|10% of the hit points lost through this spell are given to the caster.&lt;br /&gt;
|-&lt;br /&gt;
|illusionary&lt;br /&gt;
|10%&lt;br /&gt;
|0%&lt;br /&gt;
|This is the only enhancement particle that makes the spell (a lot!) cheaper instead of more expensive. An illusionary spell appears like a real one to other players but does no damage. Useful as a distraction in PvP combat. &#039;&#039;How can that guy cast ten enforced fire storms in a row? Oh, I see, they are all illusionary. *ouch* ok, this one wasn&#039;t&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|enforced&lt;br /&gt;
|200%&lt;br /&gt;
|100%&lt;br /&gt;
|Halves the enemies magical defence.&lt;br /&gt;
|-&lt;br /&gt;
|creeping&lt;br /&gt;
|120%&lt;br /&gt;
|200%&lt;br /&gt;
|Deals damage over time instead of instant damage. The total damage is higher but inflicted in small portions of 4% every second for 25 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|cursed&lt;br /&gt;
|150%&lt;br /&gt;
|75%&lt;br /&gt;
|Inflicts an additional attribute loss in addition to the normal damage. What attribute is affected and how much depends on the effect particle.&lt;br /&gt;
|-&lt;br /&gt;
|quick&lt;br /&gt;
|150%&lt;br /&gt;
|75%&lt;br /&gt;
|Reduced casting time and after cast delay.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Healing spells ==&lt;br /&gt;
I would like to take the healing spells out of the elemental scheme und use a separate skill for them. Putting all healing spells in one elemental discipline would make this extremely overused because I believe almost every spellcaster would attempt to accquire healing spells. Spreading all healing spells over the whole elemental spectrum would be difficult to balance and would be a disadvantage for dedicated healers.&lt;br /&gt;
&lt;br /&gt;
For that reason all healing spells are not combinations of syllables but stand-alone runes.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Spell&lt;br /&gt;
! Element&lt;br /&gt;
! Effect&lt;br /&gt;
! Target&lt;br /&gt;
! cast time&lt;br /&gt;
! cooldown time&lt;br /&gt;
! Further description&lt;br /&gt;
|-&lt;br /&gt;
| Lay hands&lt;br /&gt;
| neutral&lt;br /&gt;
| heal&lt;br /&gt;
| untargeted&lt;br /&gt;
| low&lt;br /&gt;
| low&lt;br /&gt;
| Basic healing spell. Heals the character standing right in front of the caster. The low range makes it impractical in combat.&lt;br /&gt;
|-&lt;br /&gt;
| Heal&lt;br /&gt;
| neutral&lt;br /&gt;
| heal&lt;br /&gt;
| single&lt;br /&gt;
| medium&lt;br /&gt;
| medium&lt;br /&gt;
| Less efficient than lay hands but because it can be used at distance it is more practical in combat and it can be cast on oneself.&lt;br /&gt;
|-&lt;br /&gt;
| Regeneration&lt;br /&gt;
| neutral&lt;br /&gt;
| heal over time&lt;br /&gt;
| single&lt;br /&gt;
| medium&lt;br /&gt;
| medium&lt;br /&gt;
| Heals more than heal but takes more time.&lt;br /&gt;
|-&lt;br /&gt;
| Aura&lt;br /&gt;
| neutral&lt;br /&gt;
| heal&lt;br /&gt;
| untargeted, persistent&lt;br /&gt;
| high&lt;br /&gt;
| high&lt;br /&gt;
| Creates a healing aura around the caster that slowly heals everyone around. Doesn&#039;t affect the caster.&lt;br /&gt;
|-&lt;br /&gt;
| Revive&lt;br /&gt;
| neutral&lt;br /&gt;
| restore&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| high&lt;br /&gt;
| Attempts to revive a dead character that has not returned to its spawn point yet. The healing skill level of the caster must be higher than the total character level of the target to be successful.&lt;br /&gt;
|-&lt;br /&gt;
| Detox&lt;br /&gt;
| neutral&lt;br /&gt;
| restore&lt;br /&gt;
| untargeted&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Attempts to remove a status effect that falls in the category &amp;quot;poisons&amp;quot; from the character standing in front of the caster.&lt;br /&gt;
|-&lt;br /&gt;
| Decurse&lt;br /&gt;
| neutral&lt;br /&gt;
| restore&lt;br /&gt;
| untargeted&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Attempts to removes a status effect that falls in the category &amp;quot;curses&amp;quot; (like most attribute decrease spells) from the character standing in front of the caster.&lt;br /&gt;
|-&lt;br /&gt;
| Disinfect&lt;br /&gt;
| neutral&lt;br /&gt;
| restore&lt;br /&gt;
| untargeted&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Attempts to removes a status effect that falls in the category &amp;quot;diseases&amp;quot; from the character standing in front of the caster.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Unsorted Spells ==&lt;br /&gt;
Below are spells planned or implemented for eAthena that are not covered by the above:&lt;br /&gt;
* Transmute X to Y (partially used as quest spell)&lt;br /&gt;
* Aggravate&lt;br /&gt;
* Detect Magic (quest spell)&lt;br /&gt;
* Flying backpack (temporarily eliminate penalties for heavy equipment)&lt;br /&gt;
* Happy Curse and variations (force player to emote for a while)&lt;br /&gt;
* Shroud (hide name from other players until the player picks up an item or talks)&lt;br /&gt;
* Reveal (cancel Shroud)&lt;br /&gt;
* Detect Players (list nearby players)&lt;br /&gt;
* Wind (`push&#039; creatures in a predefined region)&lt;br /&gt;
* Burrow/Ascend (special-purpose Teleport that moves upwards/downwards in certain regions; partly quest spell)&lt;br /&gt;
* Delayed Teleport (teleport back to casting location after short period of time)&lt;br /&gt;
* Peace (non-highlevel aggressive monsters stop attacking unless provoked or unless they were already provoked, for a while)&lt;br /&gt;
* Teleport&lt;br /&gt;
* Summon partner (summons the caster&#039;s partner, for married couples, if online)&lt;br /&gt;
&lt;br /&gt;
==Spell naming==&lt;br /&gt;
The finished spell is named &amp;quot;[Enhancement syllable] [effect syllable] [application syllable]&amp;quot;.&lt;br /&gt;
Examples:&lt;br /&gt;
 Bubble                      Bubble&lt;br /&gt;
 Fire + Bolt                 Fire Bolt&lt;br /&gt;
 Flame + Inferno + enforced  Enforced Flame Inferno&lt;br /&gt;
 Fire + Air + Nova           Lightning Nova&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Magic_system&amp;diff=10762</id>
		<title>Archive:Magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Magic_system&amp;diff=10762"/>
		<updated>2008-11-17T22:15:35Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Status_yellow}}&lt;br /&gt;
This is the magic system we decided to use for the new mana world server.&lt;br /&gt;
&lt;br /&gt;
Short synopsis: All mage equipment has runes. Every rune holds one spell. The runes are discharged when the spell is cast and has to be recharged before it can be used again. Recharge happens automatically. The recharge speed is based on intelligence. The skill levels decides what kind of runes the character can have in its equipment and thus what kind of spells it can cast. High level equipment can have more and better runes than low level equipment. Willpower is important for the damage or success chance of the spells cast.&lt;br /&gt;
&lt;br /&gt;
==Recharge bar instead of magic points==&lt;br /&gt;
There are no magic points. Instead of that every single spell has its own recharge bar. When a spell is cast its recharge bar has to be filled again before the spell can be cast again.&lt;br /&gt;
&lt;br /&gt;
The character got a constant &amp;quot;mana flow&amp;quot; that recharges its spells. The intensity of this flow is mainly influenced by intelligence but other factors might influence it, too. The mana flow is divided evenly between all spells that are currently recharged. Recharge of each spell can be switched on and off by the player. That means the character may decide to deactivate the recharge of some spells to recharge others more quickly. Advanced spells require more mana flow points to recharge them than simple ones.&lt;br /&gt;
&lt;br /&gt;
Characters can have the same spell multiple times allowing them to cast them multiple times in a row (see below for details) but only one of them can be recharged at the same time. All spells  have a short after cast delay time in which no new spells can be cast to avoid spamming spells very fast. The more powerful the spell the longer the after cast delay.&lt;br /&gt;
&lt;br /&gt;
==Available spells==&lt;br /&gt;
The spells that are available to a character depend on the spell runes written on his currently worn equipment. Every rune represents one spell. The character can only use spells he learned before. When the character wears equipment with runes of spells he hasn&#039;t learned before these runes are ignored.&lt;br /&gt;
&lt;br /&gt;
===Learning spells===&lt;br /&gt;
{{Controversial|Spell learning should maybe be done like described on [[User:Crush/Rune combination]]}}&lt;br /&gt;
Before a character may use a spell he has to learn it first by reading a magic scroll that contains the instructions for the spell. Magic scrolls turn to dust after they have been read once. People who have not reached the minimal skill level for the spell can not read them. Magic scrolls can be bought in shops, obtained through quests or found from monsters.&lt;br /&gt;
&lt;br /&gt;
===Runes===&lt;br /&gt;
The spells that are available for the character at the moment depend on the magic runes that are written on /engraved in its currently worn equipment.&lt;br /&gt;
&lt;br /&gt;
All equipment for spellcasters (and maybe some non-spellcaster equipment) has rune slots. These slots can be engraved with runes. Every rune represents one charge of a specific spell.&lt;br /&gt;
&lt;br /&gt;
Runes of advanced spells fill multiple rune slots in the same equipment piece. Equipment with enough rune slots to hold the runes of advanced spells should be restricted to characters that reached a high magical skill level and/or high magic related attributes.&lt;br /&gt;
&lt;br /&gt;
The most spell runes can be written on robes closely followed by wands. Then comes headgears and then other equipment pieces (assuming that they all have similar requirements and rareness). Other weapons can usually not have runes with the exception of some special &amp;quot;rune&amp;quot; weapons (which have usually sub-par combat abilitys compared with weapons with similar requirements and rareness). That means hybrid characters will most likely wear fighter armor with a magican headgear and maybe a rune weapon.&lt;br /&gt;
&lt;br /&gt;
Characters can theoretically extend their spell palette by carrying multiple equipment pieces with different runes in their inventory and switch them. But when an equipment piece is taken off all its slots are uncharged.&lt;br /&gt;
&lt;br /&gt;
To write runes on a piece of equipment one needs the &amp;quot;runewriting&amp;quot; crafting skill and needs to learn the spell from a scroll beforehand. The success chance depends on the minimum skill level of the spell in its discipline and the runewriting skill of the crafter. When the runewriting fails the equipment piece might be destroyed.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Example:&#039;&#039;&#039; When a character wants to have 3 charges of a fireball spell that requires skill level 10 he needs:&lt;br /&gt;
:* Fire Magic Skill level 10&lt;br /&gt;
:* To learn the fireball spell from a fireball scroll&lt;br /&gt;
:* 3 fireball runes written on equipment pieces he is wearing&lt;br /&gt;
&lt;br /&gt;
==Damage calculation==&lt;br /&gt;
The damage of spells and the success rate of spells that can fail depend on the characters willpower and skill level in the magic discipline of the spell and the targets willpower. See [[Damage calculation]] for details.&lt;br /&gt;
&lt;br /&gt;
Efficiency of support spells like attribute increases (buffs in MMORPG jargon) or healing spells should not be based on willpower but on skill level alone. That way I want to archieve that the ideal attribute build of a supportive mage (cleric) is different from that of an offensive mage.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Example:&#039;&#039;&#039; A typical offensive spellcaster character with a mix of willpower and intelligence could function as a backup healer by taking some healing runes in its equipment. But it could cast its healing spells much less frequently than a character that is focused on intelligence alone. A character focused on intelligence, on the other hand, could cast offensive spells frequently but they would do almost no damage. So the character would be better of with focusing on heal and support spells that aren&#039;t affected by willpower.&lt;br /&gt;
&lt;br /&gt;
==GUI==&lt;br /&gt;
Here a mockup of the OSD that shows the current magic status:&lt;br /&gt;
&lt;br /&gt;
[[Image:Magicdemo.png]]&lt;br /&gt;
# Firewall spell - fully charged and ready, will be recharged immediately after use.&lt;br /&gt;
# Lightning Bolt spell - not charged, currently not recharged.&lt;br /&gt;
# Fire rain spell - recharge in progress and half finished.&lt;br /&gt;
# Three fireball spells - one ready, one partially charged but recharge currently deactivated.&lt;br /&gt;
# Four lightning strike spells - two ready, one partially charged and recharge in progress.&lt;br /&gt;
&lt;br /&gt;
The background of each spell icon doubles as a progress bar. The color of the icon itself indicates the element of the spell and the charge level. When the color of the icon itself is bright, recharge is activated. When the color is dark, recharge is deactivated. When a spell is fully charged and ready for use it is indicated by a particle effect on the icon.&lt;br /&gt;
&lt;br /&gt;
Spell icons of the same spell are grouped in one frame and sorted by recharge level. The charge activation status of spells it the whole group is linked although only one spell is recharged at the same time.&lt;br /&gt;
&lt;br /&gt;
The letters in the upper-left corner of the spell icons are the hotkeys for the spells. It should be possible to redefine those in the keyboard gui (setting a key for every spell in the game would be overkill. Instead of that keys should be defined for spell 1, spell 2, spell 3 etc.)&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
;Mouse:Left-click on a spell icon uses the spell, right-click activates/deactivates its recharge.&lt;br /&gt;
;Gamepad: One button opens a spell ring menu to select a spell. Another press of this button uses the selected spell. A 2nd button activates/deactivates the recharge of the spell. A 3rd button closes the menu without casting a spell.&lt;br /&gt;
;Keyboard: Each spell has a hotkey. Pressing the hotkey casts it. Pressing shift + the hotkey toggles recharge. The ring menu can be used as an alternative casting method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Types of spells==&lt;br /&gt;
&lt;br /&gt;
=== Effects ===&lt;br /&gt;
These are some examples of effects that can be caused by spells.&lt;br /&gt;
&lt;br /&gt;
====Negative====&lt;br /&gt;
;Damage: Just plain old damage to a single target.&lt;br /&gt;
;Splash damage: Hurts the target and targets around it with reduced power.&lt;br /&gt;
;Damage over time: Hurts the target at regular intervals&lt;br /&gt;
;Attribute reduction: Reduction of an attribute by percentual or absolute value or affects the victim with a negative status effect. Might or might not stack.&lt;br /&gt;
&lt;br /&gt;
====Positive:====&lt;br /&gt;
;Healing: self-explaining.&lt;br /&gt;
;Healing over time: A temporary status effect that heals the target at regular intervals.&lt;br /&gt;
;Attribute increase: A temporary status effect that increases an attribute by a percentual or absolute value.&lt;br /&gt;
;Restore: Attempts to removes a negative status effect.&lt;br /&gt;
&lt;br /&gt;
=== Targeting modes===&lt;br /&gt;
Different spells have different ways of determining what targets are affected by it.&lt;br /&gt;
&lt;br /&gt;
;Single-targeted spells: Targeted spells are spells that hit exactly one target that has to be selected when the spell is cast.&lt;br /&gt;
;Area-targeted spells: Area spells can be cast on any position the caster has a sightline to. The position has to be selected when the spell is cast.&lt;br /&gt;
;Area-persisten spells: Like area spells but stay active for a while and do their effect every game tick.&lt;br /&gt;
;Untargeted spells: Spells that have a fixed damage zone based on the position and heading of the caster. They don&#039;t require to set a target.&lt;br /&gt;
;Untargeted persistent spells: Like untargeted spells but stay active for a while and do their effect every game tick. When the caster moves the effect area moves with him/her.&lt;br /&gt;
;Projectile spells: Spells that are cast like single-targeted spells but fly towards the target and hit the first enemy they collide with. They don&#039;t require to select a target.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spell ideas ==&lt;br /&gt;
Note that there are many spells that have an equivalent in every elemental discipline that only differs by the elemental property. I am straving for balance through similarity. Lame but a surefire way to avoid elements to be over- or underpowered.&lt;br /&gt;
&lt;br /&gt;
=== Attack spells ===&lt;br /&gt;
The names needn&#039;t be exactly as written here, when we can come up with better names. These spells should all exist in multiple versions with different strength for each element. I am not sure about the naming of the different strength. &lt;br /&gt;
*We could go with level numbers like Fire Bolt I to Fire Bolt XII. Not that creative but the most convenient solution for both players and developers.&lt;br /&gt;
*We could go with adjectives like lower, lesser, higher, greater or ultimate Fire Bolt. But when we decide to add more and more high level content later we would have to invent more and more superlatives. So we might end up with ridiculous spell names like &amp;quot;ultimate mega super giga hyper Fire Bolt&amp;quot;.&lt;br /&gt;
*Or invent a new denotation for each power level like Fire Arrow, Fire Bolt, Fire Strike, Fire Blast. But this might become confusing for the users and a seriouse challenge to our creativity.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Spell&lt;br /&gt;
! Element&lt;br /&gt;
! Effect&lt;br /&gt;
! Target&lt;br /&gt;
! cast time&lt;br /&gt;
! cooldown time&lt;br /&gt;
! Further description&lt;br /&gt;
|-&lt;br /&gt;
| [element] Bolt&lt;br /&gt;
| (one for each)&lt;br /&gt;
| damage&lt;br /&gt;
| projectile&lt;br /&gt;
| low&lt;br /&gt;
| medium&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Call [element]&lt;br /&gt;
| (one for each)&lt;br /&gt;
| damage&lt;br /&gt;
| single&lt;br /&gt;
| medium&lt;br /&gt;
| low&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [element] Nova&lt;br /&gt;
| (one for each)&lt;br /&gt;
| splash damage&lt;br /&gt;
| single&lt;br /&gt;
| medium&lt;br /&gt;
| medium&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [element] Ball&lt;br /&gt;
| (one for each)&lt;br /&gt;
| splash damage&lt;br /&gt;
| projectile&lt;br /&gt;
| medium&lt;br /&gt;
| medium&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [element] Explosion&lt;br /&gt;
| (one for each)&lt;br /&gt;
| damage&lt;br /&gt;
| area&lt;br /&gt;
| medium&lt;br /&gt;
| high&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [element] Storm&lt;br /&gt;
| (one for each)&lt;br /&gt;
| damage&lt;br /&gt;
| area, persistent&lt;br /&gt;
| high&lt;br /&gt;
| high&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffs/Debuffs ===&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Spell&lt;br /&gt;
! Element&lt;br /&gt;
! Effect&lt;br /&gt;
! Target&lt;br /&gt;
! cast time&lt;br /&gt;
! cooldown time&lt;br /&gt;
! Further description&lt;br /&gt;
|-&lt;br /&gt;
| Hearth of [element]&lt;br /&gt;
| (one for each)&lt;br /&gt;
| attribute reduction/increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Changes the elemental modifier of the target making it more resistant to one element and more vulnerable to another. Depending on the situation this can be seen as a buff or debuff.&lt;br /&gt;
|-&lt;br /&gt;
| Freeze&lt;br /&gt;
| Ice&lt;br /&gt;
| attribute decrease&lt;br /&gt;
| single&lt;br /&gt;
| medium&lt;br /&gt;
| medium&lt;br /&gt;
| Encloses the target in a block of ice making it unable to do anything but also immune to damage. The block has a hit points rating that decreases over time. The ice block can be attacked by others to make it disappear faster. When its hit points reach 0 the target is free.&lt;br /&gt;
|-&lt;br /&gt;
| Swiftness of Wind&lt;br /&gt;
| Air&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Increases dexterity&lt;br /&gt;
|-&lt;br /&gt;
| Tornado shield&lt;br /&gt;
| Air&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Protects the target by making it harder to hit.&lt;br /&gt;
|-&lt;br /&gt;
| Lightning speed&lt;br /&gt;
| Lightning&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Increases movement speed&lt;br /&gt;
|-&lt;br /&gt;
| Buried knowledge&lt;br /&gt;
| Earth&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Increases intelligence&lt;br /&gt;
|-&lt;br /&gt;
| Stone skin&lt;br /&gt;
| Earth&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Increases armor defence&lt;br /&gt;
|-&lt;br /&gt;
| Petrify&lt;br /&gt;
| Earth&lt;br /&gt;
| attribute decrease&lt;br /&gt;
| single&lt;br /&gt;
| medium&lt;br /&gt;
| medium&lt;br /&gt;
| Earth version of &amp;quot;Freeze&amp;quot;. Encloses the target in a block of stone making it unable to do anything but also immune to damage. The block has a hit points rating that decreases over time. The stone block can be attacked by others to make it disappear faster. When its hit points reach 0 the target is free.&lt;br /&gt;
|-&lt;br /&gt;
| Muscles of steel&lt;br /&gt;
| Metal&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Increases strength&lt;br /&gt;
|-&lt;br /&gt;
| Sharp blade&lt;br /&gt;
| Metal&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Increases weapon penetration&lt;br /&gt;
|-&lt;br /&gt;
| Temper of fire&lt;br /&gt;
| Fire&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Increases willpower&lt;br /&gt;
|-&lt;br /&gt;
| Burning shield&lt;br /&gt;
| Fire&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Surrounds the target with a burning shield that deals damage to close enemies.&lt;br /&gt;
|-&lt;br /&gt;
| Life force&lt;br /&gt;
| Wood&lt;br /&gt;
| attribute increase&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Increases vitality&lt;br /&gt;
|-&lt;br /&gt;
| Entangle&lt;br /&gt;
| Wood&lt;br /&gt;
| attribute decrease&lt;br /&gt;
| single&lt;br /&gt;
| medium&lt;br /&gt;
| low&lt;br /&gt;
| Makes the target unable to move but it can still attack, cast spells, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Summon spells ===&lt;br /&gt;
These spells summon creatures that aid the caster in battle. The number of creatures that can be summoned at the same time should be limited. The caster receives experience for the magic skill used to summon the creatures when they contribute to killing a monster.&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Spell&lt;br /&gt;
! Element&lt;br /&gt;
! Effect&lt;br /&gt;
! Target&lt;br /&gt;
! cast time&lt;br /&gt;
! cooldown time&lt;br /&gt;
! Further description&lt;br /&gt;
|-&lt;br /&gt;
| Summon [[Races#Elementals|elemental]]&lt;br /&gt;
| (one for each)&lt;br /&gt;
| Summon uncontrolable&lt;br /&gt;
| area&lt;br /&gt;
| medium&lt;br /&gt;
| low&lt;br /&gt;
| Summons an aggressive elemental spirit that attacks enemies, the caster and its party members alike (other players should only be attacked in pvp zones)&lt;br /&gt;
|-&lt;br /&gt;
| Summon [[Races#Golems|golem]]&lt;br /&gt;
| (one for each)&lt;br /&gt;
| Summon controlable&lt;br /&gt;
| area&lt;br /&gt;
| high&lt;br /&gt;
| high&lt;br /&gt;
| Summons a golem that follows and protects the caster (maybe can be commanded to some extend). Should require expensive ingredients to create.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Healing spells ===&lt;br /&gt;
I would like to take the healing spells out of the elemental scheme und use a separate skill for them. Putting all healing spells in one elemental discipline would make this extremely overused because I believe almost every spellcaster would attempt to accquire healing spells. Spreading all healing spells over the whole elemental spectrum would be difficult to balance and would be a disadvantage for dedicated healers.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Spell&lt;br /&gt;
! Element&lt;br /&gt;
! Effect&lt;br /&gt;
! Target&lt;br /&gt;
! cast time&lt;br /&gt;
! cooldown time&lt;br /&gt;
! Further description&lt;br /&gt;
|-&lt;br /&gt;
| Lay hands&lt;br /&gt;
| neutral&lt;br /&gt;
| heal&lt;br /&gt;
| untargeted&lt;br /&gt;
| low&lt;br /&gt;
| low&lt;br /&gt;
| Basic healing spell. Heals the character standing right in front of the caster. The low range makes it impractical in combat.&lt;br /&gt;
|-&lt;br /&gt;
| Heal&lt;br /&gt;
| neutral&lt;br /&gt;
| heal&lt;br /&gt;
| single&lt;br /&gt;
| medium&lt;br /&gt;
| medium&lt;br /&gt;
| Less efficient than lay hands but because it can be used at distance it is more practical in combat and it can be cast on oneself.&lt;br /&gt;
|-&lt;br /&gt;
| Regeneration&lt;br /&gt;
| neutral&lt;br /&gt;
| heal over time&lt;br /&gt;
| single&lt;br /&gt;
| medium&lt;br /&gt;
| medium&lt;br /&gt;
| Heals more than heal but takes more time.&lt;br /&gt;
|-&lt;br /&gt;
| Aura&lt;br /&gt;
| neutral&lt;br /&gt;
| heal&lt;br /&gt;
| untargeted, persistent&lt;br /&gt;
| high&lt;br /&gt;
| high&lt;br /&gt;
| Creates a healing aura around the caster that slowly heals everyone around. Doesn&#039;t affect the caster.&lt;br /&gt;
|-&lt;br /&gt;
| Revive&lt;br /&gt;
| neutral&lt;br /&gt;
| restore&lt;br /&gt;
| single&lt;br /&gt;
| high&lt;br /&gt;
| high&lt;br /&gt;
| Attempts to revive a dead character that has not returned to its spawn point yet. The healing skill level of the caster must be higher than the total character level of the target to be successful.&lt;br /&gt;
|-&lt;br /&gt;
| Detox&lt;br /&gt;
| neutral&lt;br /&gt;
| restore&lt;br /&gt;
| untargeted&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Attempts to remove a status effect that falls in the category &amp;quot;poisons&amp;quot; from the character standing in front of the caster.&lt;br /&gt;
|-&lt;br /&gt;
| Decurse&lt;br /&gt;
| neutral&lt;br /&gt;
| restore&lt;br /&gt;
| untargeted&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Attempts to removes a status effect that falls in the category &amp;quot;curses&amp;quot; (like most attribute decrease spells) from the character standing in front of the caster.&lt;br /&gt;
|-&lt;br /&gt;
| Disinfect&lt;br /&gt;
| neutral&lt;br /&gt;
| restore&lt;br /&gt;
| untargeted&lt;br /&gt;
| high&lt;br /&gt;
| low&lt;br /&gt;
| Attempts to removes a status effect that falls in the category &amp;quot;diseases&amp;quot; from the character standing in front of the caster.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Blade Magic ===&lt;br /&gt;
[[User:Crush/Blade_Magic|Blade magic]] is an umbrella term for [[special attacks]] that use magic to enhance physical attacks (not only by blade weapons). They are for hybrid characters that want to fight both magical and physical. Blade magic techniques require skills and attributes for both physical and magical combat and deal a mix of magical and physical damage.&lt;br /&gt;
&lt;br /&gt;
=== Unsorted Spells ===&lt;br /&gt;
Below are spells planned or implemented for eAthena that are not covered by the above:&lt;br /&gt;
* Transmute X to Y (partially used as quest spell)&lt;br /&gt;
* Rain spell (quest spell, elemental attack vs. fire)&lt;br /&gt;
* Aggravate&lt;br /&gt;
* Detect Magic (quest spell)&lt;br /&gt;
* Flying backpack (temporarily eliminate penalties for heavy equipment)&lt;br /&gt;
* Happy Curse and variations (force player to emote for a while)&lt;br /&gt;
* Shroud (hide name from other players until the player picks up an item or talks)&lt;br /&gt;
* Reveal (cancel Shroud)&lt;br /&gt;
* Detect Players (list nearby players)&lt;br /&gt;
* Wind (`push&#039; creatures in a predefined region)&lt;br /&gt;
* Burrow/Ascend (special-purpose Teleport that moves upwards/downwards in certain regions; partly quest spell)&lt;br /&gt;
* Delayed Teleport (teleport back to casting location after short period of time)&lt;br /&gt;
* Peace (non-highlevel aggressive monsters stop attacking unless provoked or unless they were already provoked, for a while)&lt;br /&gt;
* Dispel Curse (cancel curse spells)&lt;br /&gt;
* Resurrect&lt;br /&gt;
* Teleport&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Developers&amp;diff=10555</id>
		<title>Development:Developers</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Developers&amp;diff=10555"/>
		<updated>2008-11-04T21:06:14Z</updated>

		<summary type="html">&lt;p&gt;Fate: Added myself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Active ==&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border-bottom: 2px solid #efdead&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; | Occupation&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Location&lt;br /&gt;
&lt;br /&gt;
{{dev1| [[User:Av3nger|Av3nger]]                 | Pixel art, map creation, translations | Brazil}}&lt;br /&gt;
{{dev2| [[User:Bertram|Bertram]]                 | Programmer | France}}&lt;br /&gt;
{{dev1| [[User:BjÃ¸rn|BjÃ¸rn Lindeijer]]           | Lead Programmer | The Netherlands}}&lt;br /&gt;
{{dev2| [[User:Crush|Philipp Sehmisch (Crush)]]  | Pixel artist, mapper, programmer | Germany}}&lt;br /&gt;
{{dev1| [[User:Dabe|David Del Re (Dabe)]]        | Story and Geography writer | USA}}&lt;br /&gt;
{{dev2| [[User:Doener|Doener]]                   | Programmer | Germany}}&lt;br /&gt;
{{dev1| [[User:ElvenProgrammer|Eugenio Favalli (ElvenProgrammer)]] | Project leader, programmer | Italy}}&lt;br /&gt;
{{dev2| [[User:Silene|Guillaume Melquiond (Silene)]] | Programmer | France}}&lt;br /&gt;
{{dev1| [[User:Jaxad0127|Jared Adams (Jaxad0127)]] | Content Manager Task Force member, mapper, minor programming | USA}}&lt;br /&gt;
{{dev2| [[User:Len|L Pabin (len)]]                         | Pixel artist, concept artist, mapper, and Head of Pixellation| USA}}&lt;br /&gt;
{{dev1| [[User:maci|maci]]                       | User support | Germany}}&lt;br /&gt;
{{dev2| [[User:hackgrid|Matt]]                   | Blabbering idiot | Germany}}&lt;br /&gt;
{{dev1| [[User:Modanung|Modanung]]               | Pixel artist, concept artist | The Netherlands}}&lt;br /&gt;
{{dev2| [[User:Pajarico|Pajarico]]               | Art, writer | Spain}}&lt;br /&gt;
{{dev1| [[User:the-me|Patrick MatthÃ¤i]]          | Debian package maintainer | Germany}}&lt;br /&gt;
{{dev2| [[User:Pauan|Pauan]]                     | Graphics artist (painting, pixel art, interface design, etc.) | USA}}&lt;br /&gt;
{{dev1| [[User:Peavey|Dennis Friis (peavey)]]    | Programmer | Denmark}}&lt;br /&gt;
{{dev2| [[User:Platyna|Platyna]]                 | Slackware package maintainer | Poland}}&lt;br /&gt;
{{dev1| [[User:Avaniel|Rogier Polak (Avaniel)]]  | Programmer | The Netherlands}}&lt;br /&gt;
{{dev2| [[User:Rotonen|Joni Orponen (Rotonen)]]  | Head of art, story and music | Finland}}&lt;br /&gt;
{{dev1| [[User:Trapdoor|trapdoor]]               | Programmer | England}}&lt;br /&gt;
{{dev2| [[User:Tuxtgz|Tuxtgz]]                   | Web-interface Programmer | Germany}}&lt;br /&gt;
{{dev1| [[User:VictorSan|VictorSan]]             | Programmer | Spain}}&lt;br /&gt;
{{dev2| [[User:Yosuhara|Yosuhara]]               | Pixel artist | Slovakia}}&lt;br /&gt;
{{dev1| [[User:Zipon|Zipon]]                     | Mapper | Denmark}}&lt;br /&gt;
{{dev2| [[User:Irukard|Krzysztof Daszuta (Irukard)]]                 | Pixel artist | Poland}}&lt;br /&gt;
{{dev1| [[User:Kage|Chuck Miller (Kage)]]        | Programmer | USA}}&lt;br /&gt;
{{dev2| [[User:Fate|Fate]]                       | Programmer (client, eAthena), Pixel artist | USA }}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Retired ==&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border-bottom: 2px solid #efdead&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; | Occupation&lt;br /&gt;
! style=&amp;quot;background:#efdead;&amp;quot; width=&amp;quot;150px&amp;quot; align=&amp;quot;left&amp;quot; | Location&lt;br /&gt;
&lt;br /&gt;
{{dev1| [[User:Gagaofdeath|Andrej Sinicyn]]      | Programmer | Germany}}&lt;br /&gt;
{{dev2| [[User:Bear|Bear]]                       | Scripter | USA}}&lt;br /&gt;
{{dev1| [[User:Catfish_Man|Catfish_Man]]         | Mac port | USA}}&lt;br /&gt;
{{dev2| Chetic                                   | Mapper | }}&lt;br /&gt;
{{dev1| [[User:Clef|Clef]]                       | Pixel artist | }}&lt;br /&gt;
{{dev2| [[User:Demon|Demon]]                     | Pixel artist | }}&lt;br /&gt;
{{dev1| [[User:deviexx|deviexx]]                 | Content manager | }}&lt;br /&gt;
{{dev2| [[User:Golgo|Golgo]]                     | Pixel artist | }}&lt;br /&gt;
{{dev1| Gnulia                                   | Concept artist | }}&lt;br /&gt;
{{dev2| Igor Morgado (imorgado)                  | Tester | }}&lt;br /&gt;
{{dev1| [[User:Javila|Javila]]                   | Programmer | Brazil}}&lt;br /&gt;
{{dev2| [[User:JoshLangley|JoshLangley]]         | Client Programmer | Australia}}&lt;br /&gt;
{{dev1| [[User:kindjal|kindjal]]                 | Programmer | France, currently Italy}}&lt;br /&gt;
{{dev2| [[User:Kinetic|Kinetic]]                 | Pixel artist | USA}}&lt;br /&gt;
{{dev1| Alexander Baldeck (kth5/Shura)           | Programmer | }}&lt;br /&gt;
{{dev2| [[User:Kyokai|Kyokai]]                   | Game systems designer | }}&lt;br /&gt;
{{dev1| [[User:Maester Pixel|Maester Pixel]]     | Pixel artist | USA}}&lt;br /&gt;
{{dev2| [[User:Magick|Magick]]                   | Musician | }}&lt;br /&gt;
{{dev1| [[User:Mkael|Mkael]]                     | Concept artist | Finland}}&lt;br /&gt;
{{dev2| [[User:Mra|Mra]]                         | Programmer | Germany}}&lt;br /&gt;
{{dev1| [[User:Neko-mon|Neko-mon]]               | Pixel artist | Brazil}}&lt;br /&gt;
{{dev2| Neorice                                  | Pixel artist | }}&lt;br /&gt;
{{dev1| [[User:Nym|nym]]                         | Programmer | Australia}}&lt;br /&gt;
{{dev2| Rodney Dawes (dobey)                     | Packager (install process) | }}&lt;br /&gt;
{{dev1| Romulo Fernandes (razor85)               | Artist | }}&lt;br /&gt;
{{dev2| Simon Edwardsson (simonedw/simedw)       | Packager (Mac) | }}&lt;br /&gt;
{{dev1| [[User:Sora|Sora]]                       | Pixel artist | Poland}}&lt;br /&gt;
{{dev2| [[User:Sull|Sull]]                       | Pixel artist and hosting | Canada}}&lt;br /&gt;
{{dev1| [[User:Talaroc|Talaroc]]                 | Pixel artist | }}&lt;br /&gt;
{{dev2| Ti Sing Hao                              | Musician | }}&lt;br /&gt;
{{dev1| Telospanton                              | Fan, player of TMW | Greece }}&lt;br /&gt;
{{dev1| Ultramichy                               | Hosting | }}&lt;br /&gt;
{{dev2| [[User:Usiu|Mateusz Kaduk (Usiu)]]       | Programmer | Poland}}&lt;br /&gt;
{{dev1| Vlady                                    | Artist | }}&lt;br /&gt;
{{dev2| zenogais (bitshift2002)                  | Programmer | }}&lt;br /&gt;
{{dev1| [[User:Axltrozz|Alex Argumedo (Axltrozz)]]               | Pixel artist | USA, born in El Salvador}}&lt;br /&gt;
{{dev2| Quiche_On_A_leash | Content Management |}}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Revolt:Stats&amp;diff=10484</id>
		<title>Revolt:Stats</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Revolt:Stats&amp;diff=10484"/>
		<updated>2008-10-25T22:17:26Z</updated>

		<summary type="html">&lt;p&gt;Fate: Explained changes to the combat and healing rules.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Category_playerinfo}}&lt;br /&gt;
{{Status_green}}&lt;br /&gt;
This is the currently used stat system. Because The Mana World is currently using the Ragnarok Online Server Emulator eAthena as a server backend the game mechanics are identical to the online game Ragnarok Online. Note that this is only a temporary state. The game will switch to an unique stat system as soon as the [[Server_development|new server platform]] is ready.&lt;br /&gt;
&lt;br /&gt;
== Agility ==&lt;br /&gt;
Raises your attack speed and your dodge.&lt;br /&gt;
* +1 to Flee/Evade per point.&lt;br /&gt;
* Increased attack speed per point (complicated, but based on the attack speed of the weapon you are using).&lt;br /&gt;
&lt;br /&gt;
== Dexterity ==&lt;br /&gt;
Raises your bow damage and your accuracy (minimum damage on hit). &lt;br /&gt;
* +1 to Hit per point.  Note that the to-Hit chance is then reduced by (distance * (distance + 1)).&lt;br /&gt;
* Increased attack speed per point (complicated, but based on the attack speed of the weapon).&lt;br /&gt;
* +1 base damage per point for missile weapons.&lt;br /&gt;
* A bonus of (Dexterity/10)^2 for missile weapons (such as bows).&lt;br /&gt;
* +1 base damage per 5 points for melee weapons.&lt;br /&gt;
* +1 minimum damage per point for melee weapons. If dexterity exceeds the attack value of the melee weapon, use the attack of the melee weapon for the min. value (ie. max. and min. values become the same).&lt;br /&gt;
* +0.15% crit chance for melee weapons per point of dexterity&lt;br /&gt;
&lt;br /&gt;
== Vitality == &lt;br /&gt;
Raises max health points and defense. &lt;br /&gt;
* +1% to max health points per point.&lt;br /&gt;
* +0.8 weapon damage reduction (defensive) per point.&lt;br /&gt;
* Healing items effect increased by +2% per point.&lt;br /&gt;
* Every 5 full points of vitality increases health points recovery power by 1.  This affects both healing by resting and healing by heal-over-time items.&lt;br /&gt;
* For monsters, there is a bonus to damage reduction.&lt;br /&gt;
* There is a hidden bonus of +1 intelligence style magic defence per 2 points (currently not used in TMW).&lt;br /&gt;
&lt;br /&gt;
== Luck == &lt;br /&gt;
Raises max lucky dodge. &lt;br /&gt;
* +1 base damage per 5 points of luck for missile and melee weapons.&lt;br /&gt;
* +0.2% crit chance per point of luck.&lt;br /&gt;
* +1 &amp;quot;lucky&amp;quot; dodge chance (the right hand part of your evade value) per 10 points of luck.&lt;br /&gt;
&lt;br /&gt;
== Intelligence ==&lt;br /&gt;
Raises your MP and mind abilities (currently not used in TMW). &lt;br /&gt;
* +1 Base Magick Atack per point.&lt;br /&gt;
* +1% to Max SP per point.&lt;br /&gt;
* SP Recovery items effect increased by +2% per point.&lt;br /&gt;
* Every 6 full points of intelligence increases spirit points recovery power by 1 and past 120 intelligence, every 2 intelligence gives a bonus to spirit recovery power of 1.&lt;br /&gt;
* A bonus to min. magick attack.&lt;br /&gt;
* A bonus to max. magick attack.&lt;br /&gt;
* +1 spell damage reduction (defensive) per point.&lt;br /&gt;
&lt;br /&gt;
== Strength == &lt;br /&gt;
Raises your attack and damage of your hits.&lt;br /&gt;
* +1 base damage per point for melee weapons.&lt;br /&gt;
* A bonus of (Strength/10)^2 for melee weapons.&lt;br /&gt;
* +1 base damage per 5 points for missile weapons.&lt;br /&gt;
* +30 carrying capacity per point of base strength (the left hand part of strength only).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* [http://rodatazone.simgaming.net/mechanics/stats.php RO DataZone]&lt;br /&gt;
* [http://ro.doddlercon.com/calc/calcx.html RO Stats Calculator] (do only change the Lvl, STR, AGI, VIT, INT, DEX, LUK values!)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User:Jaxad0127/Rules_Dialog&amp;diff=10468</id>
		<title>User:Jaxad0127/Rules Dialog</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User:Jaxad0127/Rules_Dialog&amp;diff=10468"/>
		<updated>2008-10-25T00:16:21Z</updated>

		<summary type="html">&lt;p&gt;Fate: Menu edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NPC: Constable Perry Graf&lt;br /&gt;
&lt;br /&gt;
Will be spoken by an NPC near the starting location. New accounts will get a popup with this info.&lt;br /&gt;
&lt;br /&gt;
-- Language Menu --&lt;br /&gt;
(Please put language names in their own language)&lt;br /&gt;
&lt;br /&gt;
* English&lt;br /&gt;
* Deutsch (German)&lt;br /&gt;
&lt;br /&gt;
-- Screen 1 --&lt;br /&gt;
&lt;br /&gt;
Players breaking the following rules may be banned (up to and including a permanent ban) or have their character&#039;s reset at the GM&#039;s discretion:&lt;br /&gt;
&lt;br /&gt;
1. Do not abuse other players (it means insults, swearing etc. directed to a particular person/s)&lt;br /&gt;
&lt;br /&gt;
2. No bots (and botting means ANY activity while away from keyboard)&lt;br /&gt;
&lt;br /&gt;
3. No spamming / flooding (including trade spam)&lt;br /&gt;
&lt;br /&gt;
4. No begging&lt;br /&gt;
&lt;br /&gt;
5. Speak English on public chat&lt;br /&gt;
&lt;br /&gt;
6. Treat others the same way you would like to be treated&lt;br /&gt;
&lt;br /&gt;
-- Screen 2 --&lt;br /&gt;
&lt;br /&gt;
Botting will be determined by talking to players who are moving and/or attacking.&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
(Deutsch/German)&lt;br /&gt;
&lt;br /&gt;
Wir bitten um das Einhalten der folgenden Regeln:&lt;br /&gt;
&lt;br /&gt;
1. Keine Beleidigungen, Schimpfwoerter, Schmaehungen oder Rufmord&lt;br /&gt;
&lt;br /&gt;
2. Keine `bots&#039; (automatisierte Spieler).  Dies beinhaltet JEGLICHE Teilnahme am Spiel waehrend der Abwesenheit des Spielers.&lt;br /&gt;
&lt;br /&gt;
3. Kein `spamming&#039; oder `flooding&#039; (schnelles Wiederholen von Nachrichten oder Aufforderungen zum Warenhandel).&lt;br /&gt;
&lt;br /&gt;
4. Kein Betteln.&lt;br /&gt;
&lt;br /&gt;
5. Englisch ist die einzige zulaessige Sprache im oeffentlichen Raum.&lt;br /&gt;
&lt;br /&gt;
6. Behandelt andere so, wie Ihr behandelt werden wollt.&lt;br /&gt;
&lt;br /&gt;
Jegliche Regelverstoesse koennen koennen bestraft werden, entweder durch ein Zuruecksetzen der Charaktereigenschaften und -besitztuemer auf den Ausgangszustand, oder durch einen temporaeren oder permanenten Ausschluss aus dem Spiel.&lt;br /&gt;
&lt;br /&gt;
-- Next screen --&lt;br /&gt;
&lt;br /&gt;
Automatisiertes Spielverhalten liegt vor, wenn ein sich bewegender/kaempfender Spieler nicht intelligent auf Gespraechsaufforderungen reagiert.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User:Jaxad0127/Rules_Dialog&amp;diff=10460</id>
		<title>User:Jaxad0127/Rules Dialog</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User:Jaxad0127/Rules_Dialog&amp;diff=10460"/>
		<updated>2008-10-24T20:48:15Z</updated>

		<summary type="html">&lt;p&gt;Fate: Added translation into German&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Will be spoken by an NPC near the starting location. New accounts will get a popup with this info.&lt;br /&gt;
&lt;br /&gt;
-- Screen 1 --&lt;br /&gt;
&lt;br /&gt;
Players breaking the following rules may be banned (up to and including a permanent ban) or have their character&#039;s reset at the GM&#039;s discretion:&lt;br /&gt;
&lt;br /&gt;
1. Do not abuse other players (it means insults, swearing etc. directed to a particular person/s)&lt;br /&gt;
&lt;br /&gt;
2. No bots (and botting means ANY activity while away from keyboard)&lt;br /&gt;
&lt;br /&gt;
3. No spamming / flooding (including trade spam)&lt;br /&gt;
&lt;br /&gt;
4. No begging&lt;br /&gt;
&lt;br /&gt;
5. Speak English on public chat&lt;br /&gt;
&lt;br /&gt;
6. Treat others the same way you would like to be treated&lt;br /&gt;
&lt;br /&gt;
-- Screen 2 --&lt;br /&gt;
&lt;br /&gt;
Botting will be determined by talking to players who are moving and/or attacking.&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
(Deutsch/German)&lt;br /&gt;
&lt;br /&gt;
Wir bitten um das Einhalten der folgenden Regeln:&lt;br /&gt;
&lt;br /&gt;
1. Keine Beleidigungen, Schimpfwoerter, Schmaehungen oder Rufmord&lt;br /&gt;
&lt;br /&gt;
2. Keine `bots&#039; (automatisierte Spieler).  Dies beinhaltet JEGLICHE Teilnahme am Spiel waehrend der Abwesenheit des Spielers.&lt;br /&gt;
&lt;br /&gt;
3. Kein `spamming&#039; oder `flooding&#039; (schnelles Wiederholen von Nachrichten oder Aufforderungen zum Warenhandel).&lt;br /&gt;
&lt;br /&gt;
4. Kein Betteln.&lt;br /&gt;
&lt;br /&gt;
5. Englisch ist die einzige zulaessige Sprache im oeffentlichen Raum.&lt;br /&gt;
&lt;br /&gt;
6. Behandelt andere so, wie Ihr behandelt werden wollt.&lt;br /&gt;
&lt;br /&gt;
Jegliche Regelverstoesse koennen koennen bestraft werden, entweder durch ein Zuruecksetzen der Charaktereigenschaften und -besitztuemer auf den Ausgangszustand, oder durch einen temporaeren oder permanenten Ausschluss aus dem Spiel.&lt;br /&gt;
&lt;br /&gt;
-- Next screen --&lt;br /&gt;
&lt;br /&gt;
Automatisiertes Spielverhalten liegt vor, wenn ein sich bewegender/kaempfender Spieler nicht intelligent auf Gespraechsaufforderungen reagiert.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10454</id>
		<title>User talk:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10454"/>
		<updated>2008-10-24T17:02:12Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Item drawing order and item IDs:&lt;br /&gt;
&lt;br /&gt;
 [(BASE, -), (BOOTS, 64), (PANTS, 1), (SHIRT, 512), (MISC1, 16), (MISC2, 128), (HAIR, -), (HAT, 256), (CAPE, 8), (GLOVES, 4), (WEAPON, 2), (SHIELD, 32)]&lt;br /&gt;
&lt;br /&gt;
I propose using MISC1 as an `amulet&#039; slot and MISC2 as a ring slot.  (MISC2 is currently used by the wedding ring.)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10453</id>
		<title>User talk:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10453"/>
		<updated>2008-10-24T17:01:24Z</updated>

		<summary type="html">&lt;p&gt;Fate: Item drawing order, slot IDs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Item drawing order and item IDs:&lt;br /&gt;
&lt;br /&gt;
 [(BASE, -), (BOOTS, 64), (PANTS, 1), (SHIRT, 512), (MISC1, 16), (MISC2, 128), (HAIR, -), (HAT, 256), (CAPE, 8), (GLOVES, 4), (WEAPON, 2), (SHIELD, 32)]&lt;br /&gt;
&lt;br /&gt;
I propose to use MISC1 as `amulet&#039; slot and MISC2 as ring slot.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10321</id>
		<title>User talk:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10321"/>
		<updated>2008-10-11T21:46:19Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;cat save/athena.txt | sort -n &amp;gt; athena-sorted.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Top married couples\n===================\n&amp;quot; &amp;gt; married.txt&lt;br /&gt;
&lt;br /&gt;
cat athena-sorted.txt | ./marriage-info -c | sort -rn | awk &#039;{printf &amp;quot;%d   %s  oo  %s  (%s (%s, %d), %s(%s, %d))\n&amp;quot;, ++rank, $3, $6, $3, $4, $5, $6, $7, $8}&#039; | tr &#039;%&#039; &#039; &#039; | head -50 &amp;gt;&amp;gt; married.txt&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Top female singles\n==================\n&amp;quot; &amp;gt; female-singles.txt&lt;br /&gt;
&lt;br /&gt;
cat athena-sorted.txt | ./marriage-info -f | sort -rn | awk &#039;{printf &amp;quot;%d   %s(%d)\n&amp;quot;, ++rank, $3, $1}&#039; | tr &#039;%&#039; &#039; &#039; | head -50 &amp;gt;&amp;gt; female-singles.txt&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Top male singles\n===============\n&amp;quot; &amp;gt; male-singles.txt&lt;br /&gt;
&lt;br /&gt;
cat athena-sorted.txt | ./marriage-info -m | sort -rn | awk &#039;{printf &amp;quot;%d   %s(%d)\n&amp;quot;, ++rank, $3, $1}&#039; | tr &#039;%&#039; &#039; &#039; | head -50 &amp;gt;&amp;gt; male-singles.txt&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10320</id>
		<title>User talk:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User_talk:Fate&amp;diff=10320"/>
		<updated>2008-10-11T21:45:55Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;cat save/athena.txt | sort -n &amp;gt; athena-sorted.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Top married couples\n===================\n&amp;quot; &amp;gt; married.txt&lt;br /&gt;
cat athena-sorted.txt | ./marriage-info -c | sort -rn | awk &#039;{printf &amp;quot;%d   %s  oo  %s  (%s (%s, %d), %s(%s, %d))\n&amp;quot;, ++rank, $3, $6, $3, $4, $5, $6, $7, $8}&#039; | tr &#039;%&#039; &#039; &#039; | head -50 &amp;gt;&amp;gt; married.txt&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Top female singles\n==================\n&amp;quot; &amp;gt; female-singles.txt&lt;br /&gt;
cat athena-sorted.txt | ./marriage-info -f | sort -rn | awk &#039;{printf &amp;quot;%d   %s(%d)\n&amp;quot;, ++rank, $3, $1}&#039; | tr &#039;%&#039; &#039; &#039; | head -50 &amp;gt;&amp;gt; female-singles.txt&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Top male singles\n===============\n&amp;quot; &amp;gt; male-singles.txt&lt;br /&gt;
cat athena-sorted.txt | ./marriage-info -m | sort -rn | awk &#039;{printf &amp;quot;%d   %s(%d)\n&amp;quot;, ++rank, $3, $1}&#039; | tr &#039;%&#039; &#039; &#039; | head -50 &amp;gt;&amp;gt; male-singles.txt&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9956</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9956"/>
		<updated>2008-08-24T15:46:56Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development&lt;br /&gt;
perspective for tmw.  Consequently, changes to eAthena are subject to&lt;br /&gt;
a short lifespan and little hope of re-use.  As a result, there is no&lt;br /&gt;
discernible feature development for eAthena to extend the player&lt;br /&gt;
experience on this server.  However, some enhancements that would&lt;br /&gt;
benefit the player community (and might thereby serve to attract new&lt;br /&gt;
testers and developers) depend on such extensions; one particular&lt;br /&gt;
prominent example of this is magic. This document proposes a simple&lt;br /&gt;
magic system as an addition to the eAthena system.  The magic system&lt;br /&gt;
satisfies the following requirements: (a) it is easy to implement and&lt;br /&gt;
integrate into eAthena, (b) it can be easily configured and&lt;br /&gt;
fine-tuned, (c) it requires no client-side extensions to function&lt;br /&gt;
properly.  This document presents the system together with fifteen&lt;br /&gt;
spells as well as their intended behaviour and describes the system&lt;br /&gt;
would work in regular gameplay.  The document further sketches a&lt;br /&gt;
prototype of the system.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this&lt;br /&gt;
proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v9 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic&lt;br /&gt;
system requires client support.  Furthermore, if there are bugs in the&lt;br /&gt;
system, the generally low quality of code in eAthena would make&lt;br /&gt;
debugging  a less than pleasant experience.  Since plans on the tmw&lt;br /&gt;
side further expect eAthena to be retired soon, it seems wasteful to&lt;br /&gt;
spend much time on a feature-rich magic system.  As an alternative,&lt;br /&gt;
tmw could adopt a simple magic system that provides the `bare-bones&lt;br /&gt;
magic experience&#039; as quickly as possible before eAthena support is&lt;br /&gt;
retired:  players can cast spells, but will not be required to wait&lt;br /&gt;
for a new client to become available.  As an interface, the existing&lt;br /&gt;
chat system appears to provide sufficient expressive power to&lt;br /&gt;
communicate many interesting spells to the server, while player&lt;br /&gt;
location and heading can affect spell effects more or less subtly.&lt;br /&gt;
While these interface choices are limiting, they (a) do not require&lt;br /&gt;
players to familiarise themselves with a new interface, (b) do not&lt;br /&gt;
require the implementation of `throw-away&#039; interface and protocol&lt;br /&gt;
code, and (c) (as mentioned) are already sufficient for a number of&lt;br /&gt;
interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised,&lt;br /&gt;
specifically the notions of `spell power&#039;, `magic defence&#039;, `magic&lt;br /&gt;
absorption&#039; and `spell requirements&#039;.  The document then discusses a&lt;br /&gt;
number of spells that can be expressed with the proposed interface;&lt;br /&gt;
all of the listed spells are also implemented as part of the&lt;br /&gt;
prototype.  A high-level overview over the implementation of the&lt;br /&gt;
prototype follows, then a description of how `spell requirements&#039; can&lt;br /&gt;
be configured.  The document concludes with a list of possible&lt;br /&gt;
approaches towards improving the visualisation of these spells by&lt;br /&gt;
means of altering the client, and with observations about extensions&lt;br /&gt;
to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by&lt;br /&gt;
means of atomic spells, i.e., magical effects arise by triggering a&lt;br /&gt;
particular effect-- while some spells may interact, there is no&lt;br /&gt;
foundational mechanism that allows players to construct new spells,&lt;br /&gt;
largely because such a mechanism would likely be hard to balance.&lt;br /&gt;
Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived&lt;br /&gt;
attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits&lt;br /&gt;
magic usage by established players without a (second) stat reset,&lt;br /&gt;
while giving sufficiently significant meaning to intelligence to make&lt;br /&gt;
it of some interest.  Intelligence also affects one of the two&lt;br /&gt;
defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to&lt;br /&gt;
subtract each time magical damage is dealt to a character-- this&lt;br /&gt;
derived stat therefore works similarly to vitality.  A third stat,&lt;br /&gt;
`magic defence&#039;, is already present in eAthena and describes (as a&lt;br /&gt;
percentage) how much magical damage is absorbed.  `magic defence&#039; is&lt;br /&gt;
applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Invocation: The spell&#039;s invocation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the invocation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Invocation, level, cost, prerequisites, and (material) components are&lt;br /&gt;
together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether&lt;br /&gt;
or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Invocation: The player must type the invocation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an invocation that matches the invocation of&lt;br /&gt;
a given spell, all of the above are checked.  Only if all requirements&lt;br /&gt;
are met is the spell effect triggered.  In that case, mana points are&lt;br /&gt;
subtracted and material components consumed as mentioned above.  In&lt;br /&gt;
all situations (no matter whether the spell requirements are fully met&lt;br /&gt;
or not) a correct invocation results in part of the spell being&lt;br /&gt;
starred out.  Assume that a given spell has the invocation `foo&#039;.&lt;br /&gt;
Whenever a player types in `foo&#039;, the chat message sent to other&lt;br /&gt;
players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is&lt;br /&gt;
decided individually for each character based on the &#039;&#039;obscure&lt;br /&gt;
factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy&lt;br /&gt;
regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the&lt;br /&gt;
proposed system within the previously described requirements.  Note&lt;br /&gt;
that the spells do not list level, cost, prerequisites or material&lt;br /&gt;
components, as determining these is not part of the implementation of&lt;br /&gt;
the magic system per se, but rather of applying it in practice.&lt;br /&gt;
&lt;br /&gt;
Since it may be desirable to vary spell power in practice, the spells&lt;br /&gt;
do not have predetermined durations, ranges etc.; these should be&lt;br /&gt;
part of spell configuration.  Instead, we list all configuration&lt;br /&gt;
options that would be of interest to the specified spell.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `parameter&#039;: A set of flags that narrow down the exact shroud behaviour&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing&lt;br /&gt;
a thusly shrouded player will not be able to determine the player&#039;s&lt;br /&gt;
name.  The precise behaviour is determined by the flags specified as `parameter&#039;:&lt;br /&gt;
* 1: If set, the player&#039;s name is hidden when (s)he talks&lt;br /&gt;
* 2: If set, the shroud disappears as soon as the player tries to pick up an item&lt;br /&gt;
* 4: If set, the shroud disappears as soon as the player talks (excluding spellcasting)&lt;br /&gt;
For example, setting `parameter&#039; to 6 will make the shroud disappear whenever the player&lt;br /&gt;
tries to pick up an item OR tries to talk.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* affects: all in range, including self, unless they resist (see below)&lt;br /&gt;
* option `power&#039;: Maximum caster experience level that can be revealed&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the&lt;br /&gt;
caster&#039;s spell power is at least as great as the shrouded player&#039;s&lt;br /&gt;
level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell detects all players in the area of effect and lists them to&lt;br /&gt;
the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: all PCs and monsters in range&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
* option `duration&#039;: Effective spell duration (cycles)&lt;br /&gt;
* option `power&#039;: Cycle length in game ticks&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.&lt;br /&gt;
All PCs and monsters are blown in the direction the caster was facing&lt;br /&gt;
at the time the spell was cast.  By walking directly against the wind,&lt;br /&gt;
players are able to overcome this obstacle, but only with considerable&lt;br /&gt;
delay.  A second `wind&#039; spell near the area of the first will result&lt;br /&gt;
in neither spell taking effect.  If one of the spells finishes before&lt;br /&gt;
the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this&lt;br /&gt;
point, particularly for PCs that are being pushed around.  See section&lt;br /&gt;
`Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject, MAGIC_EFFECT_SHIELD_ENDS (111) when finished&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: Number of HP to absorb each time the subject is injured&lt;br /&gt;
This spell absorbs, each time the subject is injured by weapons, some points&lt;br /&gt;
of damage.  The subject is slowed down by an equal percentage.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject, MAGIC_EFFECT_HASTE_ENDS (112) when finished&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: percentage the subject should be sped up by&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion.&lt;br /&gt;
However, the subject becomes highly vulnerable&lt;br /&gt;
during this period:  every time the subject receives physical damage&lt;br /&gt;
that bypasses its armour and defences, the suffered damage is doubled&lt;br /&gt;
for every sixteen points of speedup (tripled for a speedup of 32,&lt;br /&gt;
multiplied by 3.5 for a speedup of 40 etc.)&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects, MAGIC_EFFECT_BARRIER_ENDS (120) when finished&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: the percentage of magical damage absorbed&lt;br /&gt;
During the duration of this spell, magic defence is increased, thereby&lt;br /&gt;
absorbing all damage from offensive spells such as the three previous&lt;br /&gt;
ones, but also from healing magic, curses, and `haste&#039;/`protect&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Flying Backpack ===&lt;br /&gt;
* short name : `flying-backpack&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_FLYING_BACKPACK (23) on subjects, MAGIC_EFFECT_FLYING_BACKPACK_ENDS (123) when finished&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
During the duration of this spell, the subject is not affected by being burdened, i.e., can regenerate normally. &#039;&#039;&#039;Note:&#039;&#039;&#039; Suggested by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* affects: all PCs in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `hpcost&#039;: percentage of HP the caster must pay out of his/her own HP&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.&lt;br /&gt;
The caster has to a certain percentage of&lt;br /&gt;
the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate&lt;br /&gt;
fraction; e.g., if a caster with 11/11 HP tries to heal a player with&lt;br /&gt;
20/30 HP and another with 10/110 HP at a cost of 100%, then the second&lt;br /&gt;
player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine&lt;br /&gt;
(-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* affects: one dead PC in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: maximum experience level of the player to be resurrected&lt;br /&gt;
Resurrects a dead player.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* affects: all monsters in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `parameter&#039;: precise spell effect:&lt;br /&gt;
** 0: Attack caster&lt;br /&gt;
** 1: Permanently make agressive&lt;br /&gt;
** 2: Both of the above&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* affects: all monsters in range, unless their level is too high&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: effective spell power (see below).&lt;br /&gt;
All monsters in range may become peaceful, stopping their current&lt;br /&gt;
attacks and no longer auto-attacking (the latter effect is permanent&lt;br /&gt;
for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s modified spell power (i.e.,&lt;br /&gt;
the spell power modified by the configuration option `power&#039;)  is greater&lt;br /&gt;
than or equal to the subject&#039;s monster level; otherwise the spell may or&lt;br /&gt;
may not take effect (whether the spell takes effect is determined&lt;br /&gt;
solely by who the caster is and who the monster is, i.e., re-casting&lt;br /&gt;
the spell will not change the outcome).  The spell will never take&lt;br /&gt;
effect against monsters whose level is more than twice the modified&lt;br /&gt;
spell power.&lt;br /&gt;
&lt;br /&gt;
=== Emote Curse ===&lt;br /&gt;
* short name: `emote-curse&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self or subject standing immediately in front of the caster&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `parameter&#039;: particular smiley to emote&lt;br /&gt;
During the duration of the spell, the subject will constantly emote.  The&lt;br /&gt;
precise emote must be specified as a spell parameter.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: delay until the spell takes effect&lt;br /&gt;
After the duration has expired, the caster is teleported back to the&lt;br /&gt;
location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Teleport ===&lt;br /&gt;
* short name: `teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) when triggered&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
This spell teleports the caster to a pre-defined `teleport anchor&#039;&lt;br /&gt;
(specified in the configuration file) after a short delay.  Each&lt;br /&gt;
anchor may add further requirements (MP, level, prerequisites,&lt;br /&gt;
components) to the spell.&lt;br /&gt;
&lt;br /&gt;
=== Magic Mouth ===&lt;br /&gt;
* short name: `magic-mouth&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), both on the caster and the magic mouth&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: amount of game ticks the magic mouth stays alive&lt;br /&gt;
* option `range&#039;: minimum distance from the next magic mouth&lt;br /&gt;
This spell must be invoked together with a phrase to be spoken by the&lt;br /&gt;
magic mouth.  It will summon a magic mouth NPC that will repeat that&lt;br /&gt;
phrase (tagged with the caster&#039;s name) to everyone who decides to&lt;br /&gt;
listen.  Magic mouths cannot be placed within walls or too close to&lt;br /&gt;
each other.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell really demands a material component.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (if pvp) and monsters standing immediately in front of the caster, or in a nearby square in the direction the caster is facing&lt;br /&gt;
* option `power&#039;: maximum damage the spell will deal&lt;br /&gt;
* option `hpcost&#039;: percentage of damage dealt that the caster must pay from his/her HP&lt;br /&gt;
Deals considerable damage to each monster standing immediately in the&lt;br /&gt;
selected target square (either the square directly in front of the caster or one nearby, in the&lt;br /&gt;
direction the caster is facing).&lt;br /&gt;
The caster loses an appropriate amount of hitpoints and may die.&lt;br /&gt;
If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather&lt;br /&gt;
great effect by a pair of sorcerers.  One possible way to combat such&lt;br /&gt;
abuse would be to require expensive material components for either;&lt;br /&gt;
another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot&lt;br /&gt;
resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* affects: all PCs (if in pvp) and monsters in range&lt;br /&gt;
* option `duration&#039;: number of attack waves&lt;br /&gt;
* option `power&#039;: maximum damage to deal; this is divided by the range of each wave&lt;br /&gt;
* option `range&#039;: range of each wave&lt;br /&gt;
* option `hpcost&#039;: percentage of damage the caster must pay from his/her own HP&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.&lt;br /&gt;
Monsters/pvp players nearby may be hit multiple times, once&lt;br /&gt;
for each round.  The caster must pay a certain amount of the damage&lt;br /&gt;
dealt.  If dealing this damage would kill the&lt;br /&gt;
caster, the damage is reduced proportionally (as per the `heal&#039;&lt;br /&gt;
spell).  If the caster gets very close to dying, his/her hair will&lt;br /&gt;
turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (even outside of pvp!) and monsters in range&lt;br /&gt;
* option `range&#039;: effecive spell range&lt;br /&gt;
* option `power&#039;: percentage chance of success per subject&lt;br /&gt;
The health of all player characters and monsters in the specified area&lt;br /&gt;
of effect is set to one (modified by magic defence, as usual).  The success chance for the&lt;br /&gt;
caster (who does not get magic defence) is 100%, but for any other creature is as determined by&lt;br /&gt;
the option `power&#039;.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player&lt;br /&gt;
outside of a pvp zone.  It is possible to abuse this spell to aid&lt;br /&gt;
monsters in killing other players.  Furthermore this spell may deal a&lt;br /&gt;
significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Create Item ===&lt;br /&gt;
* short name: `create-item&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `power&#039;: number of items to create&lt;br /&gt;
* option `parameter&#039;: item ID of the item to create&lt;br /&gt;
Creates an appropriate number of the indicated items.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; In practice, this spell must have material components that&lt;br /&gt;
are at least as valuable as the created item to avoid potential&lt;br /&gt;
economical issues.&lt;br /&gt;
&lt;br /&gt;
=== Summon ===&lt;br /&gt;
* short name: `summon&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_SUMMON_PREPARE (21) at the target location, MAGIC_EFFECT_SUMMON_EXECUTE (22) at the target location after the spell delay&lt;br /&gt;
* affects: world&lt;br /&gt;
* option `power&#039;: time until the summoned creatures disappear again&lt;br /&gt;
* option `range&#039;: number of creatures to summon&lt;br /&gt;
* option `duration&#039;: delay between casting and appearance of the summoned creatures&lt;br /&gt;
* option `hpcost&#039;: hp cost to pay for the summons (absolute value)&lt;br /&gt;
* optoin `parameter&#039;: monster ID to summon&lt;br /&gt;
This spell summons a number of creatures and makes them attack nearby enemies.  If the caster attacks one of the creatures, that creature (and that creature alone) turns into an enemy and attacks the caster as a normal monster would.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler&lt;br /&gt;
messaging mechanism in eAthena.  It processes all chat messages and&lt;br /&gt;
tests whether they are identical to a given indication, then&lt;br /&gt;
implementing the spell protocol as listed above.  For each spell, the&lt;br /&gt;
chat handler instructs the chat system that the spell was not spam,&lt;br /&gt;
thereby allowing quick re-casting without automatic banning.  To allow&lt;br /&gt;
easy fine-tuning of spells, all spell requirements are read from a&lt;br /&gt;
configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
three kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell invocation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper invocation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the invocation.&lt;br /&gt;
* teleport-anchor &amp;quot;&amp;lt;name&amp;gt;&amp;quot; = &amp;quot;&amp;lt;mapname&amp;gt;&amp;quot;, &amp;lt;int&amp;gt;, &amp;lt;int&amp;gt;&lt;br /&gt;
This sets up a teleport destination at the specified map and the&lt;br /&gt;
specified x and y co-ordinates.  Teleport anchors may further be&lt;br /&gt;
restricted by spell requirements that are added on top of the&lt;br /&gt;
requirements&lt;br /&gt;
already enforced for the teleport spell itself.  Such options are&lt;br /&gt;
listed as for a spell (see below).&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell with the specified invocation; e.g.,&lt;br /&gt;
`spell &amp;quot;xyzzy&amp;quot; = &amp;quot;teleport&amp;quot;&#039; will bind the invocation &amp;quot;xyzzy&amp;quot; to the&lt;br /&gt;
&amp;quot;teleport&amp;quot; spell.   In this vein, spells may be bound with multiple&lt;br /&gt;
names (and different options).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number; overrides the default.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** prerequisites = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Prerequisite items (specified as item IDs) to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Material components (specified as item IDs) to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
** parameter = &amp;lt;int&amp;gt; (a spell-dependent parameter)&lt;br /&gt;
** master = &amp;lt;lmap&amp;gt; (master spell power modifier; applied before all other spell properties are applied.  Defaults to the identify function.)&lt;br /&gt;
** power = &amp;lt;lmap&amp;gt; (Modified spell power.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** range = &amp;lt;lmap&amp;gt; (Effective spell range.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** duration = &amp;lt;lmap&amp;gt; (Effective spell duration.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** hpcost = &amp;lt;lmap&amp;gt; (HP cost percentage.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;lmap&amp;gt; is a (bounded) linear map.  Its syntax follows the grammar below:&lt;br /&gt;
&lt;br /&gt;
  LMAP ::= PREBOUND &#039;{&#039; BODY &#039;}&#039; POSTBOUND&lt;br /&gt;
  PREBOUND ::= /* empty */ | &amp;lt;int&amp;gt; &#039;&amp;lt;=&#039;&lt;br /&gt;
  POSTBOUND ::= /* empty */ | &#039;&amp;lt;=&#039; &amp;lt;int&amp;gt;&lt;br /&gt;
  BODY ::= &amp;lt;int&amp;gt; &#039;+&#039; &amp;lt;float&amp;gt; &#039;*&#039; &#039;x&#039;&lt;br /&gt;
&lt;br /&gt;
Here are some examples of ranges, with implied semantics:&lt;br /&gt;
* { 0 + 2 * x }      # doubles the value&lt;br /&gt;
* { 1000 + 1 * x }   # Increments the value by one&lt;br /&gt;
* { 1000 + -2 * x }  # perfectly valid&lt;br /&gt;
* 0 &amp;lt;= { 0 + 1 * x } # The result is clipped at zero: no negatives&lt;br /&gt;
* { 0 + 1 * x } &amp;lt;= 9 # Result is clipped at 9: no greater values&lt;br /&gt;
&lt;br /&gt;
Please note that in the&lt;br /&gt;
current implementation most default values, particularly those&lt;br /&gt;
for `mana&#039; and `level&#039;, are inadequate and must be adjusted before&lt;br /&gt;
practical adoption.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point,&lt;br /&gt;
it could use some improvement.  The implementation sends different&lt;br /&gt;
level-up like signals to the client, which the existing client&lt;br /&gt;
interprets as `job level up&#039; signals.  A refined client could map&lt;br /&gt;
these numbers to more appropriate particle effects.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=305 Mantis entry with&lt;br /&gt;
corresponding client-side improvements].  This would be accomplished&lt;br /&gt;
by adding a new configuration file-- `being-effects.xml&#039; in the&lt;br /&gt;
prototype-- that has structure such as the following:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;being-effects&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;0&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/levelup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;1&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/skillup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;2&amp;quot; audio=&amp;quot;sfx/foo.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;default particle=&amp;quot;graphics/particles/default.xml&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/being-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file maps server-side effect IDs to client-side sound effects and&lt;br /&gt;
particle effects.  The first two entries (ids 0 and 1) replicate the&lt;br /&gt;
existing effects.  The third entry maps effect ID 2 to the sound&lt;br /&gt;
effect &amp;quot;sfx/foo.ogg&amp;quot;.  The fourth and final entry is a default rule,&lt;br /&gt;
indicating that all unidentified effects should not generate sound,&lt;br /&gt;
but produce the particle effect &amp;quot;graphics/particles/default.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy&lt;br /&gt;
to integrate with the existing infrastructure but offers players&lt;br /&gt;
additional, `magical&#039; operations.  While not all of the spells&lt;br /&gt;
presented herein are balanced in and by themselves, they can be&lt;br /&gt;
balanced by adding appropriate material component requirements.  This&lt;br /&gt;
in turn creates new opportunities for money sinks and player-driven&lt;br /&gt;
markets.  Finally, the use of invocations as part of the spellcasting&lt;br /&gt;
process allows spells to be guarded and/or propagated by social means&lt;br /&gt;
rather than by developer-driven quests; depending on how the&lt;br /&gt;
invocations are seeded, this may have interesting effects on existing&lt;br /&gt;
and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated&lt;br /&gt;
at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can&lt;br /&gt;
be effectively disabled.  In this fashion, spells can be gradually&lt;br /&gt;
added after they have survived testing.  Similarly, that have been&lt;br /&gt;
found exploitable or broken can be disabled quickly, while spells that&lt;br /&gt;
have become more widely known than anticipated can be re-hidden by&lt;br /&gt;
changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Thanks go out to Vink, who suggested several spells, peavey, who&lt;br /&gt;
reviewed the patch and suggested making spell effects more easily&lt;br /&gt;
configurable, and to Sanga, who provided numerous bug and experience&lt;br /&gt;
reports, as well as several suggestions for improving spell usage.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises * &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate&amp;diff=9817</id>
		<title>User:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate&amp;diff=9817"/>
		<updated>2008-08-06T01:36:44Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Former external development helper, now inactive.&lt;br /&gt;
&lt;br /&gt;
I will maintain my old patches/modifications; please assign Mantis issue reports to me if appropriate and allow a few days for me to react.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9816</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9816"/>
		<updated>2008-08-06T01:35:16Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This is an ignored proposal; due to lack of interest the developer has withdrawn the proposal and closed the related patches.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development&lt;br /&gt;
perspective for tmw.  Consequently, changes to eAthena are subject to&lt;br /&gt;
a short lifespan and little hope of re-use.  As a result, there is no&lt;br /&gt;
discernible feature development for eAthena to extend the player&lt;br /&gt;
experience on this server.  However, some enhancements that would&lt;br /&gt;
benefit the player community (and might thereby serve to attract new&lt;br /&gt;
testers and developers) depend on such extensions; one particular&lt;br /&gt;
prominent example of this is magic. This document proposes a simple&lt;br /&gt;
magic system as an addition to the eAthena system.  The magic system&lt;br /&gt;
satisfies the following requirements: (a) it is easy to implement and&lt;br /&gt;
integrate into eAthena, (b) it can be easily configured and&lt;br /&gt;
fine-tuned, (c) it requires no client-side extensions to function&lt;br /&gt;
properly.  This document presents the system together with fifteen&lt;br /&gt;
spells as well as their intended behaviour and describes the system&lt;br /&gt;
would work in regular gameplay.  The document further sketches a&lt;br /&gt;
prototype of the system.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this&lt;br /&gt;
proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v7 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic&lt;br /&gt;
system requires client support.  Furthermore, if there are bugs in the&lt;br /&gt;
system, the generally low quality of code in eAthena would make&lt;br /&gt;
debugging  a less than pleasant experience.  Since plans on the tmw&lt;br /&gt;
side further expect eAthena to be retired soon, it seems wasteful to&lt;br /&gt;
spend much time on a feature-rich magic system.  As an alternative,&lt;br /&gt;
tmw could adopt a simple magic system that provides the `bare-bones&lt;br /&gt;
magic experience&#039; as quickly as possible before eAthena support is&lt;br /&gt;
retired:  players can cast spells, but will not be required to wait&lt;br /&gt;
for a new client to become available.  As an interface, the existing&lt;br /&gt;
chat system appears to provide sufficient expressive power to&lt;br /&gt;
communicate many interesting spells to the server, while player&lt;br /&gt;
location and heading can affect spell effects more or less subtly.&lt;br /&gt;
While these interface choices are limiting, they (a) do not require&lt;br /&gt;
players to familiarise themselves with a new interface, (b) do not&lt;br /&gt;
require the implementation of `throw-away&#039; interface and protocol&lt;br /&gt;
code, and (c) (as mentioned) are already sufficient for a number of&lt;br /&gt;
interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised,&lt;br /&gt;
specifically the notions of `spell power&#039;, `magic defence&#039;, `magic&lt;br /&gt;
absorption&#039; and `spell requirements&#039;.  The document then discusses a&lt;br /&gt;
number of spells that can be expressed with the proposed interface;&lt;br /&gt;
all of the listed spells are also implemented as part of the&lt;br /&gt;
prototype.  A high-level overview over the implementation of the&lt;br /&gt;
prototype follows, then a description of how `spell requirements&#039; can&lt;br /&gt;
be configured.  The document concludes with a list of possible&lt;br /&gt;
approaches towards improving the visualisation of these spells by&lt;br /&gt;
means of altering the client, and with observations about extensions&lt;br /&gt;
to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by&lt;br /&gt;
means of atomic spells, i.e., magical effects arise by triggering a&lt;br /&gt;
particular effect-- while some spells may interact, there is no&lt;br /&gt;
foundational mechanism that allows players to construct new spells,&lt;br /&gt;
largely because such a mechanism would likely be hard to balance.&lt;br /&gt;
Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived&lt;br /&gt;
attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits&lt;br /&gt;
magic usage by established players without a (second) stat reset,&lt;br /&gt;
while giving sufficiently significant meaning to intelligence to make&lt;br /&gt;
it of some interest.  Intelligence also affects one of the two&lt;br /&gt;
defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to&lt;br /&gt;
subtract each time magical damage is dealt to a character-- this&lt;br /&gt;
derived stat therefore works similarly to vitality.  A third stat,&lt;br /&gt;
`magic defence&#039;, is already present in eAthena and describes (as a&lt;br /&gt;
percentage) how much magical damage is absorbed.  `magic defence&#039; is&lt;br /&gt;
applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Invocation: The spell&#039;s invocation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the invocation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Invocation, level, cost, prerequisites, and (material) components are&lt;br /&gt;
together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether&lt;br /&gt;
or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Invocation: The player must type the invocation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an invocation that matches the invocation of&lt;br /&gt;
a given spell, all of the above are checked.  Only if all requirements&lt;br /&gt;
are met is the spell effect triggered.  In that case, mana points are&lt;br /&gt;
subtracted and material components consumed as mentioned above.  In&lt;br /&gt;
all situations (no matter whether the spell requirements are fully met&lt;br /&gt;
or not) a correct invocation results in part of the spell being&lt;br /&gt;
starred out.  Assume that a given spell has the invocation `foo&#039;.&lt;br /&gt;
Whenever a player types in `foo&#039;, the chat message sent to other&lt;br /&gt;
players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is&lt;br /&gt;
decided individually for each character based on the &#039;&#039;obscure&lt;br /&gt;
factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy&lt;br /&gt;
regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the&lt;br /&gt;
proposed system within the previously described requirements.  Note&lt;br /&gt;
that the spells do not list level, cost, prerequisites or material&lt;br /&gt;
components, as determining these is not part of the implementation of&lt;br /&gt;
the magic system per se, but rather of applying it in practice.&lt;br /&gt;
&lt;br /&gt;
Since it may be desirable to vary spell power in practice, the spells&lt;br /&gt;
do not have predetermined durations, ranges etc.; these should be&lt;br /&gt;
part of spell configuration.  Instead, we list all configuration&lt;br /&gt;
options that would be of interest to the specified spell.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `parameter&#039;: A set of flags that narrow down the exact shroud behaviour&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing&lt;br /&gt;
a thusly shrouded player will not be able to determine the player&#039;s&lt;br /&gt;
name.  The precise behaviour is determined by the flags specified as `parameter&#039;:&lt;br /&gt;
* 1: If set, the player&#039;s name is hidden when (s)he talks&lt;br /&gt;
* 2: If set, the shroud disappears as soon as the player tries to pick up an item&lt;br /&gt;
* 4: If set, the shroud disappears as soon as the player talks (excluding spellcasting)&lt;br /&gt;
For example, setting `parameter&#039; to 6 will make the shroud disappear whenever the player&lt;br /&gt;
tries to pick up an item OR tries to talk.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* affects: all in range, including self, unless they resist (see below)&lt;br /&gt;
* option `power&#039;: Maximum caster experience level that can be revealed&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the&lt;br /&gt;
caster&#039;s spell power is at least as great as the shrouded player&#039;s&lt;br /&gt;
level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell detects all players in the area of effect and lists them to&lt;br /&gt;
the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: all PCs and monsters in range&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
* option `duration&#039;: Effective spell duration (cycles)&lt;br /&gt;
* option `power&#039;: Cycle length in game ticks&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.&lt;br /&gt;
All PCs and monsters are blown in the direction the caster was facing&lt;br /&gt;
at the time the spell was cast.  By walking directly against the wind,&lt;br /&gt;
players are able to overcome this obstacle, but only with considerable&lt;br /&gt;
delay.  A second `wind&#039; spell near the area of the first will result&lt;br /&gt;
in neither spell taking effect.  If one of the spells finishes before&lt;br /&gt;
the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this&lt;br /&gt;
point, particularly for PCs that are being pushed around.  See section&lt;br /&gt;
`Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject, MAGIC_EFFECT_SHIELD_ENDS (111) when finished&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: Number of HP to absorb each time the subject is injured&lt;br /&gt;
This spell absorbs, each time the subject is injured by weapons, some points&lt;br /&gt;
of damage.  The subject is slowed down by an equal percentage.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject, MAGIC_EFFECT_HASTE_ENDS (112) when finished&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: percentage the subject should be sped up by&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion.&lt;br /&gt;
However, the subject becomes highly vulnerable&lt;br /&gt;
during this period:  every time the subject receives physical damage&lt;br /&gt;
that bypasses its armour and defences, the suffered damage is doubled&lt;br /&gt;
for every sixteen points of speedup (tripled for a speedup of 32,&lt;br /&gt;
multiplied by 3.5 for a speedup of 40 etc.)&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects, MAGIC_EFFECT_BARRIER_ENDS (120) when finished&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: the percentage of magical damage absorbed&lt;br /&gt;
During the duration of this spell, magic defence is increased, thereby&lt;br /&gt;
absorbing all damage from offensive spells such as the three previous&lt;br /&gt;
ones, but also from healing magic, curses, and `haste&#039;/`protect&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Flying Backpack ===&lt;br /&gt;
* short name : `flying-backpack&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_FLYING_BACKPACK (23) on subjects, MAGIC_EFFECT_FLYING_BACKPACK_ENDS (123) when finished&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
During the duration of this spell, the subject is not affected by being burdened, i.e., can regenerate normally.&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* affects: all PCs in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `hpcost&#039;: percentage of HP the caster must pay out of his/her own HP&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.&lt;br /&gt;
The caster has to a certain percentage of&lt;br /&gt;
the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate&lt;br /&gt;
fraction; e.g., if a caster with 11/11 HP tries to heal a player with&lt;br /&gt;
20/30 HP and another with 10/110 HP at a cost of 100%, then the second&lt;br /&gt;
player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine&lt;br /&gt;
(-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* affects: one dead PC in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: maximum experience level of the player to be resurrected&lt;br /&gt;
Resurrects a dead player.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* affects: all monsters in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `parameter&#039;: precise spell effect:&lt;br /&gt;
** 0: Attack caster&lt;br /&gt;
** 1: Permanently make agressive&lt;br /&gt;
** 2: Both of the above&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* affects: all monsters in range, unless their level is too high&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: effective spell power (see below).&lt;br /&gt;
All monsters in range may become peaceful, stopping their current&lt;br /&gt;
attacks and no longer auto-attacking (the latter effect is permanent&lt;br /&gt;
for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s modified spell power (i.e.,&lt;br /&gt;
the spell power modified by the configuration option `power&#039;)  is greater&lt;br /&gt;
than or equal to the subject&#039;s monster level; otherwise the spell may or&lt;br /&gt;
may not take effect (whether the spell takes effect is determined&lt;br /&gt;
solely by who the caster is and who the monster is, i.e., re-casting&lt;br /&gt;
the spell will not change the outcome).  The spell will never take&lt;br /&gt;
effect against monsters whose level is more than twice the modified&lt;br /&gt;
spell power.&lt;br /&gt;
&lt;br /&gt;
=== Emote Curse ===&lt;br /&gt;
* short name: `emote-curse&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self or subject standing immediately in front of the caster&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `parameter&#039;: particular smiley to emote&lt;br /&gt;
During the duration of the spell, the subject will constantly emote.  The&lt;br /&gt;
precise emote must be specified as a spell parameter.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: delay until the spell takes effect&lt;br /&gt;
After the duration has expired, the caster is teleported back to the&lt;br /&gt;
location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Teleport ===&lt;br /&gt;
* short name: `teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) when triggered&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
This spell teleports the caster to a pre-defined `teleport anchor&#039;&lt;br /&gt;
(specified in the configuration file) after a short delay.  Each&lt;br /&gt;
anchor may add further requirements (MP, level, prerequisites,&lt;br /&gt;
components) to the spell.&lt;br /&gt;
&lt;br /&gt;
=== Magic Mouth ===&lt;br /&gt;
* short name: `magic-mouth&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), both on the caster and the magic mouth&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: amount of game ticks the magic mouth stays alive&lt;br /&gt;
* option `range&#039;: minimum distance from the next magic mouth&lt;br /&gt;
This spell must be invoked together with a phrase to be spoken by the&lt;br /&gt;
magic mouth.  It will summon a magic mouth NPC that will repeat that&lt;br /&gt;
phrase (tagged with the caster&#039;s name) to everyone who decides to&lt;br /&gt;
listen.  Magic mouths cannot be placed within walls or too close to&lt;br /&gt;
each other.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell really demands a material component.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (if pvp) and monsters standing immediately in front of the caster, or in a nearby square in the direction the caster is facing&lt;br /&gt;
* option `power&#039;: maximum damage the spell will deal&lt;br /&gt;
* option `hpcost&#039;: percentage of damage dealt that the caster must pay from his/her HP&lt;br /&gt;
Deals considerable damage to each monster standing immediately in the&lt;br /&gt;
selected target square (either the square directly in front of the caster or one nearby, in the&lt;br /&gt;
direction the caster is facing).&lt;br /&gt;
The caster loses an appropriate amount of hitpoints and may die.&lt;br /&gt;
If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather&lt;br /&gt;
great effect by a pair of sorcerers.  One possible way to combat such&lt;br /&gt;
abuse would be to require expensive material components for either;&lt;br /&gt;
another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot&lt;br /&gt;
resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* affects: all PCs (if in pvp) and monsters in range&lt;br /&gt;
* option `duration&#039;: number of attack waves&lt;br /&gt;
* option `power&#039;: maximum damage to deal; this is divided by the range of each wave&lt;br /&gt;
* option `range&#039;: range of each wave&lt;br /&gt;
* option `hpcost&#039;: percentage of damage the caster must pay from his/her own HP&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.&lt;br /&gt;
Monsters/pvp players nearby may be hit multiple times, once&lt;br /&gt;
for each round.  The caster must pay a certain amount of the damage&lt;br /&gt;
dealt.  If dealing this damage would kill the&lt;br /&gt;
caster, the damage is reduced proportionally (as per the `heal&#039;&lt;br /&gt;
spell).  If the caster gets very close to dying, his/her hair will&lt;br /&gt;
turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (even outside of pvp!) and monsters in range&lt;br /&gt;
* option `range&#039;: effecive spell range&lt;br /&gt;
* option `power&#039;: percentage chance of success per subject&lt;br /&gt;
The health of all player characters and monsters in the specified area&lt;br /&gt;
of effect is set to one (modified by magic defence, as usual).  The success chance for the&lt;br /&gt;
caster (who does not get magic defence) is 100%, but for any other creature is as determined by&lt;br /&gt;
the option `power&#039;.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player&lt;br /&gt;
outside of a pvp zone.  It is possible to abuse this spell to aid&lt;br /&gt;
monsters in killing other players.  Furthermore this spell may deal a&lt;br /&gt;
significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Create Item ===&lt;br /&gt;
* short name: `create-item&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `power&#039;: number of items to create&lt;br /&gt;
* option `parameter&#039;: item ID of the item to create&lt;br /&gt;
Creates an appropriate number of the indicated items.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; In practice, this spell must have material components that&lt;br /&gt;
are at least as valuable as the created item to avoid potential&lt;br /&gt;
economical issues.&lt;br /&gt;
&lt;br /&gt;
=== Summon ===&lt;br /&gt;
* short name: `summon&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_SUMMON_PREPARE (21) at the target location, MAGIC_EFFECT_SUMMON_EXECUTE (22) at the target location after the spell delay&lt;br /&gt;
* affects: world&lt;br /&gt;
* option `power&#039;: time until the summoned creatures disappear again&lt;br /&gt;
* option `range&#039;: number of creatures to summon&lt;br /&gt;
* option `duration&#039;: delay between casting and appearance of the summoned creatures&lt;br /&gt;
* option `hpcost&#039;: hp cost to pay for the summons (absolute value)&lt;br /&gt;
* optoin `parameter&#039;: monster ID to summon&lt;br /&gt;
This spell summons a number of creatures and makes them attack nearby enemies.  If the caster attacks one of the creatures, that creature (and that creature alone) turns into an enemy and attacks the caster as a normal monster would.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler&lt;br /&gt;
messaging mechanism in eAthena.  It processes all chat messages and&lt;br /&gt;
tests whether they are identical to a given indication, then&lt;br /&gt;
implementing the spell protocol as listed above.  For each spell, the&lt;br /&gt;
chat handler instructs the chat system that the spell was not spam,&lt;br /&gt;
thereby allowing quick re-casting without automatic banning.  To allow&lt;br /&gt;
easy fine-tuning of spells, all spell requirements are read from a&lt;br /&gt;
configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
three kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell invocation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper invocation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the invocation.&lt;br /&gt;
* teleport-anchor &amp;quot;&amp;lt;name&amp;gt;&amp;quot; = &amp;quot;&amp;lt;mapname&amp;gt;&amp;quot;, &amp;lt;int&amp;gt;, &amp;lt;int&amp;gt;&lt;br /&gt;
This sets up a teleport destination at the specified map and the&lt;br /&gt;
specified x and y co-ordinates.  Teleport anchors may further be&lt;br /&gt;
restricted by spell requirements that are added on top of the&lt;br /&gt;
requirements&lt;br /&gt;
already enforced for the teleport spell itself.  Such options are&lt;br /&gt;
listed as for a spell (see below).&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell with the specified invocation; e.g.,&lt;br /&gt;
`spell &amp;quot;xyzzy&amp;quot; = &amp;quot;teleport&amp;quot;&#039; will bind the invocation &amp;quot;xyzzy&amp;quot; to the&lt;br /&gt;
&amp;quot;teleport&amp;quot; spell.   In this vein, spells may be bound with multiple&lt;br /&gt;
names (and different options).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number; overrides the default.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** prerequisites = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Prerequisite items (specified as item IDs) to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Material components (specified as item IDs) to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
** parameter = &amp;lt;int&amp;gt; (a spell-dependent parameter)&lt;br /&gt;
** master = &amp;lt;lmap&amp;gt; (master spell power modifier; applied before all other spell properties are applied.  Defaults to the identify function.)&lt;br /&gt;
** power = &amp;lt;lmap&amp;gt; (Modified spell power.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** range = &amp;lt;lmap&amp;gt; (Effective spell range.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** duration = &amp;lt;lmap&amp;gt; (Effective spell duration.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** hpcost = &amp;lt;lmap&amp;gt; (HP cost percentage.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;lmap&amp;gt; is a (bounded) linear map.  Its syntax follows the grammar below:&lt;br /&gt;
&lt;br /&gt;
  LMAP ::= PREBOUND &#039;{&#039; BODY &#039;}&#039; POSTBOUND&lt;br /&gt;
  PREBOUND ::= /* empty */ | &amp;lt;int&amp;gt; &#039;&amp;lt;=&#039;&lt;br /&gt;
  POSTBOUND ::= /* empty */ | &#039;&amp;lt;=&#039; &amp;lt;int&amp;gt;&lt;br /&gt;
  BODY ::= &amp;lt;int&amp;gt; &#039;+&#039; &amp;lt;float&amp;gt; &#039;*&#039; &#039;x&#039;&lt;br /&gt;
&lt;br /&gt;
Here are some examples of ranges, with implied semantics:&lt;br /&gt;
* { 0 + 2 * x }      # doubles the value&lt;br /&gt;
* { 1000 + 1 * x }   # Increments the value by one&lt;br /&gt;
* { 1000 + -2 * x }  # perfectly valid&lt;br /&gt;
* 0 &amp;lt;= { 0 + 1 * x } # The result is clipped at zero: no negatives&lt;br /&gt;
* { 0 + 1 * x } &amp;lt;= 9 # Result is clipped at 9: no greater values&lt;br /&gt;
&lt;br /&gt;
Please note that in the&lt;br /&gt;
current implementation most default values, particularly those&lt;br /&gt;
for `mana&#039; and `level&#039;, are inadequate and must be adjusted before&lt;br /&gt;
practical adoption.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point,&lt;br /&gt;
it could use some improvement.  The implementation sends different&lt;br /&gt;
level-up like signals to the client, which the existing client&lt;br /&gt;
interprets as `job level up&#039; signals.  A refined client could map&lt;br /&gt;
these numbers to more appropriate particle effects.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=305 Mantis entry with&lt;br /&gt;
corresponding client-side improvements].  This would be accomplished&lt;br /&gt;
by adding a new configuration file-- `being-effects.xml&#039; in the&lt;br /&gt;
prototype-- that has structure such as the following:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;being-effects&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;0&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/levelup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;1&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/skillup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;2&amp;quot; audio=&amp;quot;sfx/foo.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;default particle=&amp;quot;graphics/particles/default.xml&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/being-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file maps server-side effect IDs to client-side sound effects and&lt;br /&gt;
particle effects.  The first two entries (ids 0 and 1) replicate the&lt;br /&gt;
existing effects.  The third entry maps effect ID 2 to the sound&lt;br /&gt;
effect &amp;quot;sfx/foo.ogg&amp;quot;.  The fourth and final entry is a default rule,&lt;br /&gt;
indicating that all unidentified effects should not generate sound,&lt;br /&gt;
but produce the particle effect &amp;quot;graphics/particles/default.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy&lt;br /&gt;
to integrate with the existing infrastructure but offers players&lt;br /&gt;
additional, `magical&#039; operations.  While not all of the spells&lt;br /&gt;
presented herein are balanced in and by themselves, they can be&lt;br /&gt;
balanced by adding appropriate material component requirements.  This&lt;br /&gt;
in turn creates new opportunities for money sinks and player-driven&lt;br /&gt;
markets.  Finally, the use of invocations as part of the spellcasting&lt;br /&gt;
process allows spells to be guarded and/or propagated by social means&lt;br /&gt;
rather than by developer-driven quests; depending on how the&lt;br /&gt;
invocations are seeded, this may have interesting effects on existing&lt;br /&gt;
and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated&lt;br /&gt;
at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can&lt;br /&gt;
be effectively disabled.  In this fashion, spells can be gradually&lt;br /&gt;
added after they have survived testing.  Similarly, that have been&lt;br /&gt;
found exploitable or broken can be disabled quickly, while spells that&lt;br /&gt;
have become more widely known than anticipated can be re-hidden by&lt;br /&gt;
changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Thanks go out to Vink, who suggested several spells, peavey, who&lt;br /&gt;
reviewed the patch and suggested making spell effects more easily&lt;br /&gt;
configurable, and to Sanga, who provided numerous bug and experience&lt;br /&gt;
reports, as well as several suggestions for improving spell usage.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises * &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate&amp;diff=9765</id>
		<title>User:Fate</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=User:Fate&amp;diff=9765"/>
		<updated>2008-07-14T17:03:40Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Former external development helper.  I will maintain my old patches and may help with particular issues on request; please assign Mantis issue reports to me if appropriate.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Particle_engine&amp;diff=9643</id>
		<title>Development:Particle engine</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Development:Particle_engine&amp;diff=9643"/>
		<updated>2008-06-20T21:12:05Z</updated>

		<summary type="html">&lt;p&gt;Fate: /* Possible Additions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Category_programming}}&lt;br /&gt;
{{Category_art}}&lt;br /&gt;
{{status_green}}&lt;br /&gt;
&lt;br /&gt;
==What is the particle engine?==&lt;br /&gt;
&lt;br /&gt;
The particle engine is a system that allows to create beautiful dynamic special effects based on creating and managing a large number of small, independent, moving sprites. For more information about particle engines see [http://en.wikipedia.org/wiki/Particle_system the Wikipedia article about particle systems].&lt;br /&gt;
&lt;br /&gt;
The particle engine allows us to create a large variety of beautiful special effects with minimal effort that could outclass those of most other sprite based rpgs. The areas where particle effects could be used include but are not limited to:&lt;br /&gt;
* Environmental effects like waterfalls, fires, fountains or smoke comming out of chimneys&lt;br /&gt;
* Visualisation of mystical phenomenons like teleporters or other points of interest&lt;br /&gt;
* Graphic effects for spells&lt;br /&gt;
* Visualisation of status effects&lt;br /&gt;
&lt;br /&gt;
== The effect definition file ==&lt;br /&gt;
Particle effects are described in xml documents. They describe one or more single particles or particle emitters.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;effect&amp;gt; ===&lt;br /&gt;
Is the root element of the XML document.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;particle&amp;gt; ===&lt;br /&gt;
Every effect is based on at least one particle. Often but not always these root particles function only as emitters that spawn new particles and have no appearance of their own. They have the following three required properties:&lt;br /&gt;
;position-x: (initial) position on map relative to the position where the effect is created (pixel-based)&lt;br /&gt;
;position-y: (initial) position on map relative to the position where the effect is created (pixel-based)&lt;br /&gt;
;position-z: (initial) position on map relative to the position where the effect is created (pixel-based)&lt;br /&gt;
The following properties are optional:&lt;br /&gt;
;lifetime: Lifetime in game-ticks. (default: unlimited)&lt;br /&gt;
In addition they can have any number of emitters and a visual representation in form of an &amp;lt;animation&amp;gt; or an &amp;lt;image&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;image&amp;gt; ===&lt;br /&gt;
Root particles can have an &amp;lt;image&amp;gt; childtag that contains the path to an image in its content. In that case this image is used as the visual representation of the root particle.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;emitter&amp;gt; ===&lt;br /&gt;
Emitters are always child-elements of a particle or another emitter. They create new particles themself which can also include emitters and so on. They also include a number of &amp;lt;property&amp;gt; child elements that define the initial properties of the created particles. When one of the following propertiy elements is missing the default value is used. The property elements have two or three properties. Either &#039;&#039;name&#039;&#039; and &#039;&#039;value&#039;&#039; or &#039;&#039;name&#039;&#039;, &#039;&#039;min&#039;&#039; and &#039;&#039;max&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
They can also have any number of &amp;lt;emitter&amp;gt; childtags (when these exist all child-particles will be equipped with these emitters) and an &amp;lt;animation&amp;gt; childtag that replaces the image with an animation.&lt;br /&gt;
&lt;br /&gt;
:;position-x: (initial) position on map relative to the parent particle (pixel-based) (default: 0)&lt;br /&gt;
:;position-y: (initial) position on map relative to the parent particle (pixel-based) (default: 0)&lt;br /&gt;
:;position-z: (initial) position on map relative to the parent particle (pixel-based) (default: 0)&lt;br /&gt;
:;image: path to the image that should be drawn at the position of the particles (default: no image)&lt;br /&gt;
:;horizontal-angle: clockwise angle of initial vector on horizontal plane in degree. 0Â° means straight right. (default: 0)&lt;br /&gt;
:;vertical-angle: angle between ground and initial vector in degree. 0Â° means parallel to the ground. Positive values are upwards, negative downwards. (default: 0 = parallel to ground)&lt;br /&gt;
:;power: Initial speed of the particles in pixels/ game-tick (default: 0)&lt;br /&gt;
:;gravity: Downward acceleration of particles in pixels/game-tickÂ² (default: 0)&lt;br /&gt;
:;randomnes: Random changes in the X, Y and Z vector. The unit is maximum pixels/game-tick/1000. (default: 0)&lt;br /&gt;
:;lifetime: lifetime in game ticks (default: -1 = unlimited)&lt;br /&gt;
:;fade-out: Number of game ticks of lifetime left when the particle starts to disappear by fading into alpha. (default: 0 = disabled)&lt;br /&gt;
:;fade-in: Number of game ticks while the particles fade in to their full opacity. (default: 0 = spawned with full opacity)&lt;br /&gt;
:;output: Numbers of particles created per tick (default: 1)&lt;br /&gt;
:;acceleration: acceleration of particles towards the target in pixels/game-tickÂ² (default: 0)&lt;br /&gt;
:;momentum: Momentum of the particles. Before adding the acceleration the old vectors are multiplied by this. A momentum of 1 creates a perfect newtonian object. A slightly lower momentum gives the impression that the particles are breaked. A higher momentum makes the particles accelerate forward. This looks rather weird but could be useful for some effects. A negative momentum looks really ugly. (default: 1)&lt;br /&gt;
:;die-distance: Only used together with acceleration. Distance in pixels to the target that causes the destruction of the particles when reached. (Default: 0 = not destroyed on contact)&lt;br /&gt;
:;bounce: When higher than 0 particles don&#039;t disappear when they touch the ground. Instead they bounce off with a vector equal to their old vector multiplied with this property. It is recommended to add a limited lifetime to bouncing particles because otherwise they are immortal. (Default: 0)&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;animation&amp;gt; ===&lt;br /&gt;
The animation tag can be used as a childtag of the &amp;lt;particle&amp;gt; tag to make the root particle appear as an animated image or it can be used as a childtag for an emitter. In that case the emitter cspawn animated particles instead of a static ones.&lt;br /&gt;
&lt;br /&gt;
The usage is similar like the animation tag described in [[Animations#.3Canimation.3E]]. You can use the same child elements with the same syntax. The only difference are the properties of the animation tag itself. There is no direction property. Instead the used imageset is described in the animation tag with the properties &#039;&#039;imageset&#039;&#039;, &#039;&#039;width&#039;&#039; and &#039;&#039;height&#039;&#039;. All three properties are required.&lt;br /&gt;
&lt;br /&gt;
== Particle engine related config setting ==&lt;br /&gt;
===particleFastPhysics===&lt;br /&gt;
Replaces the cpu intense squareroot calculations for calculating the vectors of target-based particles by less intense but less accurate calculations. 0 uses the slow but accurate and reliable function from the C standard library. Setting it to 1 uses a squareroot approximation function that is much faster while being only slightly less accurate but doesn&#039;t work on some architectures. 2 is an even faster method that shouldn&#039;t have any portability problems but it is very inaccurate.&lt;br /&gt;
&#039;&#039;&#039;Default: 0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===particleMaxCount===&lt;br /&gt;
Maximum number of particles in the game world. When this limit is reached no new particles will be spawned by emitters until some particles disappeared. This limit is only respected by emitters and not when spawning new effects to make sure that they are spawned when the particle limit is maxed out. &lt;br /&gt;
&lt;br /&gt;
When the limit is maxed out the result is a quite unregular output of the particle emitters that looks quite ugly. So this situation should be avoided. The main reason this setting exists is to encourage the particle effect creators to keep the particle output of their emitters on a reasonable level and to keep the game playable in unusual particle-intense situations by accepting a glitchy appearance of the particle effects in this cases. &lt;br /&gt;
&lt;br /&gt;
Please note that a few very large particles can reduce the framerate more than a lot of very small particles.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default: 3000&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===particleEmitterSkip===&lt;br /&gt;
The number of game ticks each emitter is inactive between two particle spawns. Setting this to a higher value keeps the numbers of particles down by reducing the output of the emitters.&lt;br /&gt;
&lt;br /&gt;
This is a more useful way for the user to reduce the particle count than reducing particleMaxCount because it doesn&#039;t change the look of particle effects that much.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default: 0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Putting particle effects on maps==&lt;br /&gt;
An important application of particle effects are map-based effects. For that reason particle effects can be placed on maps in form of map objects. The current version of our map editor Tiled does only support map objects partially. So the best way to place particle effects on maps is by editing the map files with a text editor.&lt;br /&gt;
&lt;br /&gt;
This is done by adding an &amp;lt;objectgroup&amp;gt; tag as a child tag of the &amp;lt;map&amp;gt; tag (when the map has&#039;t got an objectgroup tag yet). Then you add an &amp;lt;object&amp;gt; childtag for each particle effect you want to add to the map. The object tag has 4 properties:&lt;br /&gt;
;type: Must be &amp;quot;PARTICLE_EFFECT&amp;quot;&lt;br /&gt;
;name: The filename of the effect definition file of the effect.&lt;br /&gt;
;x: Distance from the left border of the map in pixels.&lt;br /&gt;
;y: Distance from the upper border of the map in pixels.&lt;br /&gt;
&lt;br /&gt;
As an example here the objectgroup block from the bat cave:&lt;br /&gt;
 &amp;lt;objectgroup name=&amp;quot;Object Group 1&amp;quot; width=&amp;quot;0&amp;quot; height=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;object name=&amp;quot;graphics/particles/flame.particle.xml&amp;quot; type=&amp;quot;PARTICLE_EFFECT&amp;quot; x=&amp;quot;928&amp;quot; y=&amp;quot;960&amp;quot; width=&amp;quot;32&amp;quot; height=&amp;quot;32&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;properties/&amp;gt;&lt;br /&gt;
  &amp;lt;/object&amp;gt;&lt;br /&gt;
  &amp;lt;object name=&amp;quot;graphics/particles/flame.particle.xml&amp;quot; type=&amp;quot;PARTICLE_EFFECT&amp;quot; x=&amp;quot;992&amp;quot; y=&amp;quot;960&amp;quot; width=&amp;quot;32&amp;quot; height=&amp;quot;32&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;properties/&amp;gt;&lt;br /&gt;
  &amp;lt;/object&amp;gt;&lt;br /&gt;
 &amp;lt;/objectgroup&amp;gt;&lt;br /&gt;
Note that this example includes a lot of unnecessary meta-information added by Tiled. The minimal version that can be parsed by the TMW client would be the following:&lt;br /&gt;
 &amp;lt;objectgroup&amp;gt;&lt;br /&gt;
  &amp;lt;object name=&amp;quot;graphics/particles/flame.particle.xml&amp;quot; type=&amp;quot;PARTICLE_EFFECT&amp;quot; x=&amp;quot;928&amp;quot; y=&amp;quot;960&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;object name=&amp;quot;graphics/particles/flame.particle.xml&amp;quot; type=&amp;quot;PARTICLE_EFFECT&amp;quot; x=&amp;quot;992&amp;quot; y=&amp;quot;960&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/objectgroup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Map-based particle effects are initialized when the player enters the map and are also calculated when the effect isn&#039;t on the screen of the player. For that reason you should not put too many effects with a lot of particles on one map. Otherwise you could hit the particleMaxCount limit.&lt;br /&gt;
&lt;br /&gt;
==Using the particle engine for programmers==&lt;br /&gt;
The basic element of the particle engine is a special particle named &amp;quot;particleEngine&amp;quot;. It maintains a tree of particle effects. Each particle has a position in three dimensional space (in this case the two dimensional game world is treated as a flat plane in a three dimensional space). Based on the type of particle it might or might not have:&lt;br /&gt;
* Movement based on physical properties&lt;br /&gt;
* A visual representation (a single image or an animation)&lt;br /&gt;
* A list of emitters that create additional particles.&lt;br /&gt;
&lt;br /&gt;
The Particles are derived class from the &amp;quot;Sprite&amp;quot; class so that they can be added to the maps sprite list to be drawn together with the other sprites by the &amp;quot;map&amp;quot; class. &lt;br /&gt;
&lt;br /&gt;
=== Creation of effects ===&lt;br /&gt;
Effects are created by calling particleEngine-&amp;gt;addEffect(). The arguments are a particle effect definition file, the map coordinates (pixel-based) and the map on which the effect should be created. This creates a host particle that can have any number of emitters. The host particle is returned so it can be manipulated further. It is possible to create multiple host particles in one particle effect file. In that case only the last particle is returned.&lt;br /&gt;
&lt;br /&gt;
=== Effects that follow beings ===&lt;br /&gt;
Beings can gain control of a particle. This happens by calling the controlParticle() member function of the Being class.&lt;br /&gt;
&lt;br /&gt;
The usual method to create a particle that follows a being is by calling particleEngine-&amp;gt;addEffect() and pass the returned particle to controlParticle().&lt;br /&gt;
&lt;br /&gt;
Note that when a Being takes control of a particle it disables the automatic deletion of the particle. The being is now responsible for requesting the deletion of the particle by calling Particle::kill(). When it does the particle will be deleted after its next update.&lt;br /&gt;
&lt;br /&gt;
=== Homing particles ===&lt;br /&gt;
A particle will be attracted by another particle when its acceleration is greater than 0. When a particle is created by an emitter the attracting particle is the host particle of the effect but it can be changed by calling Particle::setDestination(). I would always recommend to use a parent particle of the particle as a target because a segfault will occur when the target particle is deleted.&lt;br /&gt;
&lt;br /&gt;
==Possible Additions==&lt;br /&gt;
&lt;br /&gt;
Below is a list of proposed additions to the Particle System.&lt;br /&gt;
* Delayed effects.  In composite effects, it is often desirable to start a certain effect only after a certian amount of time has passed; for example, we might want to fade in a circle and only then suddenly flash a pentagram in its centre.  This could be accomplished by an `on-death&#039; emitter that is spawned when its parent particle dies.&lt;br /&gt;
* Parents that move their children.  When the parent moves, so do all of its children (cf. `dominates-children&#039;, to be re-named `move-children&#039;, in [http://mantis.themanaworld.org/view.php?id=305 Mantis #305])&lt;br /&gt;
* Random animation entry points/cel choices  Right now, animation cels are looped through sequentially.  For some effects, randomly picking one element each interval, or at least starting out at a random entry, may be preferable.&lt;br /&gt;
* A `master alpha&#039; setting may be useful for some particles (though this might be better served by an appropriate attribute for the animation/image)&lt;br /&gt;
* Orbitting particles need a reference point; right now this is fixed to be the `base&#039; particle.  We need an option to choose the parent, grandparent, ... instead.&lt;br /&gt;
&lt;br /&gt;
==Current problems and limitations==&lt;br /&gt;
[[Image:Particle-engine-problem.png|thumb|250px]]&lt;br /&gt;
&lt;br /&gt;
Crush, I see the particles surrounding the player got across the wall because those tiles aren&#039;t marked as above the player. This happens in every map, I think. The solution would be to put the problematic a level up. This is not a limitation on the engine actually, but something that has to be fixed before committing to trunk. Unless you had something better in mind.&lt;br /&gt;
&lt;br /&gt;
: This can&#039;t be fixed that easily. The particles have to be drawn on the object layer so that they can be sorted with the other objects. Also note that it is usually the desired behavior that objects on the over layer are drawn over particles on the sprite layer. As a workaround i would suggest to use more thorough mapping in the future. That means to fill &amp;quot;empty&amp;quot; areas with black tiles on layer 2 instead of black tiles on the ground layer and to map cliffs that are clearly on the upper layer on layer 2.--[[User:Crush|Crush]] 21:58, 9 February 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
I know. But it&#039;s still a problem. My intention was to bring it to light before the engine is merged to trunk and used extensively. --[[User:Pajarico|Pajarico]] 13:23, 10 February 2007 (CET)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9591</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9591"/>
		<updated>2008-06-08T07:04:32Z</updated>

		<summary type="html">&lt;p&gt;Fate: Updated to reflect v7 of the patch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Status_red}}&lt;br /&gt;
{{Opinions&lt;br /&gt;
|&lt;br /&gt;
{{Pro|Fate}}&lt;br /&gt;
{{Pro|Vink}}&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development&lt;br /&gt;
perspective for tmw.  Consequently, changes to eAthena are subject to&lt;br /&gt;
a short lifespan and little hope of re-use.  As a result, there is no&lt;br /&gt;
discernible feature development for eAthena to extend the player&lt;br /&gt;
experience on this server.  However, some enhancements that would&lt;br /&gt;
benefit the player community (and might thereby serve to attract new&lt;br /&gt;
testers and developers) depend on such extensions; one particular&lt;br /&gt;
prominent example of this is magic. This document proposes a simple&lt;br /&gt;
magic system as an addition to the eAthena system.  The magic system&lt;br /&gt;
satisfies the following requirements: (a) it is easy to implement and&lt;br /&gt;
integrate into eAthena, (b) it can be easily configured and&lt;br /&gt;
fine-tuned, (c) it requires no client-side extensions to function&lt;br /&gt;
properly.  This document presents the system together with fifteen&lt;br /&gt;
spells as well as their intended behaviour and describes the system&lt;br /&gt;
would work in regular gameplay.  The document further sketches a&lt;br /&gt;
prototype of the system.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this&lt;br /&gt;
proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v7 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic&lt;br /&gt;
system requires client support.  Furthermore, if there are bugs in the&lt;br /&gt;
system, the generally low quality of code in eAthena would make&lt;br /&gt;
debugging  a less than pleasant experience.  Since plans on the tmw&lt;br /&gt;
side further expect eAthena to be retired soon, it seems wasteful to&lt;br /&gt;
spend much time on a feature-rich magic system.  As an alternative,&lt;br /&gt;
tmw could adopt a simple magic system that provides the `bare-bones&lt;br /&gt;
magic experience&#039; as quickly as possible before eAthena support is&lt;br /&gt;
retired:  players can cast spells, but will not be required to wait&lt;br /&gt;
for a new client to become available.  As an interface, the existing&lt;br /&gt;
chat system appears to provide sufficient expressive power to&lt;br /&gt;
communicate many interesting spells to the server, while player&lt;br /&gt;
location and heading can affect spell effects more or less subtly.&lt;br /&gt;
While these interface choices are limiting, they (a) do not require&lt;br /&gt;
players to familiarise themselves with a new interface, (b) do not&lt;br /&gt;
require the implementation of `throw-away&#039; interface and protocol&lt;br /&gt;
code, and (c) (as mentioned) are already sufficient for a number of&lt;br /&gt;
interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised,&lt;br /&gt;
specifically the notions of `spell power&#039;, `magic defence&#039;, `magic&lt;br /&gt;
absorption&#039; and `spell requirements&#039;.  The document then discusses a&lt;br /&gt;
number of spells that can be expressed with the proposed interface;&lt;br /&gt;
all of the listed spells are also implemented as part of the&lt;br /&gt;
prototype.  A high-level overview over the implementation of the&lt;br /&gt;
prototype follows, then a description of how `spell requirements&#039; can&lt;br /&gt;
be configured.  The document concludes with a list of possible&lt;br /&gt;
approaches towards improving the visualisation of these spells by&lt;br /&gt;
means of altering the client, and with observations about extensions&lt;br /&gt;
to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by&lt;br /&gt;
means of atomic spells, i.e., magical effects arise by triggering a&lt;br /&gt;
particular effect-- while some spells may interact, there is no&lt;br /&gt;
foundational mechanism that allows players to construct new spells,&lt;br /&gt;
largely because such a mechanism would likely be hard to balance.&lt;br /&gt;
Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived&lt;br /&gt;
attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits&lt;br /&gt;
magic usage by established players without a (second) stat reset,&lt;br /&gt;
while giving sufficiently significant meaning to intelligence to make&lt;br /&gt;
it of some interest.  Intelligence also affects one of the two&lt;br /&gt;
defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to&lt;br /&gt;
subtract each time magical damage is dealt to a character-- this&lt;br /&gt;
derived stat therefore works similarly to vitality.  A third stat,&lt;br /&gt;
`magic defence&#039;, is already present in eAthena and describes (as a&lt;br /&gt;
percentage) how much magical damage is absorbed.  `magic defence&#039; is&lt;br /&gt;
applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Invocation: The spell&#039;s invocation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the invocation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Invocation, level, cost, prerequisites, and (material) components are&lt;br /&gt;
together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether&lt;br /&gt;
or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Invocation: The player must type the invocation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an invocation that matches the invocation of&lt;br /&gt;
a given spell, all of the above are checked.  Only if all requirements&lt;br /&gt;
are met is the spell effect triggered.  In that case, mana points are&lt;br /&gt;
subtracted and material components consumed as mentioned above.  In&lt;br /&gt;
all situations (no matter whether the spell requirements are fully met&lt;br /&gt;
or not) a correct invocation results in part of the spell being&lt;br /&gt;
starred out.  Assume that a given spell has the invocation `foo&#039;.&lt;br /&gt;
Whenever a player types in `foo&#039;, the chat message sent to other&lt;br /&gt;
players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is&lt;br /&gt;
decided individually for each character based on the &#039;&#039;obscure&lt;br /&gt;
factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy&lt;br /&gt;
regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the&lt;br /&gt;
proposed system within the previously described requirements.  Note&lt;br /&gt;
that the spells do not list level, cost, prerequisites or material&lt;br /&gt;
components, as determining these is not part of the implementation of&lt;br /&gt;
the magic system per se, but rather of applying it in practice.&lt;br /&gt;
&lt;br /&gt;
Since it may be desirable to vary spell power in practice, the spells&lt;br /&gt;
do not have predetermined durations, ranges etc.; these should be&lt;br /&gt;
part of spell configuration.  Instead, we list all configuration&lt;br /&gt;
options that would be of interest to the specified spell.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `parameter&#039;: A set of flags that narrow down the exact shroud behaviour&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing&lt;br /&gt;
a thusly shrouded player will not be able to determine the player&#039;s&lt;br /&gt;
name.  The precise behaviour is determined by the flags specified as `parameter&#039;:&lt;br /&gt;
* 1: If set, the player&#039;s name is hidden when (s)he talks&lt;br /&gt;
* 2: If set, the shroud disappears as soon as the player tries to pick up an item&lt;br /&gt;
* 4: If set, the shroud disappears as soon as the player talks (excluding spellcasting)&lt;br /&gt;
For example, setting `parameter&#039; to 6 will make the shroud disappear whenever the player&lt;br /&gt;
tries to pick up an item OR tries to talk.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* affects: all in range, including self, unless they resist (see below)&lt;br /&gt;
* option `power&#039;: Maximum caster experience level that can be revealed&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the&lt;br /&gt;
caster&#039;s spell power is at least as great as the shrouded player&#039;s&lt;br /&gt;
level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell detects all players in the area of effect and lists them to&lt;br /&gt;
the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: all PCs and monsters in range&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
* option `duration&#039;: Effective spell duration (cycles)&lt;br /&gt;
* option `power&#039;: Cycle length in game ticks&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.&lt;br /&gt;
All PCs and monsters are blown in the direction the caster was facing&lt;br /&gt;
at the time the spell was cast.  By walking directly against the wind,&lt;br /&gt;
players are able to overcome this obstacle, but only with considerable&lt;br /&gt;
delay.  A second `wind&#039; spell near the area of the first will result&lt;br /&gt;
in neither spell taking effect.  If one of the spells finishes before&lt;br /&gt;
the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this&lt;br /&gt;
point, particularly for PCs that are being pushed around.  See section&lt;br /&gt;
`Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject, MAGIC_EFFECT_SHIELD_ENDS (111) when finished&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: Number of HP to absorb each time the subject is injured&lt;br /&gt;
This spell absorbs, each time the subject is injured by weapons, some points&lt;br /&gt;
of damage.  The subject is slowed down by an equal percentage.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject, MAGIC_EFFECT_HASTE_ENDS (112) when finished&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: percentage the subject should be sped up by&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion.&lt;br /&gt;
However, the subject becomes highly vulnerable&lt;br /&gt;
during this period:  every time the subject receives physical damage&lt;br /&gt;
that bypasses its armour and defences, the suffered damage is doubled&lt;br /&gt;
for every sixteen points of speedup (tripled for a speedup of 32,&lt;br /&gt;
multiplied by 3.5 for a speedup of 40 etc.)&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects, MAGIC_EFFECT_BARRIER_ENDS (120) when finished&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: the percentage of magical damage absorbed&lt;br /&gt;
During the duration of this spell, magic defence is increased, thereby&lt;br /&gt;
absorbing all damage from offensive spells such as the three previous&lt;br /&gt;
ones, but also from healing magic, curses, and `haste&#039;/`protect&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Flying Backpack ===&lt;br /&gt;
* short name : `flying-backpack&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_FLYING_BACKPACK (23) on subjects, MAGIC_EFFECT_FLYING_BACKPACK_ENDS (123) when finished&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
During the duration of this spell, the subject is not affected by being burdened, i.e., can regenerate normally.&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* affects: all PCs in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `hpcost&#039;: percentage of HP the caster must pay out of his/her own HP&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.&lt;br /&gt;
The caster has to a certain percentage of&lt;br /&gt;
the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate&lt;br /&gt;
fraction; e.g., if a caster with 11/11 HP tries to heal a player with&lt;br /&gt;
20/30 HP and another with 10/110 HP at a cost of 100%, then the second&lt;br /&gt;
player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine&lt;br /&gt;
(-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* affects: one dead PC in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: maximum experience level of the player to be resurrected&lt;br /&gt;
Resurrects a dead player.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* affects: all monsters in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `parameter&#039;: precise spell effect:&lt;br /&gt;
** 0: Attack caster&lt;br /&gt;
** 1: Permanently make agressive&lt;br /&gt;
** 2: Both of the above&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* affects: all monsters in range, unless their level is too high&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: effective spell power (see below).&lt;br /&gt;
All monsters in range may become peaceful, stopping their current&lt;br /&gt;
attacks and no longer auto-attacking (the latter effect is permanent&lt;br /&gt;
for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s modified spell power (i.e.,&lt;br /&gt;
the spell power modified by the configuration option `power&#039;)  is greater&lt;br /&gt;
than or equal to the subject&#039;s monster level; otherwise the spell may or&lt;br /&gt;
may not take effect (whether the spell takes effect is determined&lt;br /&gt;
solely by who the caster is and who the monster is, i.e., re-casting&lt;br /&gt;
the spell will not change the outcome).  The spell will never take&lt;br /&gt;
effect against monsters whose level is more than twice the modified&lt;br /&gt;
spell power.&lt;br /&gt;
&lt;br /&gt;
=== Emote Curse ===&lt;br /&gt;
* short name: `emote-curse&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self or subject standing immediately in front of the caster&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `parameter&#039;: particular smiley to emote&lt;br /&gt;
During the duration of the spell, the subject will constantly emote.  The&lt;br /&gt;
precise emote must be specified as a spell parameter.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: delay until the spell takes effect&lt;br /&gt;
After the duration has expired, the caster is teleported back to the&lt;br /&gt;
location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Teleport ===&lt;br /&gt;
* short name: `teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) when triggered&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
This spell teleports the caster to a pre-defined `teleport anchor&#039;&lt;br /&gt;
(specified in the configuration file) after a short delay.  Each&lt;br /&gt;
anchor may add further requirements (MP, level, prerequisites,&lt;br /&gt;
components) to the spell.&lt;br /&gt;
&lt;br /&gt;
=== Magic Mouth ===&lt;br /&gt;
* short name: `magic-mouth&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), both on the caster and the magic mouth&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: amount of game ticks the magic mouth stays alive&lt;br /&gt;
* option `range&#039;: minimum distance from the next magic mouth&lt;br /&gt;
This spell must be invoked together with a phrase to be spoken by the&lt;br /&gt;
magic mouth.  It will summon a magic mouth NPC that will repeat that&lt;br /&gt;
phrase (tagged with the caster&#039;s name) to everyone who decides to&lt;br /&gt;
listen.  Magic mouths cannot be placed within walls or too close to&lt;br /&gt;
each other.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell really demands a material component.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (if pvp) and monsters standing immediately in front of the caster, or in a nearby square in the direction the caster is facing&lt;br /&gt;
* option `power&#039;: maximum damage the spell will deal&lt;br /&gt;
* option `hpcost&#039;: percentage of damage dealt that the caster must pay from his/her HP&lt;br /&gt;
Deals considerable damage to each monster standing immediately in the&lt;br /&gt;
selected target square (either the square directly in front of the caster or one nearby, in the&lt;br /&gt;
direction the caster is facing).&lt;br /&gt;
The caster loses an appropriate amount of hitpoints and may die.&lt;br /&gt;
If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather&lt;br /&gt;
great effect by a pair of sorcerers.  One possible way to combat such&lt;br /&gt;
abuse would be to require expensive material components for either;&lt;br /&gt;
another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot&lt;br /&gt;
resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* affects: all PCs (if in pvp) and monsters in range&lt;br /&gt;
* option `duration&#039;: number of attack waves&lt;br /&gt;
* option `power&#039;: maximum damage to deal; this is divided by the range of each wave&lt;br /&gt;
* option `range&#039;: range of each wave&lt;br /&gt;
* option `hpcost&#039;: percentage of damage the caster must pay from his/her own HP&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.&lt;br /&gt;
Monsters/pvp players nearby may be hit multiple times, once&lt;br /&gt;
for each round.  The caster must pay a certain amount of the damage&lt;br /&gt;
dealt.  If dealing this damage would kill the&lt;br /&gt;
caster, the damage is reduced proportionally (as per the `heal&#039;&lt;br /&gt;
spell).  If the caster gets very close to dying, his/her hair will&lt;br /&gt;
turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (even outside of pvp!) and monsters in range&lt;br /&gt;
* option `range&#039;: effecive spell range&lt;br /&gt;
* option `power&#039;: percentage chance of success per subject&lt;br /&gt;
The health of all player characters and monsters in the specified area&lt;br /&gt;
of effect is set to one (modified by magic defence, as usual).  The success chance for the&lt;br /&gt;
caster (who does not get magic defence) is 100%, but for any other creature is as determined by&lt;br /&gt;
the option `power&#039;.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player&lt;br /&gt;
outside of a pvp zone.  It is possible to abuse this spell to aid&lt;br /&gt;
monsters in killing other players.  Furthermore this spell may deal a&lt;br /&gt;
significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Create Item ===&lt;br /&gt;
* short name: `create-item&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `power&#039;: number of items to create&lt;br /&gt;
* option `parameter&#039;: item ID of the item to create&lt;br /&gt;
Creates an appropriate number of the indicated items.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; In practice, this spell must have material components that&lt;br /&gt;
are at least as valuable as the created item to avoid potential&lt;br /&gt;
economical issues.&lt;br /&gt;
&lt;br /&gt;
=== Summon ===&lt;br /&gt;
* short name: `summon&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_SUMMON_PREPARE (21) at the target location, MAGIC_EFFECT_SUMMON_EXECUTE (22) at the target location after the spell delay&lt;br /&gt;
* affects: world&lt;br /&gt;
* option `power&#039;: time until the summoned creatures disappear again&lt;br /&gt;
* option `range&#039;: number of creatures to summon&lt;br /&gt;
* option `duration&#039;: delay between casting and appearance of the summoned creatures&lt;br /&gt;
* option `hpcost&#039;: hp cost to pay for the summons (absolute value)&lt;br /&gt;
* optoin `parameter&#039;: monster ID to summon&lt;br /&gt;
This spell summons a number of creatures and makes them attack nearby enemies.  If the caster attacks one of the creatures, that creature (and that creature alone) turns into an enemy and attacks the caster as a normal monster would.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler&lt;br /&gt;
messaging mechanism in eAthena.  It processes all chat messages and&lt;br /&gt;
tests whether they are identical to a given indication, then&lt;br /&gt;
implementing the spell protocol as listed above.  For each spell, the&lt;br /&gt;
chat handler instructs the chat system that the spell was not spam,&lt;br /&gt;
thereby allowing quick re-casting without automatic banning.  To allow&lt;br /&gt;
easy fine-tuning of spells, all spell requirements are read from a&lt;br /&gt;
configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
three kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell invocation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper invocation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the invocation.&lt;br /&gt;
* teleport-anchor &amp;quot;&amp;lt;name&amp;gt;&amp;quot; = &amp;quot;&amp;lt;mapname&amp;gt;&amp;quot;, &amp;lt;int&amp;gt;, &amp;lt;int&amp;gt;&lt;br /&gt;
This sets up a teleport destination at the specified map and the&lt;br /&gt;
specified x and y co-ordinates.  Teleport anchors may further be&lt;br /&gt;
restricted by spell requirements that are added on top of the&lt;br /&gt;
requirements&lt;br /&gt;
already enforced for the teleport spell itself.  Such options are&lt;br /&gt;
listed as for a spell (see below).&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell with the specified invocation; e.g.,&lt;br /&gt;
`spell &amp;quot;xyzzy&amp;quot; = &amp;quot;teleport&amp;quot;&#039; will bind the invocation &amp;quot;xyzzy&amp;quot; to the&lt;br /&gt;
&amp;quot;teleport&amp;quot; spell.   In this vein, spells may be bound with multiple&lt;br /&gt;
names (and different options).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number; overrides the default.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** prerequisites = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Prerequisite items (specified as item IDs) to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Material components (specified as item IDs) to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
** parameter = &amp;lt;int&amp;gt; (a spell-dependent parameter)&lt;br /&gt;
** master = &amp;lt;lmap&amp;gt; (master spell power modifier; applied before all other spell properties are applied.  Defaults to the identify function.)&lt;br /&gt;
** power = &amp;lt;lmap&amp;gt; (Modified spell power.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** range = &amp;lt;lmap&amp;gt; (Effective spell range.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** duration = &amp;lt;lmap&amp;gt; (Effective spell duration.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** hpcost = &amp;lt;lmap&amp;gt; (HP cost percentage.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;lmap&amp;gt; is a (bounded) linear map.  Its syntax follows the grammar below:&lt;br /&gt;
&lt;br /&gt;
  LMAP ::= PREBOUND &#039;{&#039; BODY &#039;}&#039; POSTBOUND&lt;br /&gt;
  PREBOUND ::= /* empty */ | &amp;lt;int&amp;gt; &#039;&amp;lt;=&#039;&lt;br /&gt;
  POSTBOUND ::= /* empty */ | &#039;&amp;lt;=&#039; &amp;lt;int&amp;gt;&lt;br /&gt;
  BODY ::= &amp;lt;int&amp;gt; &#039;+&#039; &amp;lt;float&amp;gt; &#039;*&#039; &#039;x&#039;&lt;br /&gt;
&lt;br /&gt;
Here are some examples of ranges, with implied semantics:&lt;br /&gt;
* { 0 + 2 * x }      # doubles the value&lt;br /&gt;
* { 1000 + 1 * x }   # Increments the value by one&lt;br /&gt;
* { 1000 + -2 * x }  # perfectly valid&lt;br /&gt;
* 0 &amp;lt;= { 0 + 1 * x } # The result is clipped at zero: no negatives&lt;br /&gt;
* { 0 + 1 * x } &amp;lt;= 9 # Result is clipped at 9: no greater values&lt;br /&gt;
&lt;br /&gt;
Please note that in the&lt;br /&gt;
current implementation most default values, particularly those&lt;br /&gt;
for `mana&#039; and `level&#039;, are inadequate and must be adjusted before&lt;br /&gt;
practical adoption.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point,&lt;br /&gt;
it could use some improvement.  The implementation sends different&lt;br /&gt;
level-up like signals to the client, which the existing client&lt;br /&gt;
interprets as `job level up&#039; signals.  A refined client could map&lt;br /&gt;
these numbers to more appropriate particle effects.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=305 Mantis entry with&lt;br /&gt;
corresponding client-side improvements].  This would be accomplished&lt;br /&gt;
by adding a new configuration file-- `being-effects.xml&#039; in the&lt;br /&gt;
prototype-- that has structure such as the following:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;being-effects&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;0&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/levelup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;1&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/skillup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;2&amp;quot; audio=&amp;quot;sfx/foo.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;default particle=&amp;quot;graphics/particles/default.xml&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/being-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file maps server-side effect IDs to client-side sound effects and&lt;br /&gt;
particle effects.  The first two entries (ids 0 and 1) replicate the&lt;br /&gt;
existing effects.  The third entry maps effect ID 2 to the sound&lt;br /&gt;
effect &amp;quot;sfx/foo.ogg&amp;quot;.  The fourth and final entry is a default rule,&lt;br /&gt;
indicating that all unidentified effects should not generate sound,&lt;br /&gt;
but produce the particle effect &amp;quot;graphics/particles/default.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy&lt;br /&gt;
to integrate with the existing infrastructure but offers players&lt;br /&gt;
additional, `magical&#039; operations.  While not all of the spells&lt;br /&gt;
presented herein are balanced in and by themselves, they can be&lt;br /&gt;
balanced by adding appropriate material component requirements.  This&lt;br /&gt;
in turn creates new opportunities for money sinks and player-driven&lt;br /&gt;
markets.  Finally, the use of invocations as part of the spellcasting&lt;br /&gt;
process allows spells to be guarded and/or propagated by social means&lt;br /&gt;
rather than by developer-driven quests; depending on how the&lt;br /&gt;
invocations are seeded, this may have interesting effects on existing&lt;br /&gt;
and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated&lt;br /&gt;
at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can&lt;br /&gt;
be effectively disabled.  In this fashion, spells can be gradually&lt;br /&gt;
added after they have survived testing.  Similarly, that have been&lt;br /&gt;
found exploitable or broken can be disabled quickly, while spells that&lt;br /&gt;
have become more widely known than anticipated can be re-hidden by&lt;br /&gt;
changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Thanks go out to Vink, who suggested several spells, peavey, who&lt;br /&gt;
reviewed the patch and suggested making spell effects more easily&lt;br /&gt;
configurable, and to Sanga, who provided numerous bug and experience&lt;br /&gt;
reports, as well as several suggestions for improving spell usage.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises * &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9426</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9426"/>
		<updated>2008-05-28T17:02:14Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Status_red}}&lt;br /&gt;
{{Opinions&lt;br /&gt;
|&lt;br /&gt;
{{Pro|Fate}}&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development&lt;br /&gt;
perspective for tmw.  Consequently, changes to eAthena are subject to&lt;br /&gt;
a short lifespan and little hope of re-use.  As a result, there is no&lt;br /&gt;
discernible feature development for eAthena to extend the player&lt;br /&gt;
experience on this server.  However, some enhancements that would&lt;br /&gt;
benefit the player community (and might thereby serve to attract new&lt;br /&gt;
testers and developers) depend on such extensions; one particular&lt;br /&gt;
prominent example of this is magic. This document proposes a simple&lt;br /&gt;
magic system as an addition to the eAthena system.  The magic system&lt;br /&gt;
satisfies the following requirements: (a) it is easy to implement and&lt;br /&gt;
integrate into eAthena, (b) it can be easily configured and&lt;br /&gt;
fine-tuned, (c) it requires no client-side extensions to function&lt;br /&gt;
properly.  This document presents the system together with fifteen&lt;br /&gt;
spells as well as their intended behaviour and describes the system&lt;br /&gt;
would work in regular gameplay.  The document further sketches a&lt;br /&gt;
prototype of the system.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this&lt;br /&gt;
proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v6 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic&lt;br /&gt;
system requires client support.  Furthermore, if there are bugs in the&lt;br /&gt;
system, the generally low quality of code in eAthena would make&lt;br /&gt;
debugging  a less than pleasant experience.  Since plans on the tmw&lt;br /&gt;
side further expect eAthena to be retired soon, it seems wasteful to&lt;br /&gt;
spend much time on a feature-rich magic system.  As an alternative,&lt;br /&gt;
tmw could adopt a simple magic system that provides the `bare-bones&lt;br /&gt;
magic experience&#039; as quickly as possible before eAthena support is&lt;br /&gt;
retired:  players can cast spells, but will not be required to wait&lt;br /&gt;
for a new client to become available.  As an interface, the existing&lt;br /&gt;
chat system appears to provide sufficient expressive power to&lt;br /&gt;
communicate many interesting spells to the server, while player&lt;br /&gt;
location and heading can affect spell effects more or less subtly.&lt;br /&gt;
While these interface choices are limiting, they (a) do not require&lt;br /&gt;
players to familiarise themselves with a new interface, (b) do not&lt;br /&gt;
require the implementation of `throw-away&#039; interface and protocol&lt;br /&gt;
code, and (c) (as mentioned) are already sufficient for a number of&lt;br /&gt;
interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised,&lt;br /&gt;
specifically the notions of `spell power&#039;, `magic defence&#039;, `magic&lt;br /&gt;
absorption&#039; and `spell requirements&#039;.  The document then discusses a&lt;br /&gt;
number of spells that can be expressed with the proposed interface;&lt;br /&gt;
all of the listed spells are also implemented as part of the&lt;br /&gt;
prototype.  A high-level overview over the implementation of the&lt;br /&gt;
prototype follows, then a description of how `spell requirements&#039; can&lt;br /&gt;
be configured.  The document concludes with a list of possible&lt;br /&gt;
approaches towards improving the visualisation of these spells by&lt;br /&gt;
means of altering the client, and with observations about extensions&lt;br /&gt;
to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by&lt;br /&gt;
means of atomic spells, i.e., magical effects arise by triggering a&lt;br /&gt;
particular effect-- while some spells may interact, there is no&lt;br /&gt;
foundational mechanism that allows players to construct new spells,&lt;br /&gt;
largely because such a mechanism would likely be hard to balance.&lt;br /&gt;
Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived&lt;br /&gt;
attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits&lt;br /&gt;
magic usage by established players without a (second) stat reset,&lt;br /&gt;
while giving sufficiently significant meaning to intelligence to make&lt;br /&gt;
it of some interest.  Intelligence also affects one of the two&lt;br /&gt;
defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to&lt;br /&gt;
subtract each time magical damage is dealt to a character-- this&lt;br /&gt;
derived stat therefore works similarly to vitality.  A third stat,&lt;br /&gt;
`magic defence&#039;, is already present in eAthena and describes (as a&lt;br /&gt;
percentage) how much magical damage is absorbed.  `magic defence&#039; is&lt;br /&gt;
applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Invocation: The spell&#039;s invocation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the invocation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Invocation, level, cost, prerequisites, and (material) components are&lt;br /&gt;
together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether&lt;br /&gt;
or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Invocation: The player must type the invocation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an invocation that matches the invocation of&lt;br /&gt;
a given spell, all of the above are checked.  Only if all requirements&lt;br /&gt;
are met is the spell effect triggered.  In that case, mana points are&lt;br /&gt;
subtracted and material components consumed as mentioned above.  In&lt;br /&gt;
all situations (no matter whether the spell requirements are fully met&lt;br /&gt;
or not) a correct invocation results in part of the spell being&lt;br /&gt;
starred out.  Assume that a given spell has the invocation `foo&#039;.&lt;br /&gt;
Whenever a player types in `foo&#039;, the chat message sent to other&lt;br /&gt;
players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is&lt;br /&gt;
decided individually for each character based on the &#039;&#039;obscure&lt;br /&gt;
factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy&lt;br /&gt;
regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the&lt;br /&gt;
proposed system within the previously described requirements.  Note&lt;br /&gt;
that the spells do not list level, cost, prerequisites or material&lt;br /&gt;
components, as determining these is not part of the implementation of&lt;br /&gt;
the magic system per se, but rather of applying it in practice.&lt;br /&gt;
&lt;br /&gt;
Since it may be desirable to vary spell power in practice, the spells&lt;br /&gt;
do not have predetermined durations, ranges etc.; these should be&lt;br /&gt;
part of spell configuration.  Instead, we list all configuration&lt;br /&gt;
options that would be of interest to the specified spell.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing&lt;br /&gt;
a thusly shrouded player will not be able to determine the player&#039;s&lt;br /&gt;
name; furthermore, any chat messages sent by the player will be&lt;br /&gt;
anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* affects: all in range, including self, unless they resist (see below)&lt;br /&gt;
* option `power&#039;: Maximum caster experience level that can be revealed&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the&lt;br /&gt;
caster&#039;s spell power is at least as great as the shrouded player&#039;s&lt;br /&gt;
level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell detects all players in the area of effect and lists them to&lt;br /&gt;
the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: all PCs and monsters in range&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
* option `duration&#039;: Effective spell duration (cycles)&lt;br /&gt;
* option `power&#039;: Cycle length in game ticks&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.&lt;br /&gt;
All PCs and monsters are blown in the direction the caster was facing&lt;br /&gt;
at the time the spell was cast.  By walking directly against the wind,&lt;br /&gt;
players are able to overcome this obstacle, but only with considerable&lt;br /&gt;
delay.  A second `wind&#039; spell near the area of the first will result&lt;br /&gt;
in neither spell taking effect.  If one of the spells finishes before&lt;br /&gt;
the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this&lt;br /&gt;
point, particularly for PCs that are being pushed around.  See section&lt;br /&gt;
`Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: Number of HP to absorb each time the subject is injured&lt;br /&gt;
This spell absorbs, each time the subject is injured by weapons, some points&lt;br /&gt;
of damage.  The subject is slowed down by an equal percentage.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: percentage the subject should be sped up by&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion.&lt;br /&gt;
However, the subject becomes highly vulnerable&lt;br /&gt;
during this period:  every time the subject receives physical damage&lt;br /&gt;
that bypasses its armour and defences, the suffered damage is doubled&lt;br /&gt;
for every sixteen points of speedup (tripled for a speedup of 32,&lt;br /&gt;
multiplied by 3.5 for a speedup of 40 etc.)&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as&lt;br /&gt;
per the default eAthena implementation of `barrier&#039;), thereby&lt;br /&gt;
absorbing all damage from offensive spells such as the three previous&lt;br /&gt;
ones, but also from healing magic, curses, and `haste&#039;/`protect&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* affects: all PCs in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `hpcost&#039;: percentage of HP the caster must pay out of his/her own HP&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.&lt;br /&gt;
The caster has to a certain percentage of&lt;br /&gt;
the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate&lt;br /&gt;
fraction; e.g., if a caster with 11/11 HP tries to heal a player with&lt;br /&gt;
20/30 HP and another with 10/110 HP at a cost of 100%, then the second&lt;br /&gt;
player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine&lt;br /&gt;
(-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* affects: one dead PC in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: maximum experience level of the player to be resurrected&lt;br /&gt;
Resurrects a dead player.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* affects: all monsters in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* affects: all monsters in range, unless their level is too high&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: effective spell power (see below).&lt;br /&gt;
All monsters in range may become peaceful, stopping their current&lt;br /&gt;
attacks and no longer auto-attacking (the latter effect is permanent&lt;br /&gt;
for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s modified spell power (i.e.,&lt;br /&gt;
the spell power modified by the configuration option `power&#039;)  is greater&lt;br /&gt;
than or equal to the subject&#039;s monster level; otherwise the spell may or&lt;br /&gt;
may not take effect (whether the spell takes effect is determined&lt;br /&gt;
solely by who the caster is and who the monster is, i.e., re-casting&lt;br /&gt;
the spell will not change the outcome).  The spell will never take&lt;br /&gt;
effect against monsters whose level is more than twice the modified&lt;br /&gt;
spell power.&lt;br /&gt;
&lt;br /&gt;
=== Emote Curse ===&lt;br /&gt;
* short name: `emote-curse&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self or subject standing immediately in front of the caster&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `parameter&#039;: particular smiley to emote&lt;br /&gt;
During the duration of the spell, the subject will constantly emote.  The&lt;br /&gt;
precise emote must be specified as a spell parameter.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: delay until the spell takes effect&lt;br /&gt;
After the duration has expired, the caster is teleported back to the&lt;br /&gt;
location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Teleport ===&lt;br /&gt;
* short name: `teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) when triggered&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
This spell teleports the caster to a pre-defined `teleport anchor&#039;&lt;br /&gt;
(specified in the configuration file) after a short delay.  Each&lt;br /&gt;
anchor may add further requirements (MP, level, prerequisites,&lt;br /&gt;
components) to the spell.&lt;br /&gt;
&lt;br /&gt;
=== Magic Mouth ===&lt;br /&gt;
* short name: `magic-mouth&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), both on the caster and the magic mouth&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: amount of game ticks the magic mouth stays alive&lt;br /&gt;
* option `range&#039;: minimum distance from the next magic mouth&lt;br /&gt;
This spell must be invoked together with a phrase to be spoken by the&lt;br /&gt;
magic mouth.  It will summon a magic mouth NPC that will repeat that&lt;br /&gt;
phrase (tagged with the caster&#039;s name) to everyone who decides to&lt;br /&gt;
listen.  Magic mouths cannot be placed within walls or too close to&lt;br /&gt;
each other.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell really demands a material component.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (if pvp) and monsters standing immediately in front of the caster, or in a nearby square in the direction the caster is facing&lt;br /&gt;
* option `power&#039;: maximum damage the spell will deal&lt;br /&gt;
* option `hpcost&#039;: percentage of damage dealt that the caster must pay from his/her HP&lt;br /&gt;
Deals considerable damage to each monster standing immediately in the&lt;br /&gt;
selected target square (either the square directly in front of the caster or one nearby, in the&lt;br /&gt;
direction the caster is facing).&lt;br /&gt;
The caster loses an appropriate amount of hitpoints and may die.&lt;br /&gt;
If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather&lt;br /&gt;
great effect by a pair of sorcerers.  One possible way to combat such&lt;br /&gt;
abuse would be to require expensive material components for either;&lt;br /&gt;
another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot&lt;br /&gt;
resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* affects: all PCs (if in pvp) and monsters in range&lt;br /&gt;
* option `duration&#039;: number of attack waves&lt;br /&gt;
* option `power&#039;: maximum damage to deal; this is divided by the range of each wave&lt;br /&gt;
* option `range&#039;: range of each wave&lt;br /&gt;
* option `hpcost&#039;: percentage of damage the caster must pay from his/her own HP&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.&lt;br /&gt;
Monsters/pvp players nearby may be hit multiple times, once&lt;br /&gt;
for each round.  The caster must pay a certain amount of the damage&lt;br /&gt;
dealt.  If dealing this damage would kill the&lt;br /&gt;
caster, the damage is reduced proportionally (as per the `heal&#039;&lt;br /&gt;
spell).  If the caster gets very close to dying, his/her hair will&lt;br /&gt;
turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (even outside of pvp!) and monsters in range&lt;br /&gt;
* option `range&#039;: effecive spell range&lt;br /&gt;
The health of all player characters and monsters in the specified area&lt;br /&gt;
of effect is set to one (modified by magic defence, as usual).&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player&lt;br /&gt;
outside of a pvp zone.  It is possible to abuse this spell to aid&lt;br /&gt;
monsters in killing other players.  Furthermore this spell may deal a&lt;br /&gt;
significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Create Item ===&lt;br /&gt;
* short name: `create-item&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `power&#039;: number of items to create&lt;br /&gt;
* option `parameter&#039;: item ID of the item to create&lt;br /&gt;
Creates an appropriate number of the indicated items.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; In practice, this spell must have material components that&lt;br /&gt;
are at least as valuable as the created item to avoid potential&lt;br /&gt;
economical issues.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler&lt;br /&gt;
messaging mechanism in eAthena.  It processes all chat messages and&lt;br /&gt;
tests whether they are identical to a given indication, then&lt;br /&gt;
implementing the spell protocol as listed above.  For each spell, the&lt;br /&gt;
chat handler instructs the chat system that the spell was not spam,&lt;br /&gt;
thereby allowing quick re-casting without automatic banning.  To allow&lt;br /&gt;
easy fine-tuning of spells, all spell requirements are read from a&lt;br /&gt;
configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
three kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell invocation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper invocation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the invocation.&lt;br /&gt;
* teleport-anchor &amp;quot;&amp;lt;name&amp;gt;&amp;quot; = &amp;quot;&amp;lt;mapname&amp;gt;&amp;quot;, &amp;lt;int&amp;gt;, &amp;lt;int&amp;gt;&lt;br /&gt;
This sets up a teleport destination at the specified map and the&lt;br /&gt;
specified x and y co-ordinates.  Teleport anchors may further be&lt;br /&gt;
restricted by spell requirements that are added on top of the&lt;br /&gt;
requirements&lt;br /&gt;
already enforced for the teleport spell itself.  Such options are&lt;br /&gt;
listed as for a spell (see below).&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell with the specified invocation; e.g.,&lt;br /&gt;
`spell &amp;quot;xyzzy&amp;quot; = &amp;quot;teleport&amp;quot;&#039; will bind the invocation &amp;quot;xyzzy&amp;quot; to the&lt;br /&gt;
&amp;quot;teleport&amp;quot; spell.   In this vein, spells may be bound with multiple&lt;br /&gt;
names (and different options).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number; overrides the default.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** prerequisites = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Prerequisite items (specified as item IDs) to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Material components (specified as item IDs) to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
** parameter = &amp;lt;int&amp;gt; (a spell-dependent parameter)&lt;br /&gt;
** master = &amp;lt;lmap&amp;gt; (master spell power modifier; applied before all other spell properties are applied.  Defaults to the identify function.)&lt;br /&gt;
** power = &amp;lt;lmap&amp;gt; (Modified spell power.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** range = &amp;lt;lmap&amp;gt; (Effective spell range.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** duration = &amp;lt;lmap&amp;gt; (Effective spell duration.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** hpcost = &amp;lt;lmap&amp;gt; (HP cost percentage.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;lmap&amp;gt; is a (bounded) linear map.  Its syntax follows the grammar below:&lt;br /&gt;
&lt;br /&gt;
  LMAP ::= PREBOUND &#039;{&#039; BODY &#039;}&#039; POSTBOUND&lt;br /&gt;
  PREBOUND ::= /* empty */ | &amp;lt;int&amp;gt; &#039;&amp;lt;=&#039;&lt;br /&gt;
  POSTBOUND ::= /* empty */ | &#039;&amp;lt;=&#039; &amp;lt;int&amp;gt;&lt;br /&gt;
  BODY ::= &amp;lt;int&amp;gt; &#039;+&#039; &amp;lt;float&amp;gt; &#039;*&#039; &#039;x&#039;&lt;br /&gt;
&lt;br /&gt;
Here are some examples of ranges, with implied semantics:&lt;br /&gt;
* { 0 + 2 * x }      # doubles the value&lt;br /&gt;
* { 1000 + 1 * x }   # Increments the value by one&lt;br /&gt;
* { 1000 + -2 * x }  # perfectly valid&lt;br /&gt;
* 0 &amp;lt;= { 0 + 1 * x } # The result is clipped at zero: no negatives&lt;br /&gt;
* { 0 + 1 * x } &amp;lt;= 9 # Result is clipped at 9: no greater values&lt;br /&gt;
&lt;br /&gt;
Please note that in the&lt;br /&gt;
current implementation most default values, particularly those&lt;br /&gt;
for `mana&#039; and `level&#039;, are inadequate and must be adjusted before&lt;br /&gt;
practical adoption.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point,&lt;br /&gt;
it could use some improvement.  The implementation sends different&lt;br /&gt;
level-up like signals to the client, which the existing client&lt;br /&gt;
interprets as `job level up&#039; signals.  A refined client could map&lt;br /&gt;
these numbers to more appropriate particle effects.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=305 Mantis entry with&lt;br /&gt;
corresponding client-side improvements].  This would be accomplished&lt;br /&gt;
by adding a new configuration file-- `being-effects.xml&#039; in the&lt;br /&gt;
prototype-- that has structure such as the following:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;being-effects&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;0&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/levelup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;1&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/skillup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;2&amp;quot; audio=&amp;quot;sfx/foo.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;default particle=&amp;quot;graphics/particles/default.xml&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/being-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file maps server-side effect IDs to client-side sound effects and&lt;br /&gt;
particle effects.  The first two entries (ids 0 and 1) replicate the&lt;br /&gt;
existing effects.  The third entry maps effect ID 2 to the sound&lt;br /&gt;
effect &amp;quot;sfx/foo.ogg&amp;quot;.  The fourth and final entry is a default rule,&lt;br /&gt;
indicating that all unidentified effects should not generate sound,&lt;br /&gt;
but produce the particle effect &amp;quot;graphics/particles/default.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy&lt;br /&gt;
to integrate with the existing infrastructure but offers players&lt;br /&gt;
additional, `magical&#039; operations.  While not all of the spells&lt;br /&gt;
presented herein are balanced in and by themselves, they can be&lt;br /&gt;
balanced by adding appropriate material component requirements.  This&lt;br /&gt;
in turn creates new opportunities for money sinks and player-driven&lt;br /&gt;
markets.  Finally, the use of invocations as part of the spellcasting&lt;br /&gt;
process allows spells to be guarded and/or propagated by social means&lt;br /&gt;
rather than by developer-driven quests; depending on how the&lt;br /&gt;
invocations are seeded, this may have interesting effects on existing&lt;br /&gt;
and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated&lt;br /&gt;
at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can&lt;br /&gt;
be effectively disabled.  In this fashion, spells can be gradually&lt;br /&gt;
added after they have survived testing.  Similarly, that have been&lt;br /&gt;
found exploitable or broken can be disabled quickly, while spells that&lt;br /&gt;
have become more widely known than anticipated can be re-hidden by&lt;br /&gt;
changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Thanks go out to Vink, who suggested several spells, peavey, who&lt;br /&gt;
reviewed the patch and suggested making spell effects more easily&lt;br /&gt;
configurable, and to Sanga, who provided numerous bug and experience&lt;br /&gt;
reports, as well as several suggestions for improving spell usage.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises * &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9425</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9425"/>
		<updated>2008-05-28T16:56:41Z</updated>

		<summary type="html">&lt;p&gt;Fate: Explicitly tagged the article as a proposal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Status_red}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development&lt;br /&gt;
perspective for tmw.  Consequently, changes to eAthena are subject to&lt;br /&gt;
a short lifespan and little hope of re-use.  As a result, there is no&lt;br /&gt;
discernible feature development for eAthena to extend the player&lt;br /&gt;
experience on this server.  However, some enhancements that would&lt;br /&gt;
benefit the player community (and might thereby serve to attract new&lt;br /&gt;
testers and developers) depend on such extensions; one particular&lt;br /&gt;
prominent example of this is magic. This document proposes a simple&lt;br /&gt;
magic system as an addition to the eAthena system.  The magic system&lt;br /&gt;
satisfies the following requirements: (a) it is easy to implement and&lt;br /&gt;
integrate into eAthena, (b) it can be easily configured and&lt;br /&gt;
fine-tuned, (c) it requires no client-side extensions to function&lt;br /&gt;
properly.  This document presents the system together with fifteen&lt;br /&gt;
spells as well as their intended behaviour and describes the system&lt;br /&gt;
would work in regular gameplay.  The document further sketches a&lt;br /&gt;
prototype of the system.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this&lt;br /&gt;
proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v6 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic&lt;br /&gt;
system requires client support.  Furthermore, if there are bugs in the&lt;br /&gt;
system, the generally low quality of code in eAthena would make&lt;br /&gt;
debugging  a less than pleasant experience.  Since plans on the tmw&lt;br /&gt;
side further expect eAthena to be retired soon, it seems wasteful to&lt;br /&gt;
spend much time on a feature-rich magic system.  As an alternative,&lt;br /&gt;
tmw could adopt a simple magic system that provides the `bare-bones&lt;br /&gt;
magic experience&#039; as quickly as possible before eAthena support is&lt;br /&gt;
retired:  players can cast spells, but will not be required to wait&lt;br /&gt;
for a new client to become available.  As an interface, the existing&lt;br /&gt;
chat system appears to provide sufficient expressive power to&lt;br /&gt;
communicate many interesting spells to the server, while player&lt;br /&gt;
location and heading can affect spell effects more or less subtly.&lt;br /&gt;
While these interface choices are limiting, they (a) do not require&lt;br /&gt;
players to familiarise themselves with a new interface, (b) do not&lt;br /&gt;
require the implementation of `throw-away&#039; interface and protocol&lt;br /&gt;
code, and (c) (as mentioned) are already sufficient for a number of&lt;br /&gt;
interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised,&lt;br /&gt;
specifically the notions of `spell power&#039;, `magic defence&#039;, `magic&lt;br /&gt;
absorption&#039; and `spell requirements&#039;.  The document then discusses a&lt;br /&gt;
number of spells that can be expressed with the proposed interface;&lt;br /&gt;
all of the listed spells are also implemented as part of the&lt;br /&gt;
prototype.  A high-level overview over the implementation of the&lt;br /&gt;
prototype follows, then a description of how `spell requirements&#039; can&lt;br /&gt;
be configured.  The document concludes with a list of possible&lt;br /&gt;
approaches towards improving the visualisation of these spells by&lt;br /&gt;
means of altering the client, and with observations about extensions&lt;br /&gt;
to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by&lt;br /&gt;
means of atomic spells, i.e., magical effects arise by triggering a&lt;br /&gt;
particular effect-- while some spells may interact, there is no&lt;br /&gt;
foundational mechanism that allows players to construct new spells,&lt;br /&gt;
largely because such a mechanism would likely be hard to balance.&lt;br /&gt;
Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived&lt;br /&gt;
attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits&lt;br /&gt;
magic usage by established players without a (second) stat reset,&lt;br /&gt;
while giving sufficiently significant meaning to intelligence to make&lt;br /&gt;
it of some interest.  Intelligence also affects one of the two&lt;br /&gt;
defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to&lt;br /&gt;
subtract each time magical damage is dealt to a character-- this&lt;br /&gt;
derived stat therefore works similarly to vitality.  A third stat,&lt;br /&gt;
`magic defence&#039;, is already present in eAthena and describes (as a&lt;br /&gt;
percentage) how much magical damage is absorbed.  `magic defence&#039; is&lt;br /&gt;
applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Invocation: The spell&#039;s invocation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the invocation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Invocation, level, cost, prerequisites, and (material) components are&lt;br /&gt;
together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether&lt;br /&gt;
or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Invocation: The player must type the invocation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an invocation that matches the invocation of&lt;br /&gt;
a given spell, all of the above are checked.  Only if all requirements&lt;br /&gt;
are met is the spell effect triggered.  In that case, mana points are&lt;br /&gt;
subtracted and material components consumed as mentioned above.  In&lt;br /&gt;
all situations (no matter whether the spell requirements are fully met&lt;br /&gt;
or not) a correct invocation results in part of the spell being&lt;br /&gt;
starred out.  Assume that a given spell has the invocation `foo&#039;.&lt;br /&gt;
Whenever a player types in `foo&#039;, the chat message sent to other&lt;br /&gt;
players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is&lt;br /&gt;
decided individually for each character based on the &#039;&#039;obscure&lt;br /&gt;
factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy&lt;br /&gt;
regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the&lt;br /&gt;
proposed system within the previously described requirements.  Note&lt;br /&gt;
that the spells do not list level, cost, prerequisites or material&lt;br /&gt;
components, as determining these is not part of the implementation of&lt;br /&gt;
the magic system per se, but rather of applying it in practice.&lt;br /&gt;
&lt;br /&gt;
Since it may be desirable to vary spell power in practice, the spells&lt;br /&gt;
do not have predetermined durations, ranges etc.; these should be&lt;br /&gt;
part of spell configuration.  Instead, we list all configuration&lt;br /&gt;
options that would be of interest to the specified spell.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing&lt;br /&gt;
a thusly shrouded player will not be able to determine the player&#039;s&lt;br /&gt;
name; furthermore, any chat messages sent by the player will be&lt;br /&gt;
anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* affects: all in range, including self, unless they resist (see below)&lt;br /&gt;
* option `power&#039;: Maximum caster experience level that can be revealed&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the&lt;br /&gt;
caster&#039;s spell power is at least as great as the shrouded player&#039;s&lt;br /&gt;
level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell detects all players in the area of effect and lists them to&lt;br /&gt;
the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: all PCs and monsters in range&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
* option `duration&#039;: Effective spell duration (cycles)&lt;br /&gt;
* option `power&#039;: Cycle length in game ticks&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.&lt;br /&gt;
All PCs and monsters are blown in the direction the caster was facing&lt;br /&gt;
at the time the spell was cast.  By walking directly against the wind,&lt;br /&gt;
players are able to overcome this obstacle, but only with considerable&lt;br /&gt;
delay.  A second `wind&#039; spell near the area of the first will result&lt;br /&gt;
in neither spell taking effect.  If one of the spells finishes before&lt;br /&gt;
the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this&lt;br /&gt;
point, particularly for PCs that are being pushed around.  See section&lt;br /&gt;
`Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: Number of HP to absorb each time the subject is injured&lt;br /&gt;
This spell absorbs, each time the subject is injured by weapons, some points&lt;br /&gt;
of damage.  The subject is slowed down by an equal percentage.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: percentage the subject should be sped up by&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion.&lt;br /&gt;
However, the subject becomes highly vulnerable&lt;br /&gt;
during this period:  every time the subject receives physical damage&lt;br /&gt;
that bypasses its armour and defences, the suffered damage is doubled&lt;br /&gt;
for every sixteen points of speedup (tripled for a speedup of 32,&lt;br /&gt;
multiplied by 3.5 for a speedup of 40 etc.)&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as&lt;br /&gt;
per the default eAthena implementation of `barrier&#039;), thereby&lt;br /&gt;
absorbing all damage from offensive spells such as the three previous&lt;br /&gt;
ones, but also from healing magic, curses, and `haste&#039;/`protect&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* affects: all PCs in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `hpcost&#039;: percentage of HP the caster must pay out of his/her own HP&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.&lt;br /&gt;
The caster has to a certain percentage of&lt;br /&gt;
the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate&lt;br /&gt;
fraction; e.g., if a caster with 11/11 HP tries to heal a player with&lt;br /&gt;
20/30 HP and another with 10/110 HP at a cost of 100%, then the second&lt;br /&gt;
player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine&lt;br /&gt;
(-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* affects: one dead PC in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: maximum experience level of the player to be resurrected&lt;br /&gt;
Resurrects a dead player.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* affects: all monsters in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* affects: all monsters in range, unless their level is too high&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: effective spell power (see below).&lt;br /&gt;
All monsters in range may become peaceful, stopping their current&lt;br /&gt;
attacks and no longer auto-attacking (the latter effect is permanent&lt;br /&gt;
for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s modified spell power (i.e.,&lt;br /&gt;
the spell power modified by the configuration option `power&#039;)  is greater&lt;br /&gt;
than or equal to the subject&#039;s monster level; otherwise the spell may or&lt;br /&gt;
may not take effect (whether the spell takes effect is determined&lt;br /&gt;
solely by who the caster is and who the monster is, i.e., re-casting&lt;br /&gt;
the spell will not change the outcome).  The spell will never take&lt;br /&gt;
effect against monsters whose level is more than twice the modified&lt;br /&gt;
spell power.&lt;br /&gt;
&lt;br /&gt;
=== Emote Curse ===&lt;br /&gt;
* short name: `emote-curse&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self or subject standing immediately in front of the caster&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `parameter&#039;: particular smiley to emote&lt;br /&gt;
During the duration of the spell, the subject will constantly emote.  The&lt;br /&gt;
precise emote must be specified as a spell parameter.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: delay until the spell takes effect&lt;br /&gt;
After the duration has expired, the caster is teleported back to the&lt;br /&gt;
location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Teleport ===&lt;br /&gt;
* short name: `teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) when triggered&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
This spell teleports the caster to a pre-defined `teleport anchor&#039;&lt;br /&gt;
(specified in the configuration file) after a short delay.  Each&lt;br /&gt;
anchor may add further requirements (MP, level, prerequisites,&lt;br /&gt;
components) to the spell.&lt;br /&gt;
&lt;br /&gt;
=== Magic Mouth ===&lt;br /&gt;
* short name: `magic-mouth&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), both on the caster and the magic mouth&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: amount of game ticks the magic mouth stays alive&lt;br /&gt;
* option `range&#039;: minimum distance from the next magic mouth&lt;br /&gt;
This spell must be invoked together with a phrase to be spoken by the&lt;br /&gt;
magic mouth.  It will summon a magic mouth NPC that will repeat that&lt;br /&gt;
phrase (tagged with the caster&#039;s name) to everyone who decides to&lt;br /&gt;
listen.  Magic mouths cannot be placed within walls or too close to&lt;br /&gt;
each other.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell really demands a material component.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (if pvp) and monsters standing immediately in front of the caster, or in a nearby square in the direction the caster is facing&lt;br /&gt;
* option `power&#039;: maximum damage the spell will deal&lt;br /&gt;
* option `hpcost&#039;: percentage of damage dealt that the caster must pay from his/her HP&lt;br /&gt;
Deals considerable damage to each monster standing immediately in the&lt;br /&gt;
selected target square (either the square directly in front of the caster or one nearby, in the&lt;br /&gt;
direction the caster is facing).&lt;br /&gt;
The caster loses an appropriate amount of hitpoints and may die.&lt;br /&gt;
If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather&lt;br /&gt;
great effect by a pair of sorcerers.  One possible way to combat such&lt;br /&gt;
abuse would be to require expensive material components for either;&lt;br /&gt;
another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot&lt;br /&gt;
resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* affects: all PCs (if in pvp) and monsters in range&lt;br /&gt;
* option `duration&#039;: number of attack waves&lt;br /&gt;
* option `power&#039;: maximum damage to deal; this is divided by the range of each wave&lt;br /&gt;
* option `range&#039;: range of each wave&lt;br /&gt;
* option `hpcost&#039;: percentage of damage the caster must pay from his/her own HP&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.&lt;br /&gt;
Monsters/pvp players nearby may be hit multiple times, once&lt;br /&gt;
for each round.  The caster must pay a certain amount of the damage&lt;br /&gt;
dealt.  If dealing this damage would kill the&lt;br /&gt;
caster, the damage is reduced proportionally (as per the `heal&#039;&lt;br /&gt;
spell).  If the caster gets very close to dying, his/her hair will&lt;br /&gt;
turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (even outside of pvp!) and monsters in range&lt;br /&gt;
* option `range&#039;: effecive spell range&lt;br /&gt;
The health of all player characters and monsters in the specified area&lt;br /&gt;
of effect is set to one (modified by magic defence, as usual).&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player&lt;br /&gt;
outside of a pvp zone.  It is possible to abuse this spell to aid&lt;br /&gt;
monsters in killing other players.  Furthermore this spell may deal a&lt;br /&gt;
significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Create Item ===&lt;br /&gt;
* short name: `create-item&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `power&#039;: number of items to create&lt;br /&gt;
* option `parameter&#039;: item ID of the item to create&lt;br /&gt;
Creates an appropriate number of the indicated items.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; In practice, this spell must have material components that&lt;br /&gt;
are at least as valuable as the created item to avoid potential&lt;br /&gt;
economical issues.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler&lt;br /&gt;
messaging mechanism in eAthena.  It processes all chat messages and&lt;br /&gt;
tests whether they are identical to a given indication, then&lt;br /&gt;
implementing the spell protocol as listed above.  For each spell, the&lt;br /&gt;
chat handler instructs the chat system that the spell was not spam,&lt;br /&gt;
thereby allowing quick re-casting without automatic banning.  To allow&lt;br /&gt;
easy fine-tuning of spells, all spell requirements are read from a&lt;br /&gt;
configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
three kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell invocation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper invocation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the invocation.&lt;br /&gt;
* teleport-anchor &amp;quot;&amp;lt;name&amp;gt;&amp;quot; = &amp;quot;&amp;lt;mapname&amp;gt;&amp;quot;, &amp;lt;int&amp;gt;, &amp;lt;int&amp;gt;&lt;br /&gt;
This sets up a teleport destination at the specified map and the&lt;br /&gt;
specified x and y co-ordinates.  Teleport anchors may further be&lt;br /&gt;
restricted by spell requirements that are added on top of the&lt;br /&gt;
requirements&lt;br /&gt;
already enforced for the teleport spell itself.  Such options are&lt;br /&gt;
listed as for a spell (see below).&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell with the specified invocation; e.g.,&lt;br /&gt;
`spell &amp;quot;xyzzy&amp;quot; = &amp;quot;teleport&amp;quot;&#039; will bind the invocation &amp;quot;xyzzy&amp;quot; to the&lt;br /&gt;
&amp;quot;teleport&amp;quot; spell.   In this vein, spells may be bound with multiple&lt;br /&gt;
names (and different options).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number; overrides the default.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** prerequisites = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Prerequisite items (specified as item IDs) to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Material components (specified as item IDs) to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
** parameter = &amp;lt;int&amp;gt; (a spell-dependent parameter)&lt;br /&gt;
** master = &amp;lt;lmap&amp;gt; (master spell power modifier; applied before all other spell properties are applied.  Defaults to the identify function.)&lt;br /&gt;
** power = &amp;lt;lmap&amp;gt; (Modified spell power.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** range = &amp;lt;lmap&amp;gt; (Effective spell range.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** duration = &amp;lt;lmap&amp;gt; (Effective spell duration.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** hpcost = &amp;lt;lmap&amp;gt; (HP cost percentage.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;lmap&amp;gt; is a (bounded) linear map.  Its syntax follows the grammar below:&lt;br /&gt;
&lt;br /&gt;
  LMAP ::= PREBOUND &#039;{&#039; BODY &#039;}&#039; POSTBOUND&lt;br /&gt;
  PREBOUND ::= /* empty */ | &amp;lt;int&amp;gt; &#039;&amp;lt;=&#039;&lt;br /&gt;
  POSTBOUND ::= /* empty */ | &#039;&amp;lt;=&#039; &amp;lt;int&amp;gt;&lt;br /&gt;
  BODY ::= &amp;lt;int&amp;gt; &#039;+&#039; &amp;lt;float&amp;gt; &#039;*&#039; &#039;x&#039;&lt;br /&gt;
&lt;br /&gt;
Here are some examples of ranges, with implied semantics:&lt;br /&gt;
* { 0 + 2 * x }      # doubles the value&lt;br /&gt;
* { 1000 + 1 * x }   # Increments the value by one&lt;br /&gt;
* { 1000 + -2 * x }  # perfectly valid&lt;br /&gt;
* 0 &amp;lt;= { 0 + 1 * x } # The result is clipped at zero: no negatives&lt;br /&gt;
* { 0 + 1 * x } &amp;lt;= 9 # Result is clipped at 9: no greater values&lt;br /&gt;
&lt;br /&gt;
Please note that in the&lt;br /&gt;
current implementation most default values, particularly those&lt;br /&gt;
for `mana&#039; and `level&#039;, are inadequate and must be adjusted before&lt;br /&gt;
practical adoption.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point,&lt;br /&gt;
it could use some improvement.  The implementation sends different&lt;br /&gt;
level-up like signals to the client, which the existing client&lt;br /&gt;
interprets as `job level up&#039; signals.  A refined client could map&lt;br /&gt;
these numbers to more appropriate particle effects.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=305 Mantis entry with&lt;br /&gt;
corresponding client-side improvements].  This would be accomplished&lt;br /&gt;
by adding a new configuration file-- `being-effects.xml&#039; in the&lt;br /&gt;
prototype-- that has structure such as the following:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;being-effects&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;0&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/levelup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;1&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/skillup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;2&amp;quot; audio=&amp;quot;sfx/foo.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;default particle=&amp;quot;graphics/particles/default.xml&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/being-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file maps server-side effect IDs to client-side sound effects and&lt;br /&gt;
particle effects.  The first two entries (ids 0 and 1) replicate the&lt;br /&gt;
existing effects.  The third entry maps effect ID 2 to the sound&lt;br /&gt;
effect &amp;quot;sfx/foo.ogg&amp;quot;.  The fourth and final entry is a default rule,&lt;br /&gt;
indicating that all unidentified effects should not generate sound,&lt;br /&gt;
but produce the particle effect &amp;quot;graphics/particles/default.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy&lt;br /&gt;
to integrate with the existing infrastructure but offers players&lt;br /&gt;
additional, `magical&#039; operations.  While not all of the spells&lt;br /&gt;
presented herein are balanced in and by themselves, they can be&lt;br /&gt;
balanced by adding appropriate material component requirements.  This&lt;br /&gt;
in turn creates new opportunities for money sinks and player-driven&lt;br /&gt;
markets.  Finally, the use of invocations as part of the spellcasting&lt;br /&gt;
process allows spells to be guarded and/or propagated by social means&lt;br /&gt;
rather than by developer-driven quests; depending on how the&lt;br /&gt;
invocations are seeded, this may have interesting effects on existing&lt;br /&gt;
and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated&lt;br /&gt;
at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can&lt;br /&gt;
be effectively disabled.  In this fashion, spells can be gradually&lt;br /&gt;
added after they have survived testing.  Similarly, that have been&lt;br /&gt;
found exploitable or broken can be disabled quickly, while spells that&lt;br /&gt;
have become more widely known than anticipated can be re-hidden by&lt;br /&gt;
changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Thanks go out to Vink, who suggested several spells, peavey, who&lt;br /&gt;
reviewed the patch and suggested making spell effects more easily&lt;br /&gt;
configurable, and to Sanga, who provided numerous bug and experience&lt;br /&gt;
reports, as well as several suggestions for improving spell usage.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises * &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive_talk:Simple_eathena_magic_system&amp;diff=9399</id>
		<title>Archive talk:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive_talk:Simple_eathena_magic_system&amp;diff=9399"/>
		<updated>2008-05-22T15:43:17Z</updated>

		<summary type="html">&lt;p&gt;Fate: Clarified some points&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==My opinion about the spells==&lt;br /&gt;
by [[User:Crush|Crush]]&lt;br /&gt;
===OK===&lt;br /&gt;
;Detect Players: Might be useful and I see no abuse potential.&lt;br /&gt;
;Barrier: Considering that monsters have no magical attacks and I shot down any effects which harm players outside PvP I don&#039;t see the use of this spell besides PvP but there it might be useful.&lt;br /&gt;
;Heal: TMW definitely needs more teamplay, so this spell gets my OK.&lt;br /&gt;
;Life: Should have an expensive material ingredient and it shouldn&#039;t be possible to cast it on oneself but when these conditions are statisfied I say OK for the sake of teamplay.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Agreed.  As far as I can tell, it is impossible to cast spells while dead.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Aggravate: I don&#039;t see any benefit in this but also not much abuse potential.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;This can actually be beneficial in team play; I have been in several situations in which I would have found this spell useful.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Peace: Should have an unbuyable material component to avoid overuse, but otherwise OK in my opinion.&lt;br /&gt;
;Emote Curse: Sounds funny and I don&#039;t really consider it harmful to the &amp;quot;victim&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Needs to be changed===&lt;br /&gt;
;Protect: Needs some expensive ingredient and we have to be careful not to make it over- or underpowered in any level ranges. Thus the effect should depend on the target. The slowdown effect should be removed because it might be used to harass people.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;I added the slowdown to balance this spell.  If you require an expensive ingredient anyway, I don&#039;t see much abuse potential-- being a bit slower but well-protected is only a minor annoyance in my experience.&#039;&#039; --[[User:Fate|Fate]]&lt;br /&gt;
&lt;br /&gt;
;Haste: The positive effect seems OK to me because we already got an item with that effect. But the negative effect should be removed because it can be used to harass people.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Again, the negative effect was added to balance the spell.  I believe that the abuse potential is small, though-- add an expensive material component, and people will think twice about abusing this for short-term harassment.  Yes, you can kill someone with it indirectly (unlike `protect&#039;), but it&#039;s a cumbersome and unreliable way to kill, and (as noted) quite possibly an expensive one.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Some more on `haste&#039; and `protect&#039;: The problem with not having negative effects to balance these spells is that players who don&#039;t cast them are effectively penalised. (If you add an expensive material component and use that as the sole balancing point, you penalise poor players, which is even worse).  I would like to avoid a situation in which you have to go through a ritual to make yourself `as effective as possible&#039; before entering a dungeon.  Yes, players already do that to some extent-- very few of the more experienced players wear their plate mail all day long-- but that&#039;s because they choose to, not because the game mechanics penalise them if they don&#039;t.  If you consider the harassment potential to be too great, I would prefer that the spells are disabled entirely.&#039;&#039; --[[User:Fate|Fate]] 17:43, 22 May 2008 (CEST)&lt;br /&gt;
&lt;br /&gt;
===Definitely NO===&lt;br /&gt;
;Shroud: Makes it easy to break server rules without any chance of prove in form of a screenshot. Even when there are spells to counter this effect you can not assume that everyone knows these and is able to use them at that moment.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;I haven&#039;t been abused in either side of an abuse complaint, so I&#039;m not sure how/whether these are reacted to at all.  What kind of rules are you thinking of there?  Otherwise, how about you set the minimum level to 80?  That seems to be the group of people who might actually benefit from this spell, and small enough a group to identify abusers in some situations.  Finally, I can give you a patch that will log all messages sent (and timestamps) with users, so you can track down abusers trivially.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Reveal: Unnecessary without shroud.&lt;br /&gt;
&lt;br /&gt;
;Teleport: I fail to see the use of this spell when there is no way for the user to control the destination.&lt;br /&gt;
:&#039;&#039;The user can control the destination.  You cast this spell as (using the default config as an example) `vasrelpor tulimshar&#039; and are teleported to Tulimshar.  However, the set of destinations is limited to those defined in the configuration file, and each destination may impose additional requirements.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Death&#039;s Door: Impossible to balance and negative effect on other players is a big no-no.&lt;br /&gt;
:&#039;&#039;This is the one spell I am most sceptical about myself.  The negative effect on other players is mostly intended to harm party members; if it is added, it should be short-range, very high-level, and very expensive.  Note that this hurts the caster as much-- if not more-- than anyone else.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
===Indifferent===&lt;br /&gt;
;Wind: The technical realization seems very difficult to me. I haven&#039;t seen it in action yet, so I would make my judgement on this spell after I experienced it in action.&lt;br /&gt;
:&#039;&#039;It looks a little jerky, since movement is achieved by `teleporting&#039; one square at a time-- but there&#039;s nothing to be done about that without client changes.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Delayed Teleport: I don&#039;t really see the benefit of this spell, but I am afraid it might break elaborated scripted sequences which rely on the player staying in a specific area (think: teleporter puzzle). We currently don&#039;t have any such sequences and it is unsure if we will ever have some. But it might restrict further quest development.&lt;br /&gt;
:&#039;&#039;I don&#039;t see this being an issue on eathena.  If it becomes one, we can add anti-teleport zones.  The benefit for this one is quite small, admittedly, but there are a few scenarios in which it helps (peeking into a possibly lethal dungeon to check whether the snakes are waiting for you, luring dropstealers into traps etc.).&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Magic Mouth: Might be interesting for announcemets. But has to be designed carefully to avoid it becomming a nuisance. How it is implemented? As an NPC? Or does it dispatch chat messages automatically?&#039;&lt;br /&gt;
:&#039;&#039;This is implemented as an NPC, so it doesn&#039;t bother players who don&#039;t click on it.  I would still recommend an expensive material component.  Finally, each message is tagged with the name of the caster (even when the caster is under `shroud&#039;), making it easy to detect verbal abuse.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Kill: Please add the exact formulas so that it is possible to judge if it is balanced or not.&lt;br /&gt;
:&#039;&#039;The precise formulas are fully configurable, as long as the functions are bounded linear maps.  The setup in the sample config file is `power = {0 + 13 * x}&#039; and `hpcost = 20 &amp;lt;= {80 + -0.333 * x}&#039;. --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Dragon Slave: Please add the exact formulas so that it is possible to judge if it is balanced or not.&lt;br /&gt;
:&#039;&#039;Again, the precise formlulas are fully configurable.  The default configuration includes one very unbalanced setup (to illustrate how the same spell can be used with different setups/invocations) and also the following, which I consider to be more sensible:  `range = {2 + 2 * x}&#039;, `duration = {0 + 0.033 * x}&#039;, `power = {0 + 10 * x}&#039;, `hpcost = 20 &amp;lt;= {50 + -0.2 * x}&#039;. --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Create Item: Without a material component this spell would be a real gamebreaker. With a material component it would be rather a &amp;quot;transmute item&amp;quot; spell. If it is fair or not depends on the components. How about converting raw logs into stacks of arrows?&lt;br /&gt;
:&#039;&#039;Without material components this could break the economy; it seems that we both largely see this as a `quasi-crafting&#039; hook.  I like your particular suggestion, by the way-- the two scenarios I had been considering were (a) spell component preparation and (b) spellcasters as craftsmen, possibly even for new items.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive_talk:Simple_eathena_magic_system&amp;diff=9398</id>
		<title>Archive talk:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive_talk:Simple_eathena_magic_system&amp;diff=9398"/>
		<updated>2008-05-22T00:23:32Z</updated>

		<summary type="html">&lt;p&gt;Fate: /* My opinion about the spells */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==My opinion about the spells==&lt;br /&gt;
by [[User:Crush|Crush]]&lt;br /&gt;
===OK===&lt;br /&gt;
;Detect Players: Might be useful and I see no abuse potential.&lt;br /&gt;
;Barrier: Considering that monsters have no magical attacks and I shot down any effects which harm players outside PvP I don&#039;t see the use of this spell besides PvP but there it might be useful.&lt;br /&gt;
;Heal: TMW definitely needs more teamplay, so this spell gets my OK.&lt;br /&gt;
;Life: Should have an expensive material ingredient and it shouldn&#039;t be possible to cast it on oneself but when these conditions are statisfied I say OK for the sake of teamplay.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Agreed.  As far as I can tell, it is impossible to cast spells while dead.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Aggravate: I don&#039;t see any benefit in this but also not much abuse potential.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;This can actually be beneficial in team play; I have been in several situations in which I would have found this spell useful.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Peace: Should have an unbuyable material component to avoid overuse, but otherwise OK in my opinion.&lt;br /&gt;
;Emote Curse: Sounds funny and I don&#039;t really consider it harmful to the &amp;quot;victim&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Needs to be changed===&lt;br /&gt;
;Protect: Needs some expensive ingredient and we have to be careful not to make it over- or underpowered in any level ranges. Thus the effect should depend on the target. The slowdown effect should be removed because it might be used to harass people.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;I added the slowdown to balance this spell.  If you require an expensive ingredient anyway, I don&#039;t see much abuse potential-- being a bit slower but well-protected is only a minor annoyance in my experience.&#039;&#039; --[[User:Fate|Fate]]&lt;br /&gt;
&lt;br /&gt;
;Haste: The positive effect seems OK to me because we already got an item with that effect. But the negative effect should be removed because it can be used to harass people.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Again, the negative effect was added to balance the spell.  I believe that the abuse potential is small, though-- add an expensive material component, and people will think twice about abusing this for short-term harrassment.  Yes, you can kill someone with it indirectly (unlike `protect&#039;), but it&#039;s a cumbersome and unreliable way to kill, and (as noted) quite possibly an expensive one.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
===Definitely NO===&lt;br /&gt;
;Shroud: Makes it easy to break server rules without any chance of prove in form of a screenshot. Even when there are spells to counter this effect you can not assume that everyone knows these and is able to use them at that moment.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;I haven&#039;t been abused in either side of an abuse complaint, so I&#039;m not sure how/whether these are reacted to at all.  What kind of rules are you thinking of there?  Otherwise, how about you set the minimum level to 80?  That seems to be the group of people who might actually benefit from this spell, and small enough a group to identify abusers in some situations.  Finally, I can give you a patch that will log all messages sent (and timestamps) with users, so you can track down abusers trivially.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Reveal: Unnecessary without shroud.&lt;br /&gt;
&lt;br /&gt;
;Teleport: I fail to see the use of this spell when there is no way for the user to control the destination.&lt;br /&gt;
:&#039;&#039;The user can control the destination.  You cast this spell as (using the default config as an example) `vasrelpor tulimshar&#039; and are teleported to Tulimshar.  However, the set of destinations is limited to those defined in the configuration file, and each destination may impose additional requirements.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Death&#039;s Door: Impossible to balance and negative effect on other players is a big no-no.&lt;br /&gt;
:&#039;&#039;This is the one spell I am most sceptical about myself.  The negative effect on other players is mostly intended to harm party members; if it is added, it should be short-range, very high-level, and very expensive.  Note that this hurts the caster as much-- if not more-- than anyone else.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
===Indifferent===&lt;br /&gt;
;Wind: The technical realization seems very difficult to me. I haven&#039;t seen it in action yet, so I would make my judgement on this spell after I experienced it in action.&lt;br /&gt;
:&#039;&#039;It looks a little jerky, since movement is achieved by `teleporting&#039; one square at a time-- but there&#039;s nothing to be done about that without client changes.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Delayed Teleport: I don&#039;t really see the benefit of this spell, but I am afraid it might break elaborated scripted sequences which rely on the player staying in a specific area (think: teleporter puzzle). We currently don&#039;t have any such sequences and it is unsure if we will ever have some. But it might restrict further quest development.&lt;br /&gt;
:&#039;&#039;I don&#039;t see this being an issue on eathena.  If it becomes one, we can add anti-teleport zones.  The benefit for this one is quite small, admittedly, but there are a few scenarios in which it helps.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Magic Mouth: Might be interesting for announcemets. But has to be designed carefully to avoid it becomming a nuisance. How it is implemented? As an NPC? Or does it dispatch chat messages automatically?&#039;&lt;br /&gt;
:&#039;&#039;This is implemented as an NPC, so it doesn&#039;t bother players who don&#039;t click on it.  I would still recommend an expensive material component.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Kill: Please add the exact formulas so that it is possible to judge if it is balanced or not.&lt;br /&gt;
:&#039;&#039;The precise formulas are fully configurable, as long as the functions are bounded linear maps.  The setup in the sample config file is `power = {0 + 13 * x}&#039; and `hpcost = 20 &amp;lt;= {80 + -0.333 * x}&#039;. --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Dragon Slave: Please add the exact formulas so that it is possible to judge if it is balanced or not.&lt;br /&gt;
:&#039;&#039;Again, the precise formlulas are fully configurable.  The default configuration includes one very unbalanced setup (to illustrate how the same spell can be used with different setups/invocations) and also the following, which I consider to be more sensible:  `range = {2 + 2 * x}&#039;, `duration = {0 + 0.033 * x}&#039;, `power = {0 + 10 * x}&#039;, `hpcost = 20 &amp;lt;= {50 + -0.2 * x}&#039;. --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Create Item: Without a material component this spell would be a real gamebreaker. With a material component it would be rather a &amp;quot;transmute item&amp;quot; spell. If it is fair or not depends on the components. How about converting raw logs into stacks of arrows?&lt;br /&gt;
:&#039;&#039;Without material components this could break the economy; it seems that we both largely see this as a `quasi-crafting&#039; hook. I like your particular suggestion, by the way-- the two scenarios I had been considering were (a) spell component preparation and (b) spellcasters as craftsmen, possibly even for new items.&#039;&#039; --[[User:Fate|Fate]] 00:23, 22 May 2008 (UTC)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9396</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9396"/>
		<updated>2008-05-21T21:33:11Z</updated>

		<summary type="html">&lt;p&gt;Fate: Minor formatting edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development&lt;br /&gt;
perspective for tmw.  Consequently, changes to eAthena are subject to&lt;br /&gt;
a short lifespan and little hope of re-use.  As a result, there is no&lt;br /&gt;
discernible feature development for eAthena to extend the player&lt;br /&gt;
experience on this server.  However, some enhancements that would&lt;br /&gt;
benefit the player community (and might thereby serve to attract new&lt;br /&gt;
testers and developers) depend on such extensions; one particular&lt;br /&gt;
prominent example of this is magic. This document proposes a simple&lt;br /&gt;
magic system as an addition to the eAthena system.  The magic system&lt;br /&gt;
satisfies the following requirements: (a) it is easy to implement and&lt;br /&gt;
integrate into eAthena, (b) it can be easily configured and&lt;br /&gt;
fine-tuned, (c) it requires no client-side extensions to function&lt;br /&gt;
properly.  This document presents the system together with fifteen&lt;br /&gt;
spells as well as their intended behaviour and describes the system&lt;br /&gt;
would work in regular gameplay.  The document further sketches a&lt;br /&gt;
prototype of the system.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this&lt;br /&gt;
proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v6 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic&lt;br /&gt;
system requires client support.  Furthermore, if there are bugs in the&lt;br /&gt;
system, the generally low quality of code in eAthena would make&lt;br /&gt;
debugging  a less than pleasant experience.  Since plans on the tmw&lt;br /&gt;
side further expect eAthena to be retired soon, it seems wasteful to&lt;br /&gt;
spend much time on a feature-rich magic system.  As an alternative,&lt;br /&gt;
tmw could adopt a simple magic system that provides the `bare-bones&lt;br /&gt;
magic experience&#039; as quickly as possible before eAthena support is&lt;br /&gt;
retired:  players can cast spells, but will not be required to wait&lt;br /&gt;
for a new client to become available.  As an interface, the existing&lt;br /&gt;
chat system appears to provide sufficient expressive power to&lt;br /&gt;
communicate many interesting spells to the server, while player&lt;br /&gt;
location and heading can affect spell effects more or less subtly.&lt;br /&gt;
While these interface choices are limiting, they (a) do not require&lt;br /&gt;
players to familiarise themselves with a new interface, (b) do not&lt;br /&gt;
require the implementation of `throw-away&#039; interface and protocol&lt;br /&gt;
code, and (c) (as mentioned) are already sufficient for a number of&lt;br /&gt;
interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised,&lt;br /&gt;
specifically the notions of `spell power&#039;, `magic defence&#039;, `magic&lt;br /&gt;
absorption&#039; and `spell requirements&#039;.  The document then discusses a&lt;br /&gt;
number of spells that can be expressed with the proposed interface;&lt;br /&gt;
all of the listed spells are also implemented as part of the&lt;br /&gt;
prototype.  A high-level overview over the implementation of the&lt;br /&gt;
prototype follows, then a description of how `spell requirements&#039; can&lt;br /&gt;
be configured.  The document concludes with a list of possible&lt;br /&gt;
approaches towards improving the visualisation of these spells by&lt;br /&gt;
means of altering the client, and with observations about extensions&lt;br /&gt;
to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by&lt;br /&gt;
means of atomic spells, i.e., magical effects arise by triggering a&lt;br /&gt;
particular effect-- while some spells may interact, there is no&lt;br /&gt;
foundational mechanism that allows players to construct new spells,&lt;br /&gt;
largely because such a mechanism would likely be hard to balance.&lt;br /&gt;
Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived&lt;br /&gt;
attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits&lt;br /&gt;
magic usage by established players without a (second) stat reset,&lt;br /&gt;
while giving sufficiently significant meaning to intelligence to make&lt;br /&gt;
it of some interest.  Intelligence also affects one of the two&lt;br /&gt;
defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to&lt;br /&gt;
subtract each time magical damage is dealt to a character-- this&lt;br /&gt;
derived stat therefore works similarly to vitality.  A third stat,&lt;br /&gt;
`magic defence&#039;, is already present in eAthena and describes (as a&lt;br /&gt;
percentage) how much magical damage is absorbed.  `magic defence&#039; is&lt;br /&gt;
applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Invocation: The spell&#039;s invocation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the invocation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Invocation, level, cost, prerequisites, and (material) components are&lt;br /&gt;
together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether&lt;br /&gt;
or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Invocation: The player must type the invocation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an invocation that matches the invocation of&lt;br /&gt;
a given spell, all of the above are checked.  Only if all requirements&lt;br /&gt;
are met is the spell effect triggered.  In that case, mana points are&lt;br /&gt;
subtracted and material components consumed as mentioned above.  In&lt;br /&gt;
all situations (no matter whether the spell requirements are fully met&lt;br /&gt;
or not) a correct invocation results in part of the spell being&lt;br /&gt;
starred out.  Assume that a given spell has the invocation `foo&#039;.&lt;br /&gt;
Whenever a player types in `foo&#039;, the chat message sent to other&lt;br /&gt;
players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is&lt;br /&gt;
decided individually for each character based on the &#039;&#039;obscure&lt;br /&gt;
factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy&lt;br /&gt;
regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the&lt;br /&gt;
proposed system within the previously described requirements.  Note&lt;br /&gt;
that the spells do not list level, cost, prerequisites or material&lt;br /&gt;
components, as determining these is not part of the implementation of&lt;br /&gt;
the magic system per se, but rather of applying it in practice.&lt;br /&gt;
&lt;br /&gt;
Since it may be desirable to vary spell power in practice, the spells&lt;br /&gt;
do not have predetermined durations, ranges etc.; these should be&lt;br /&gt;
part of spell configuration.  Instead, we list all configuration&lt;br /&gt;
options that would be of interest to the specified spell.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing&lt;br /&gt;
a thusly shrouded player will not be able to determine the player&#039;s&lt;br /&gt;
name; furthermore, any chat messages sent by the player will be&lt;br /&gt;
anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* affects: all in range, including self, unless they resist (see below)&lt;br /&gt;
* option `power&#039;: Maximum caster experience level that can be revealed&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the&lt;br /&gt;
caster&#039;s spell power is at least as great as the shrouded player&#039;s&lt;br /&gt;
level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell detects all players in the area of effect and lists them to&lt;br /&gt;
the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: all PCs and monsters in range&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
* option `duration&#039;: Effective spell duration (cycles)&lt;br /&gt;
* option `power&#039;: Cycle length in game ticks&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.&lt;br /&gt;
All PCs and monsters are blown in the direction the caster was facing&lt;br /&gt;
at the time the spell was cast.  By walking directly against the wind,&lt;br /&gt;
players are able to overcome this obstacle, but only with considerable&lt;br /&gt;
delay.  A second `wind&#039; spell near the area of the first will result&lt;br /&gt;
in neither spell taking effect.  If one of the spells finishes before&lt;br /&gt;
the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this&lt;br /&gt;
point, particularly for PCs that are being pushed around.  See section&lt;br /&gt;
`Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: Number of HP to absorb each time the subject is injured&lt;br /&gt;
This spell absorbs, each time the subject is injured by weapons, some points&lt;br /&gt;
of damage.  The subject is slowed down by an equal percentage.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: percentage the subject should be sped up by&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion.&lt;br /&gt;
However, the subject becomes highly vulnerable&lt;br /&gt;
during this period:  every time the subject receives physical damage&lt;br /&gt;
that bypasses its armour and defences, the suffered damage is doubled&lt;br /&gt;
for every sixteen points of speedup (tripled for a speedup of 32,&lt;br /&gt;
multiplied by 3.5 for a speedup of 40 etc.)&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as&lt;br /&gt;
per the default eAthena implementation of `barrier&#039;), thereby&lt;br /&gt;
absorbing all damage from offensive spells such as the three previous&lt;br /&gt;
ones, but also from healing magic, curses, and `haste&#039;/`protect&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* affects: all PCs in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `hpcost&#039;: percentage of HP the caster must pay out of his/her own HP&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.&lt;br /&gt;
The caster has to a certain percentage of&lt;br /&gt;
the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate&lt;br /&gt;
fraction; e.g., if a caster with 11/11 HP tries to heal a player with&lt;br /&gt;
20/30 HP and another with 10/110 HP at a cost of 100%, then the second&lt;br /&gt;
player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine&lt;br /&gt;
(-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* affects: one dead PC in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: maximum experience level of the player to be resurrected&lt;br /&gt;
Resurrects a dead player.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* affects: all monsters in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* affects: all monsters in range, unless their level is too high&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: effective spell power (see below).&lt;br /&gt;
All monsters in range may become peaceful, stopping their current&lt;br /&gt;
attacks and no longer auto-attacking (the latter effect is permanent&lt;br /&gt;
for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s modified spell power (i.e.,&lt;br /&gt;
the spell power modified by the configuration option `power&#039;)  is greater&lt;br /&gt;
than or equal to the subject&#039;s monster level; otherwise the spell may or&lt;br /&gt;
may not take effect (whether the spell takes effect is determined&lt;br /&gt;
solely by who the caster is and who the monster is, i.e., re-casting&lt;br /&gt;
the spell will not change the outcome).  The spell will never take&lt;br /&gt;
effect against monsters whose level is more than twice the modified&lt;br /&gt;
spell power.&lt;br /&gt;
&lt;br /&gt;
=== Emote Curse ===&lt;br /&gt;
* short name: `emote-curse&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self or subject standing immediately in front of the caster&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `parameter&#039;: particular smiley to emote&lt;br /&gt;
During the duration of the spell, the subject will constantly emote.  The&lt;br /&gt;
precise emote must be specified as a spell parameter.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: delay until the spell takes effect&lt;br /&gt;
After the duration has expired, the caster is teleported back to the&lt;br /&gt;
location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Teleport ===&lt;br /&gt;
* short name: `teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) when triggered&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
This spell teleports the caster to a pre-defined `teleport anchor&#039;&lt;br /&gt;
(specified in the configuration file) after a short delay.  Each&lt;br /&gt;
anchor may add further requirements (MP, level, prerequisites,&lt;br /&gt;
components) to the spell.&lt;br /&gt;
&lt;br /&gt;
=== Magic Mouth ===&lt;br /&gt;
* short name: `magic-mouth&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), both on the caster and the magic mouth&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: amount of game ticks the magic mouth stays alive&lt;br /&gt;
* option `range&#039;: minimum distance from the next magic mouth&lt;br /&gt;
This spell must be invoked together with a phrase to be spoken by the&lt;br /&gt;
magic mouth.  It will summon a magic mouth NPC that will repeat that&lt;br /&gt;
phrase (tagged with the caster&#039;s name) to everyone who decides to&lt;br /&gt;
listen.  Magic mouths cannot be placed within walls or too close to&lt;br /&gt;
each other.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell really demands a material component.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (if pvp) and monsters standing immediately in front of the caster, or in a nearby square in the direction the caster is facing&lt;br /&gt;
* option `power&#039;: maximum damage the spell will deal&lt;br /&gt;
* option `hpcost&#039;: percentage of damage dealt that the caster must pay from his/her HP&lt;br /&gt;
Deals considerable damage to each monster standing immediately in the&lt;br /&gt;
selected target square (either the square directly in front of the caster or one nearby, in the&lt;br /&gt;
direction the caster is facing).&lt;br /&gt;
The caster loses an appropriate amount of hitpoints and may die.&lt;br /&gt;
If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather&lt;br /&gt;
great effect by a pair of sorcerers.  One possible way to combat such&lt;br /&gt;
abuse would be to require expensive material components for either;&lt;br /&gt;
another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot&lt;br /&gt;
resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* affects: all PCs (if in pvp) and monsters in range&lt;br /&gt;
* option `duration&#039;: number of attack waves&lt;br /&gt;
* option `power&#039;: maximum damage to deal; this is divided by the range of each wave&lt;br /&gt;
* option `range&#039;: range of each wave&lt;br /&gt;
* option `hpcost&#039;: percentage of damage the caster must pay from his/her own HP&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.&lt;br /&gt;
Monsters/pvp players nearby may be hit multiple times, once&lt;br /&gt;
for each round.  The caster must pay a certain amount of the damage&lt;br /&gt;
dealt.  If dealing this damage would kill the&lt;br /&gt;
caster, the damage is reduced proportionally (as per the `heal&#039;&lt;br /&gt;
spell).  If the caster gets very close to dying, his/her hair will&lt;br /&gt;
turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (even outside of pvp!) and monsters in range&lt;br /&gt;
* option `range&#039;: effecive spell range&lt;br /&gt;
The health of all player characters and monsters in the specified area&lt;br /&gt;
of effect is set to one (modified by magic defence, as usual).&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player&lt;br /&gt;
outside of a pvp zone.  It is possible to abuse this spell to aid&lt;br /&gt;
monsters in killing other players.  Furthermore this spell may deal a&lt;br /&gt;
significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Create Item ===&lt;br /&gt;
* short name: `create-item&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `power&#039;: number of items to create&lt;br /&gt;
* option `parameter&#039;: item ID of the item to create&lt;br /&gt;
Creates an appropriate number of the indicated items.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; In practice, this spell must have material components that&lt;br /&gt;
are at least as valuable as the created item to avoid potential&lt;br /&gt;
economical issues.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler&lt;br /&gt;
messaging mechanism in eAthena.  It processes all chat messages and&lt;br /&gt;
tests whether they are identical to a given indication, then&lt;br /&gt;
implementing the spell protocol as listed above.  For each spell, the&lt;br /&gt;
chat handler instructs the chat system that the spell was not spam,&lt;br /&gt;
thereby allowing quick re-casting without automatic banning.  To allow&lt;br /&gt;
easy fine-tuning of spells, all spell requirements are read from a&lt;br /&gt;
configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
three kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell invocation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper invocation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the invocation.&lt;br /&gt;
* teleport-anchor &amp;quot;&amp;lt;name&amp;gt;&amp;quot; = &amp;quot;&amp;lt;mapname&amp;gt;&amp;quot;, &amp;lt;int&amp;gt;, &amp;lt;int&amp;gt;&lt;br /&gt;
This sets up a teleport destination at the specified map and the&lt;br /&gt;
specified x and y co-ordinates.  Teleport anchors may further be&lt;br /&gt;
restricted by spell requirements that are added on top of the&lt;br /&gt;
requirements&lt;br /&gt;
already enforced for the teleport spell itself.  Such options are&lt;br /&gt;
listed as for a spell (see below).&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell with the specified invocation; e.g.,&lt;br /&gt;
`spell &amp;quot;xyzzy&amp;quot; = &amp;quot;teleport&amp;quot;&#039; will bind the invocation &amp;quot;xyzzy&amp;quot; to the&lt;br /&gt;
&amp;quot;teleport&amp;quot; spell.   In this vein, spells may be bound with multiple&lt;br /&gt;
names (and different options).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number; overrides the default.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** prerequisites = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Prerequisite items (specified as item IDs) to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Material components (specified as item IDs) to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
** parameter = &amp;lt;int&amp;gt; (a spell-dependent parameter)&lt;br /&gt;
** master = &amp;lt;lmap&amp;gt; (master spell power modifier; applied before all other spell properties are applied.  Defaults to the identify function.)&lt;br /&gt;
** power = &amp;lt;lmap&amp;gt; (Modified spell power.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** range = &amp;lt;lmap&amp;gt; (Effective spell range.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** duration = &amp;lt;lmap&amp;gt; (Effective spell duration.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** hpcost = &amp;lt;lmap&amp;gt; (HP cost percentage.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;lmap&amp;gt; is a (bounded) linear map.  Its syntax follows the grammar below:&lt;br /&gt;
&lt;br /&gt;
  LMAP ::= PREBOUND &#039;{&#039; BODY &#039;}&#039; POSTBOUND&lt;br /&gt;
  PREBOUND ::= /* empty */ | &amp;lt;int&amp;gt; &#039;&amp;lt;=&#039;&lt;br /&gt;
  POSTBOUND ::= /* empty */ | &#039;&amp;lt;=&#039; &amp;lt;int&amp;gt;&lt;br /&gt;
  BODY ::= &amp;lt;int&amp;gt; &#039;+&#039; &amp;lt;float&amp;gt; &#039;*&#039; &#039;x&#039;&lt;br /&gt;
&lt;br /&gt;
Here are some examples of ranges, with implied semantics:&lt;br /&gt;
* { 0 + 2 * x }      # doubles the value&lt;br /&gt;
* { 1000 + 1 * x }   # Increments the value by one&lt;br /&gt;
* { 1000 + -2 * x }  # perfectly valid&lt;br /&gt;
* 0 &amp;lt;= { 0 + 1 * x } # The result is clipped at zero: no negatives&lt;br /&gt;
* { 0 + 1 * x } &amp;lt;= 9 # Result is clipped at 9: no greater values&lt;br /&gt;
&lt;br /&gt;
Please note that in the&lt;br /&gt;
current implementation most default values, particularly those&lt;br /&gt;
for `mana&#039; and `level&#039;, are inadequate and must be adjusted before&lt;br /&gt;
practical adoption.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point,&lt;br /&gt;
it could use some improvement.  The implementation sends different&lt;br /&gt;
level-up like signals to the client, which the existing client&lt;br /&gt;
interprets as `job level up&#039; signals.  A refined client could map&lt;br /&gt;
these numbers to more appropriate particle effects.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=305 Mantis entry with&lt;br /&gt;
corresponding client-side improvements].  This would be accomplished&lt;br /&gt;
by adding a new configuration file-- `being-effects.xml&#039; in the&lt;br /&gt;
prototype-- that has structure such as the following:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;being-effects&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;0&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/levelup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;1&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/skillup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;2&amp;quot; audio=&amp;quot;sfx/foo.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;default particle=&amp;quot;graphics/particles/default.xml&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/being-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file maps server-side effect IDs to client-side sound effects and&lt;br /&gt;
particle effects.  The first two entries (ids 0 and 1) replicate the&lt;br /&gt;
existing effects.  The third entry maps effect ID 2 to the sound&lt;br /&gt;
effect &amp;quot;sfx/foo.ogg&amp;quot;.  The fourth and final entry is a default rule,&lt;br /&gt;
indicating that all unidentified effects should not generate sound,&lt;br /&gt;
but produce the particle effect &amp;quot;graphics/particles/default.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy&lt;br /&gt;
to integrate with the existing infrastructure but offers players&lt;br /&gt;
additional, `magical&#039; operations.  While not all of the spells&lt;br /&gt;
presented herein are balanced in and by themselves, they can be&lt;br /&gt;
balanced by adding appropriate material component requirements.  This&lt;br /&gt;
in turn creates new opportunities for money sinks and player-driven&lt;br /&gt;
markets.  Finally, the use of invocations as part of the spellcasting&lt;br /&gt;
process allows spells to be guarded and/or propagated by social means&lt;br /&gt;
rather than by developer-driven quests; depending on how the&lt;br /&gt;
invocations are seeded, this may have interesting effects on existing&lt;br /&gt;
and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated&lt;br /&gt;
at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can&lt;br /&gt;
be effectively disabled.  In this fashion, spells can be gradually&lt;br /&gt;
added after they have survived testing.  Similarly, that have been&lt;br /&gt;
found exploitable or broken can be disabled quickly, while spells that&lt;br /&gt;
have become more widely known than anticipated can be re-hidden by&lt;br /&gt;
changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Thanks go out to Vink, who suggested several spells, peavey, who&lt;br /&gt;
reviewed the patch and suggested making spell effects more easily&lt;br /&gt;
configurable, and to Sanga, who provided numerous bug and experience&lt;br /&gt;
reports, as well as several suggestions for improving spell usage.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises * &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9395</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9395"/>
		<updated>2008-05-21T21:06:14Z</updated>

		<summary type="html">&lt;p&gt;Fate: Updated to reflect patch version v6&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development&lt;br /&gt;
perspective for tmw.  Consequently, changes to eAthena are subject to&lt;br /&gt;
a short lifespan and little hope of re-use.  As a result, there is no&lt;br /&gt;
discernible feature development for eAthena to extend the player&lt;br /&gt;
experience on this server.  However, some enhancements that would&lt;br /&gt;
benefit the player community (and might thereby serve to attract new&lt;br /&gt;
testers and developers) depend on such extensions; one particular&lt;br /&gt;
prominent example of this is magic. This document proposes a simple&lt;br /&gt;
magic system as an addition to the eAthena system.  The magic system&lt;br /&gt;
satisfies the following requirements: (a) it is easy to implement and&lt;br /&gt;
integrate into eAthena, (b) it can be easily configured and&lt;br /&gt;
fine-tuned, (c) it requires no client-side extensions to function&lt;br /&gt;
properly.  This document presents the system together with fifteen&lt;br /&gt;
spells as well as their intended behaviour and describes the system&lt;br /&gt;
would work in regular gameplay.  The document further sketches a&lt;br /&gt;
prototype of the system.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this&lt;br /&gt;
proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v6 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic&lt;br /&gt;
system requires client support.  Furthermore, if there are bugs in the&lt;br /&gt;
system, the generally low quality of code in eAthena would make&lt;br /&gt;
debugging  a less than pleasant experience.  Since plans on the tmw&lt;br /&gt;
side further expect eAthena to be retired soon, it seems wasteful to&lt;br /&gt;
spend much time on a feature-rich magic system.  As an alternative,&lt;br /&gt;
tmw could adopt a simple magic system that provides the `bare-bones&lt;br /&gt;
magic experience&#039; as quickly as possible before eAthena support is&lt;br /&gt;
retired:  players can cast spells, but will not be required to wait&lt;br /&gt;
for a new client to become available.  As an interface, the existing&lt;br /&gt;
chat system appears to provide sufficient expressive power to&lt;br /&gt;
communicate many interesting spells to the server, while player&lt;br /&gt;
location and heading can affect spell effects more or less subtly.&lt;br /&gt;
While these interface choices are limiting, they (a) do not require&lt;br /&gt;
players to familiarise themselves with a new interface, (b) do not&lt;br /&gt;
require the implementation of `throw-away&#039; interface and protocol&lt;br /&gt;
code, and (c) (as mentioned) are already sufficient for a number of&lt;br /&gt;
interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised,&lt;br /&gt;
specifically the notions of `spell power&#039;, `magic defence&#039;, `magic&lt;br /&gt;
absorption&#039; and `spell requirements&#039;.  The document then discusses a&lt;br /&gt;
number of spells that can be expressed with the proposed interface;&lt;br /&gt;
all of the listed spells are also implemented as part of the&lt;br /&gt;
prototype.  A high-level overview over the implementation of the&lt;br /&gt;
prototype follows, then a description of how `spell requirements&#039; can&lt;br /&gt;
be configured.  The document concludes with a list of possible&lt;br /&gt;
approaches towards improving the visualisation of these spells by&lt;br /&gt;
means of altering the client, and with observations about extensions&lt;br /&gt;
to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by&lt;br /&gt;
means of atomic spells, i.e., magical effects arise by triggering a&lt;br /&gt;
particular effect-- while some spells may interact, there is no&lt;br /&gt;
foundational mechanism that allows players to construct new spells,&lt;br /&gt;
largely because such a mechanism would likely be hard to balance.&lt;br /&gt;
Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived&lt;br /&gt;
attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits&lt;br /&gt;
magic usage by established players without a (second) stat reset,&lt;br /&gt;
while giving sufficiently significant meaning to intelligence to make&lt;br /&gt;
it of some interest.  Intelligence also affects one of the two&lt;br /&gt;
defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to&lt;br /&gt;
subtract each time magical damage is dealt to a character-- this&lt;br /&gt;
derived stat therefore works similarly to vitality.  A third stat,&lt;br /&gt;
`magic defence&#039;, is already present in eAthena and describes (as a&lt;br /&gt;
percentage) how much magical damage is absorbed.  `magic defence&#039; is&lt;br /&gt;
applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Invocation: The spell&#039;s invocation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the invocation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Invocation, level, cost, prerequisites, and (material) components are&lt;br /&gt;
together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether&lt;br /&gt;
or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Invocation: The player must type the invocation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an invocation that matches the invocation of&lt;br /&gt;
a given spell, all of the above are checked.  Only if all requirements&lt;br /&gt;
are met is the spell effect triggered.  In that case, mana points are&lt;br /&gt;
subtracted and material components consumed as mentioned above.  In&lt;br /&gt;
all situations (no matter whether the spell requirements are fully met&lt;br /&gt;
or not) a correct invocation results in part of the spell being&lt;br /&gt;
starred out.  Assume that a given spell has the invocation `foo&#039;.&lt;br /&gt;
Whenever a player types in `foo&#039;, the chat message sent to other&lt;br /&gt;
players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is&lt;br /&gt;
decided individually for each character based on the &#039;&#039;obscure&lt;br /&gt;
factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy&lt;br /&gt;
regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the&lt;br /&gt;
proposed system within the previously described requirements.  Note&lt;br /&gt;
that the spells do not list level, cost, prerequisites or material&lt;br /&gt;
components, as determining these is not part of the implementation of&lt;br /&gt;
the magic system per se, but rather of applying it in practice.&lt;br /&gt;
&lt;br /&gt;
Since it may be desirable to vary spell power in practice, the spells&lt;br /&gt;
do not have predetermined durations, ranges etc.; these should be&lt;br /&gt;
part of spell configuration.  Instead, we list all configuration&lt;br /&gt;
options that would be of interest to the specified spell.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing&lt;br /&gt;
a thusly shrouded player will not be able to determine the player&#039;s&lt;br /&gt;
name; furthermore, any chat messages sent by the player will be&lt;br /&gt;
anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* affects: all in range, including self, unless they resist (see below)&lt;br /&gt;
* option `power&#039;: Maximum caster experience level that can be revealed&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the&lt;br /&gt;
caster&#039;s spell power is at least as great as the shrouded player&#039;s&lt;br /&gt;
level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
This spell detects all players in the area of effect and lists them to&lt;br /&gt;
the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: all PCs and monsters in range&lt;br /&gt;
* option `range&#039;: Effective spell range&lt;br /&gt;
* option `duration&#039;: Effective spell duration (cycles)&lt;br /&gt;
* option `power&#039;: Cycle length in game ticks&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.&lt;br /&gt;
All PCs and monsters are blown in the direction the caster was facing&lt;br /&gt;
at the time the spell was cast.  By walking directly against the wind,&lt;br /&gt;
players are able to overcome this obstacle, but only with considerable&lt;br /&gt;
delay.  A second `wind&#039; spell near the area of the first will result&lt;br /&gt;
in neither spell taking effect.  If one of the spells finishes before&lt;br /&gt;
the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this&lt;br /&gt;
point, particularly for PCs that are being pushed around.  See section&lt;br /&gt;
`Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: Number of HP to absorb each time the subject is injured&lt;br /&gt;
This spell absorbs, each time the subject is injured by weapons, some points&lt;br /&gt;
of damage.  The subject is slowed down by an equal percentage.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* affects: self or an optional subject specified as parameter&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `power&#039;: percentage the subject should be sped up by&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion.&lt;br /&gt;
However, the subject becomes highly vulnerable&lt;br /&gt;
during this period:  every time the subject receives physical damage&lt;br /&gt;
that bypasses its armour and defences, the suffered damage is doubled&lt;br /&gt;
for every sixteen points of speedup (tripled for a speedup of 32,&lt;br /&gt;
multiplied by 3.5 for a speedup of 40 etc.)&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* option `range&#039;: if not cast on self, maximum distance for the spell subject&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as&lt;br /&gt;
per the default eAthena implementation of `barrier&#039;), thereby&lt;br /&gt;
absorbing all damage from offensive spells such as the three previous&lt;br /&gt;
ones, but also from healing magic, curses, and `haste&#039;/`protect&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* affects: all PCs in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `hpcost&#039;: percentage of HP the caster must pay out of his/her own HP&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.&lt;br /&gt;
The caster has to a certain percentage of&lt;br /&gt;
the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate&lt;br /&gt;
fraction; e.g., if a caster with 11/11 HP tries to heal a player with&lt;br /&gt;
20/30 HP and another with 10/110 HP at a cost of 100%, then the second&lt;br /&gt;
player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine&lt;br /&gt;
(-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* affects: one dead PC in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: maximum experience level of the player to be resurrected&lt;br /&gt;
Resurrects a dead player.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* affects: all monsters in range&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* affects: all monsters in range, unless their level is too high&lt;br /&gt;
* option `range&#039;: effective spell range&lt;br /&gt;
* option `power&#039;: effective spell power (see below).&lt;br /&gt;
All monsters in range may become peaceful, stopping their current&lt;br /&gt;
attacks and no longer auto-attacking (the latter effect is permanent&lt;br /&gt;
for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s modified spell power (i.e.,&lt;br /&gt;
the spell power modified by the configuration option `power&#039;)  is greater&lt;br /&gt;
than or equal to the subject&#039;s monster level; otherwise the spell may or&lt;br /&gt;
may not take effect (whether the spell takes effect is determined&lt;br /&gt;
solely by who the caster is and who the monster is, i.e., re-casting&lt;br /&gt;
the spell will not change the outcome).  The spell will never take&lt;br /&gt;
effect against monsters whose level is more than twice the modified&lt;br /&gt;
spell power.&lt;br /&gt;
&lt;br /&gt;
=== Emote Curse ===&lt;br /&gt;
* short name: `emote-curse&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self or subject standing immediately in front of the caster&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
* option `parameter&#039;: particular smiley to emote&lt;br /&gt;
During the duration of the spell, the subject will constantly emote.  The&lt;br /&gt;
precise emote must be specified as a spell parameter.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: delay until the spell takes effect&lt;br /&gt;
After the duration has expired, the caster is teleported back to the&lt;br /&gt;
location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Teleport ===&lt;br /&gt;
* short name: `teleport&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) when triggered&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: effective spell duration&lt;br /&gt;
This spell teleports the caster to a pre-defined `teleport anchor&#039;&lt;br /&gt;
(specified in the configuration file) after a short delay.  Each&lt;br /&gt;
anchor may add further requirements (MP, level, prerequisites,&lt;br /&gt;
components) to the spell.&lt;br /&gt;
&lt;br /&gt;
=== Magic Mouth ===&lt;br /&gt;
* short name: `magic-mouth&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), both on the caster and the magic mouth&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `duration&#039;: amount of game ticks the magic mouth stays alive&lt;br /&gt;
* option `range&#039;: minimum distance from the next magic mouth&lt;br /&gt;
This spell must be invoked together with a phrase to be spoken by the&lt;br /&gt;
magic mouth.  It will summon a magic mouth NPC that will repeat that&lt;br /&gt;
phrase (tagged with the caster&#039;s name) to everyone who decides to&lt;br /&gt;
listen.  Magic mouths cannot be placed within walls or too close to&lt;br /&gt;
each other.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell really demands a material component.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (if pvp) and monsters standing immediately in front of the caster, or in a nearby square in the direction the caster is facing&lt;br /&gt;
* option `power&#039;: maximum damage the spell will deal&lt;br /&gt;
* option `hpcost&#039;: percentage of damage dealt that the caster must pay from his/her HP&lt;br /&gt;
Deals considerable damage to each monster standing immediately in the&lt;br /&gt;
selected target square (either the square directly in front of the caster or one nearby, in the&lt;br /&gt;
direction the caster is facing).&lt;br /&gt;
The caster loses an appropriate amount of hitpoints and may die.&lt;br /&gt;
If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather&lt;br /&gt;
great effect by a pair of sorcerers.  One possible way to combat such&lt;br /&gt;
abuse would be to require expensive material components for either;&lt;br /&gt;
another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot&lt;br /&gt;
resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* affects: all PCs (if in pvp) and monsters in range&lt;br /&gt;
* option `duration&#039;: number of attack waves&lt;br /&gt;
* option `power&#039;: maximum damage to deal; this is divided by the range of each wave&lt;br /&gt;
* option `range&#039;: range of each wave&lt;br /&gt;
* option `hpcost&#039;: percentage of damage the caster must pay from his/her own HP&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.&lt;br /&gt;
Monsters/pvp players nearby may be hit multiple times, once&lt;br /&gt;
for each round.  The caster must pay a certain amount of the damage&lt;br /&gt;
dealt.  If dealing this damage would kill the&lt;br /&gt;
caster, the damage is reduced proportionally (as per the `heal&#039;&lt;br /&gt;
spell).  If the caster gets very close to dying, his/her hair will&lt;br /&gt;
turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* affects: all PCs (even outside of pvp!) and monsters in range&lt;br /&gt;
* option `range&#039;: effecive spell range&lt;br /&gt;
The health of all player characters and monsters in the specified area&lt;br /&gt;
of effect is set to one (modified by magic defence, as usual).&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player&lt;br /&gt;
outside of a pvp zone.  It is possible to abuse this spell to aid&lt;br /&gt;
monsters in killing other players.  Furthermore this spell may deal a&lt;br /&gt;
significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Create Item ===&lt;br /&gt;
* short name: `create-item&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* affects: self&lt;br /&gt;
* option `power&#039;: number of items to create&lt;br /&gt;
* option `parameter&#039;: item ID of the item to create&lt;br /&gt;
Creates an appropriate number of the indicated items.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; In practice, this spell must have material components that&lt;br /&gt;
are at least as valuable as the created item to avoid potential&lt;br /&gt;
economical issues.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler&lt;br /&gt;
messaging mechanism in eAthena.  It processes all chat messages and&lt;br /&gt;
tests whether they are identical to a given indication, then&lt;br /&gt;
implementing the spell protocol as listed above.  For each spell, the&lt;br /&gt;
chat handler instructs the chat system that the spell was not spam,&lt;br /&gt;
thereby allowing quick re-casting without automatic banning.  To allow&lt;br /&gt;
easy fine-tuning of spells, all spell requirements are read from a&lt;br /&gt;
configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
three kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell invocation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper invocation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the invocation.&lt;br /&gt;
* teleport-anchor &amp;quot;&amp;lt;name&amp;gt;&amp;quot; = &amp;quot;&amp;lt;mapname&amp;gt;&amp;quot;, &amp;lt;int&amp;gt;, &amp;lt;int&amp;gt;&lt;br /&gt;
This sets up a teleport destination at the specified map and the&lt;br /&gt;
specified x and y co-ordinates.  Teleport anchors may further be&lt;br /&gt;
restricted by spell requirements that are added on top of the&lt;br /&gt;
requirements&lt;br /&gt;
already enforced for the teleport spell itself.  Such options are&lt;br /&gt;
listed as for a spell (see below).&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell with the specified invocation; e.g.,&lt;br /&gt;
`spell &amp;quot;xyzzy&amp;quot; = &amp;quot;teleport&amp;quot;&#039; will bind the invocation &amp;quot;xyzzy&amp;quot; to the&lt;br /&gt;
&amp;quot;teleport&amp;quot; spell.   In this vein, spells may be bound with multiple&lt;br /&gt;
names (and different options).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number; overrides the default.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** prerequisites = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Prerequisite items (specified as item IDs) to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;int&amp;gt;, ..., &amp;lt;int&amp;gt; ] (Material components (specified as item IDs) to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
** parameter = &amp;lt;int&amp;gt; (a spell-dependent parameter)&lt;br /&gt;
** master = &amp;lt;lmap&amp;gt; (master spell power modifier; applied before all other spell properties are applied.  Defaults to the identify function.)&lt;br /&gt;
** power = &amp;lt;lmap&amp;gt; (Modified spell power.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** range = &amp;lt;lmap&amp;gt; (Effective spell range.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** duration = &amp;lt;lmap&amp;gt; (Effective spell duration.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
** hpcost = &amp;lt;lmap&amp;gt; (HP cost percentage.  Meaning varies by spell.  Defaults to the identify function.)&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;lmap&amp;gt; is a (bounded) linear map.  Its syntax follows the grammar below:&lt;br /&gt;
&lt;br /&gt;
  LMAP ::= PREBOUND &#039;{&#039; BODY &#039;}&#039; POSTBOUND&lt;br /&gt;
  PREBOUND ::= /* empty */ | &amp;lt;int&amp;gt; &#039;&amp;lt;=&#039;&lt;br /&gt;
  POSTBOUND ::= /* empty */ | &#039;&amp;lt;=&#039; &amp;lt;int&amp;gt;&lt;br /&gt;
  BODY ::= &amp;lt;int&amp;gt; &#039;+&#039; &amp;lt;float&amp;gt; &#039;*&#039; &#039;x&#039;&lt;br /&gt;
&lt;br /&gt;
Here are some examples of ranges, with implied semantics:&lt;br /&gt;
* { 0 + 2 * x }      # doubles the value&lt;br /&gt;
* { 1000 + 1 * x }   # Increments the value by one&lt;br /&gt;
* { 1000 + -2 * x }  # perfectly valid&lt;br /&gt;
* 0 &amp;lt;= { 0 + 1 * x } # The result is clipped at zero: no negatives&lt;br /&gt;
* { 0 + 1 * x } &amp;lt;= 9 # Result is clipped at 9: no greater values&lt;br /&gt;
&lt;br /&gt;
Please note that in the&lt;br /&gt;
current implementation most default values, particularly those&lt;br /&gt;
for `mana&#039; and `level&#039;, are inadequate and must be adjusted before&lt;br /&gt;
practical adoption.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point,&lt;br /&gt;
it could use some improvement.  The implementation sends different&lt;br /&gt;
level-up like signals to the client, which the existing client&lt;br /&gt;
interprets as `job level up&#039; signals.  A refined client could map&lt;br /&gt;
these numbers to more appropriate particle effects.&lt;br /&gt;
[http://mantis.themanaworld.org/view.php?id=305 Mantis entry with&lt;br /&gt;
corresponding client-side improvements].  This would be accomplished&lt;br /&gt;
by adding a new configuration file-- `being-effects.xml&#039; in the&lt;br /&gt;
prototype-- that has structure such as the following:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;being-effects&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;0&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot;&lt;br /&gt;
particle=&amp;quot;graphics/particles/levelup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;1&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot;&lt;br /&gt;
particle=&amp;quot;graphics/particles/skillup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;effect id=&amp;quot;2&amp;quot; audio=&amp;quot;sfx/foo.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;default particle=&amp;quot;graphics/particles/default.xml&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/being-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file maps server-side effect IDs to client-side sound effects and&lt;br /&gt;
particle effects.  The first two entries (ids 0 and 1) replicate the&lt;br /&gt;
existing effects.  The third entry maps effect ID 2 to the sound&lt;br /&gt;
effect &amp;quot;sfx/foo.ogg&amp;quot;.  The fourth and final entry is a default rule,&lt;br /&gt;
indicating that all unidentified effects should not generate sound,&lt;br /&gt;
but produce the particle effect &amp;quot;graphics/particles/default.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy&lt;br /&gt;
to integrate with the existing infrastructure but offers players&lt;br /&gt;
additional, `magical&#039; operations.  While not all of the spells&lt;br /&gt;
presented herein are balanced in and by themselves, they can be&lt;br /&gt;
balanced by adding appropriate material component requirements.  This&lt;br /&gt;
in turn creates new opportunities for money sinks and player-driven&lt;br /&gt;
markets.  Finally, the use of invocations as part of the spellcasting&lt;br /&gt;
process allows spells to be guarded and/or propagated by social means&lt;br /&gt;
rather than by developer-driven quests; depending on how the&lt;br /&gt;
invocations are seeded, this may have interesting effects on existing&lt;br /&gt;
and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated&lt;br /&gt;
at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can&lt;br /&gt;
be effectively disabled.  In this fashion, spells can be gradually&lt;br /&gt;
added after they have survived testing.  Similarly, that have been&lt;br /&gt;
found exploitable or broken can be disabled quickly, while spells that&lt;br /&gt;
have become more widely known than anticipated can be re-hidden by&lt;br /&gt;
changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Thanks go out to Vink, who suggested several spells, peavey, who&lt;br /&gt;
reviewed the patch and suggested making spell effects more easily&lt;br /&gt;
configurable, and to Sanga, who provided numerous bug and experience&lt;br /&gt;
reports, as well as several suggestions for improving spell usage.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises * &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9393</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9393"/>
		<updated>2008-05-19T16:17:51Z</updated>

		<summary type="html">&lt;p&gt;Fate: Added acknowledgements&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system. [http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v4 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039;, `magic defence&#039;, `magic absorption&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.  Intelligence also affects one of the two defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to subtract each time magical damage is dealt to a character-- this derived stat therefore works similarly to vitality.  A third stat, `magic defence&#039;, is already present in eAthena and describes (as a percentage) how much magical damage is absorbed.  `magic defence&#039; is applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* default invocation: `anort&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* area of effect: self or player standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 100 ticks&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as per the default eAthena implementation of `barrier&#039;), thereby absorbing all damage from offensive spells such as the three previous ones.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects. [http://mantis.themanaworld.org/view.php?id=305 Mantis entry with corresponding client-side improvements].  This would be accomplished by adding a new configuration file-- `being-effects.xml&#039; in the prototype-- that has structure such as the following:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;being-effects&amp;gt;&lt;br /&gt;
      &amp;lt;effect id=&amp;quot;0&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/levelup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;effect id=&amp;quot;1&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/skillup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;effect id=&amp;quot;2&amp;quot; audio=&amp;quot;sfx/foo.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;default particle=&amp;quot;graphics/particles/default.xml&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/being-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file maps server-side effect IDs to client-side sound effects and particle effects.  The first two entries (ids 0 and 1) replicate the existing effects.  The third entry maps effect ID 2 to the sound effect &amp;quot;sfx/foo.ogg&amp;quot;.  The fourth and final entry is a default rule, indicating that all unidentified effects should not generate sound, but produce the particle effect &amp;quot;graphics/particles/default.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Thanks go out to Vink, who suggested several spells, and to Sanga, who provided numerous bug and experience reports, as well as several suggestions for improving spell usage.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9347</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9347"/>
		<updated>2008-05-18T17:22:01Z</updated>

		<summary type="html">&lt;p&gt;Fate: Explained the being-effects.xml structure for client-side effects&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system. [http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v4 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039;, `magic defence&#039;, `magic absorption&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.  Intelligence also affects one of the two defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to subtract each time magical damage is dealt to a character-- this derived stat therefore works similarly to vitality.  A third stat, `magic defence&#039;, is already present in eAthena and describes (as a percentage) how much magical damage is absorbed.  `magic defence&#039; is applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* default invocation: `anort&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* area of effect: self or player standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 100 ticks&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as per the default eAthena implementation of `barrier&#039;), thereby absorbing all damage from offensive spells such as the three previous ones.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects. [http://mantis.themanaworld.org/view.php?id=305 Mantis entry with corresponding client-side improvements].  This would be accomplished by adding a new configuration file-- `being-effects.xml&#039; in the prototype-- that has structure such as the following:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;being-effects&amp;gt;&lt;br /&gt;
      &amp;lt;effect id=&amp;quot;0&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/levelup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;effect id=&amp;quot;1&amp;quot; audio=&amp;quot;sfx/levelup.ogg&amp;quot; particle=&amp;quot;graphics/particles/skillup.particle.xml&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;effect id=&amp;quot;2&amp;quot; audio=&amp;quot;sfx/foo.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;default particle=&amp;quot;graphics/particles/default.xml&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/being-effects&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file maps server-side effect IDs to client-side sound effects and particle effects.  The first two entries (ids 0 and 1) replicate the existing effects.  The third entry maps effect ID 2 to the sound effect &amp;quot;sfx/foo.ogg&amp;quot;.  The fourth and final entry is a default rule, indicating that all unidentified effects should not generate sound, but produce the particle effect &amp;quot;graphics/particles/default.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9346</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9346"/>
		<updated>2008-05-18T15:45:37Z</updated>

		<summary type="html">&lt;p&gt;Fate: Punctuation edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system. [http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v4 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039;, `magic defence&#039;, `magic absorption&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.  Intelligence also affects one of the two defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to subtract each time magical damage is dealt to a character-- this derived stat therefore works similarly to vitality.  A third stat, `magic defence&#039;, is already present in eAthena and describes (as a percentage) how much magical damage is absorbed.  `magic defence&#039; is applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* default invocation: `anort&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* area of effect: self or player standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 100 ticks&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as per the default eAthena implementation of `barrier&#039;), thereby absorbing all damage from offensive spells such as the three previous ones.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects. [http://mantis.themanaworld.org/view.php?id=305 Mantis entry with corresponding client-side improvements].&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9345</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9345"/>
		<updated>2008-05-18T15:43:33Z</updated>

		<summary type="html">&lt;p&gt;Fate: Mentioned client-side visualisation improvements as in #305&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system. [http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v4 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039;, `magic defence&#039;, `magic absorption&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.  Intelligence also affects one of the two defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to subtract each time magical damage is dealt to a character-- this derived stat therefore works similarly to vitality.  A third stat, `magic defence&#039;, is already present in eAthena and describes (as a percentage) how much magical damage is absorbed.  `magic defence&#039; is applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* default invocation: `anort&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* area of effect: self or player standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 100 ticks&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as per the default eAthena implementation of `barrier&#039;), thereby absorbing all damage from offensive spells such as the three previous ones.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
A corresponding experimental patch that addresses some further minor issues is available [http://mantis.themanaworld.org/view.php?id=305 Visualisation improvements].&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9344</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9344"/>
		<updated>2008-05-18T14:23:24Z</updated>

		<summary type="html">&lt;p&gt;Fate: Pointed out that the article still applies to v4 of the patch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system. [http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v4 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039;, `magic defence&#039;, `magic absorption&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.  Intelligence also affects one of the two defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to subtract each time magical damage is dealt to a character-- this derived stat therefore works similarly to vitality.  A third stat, `magic defence&#039;, is already present in eAthena and describes (as a percentage) how much magical damage is absorbed.  `magic defence&#039; is applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* default invocation: `anort&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* area of effect: self or player standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 100 ticks&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as per the default eAthena implementation of `barrier&#039;), thereby absorbing all damage from offensive spells such as the three previous ones.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9343</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9343"/>
		<updated>2008-05-17T01:06:29Z</updated>

		<summary type="html">&lt;p&gt;Fate: Eliminated to-do item that has been implemented and documented (mdef use)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system. [http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v3 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039;, `magic defence&#039;, `magic absorption&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.  Intelligence also affects one of the two defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to subtract each time magical damage is dealt to a character-- this derived stat therefore works similarly to vitality.  A third stat, `magic defence&#039;, is already present in eAthena and describes (as a percentage) how much magical damage is absorbed.  `magic defence&#039; is applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* default invocation: `anort&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* area of effect: self or player standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 100 ticks&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as per the default eAthena implementation of `barrier&#039;), thereby absorbing all damage from offensive spells such as the three previous ones.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9338</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9338"/>
		<updated>2008-05-16T14:26:00Z</updated>

		<summary type="html">&lt;p&gt;Fate: Properly credited Vink, punctuation changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system. [http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v3 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039;, `magic defence&#039;, `magic absorption&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.  Intelligence also affects one of the two defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to subtract each time magical damage is dealt to a character-- this derived stat therefore works similarly to vitality.  A third stat, `magic defence&#039;, is already present in eAthena and describes (as a percentage) how much magical damage is absorbed.  `magic defence&#039; is applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* default invocation: `anort&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* area of effect: self or player standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 100 ticks&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as per the default eAthena implementation of `barrier&#039;), thereby absorbing all damage from offensive spells such as the three previous ones.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
* The effects of offensive spells should be toned down via battle_get_mdef(-).&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy).&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...).&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds.&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next.&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened. (&#039;&#039;&#039;Note:&#039;&#039;&#039; suggested by Vink)&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9337</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9337"/>
		<updated>2008-05-16T14:24:52Z</updated>

		<summary type="html">&lt;p&gt;Fate: Updated description to reflect v3: magic defence/absorption, `barrier&amp;#039; spell.  Added new spell ideas.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system. [http://mantis.themanaworld.org/view.php?id=303 Mantis entry for this proposal.]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v3 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039;, `magic defence&#039;, `magic absorption&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.  Intelligence also affects one of the two defensive properties for magic:&lt;br /&gt;
&lt;br /&gt;
magic absorption = experience level / 8  + intelligence&lt;br /&gt;
&lt;br /&gt;
`magic absorption&#039; describes how many points of magical damage to subtract each time magical damage is dealt to a character-- this derived stat therefore works similarly to vitality.  A third stat, `magic defence&#039;, is already present in eAthena and describes (as a percentage) how much magical damage is absorbed.  `magic defence&#039; is applied first, then `magic absorption&#039;.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
=== Barrier ===&lt;br /&gt;
* short name: `barrier&#039;&lt;br /&gt;
* default invocation: `anort&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_BARRIER (20) on subjects&lt;br /&gt;
* area of effect: self or player standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 100 ticks&lt;br /&gt;
During the duration of this spell, magic defence is raised to 100 (as per the default eAthena implementation of `barrier&#039;), thereby absorbing all damage from offensive spells such as the three previous ones.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
* The effects of offensive spells should be toned down via battle_get_mdef(-).&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy)&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...)&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;br /&gt;
* &#039;&#039;Floating Backpack:&#039;&#039; temporarily eliminates the `no regeneration&#039; penalty for being burdened&lt;br /&gt;
* &#039;&#039;Blink:&#039;&#039; short-range teleport in the direction the caster is facing; does not pass through walls but may pass through monsters/players.&lt;br /&gt;
* &#039;&#039;Boost:&#039;&#039; temporarily increases the caster&#039;s spell power&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9321</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9321"/>
		<updated>2008-05-15T16:24:33Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system [http://mantis.themanaworld.org/view.php?id=303]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v2 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
* The effects of offensive spells should be toned down via battle_get_mdef(-).&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Magic shield:&#039;&#039; temporarily boost magic defence&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy)&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...)&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9320</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9320"/>
		<updated>2008-05-15T16:19:39Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system [http://mantis.themanaworld.org/view.php?id=303]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v1 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
* The effects of offensive spells should be toned down via battle_get_mdef(-).&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Magic shield:&#039;&#039; temporarily boost magic defence&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making `Death&#039;s Door&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy)&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...)&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9319</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9319"/>
		<updated>2008-05-15T16:16:14Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system [http://mantis.themanaworld.org/view.php?id=303]&lt;br /&gt;
&lt;br /&gt;
(The following discussion applies to the updated v1 version of the patch)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 25 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
* The effects of offensive spells should be toned down via battle_get_mdef(-).&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Magic shield:&#039;&#039; temporarily boost magic defence&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making ``Death&#039;s Door&#039;&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy)&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...)&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9318</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9318"/>
		<updated>2008-05-15T15:00:37Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system [http://mantis.themanaworld.org/view.php?id=303]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 10 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
* Range for `Death&#039;s Door&#039; should be reduced.&lt;br /&gt;
* The effects of offensive spells should be toned down via battle_get_mdef(-).&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Magic shield:&#039;&#039; temporarily boost magic defence&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making ``Death&#039;s Door&#039;&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy)&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...)&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9317</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9317"/>
		<updated>2008-05-15T15:00:09Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system [http://mantis.themanaworld.org/view.php?id=303]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 10 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
The prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in the current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  The implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;br /&gt;
&lt;br /&gt;
=== Future extensions and spell ideas ===&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for improving existing spells:&lt;br /&gt;
* Dying from your own offensive spell should preclude resurrection&lt;br /&gt;
* Range for ``Death&#039;s Door&#039;&#039; should be reduced.&lt;br /&gt;
* The effects of offensive spells should be toned down via battle_get_mdef(-).&lt;br /&gt;
&lt;br /&gt;
Below are some ideas for additional spells:&lt;br /&gt;
* &#039;&#039;Magic shield:&#039;&#039; temporarily boost magic defence&lt;br /&gt;
* &#039;&#039;Reversal:&#039;&#039; any spell cast on the subject (good or bad) backfires on the caster.  For offensive spells, the computed damage backfires (making ``Death&#039;s Door&#039;&#039; suicidal.)  Spells the caster casts on him/herself are instead cast on a random subject in the area.  (HP draining for powering healing/offensive magic is unaffected.)  Any spell can only be turned back once in such a fashion (as in Final Fantasy).&lt;br /&gt;
* &#039;&#039;Curse of the Pink Fluffy:&#039;&#039; a near-indestructible pink fluffy follows the subject around, making funny noises&lt;br /&gt;
* &#039;&#039;Summon Ether Serpent:&#039;&#039; summons a cyan-ish snake (semi-transparent, if possible) that is significantly tougher than most monsters in the game but deals most of its damage by draining mana.  Impervious to `peace&#039;, will not (at first) attack its summoner.&lt;br /&gt;
* &#039;&#039;Banish:&#039;&#039; banishes a summoned creature (Ether Serpent, Pink Fluffy)&lt;br /&gt;
* &#039;&#039;Delay:&#039;&#039; the next spell cast by the caster will be delayed by ten seconds.  (Note that this spell can also be applied to other spellcasters via &#039;&#039;Reversal&#039;&#039;...)&lt;br /&gt;
* &#039;&#039;Dispel:&#039;&#039; cancels any spells currently active/in range and any spells cast in the next 5 seconds&lt;br /&gt;
* &#039;&#039;Teleport:&#039;&#039; teleports the caster to one of a set of predetermined locations based on whatever (s)he says next&lt;br /&gt;
* &#039;&#039;Gate:&#039;&#039; as teleport, but creates a temporary gate to that location that other people can follow through (the gate could be visualised as an NPC).&lt;br /&gt;
* &#039;&#039;Anchor:&#039;&#039; creates a temporary teleport anchor (a name bound to a location).  Can only override existing bindings if the caster is more powerful than the one of the existing binding.&lt;br /&gt;
* &#039;&#039;Magic Mouth:&#039;&#039; creates a temporary NPC that will repeat the next sentence spoken by the caster to anyone who passes by and tries to talk to it.&lt;br /&gt;
* &#039;&#039;Bless:&#039;&#039; increases accuracy and slightly increases damage (eAthena might already have this one.)&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9316</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9316"/>
		<updated>2008-05-15T14:33:51Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new testers and developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  This document presents the system together with fifteen spells as well as their intended behaviour and describes the system would work in regular gameplay.  The document further sketches a prototype of the system [http://mantis.themanaworld.org/view.php?id=303]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging  a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  As an alternative, tmw could adopt a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  As an interface, the existing chat system appears to provide sufficient expressive power to communicate many interesting spells to the server, while player location and heading can affect spell effects more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) (as mentioned) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, the basics of the magic system are summarised, specifically the notions of `spell power&#039; and `spell requirements&#039;.  The document then discusses a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of the prototype.  A high-level overview over the implementation of the prototype follows, then a description of how `spell requirements&#039; can be configured.  The document concludes with a list of possible approaches towards improving the visualisation of these spells by means of altering the client, and with observations about extensions to and applications of the system.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  Invocations are listed, however, to reflect the default invocations of the prototype implementation and thereby simplify testing.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 10 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
Our prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in our current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  Our implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
This document presents a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9315</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9315"/>
		<updated>2008-05-15T06:06:01Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Apologies for the style, but I was in a bit of a hurry.  This is how I&#039;m normally expected to write these things, which is why it looks a bit weird and says `we&#039; all over the place.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  We present the system together with fifteen spells as well as their intended behaviour and describe how we expect the system to function in regular gameplay.  To test the proposed system, we have implemented a prototype that we describe as part of this document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging those a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  Instead, we propose the adoption of a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  To facilitate such a system, we opted to use the regular chat interface as a means for communicating the intent of casting a spell to the server.  Player location and heading further affect the spell&#039;s effect more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, we first summarise the basics of the magic system, specifically the notions of `spell power&#039; and `spell requirements&#039;.  We then discuss a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of our prototype.  We then give a high-level overview over the implementation of our prototype, followed by a description of how `spell requirements&#039; can be configured.  We conclude with a list of possible approaches towards improving the visualisation of these spells by means of altering the client.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  We do list invocations, however, to reflect the default invocations of our prototype implementation.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: Radius of power / 10 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
The health of all player characters and monsters in the specified area of effect is set to one.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
Our prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.  To allow easy fine-tuning of spells, all spell requirements are read from a configuration file.&lt;br /&gt;
&lt;br /&gt;
=== Spell configuration file ===&lt;br /&gt;
&lt;br /&gt;
The spell configuration file (spell.conf) contains&lt;br /&gt;
two kinds of declarations:&lt;br /&gt;
* obscure = &amp;lt;int&amp;gt;&lt;br /&gt;
This optionsets the `obscure percentage&#039;, an int.  This defines how&lt;br /&gt;
likely it is that an individual character in a spell incantation will&lt;br /&gt;
be starred out (preventing casual listeners to figure out precisely&lt;br /&gt;
what the proper incantation is).  Note that the effectiveness of this&lt;br /&gt;
measure also depends on the length of the incantation.&lt;br /&gt;
* spell &amp;quot;&amp;lt;str&amp;gt;&amp;quot; : &amp;lt;options&amp;gt;&lt;br /&gt;
configures the specified spell (see below for a list of spells).  The&lt;br /&gt;
&amp;lt;options&amp;gt; adjust various spell properties; any option left open will&lt;br /&gt;
be left at some unreasonable defualt.  The options are below:&lt;br /&gt;
** level = &amp;lt;int&amp;gt; (spell level.  Minimum int+lvl a character must have to cast it.)&lt;br /&gt;
** effect = &amp;lt;int&amp;gt; (spell casting graphical effect index number.  Default is mostly 2.)&lt;br /&gt;
** mana = &amp;lt;int&amp;gt; (mana points that must be expended to cast the spell)&lt;br /&gt;
** incantation = &amp;quot;&amp;lt;str&amp;gt;&amp;quot; (The incantation to use to invoke the spell.)&lt;br /&gt;
** prerequisites = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Prerequisite items to cast the spell; these will NOT be consumed.)&lt;br /&gt;
** components = [ &amp;lt;num&amp;gt;, ..., &amp;lt;num&amp;gt; ] (Material components to require for the spell; these will be consumed when the spell is cast.  You can require the same item more than once to require multiple instances of that item to be consumed.)&lt;br /&gt;
&lt;br /&gt;
Items are identified by their item IDs.  Please note that in our current implementation the default values for `mana&#039; and `level&#039; are very low, and neither prerequisites nor components are used, in order to simplify testing.&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
While client visualisation should be fully functional at this point, it could use some improvement.  Our implementation sends different level-up like signals to the client, which the existing client interprets as `job level up&#039; signals.  A refined client could map these numbers to more appropriate particle effects.&lt;br /&gt;
&lt;br /&gt;
Furthermore, wind-based movement is currently somewhat rough, particularly for clients whose avatars are being moved.  Rough movement could be addressed by simulating smoother movement when a being is teleported only one square away from where the client expects it to be; rough scolling in turn can be addressed by scrolling rather than updating the frame position when the player&#039;s character is teleported to a very nearby location.&lt;br /&gt;
&lt;br /&gt;
Finally, the existing client does not properly draw the mana bar, instead opting always to display it as full.  This inconvenience can be fixed trivially in src/gui/ministatus.cpp by uncommenting the line&lt;br /&gt;
&lt;br /&gt;
      // mMpBar-&amp;gt;setProgress((float) player_node-&amp;gt;mMp / player_node-&amp;gt;mMaxMp);&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;br /&gt;
&lt;br /&gt;
We have presented a magic system that is simple to use and easy to integrate with the existing infrastructure but offers players additional, `magical&#039; operations.  While not all of the spells presented herein are balanced in and by themselves, they can be balanced by adding appropriate material component requirements.  This in turn creates new opportunities for money sinks and player-driven markets.  Finally, the use of invocations as part of the spellcasting process allows spells to be guarded and/or propagated by social means rather than by developer-driven quests; depending on how the invocations are seeded, this may have interesting effects on existing and new social structures within the game.&lt;br /&gt;
&lt;br /&gt;
Note that the magic system does not require all spells to be activated at the same time: by setting a spell&#039;s invocation to &amp;quot;&amp;quot;, the spell can be effectively disabled.  In this fashion, spells can be gradually added after they have survived testing.  Similarly, that have been found exploitable or broken can be disabled quickly, while spells that have become more widely known than anticipated can be re-hidden by changing (and re-seeding) their invocation.&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
	<entry>
		<id>https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9314</id>
		<title>Archive:Simple eathena magic system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.devbox.themanaworld.org/index.php?title=Archive:Simple_eathena_magic_system&amp;diff=9314"/>
		<updated>2008-05-15T05:49:51Z</updated>

		<summary type="html">&lt;p&gt;Fate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Apologies for the style, but I was in a bit of a hurry.  This is how I&#039;m normally expected to write these things, which is why it looks a bit weird and says `we&#039; all over the place.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Abstract:&#039;&#039;&#039; eAthena is not part of the medium-term development perspective for tmw.  Consequently, changes to eAthena are subject to a short lifespan and little hope of re-use.  As a result, there is no discernible feature development for eAthena to extend the player experience on this server.  However, some enhancements that would benefit the player community (and might thereby serve to attract new developers) depend on such extensions; one particular prominent example of this is magic. This document proposes a simple magic system as an addition to the eAthena system.  The magic system satisfies the following requirements: (a) it is easy to implement and integrate into eAthena, (b) it can be easily configured and fine-tuned, (c) it requires no client-side extensions to function properly.  We present the system together with fifteen spells as well as their intended behaviour and describe how we expect the system to function in regular gameplay.  To test the proposed system, we have implemented a prototype that we describe as part of this document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
eAthena conceptually supports a magic system; however, this magic system requires client support.  Furthermore, if there are bugs in the system, the generally low quality of code in eAthena would make debugging those a less than pleasant experience.  Since plans on the tmw side further expect eAthena to be retired soon, it seems wasteful to spend much time on a feature-rich magic system.  Instead, we propose the adoption of a simple magic system that provides the `bare-bones magic experience&#039; as quickly as possible before eAthena support is retired:  players can cast spells, but will not be required to wait for a new client to become available.  To facilitate such a system, we opted to use the regular chat interface as a means for communicating the intent of casting a spell to the server.  Player location and heading further affect the spell&#039;s effect more or less subtly.  While these interface choices are limiting, they (a) do not require players to familiarise themselves with a new interface, (b) do not require the implementation of `throw-away&#039; interface and protocol code, and (c) are already sufficient for a number of interesting spells.&lt;br /&gt;
&lt;br /&gt;
In the following, we first summarise the basics of the magic system, specifically the notions of `spell power&#039; and `spell requirements&#039;.  We then discuss a number of spells that can be expressed with the proposed interface; all of the listed spells are also implemented as part of our prototype.  We then give a high-level overview over the implementation of our prototype, followed by a description of how `spell requirements&#039; can be configured.  We conclude with a list of possible approaches towards improving the visualisation of these spells by means of altering the client.&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
The proposed system is based on the idea of implementing magic by means of atomic spells, i.e., magical effects arise by triggering a particular effect-- while some spells may interact, there is no foundational mechanism that allows players to construct new spells, largely because such a mechanism would likely be hard to balance.  Spells are parameterised by &#039;&#039;spell power&#039;&#039;, which is a derived attribute of each player:&lt;br /&gt;
&lt;br /&gt;
spell power = experience level + intelligence&lt;br /&gt;
&lt;br /&gt;
This definition of spell power (in addition to being simple) permits magic usage by established players without a (second) stat reset, while giving sufficiently significant meaning to intelligence to make it of some interest.&lt;br /&gt;
&lt;br /&gt;
Each individual spell consists of the following attributes:&lt;br /&gt;
* Name: The spell&#039;s name.  This name need not be known to players; its principal purpose is for reference.  As such, it serves as the primary key in the configuration file (see below).&lt;br /&gt;
* Incantation: The spell&#039;s incantation.  This phrase triggers the spell (see `casting&#039;, below).  Knowing the incantation is the principal differentiator between players who can cast a given spell and players who can&#039;t.&lt;br /&gt;
* Level: The spell&#039;s difficulty level.  This level corresponds directly to player experience levels.&lt;br /&gt;
* Cost: The spell&#039;s mana cost.&lt;br /&gt;
* Prerequisites: A set of items that a player must possess in order to be able to cast the spell.&lt;br /&gt;
* Material Components: A set of items that are consumed to power the spell.&lt;br /&gt;
* Effect:  The effect triggered by the spell.&lt;br /&gt;
&lt;br /&gt;
Incantation, level, cost, prerequisites, and (material) components are together referred to as &#039;&#039;spell requirements&#039;&#039;, as they guard whether or not the spell effect will be triggered.&lt;br /&gt;
&lt;br /&gt;
=== Casting ===&lt;br /&gt;
&lt;br /&gt;
To cast a spell, a player must satisfy all relevant requirements:&lt;br /&gt;
* Incantation: The player must type the incantation into the game&#039;s chat mechanism.&lt;br /&gt;
* Level: The player&#039;s experience level must be equal to or greater than the spell level.&lt;br /&gt;
* Cost: The player must have at least as many mana points as indicated by the spell cost.  If the spell is successful, all of these mana points are consumed.&lt;br /&gt;
* Prerequisites: The player must possess all prerequisites for the spell as inventory items.&lt;br /&gt;
* Material Components: The player must also have all material components in his or her inventory.  If the spell is successful, all of these components are consumed.&lt;br /&gt;
&lt;br /&gt;
If the player types in an incantation that matches the incantation of a given spell, all of the above are checked.  Only if all requirements are met is the spell effect triggered.  In that case, mana points are subtracted and material components consumed as mentioned above.  In all situations (no matter whether the spell requirements are fully met or not) a correct incantation results in part of the spell being starred out.  Assume that a given spell has the incantation `foo&#039;.  Whenever a player types in `foo&#039;, the chat message sent to other players might be `**o&#039; or `***&#039; or `f**&#039; instead.  Starring out is decided individually for each character based on the &#039;&#039;obscure factor&#039;&#039;.  This allows spellcasters to maintain some level of secrecy regarding the invocation.&lt;br /&gt;
&lt;br /&gt;
== Spell list ==&lt;br /&gt;
&lt;br /&gt;
The list below contains a number of spells that can be handled by the proposed system within the previously described requirements.  Note that the spells do not list level, cost, prerequisites or material components, as determining these is not part of the implementation of the magic system per se, but rather of applying it in practice.  We do list invocations, however, to reflect the default invocations of our prototype implementation.&lt;br /&gt;
&lt;br /&gt;
=== Shroud ===&lt;br /&gt;
* short name: `shroud&#039;&lt;br /&gt;
* default invocation: `plugh&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: until logged out or cancelled&lt;br /&gt;
This spell obscures the player&#039;s identity: any other players observing a thusly shrouded player will not be able to determine the player&#039;s name; furthermore, any chat messages sent by the player will be anonymised.&lt;br /&gt;
&lt;br /&gt;
=== Reveal ===&lt;br /&gt;
* short name: `reveal&#039;&lt;br /&gt;
* default invocation: `xyzzy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_REVEAL (10) (on subjects)&lt;br /&gt;
* area of effect: radius 2 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell cancels all shroud spells in the area of effect if the caster&#039;s spell power is at least as great as the shrouded player&#039;s level.&lt;br /&gt;
&lt;br /&gt;
=== Detect Players ===&lt;br /&gt;
* short name: `detect-players&#039;&lt;br /&gt;
* default invocation: `wismani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 40 + power * 2 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
This spell detects all players in the area of effect and lists them to the caster.  Only the current map is affected.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell will also list the correct names of shrouded players.&lt;br /&gt;
&lt;br /&gt;
=== Wind ===&lt;br /&gt;
* short name: `wind&#039;&lt;br /&gt;
* default invocation: `kalhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: radius 4 + power / 10 around a point in front of the caster such that the caster is just barely not affected&lt;br /&gt;
* duration: 5 + power cycles, where one cycle occurs every 250 ticks.&lt;br /&gt;
This spell creates a `wind&#039; area immediately in front of the player.  All PCs and monsters are blown in the direction the caster was facing at the time the spell was cast.  By walking directly against the wind, players are able to overcome this obstacle, but only with considerable delay.  A second `wind&#039; spell near the area of the first will result in neither spell taking effect.  If one of the spells finishes before the other, however, the remaining spell will take effect immediately.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Visualisation for this spell is less than ideal at this point, particularly for PCs that are being pushed around.  See section `Improving visualisation in the client&#039;, below.&lt;br /&gt;
&lt;br /&gt;
=== Protect ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `insanct&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_SHIELD (11) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell absorbs, for each attack, 25 + (power / 5) points of damage during its duration.&lt;br /&gt;
&lt;br /&gt;
=== Haste ===&lt;br /&gt;
* short name: `protect&#039;&lt;br /&gt;
* default invocation: `vaspor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_ENHANCE (3), MAGIC_EFFECT_HASTE (12) on the subject&lt;br /&gt;
* area of effect: self or single subject standing immediately in front of the caster&lt;br /&gt;
* duration: (10 + power) * 500 ticks&lt;br /&gt;
This spell speeds up the subject&#039;s attacks as per a speed potion, by 30 + (power / 10).&lt;br /&gt;
&lt;br /&gt;
=== Heal ===&lt;br /&gt;
* short name: `heal&#039;&lt;br /&gt;
* default invocation: `vasmani&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_HEAL (13) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Heals hit points from all OTHER players within the area of effect.  The caster has to pay 100-(power / 8) percent (but at least 60%) of the health given to those players from his or her own health.  If this&lt;br /&gt;
would kill the caster, the healing effect is reduced to an appropriate fraction; e.g., if a caster with 11/11 HP tries to heal a player with 20/30 HP and another with 10/110 HP at a cost of 100%, then the second player will receive one HP (-&amp;gt; 21/30) and the secon will receive nine (-&amp;gt; 19/110 HP).&lt;br /&gt;
&lt;br /&gt;
=== Life ===&lt;br /&gt;
* short name: `life&#039;&lt;br /&gt;
* default invocation: `kallor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_WHITE (4), MAGIC_EFFECT_RESURRECT (16) on subjects&lt;br /&gt;
* area of effect: radius of 3 around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Resurrects a dead player.  The player&#039;s level must not be greater than the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Aggravate ===&lt;br /&gt;
* short name: `aggravate&#039;&lt;br /&gt;
* default invocation: `iten plz&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_AGGRAVATE (18) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Aggravates all monsters in range.  Each monster tries to attack the caster.&lt;br /&gt;
&lt;br /&gt;
=== Peace ===&lt;br /&gt;
* short name: `peace&#039;&lt;br /&gt;
* default invocation: `erana sent me&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_PEACE (17) on subjects&lt;br /&gt;
* area of effect: radius of 3 + (power / 10) around the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
All monsters in range may become peaceful, stopping their current attacks and no longer auto-attacking (the latter effect is permanent for the given monster).&lt;br /&gt;
This effect is only guaranteed if the player&#039;s power is greater than or equal to the subject&#039;s monster level; otherwise the spell may or may not take effect (whether the spell takes effect is determined solely by who the caster is and who the monster is, i.e., re-casting the spell will not change the outcome).  The spell will never take effect against monsters whose level is more than twice the caster&#039;s power.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Teleport ===&lt;br /&gt;
* short name: `delayed-teleport&#039;&lt;br /&gt;
* default invocation: `relkalpor&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2), MAGIC_EFFECT_TELEPORT (19) after the delay completes&lt;br /&gt;
* area of effect: self&lt;br /&gt;
* duration: 5000 ticks&lt;br /&gt;
After the duration has expired, the caster is teleported back to the location he/she was at when casting the spell.&lt;br /&gt;
&lt;br /&gt;
=== Happy ===&lt;br /&gt;
* short name: `happy&#039;&lt;br /&gt;
* default invocation: `happy happy joy joy&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_DEFAULT (2)&lt;br /&gt;
* area of effect: self or subject standing immediately in front of the caster&lt;br /&gt;
* duration: 500 * power ticks&lt;br /&gt;
During the duration of the spell, the subject will constantly emote a happy grin.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&lt;br /&gt;
=== Kill ===&lt;br /&gt;
* short name: `kill&#039;&lt;br /&gt;
* default invocation: `kalcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect: all subjects standing immediately in front of the caster&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
Deals up to 13 * power damage to each monster standing immediately in front of the caster.  The caster loses (80 - power / 3) (but at least 20) percent of the total damage dealt and may die.  If the caster dies, his/her hair turns white.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Based on a suggestion by Vink.&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Combined with &#039;&#039;Life&#039;&#039;, this spell can be used to rather great effect by a pair of sorcerers.  One possible way to combat such abuse would be to require expensive material components for either; another would be to alter &#039;&#039;Life&#039;&#039; in such a way that it cannot resurrect those who were slain by their own dark magic.&lt;br /&gt;
&lt;br /&gt;
=== Dragon Slave ===&lt;br /&gt;
* short name: `dragon-slave&#039;&lt;br /&gt;
* default invocation: `kalgravhur&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_INJURE (14) on subjects&lt;br /&gt;
* area of effect: radius of 2 * round around the player&lt;br /&gt;
* duration: power / 30 rounds of 500 ticks each&lt;br /&gt;
Deals damage to the caster&#039;s surroundings in multiple rounds.  During the first round (radius 2), the spell deals up to power * 4 damage, then power * 2 (radius 4), power * 4/3 (radius 6), power * 1 (radius 8), etc.  Monsters/pvp players nearby may be hit multiple times, once for each round.  The caster must pay 50 - power/5 percent (but at least 20%) of the damage dealt.  If dealing this damage would kill the caster, the damage is reduced proportionally (as per the `heal&#039; spell).  If the caster gets very close to dying, his/her hair will turn white.&lt;br /&gt;
&lt;br /&gt;
=== Death&#039;s Door ===&lt;br /&gt;
* short name: `deaths-door&#039;&lt;br /&gt;
* default invocation: `kalbetcorp&#039;&lt;br /&gt;
* visual effect: MAGIC_CAST_BLACK (5), MAGIC_EFFECT_EVIL (15) on subjects&lt;br /&gt;
* area of effect:&lt;br /&gt;
* duration: instantaneous&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This spell is the only means for injuring another player outside of a pvp zone.  It is possible to abuse this spell to aid monsters in killing other players.  Furthermore this spell may deal a significant amount of damage for a comparatively small cost.&lt;br /&gt;
&lt;br /&gt;
== Prototype implementation ==&lt;br /&gt;
&lt;br /&gt;
Our prototype implementation hooks into the existing chat handler messaging mechanism in eAthena.  It processes all chat messages and tests whether they are identical to a given indication, then implementing the spell protocol as listed above.  For each spell, the chat handler instructs the chat system that the spell was not spam, thereby allowing quick re-casting without automatic banning.&lt;br /&gt;
&lt;br /&gt;
== Spell configuration file ==&lt;br /&gt;
&lt;br /&gt;
== Improving visualisation in the client ==&lt;br /&gt;
&lt;br /&gt;
== Related work ==&lt;br /&gt;
&lt;br /&gt;
== Conclusions and Future Work ==&lt;/div&gt;</summary>
		<author><name>Fate</name></author>
	</entry>
</feed>