From The Mana World
(using attack message as it is already used for monster attacks)
(blanked the page because my current plans are completely different from what I wrote here ages ago.)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
Notes for implementing special actions like special attacks, magic or other special actions a player character can perform (emoticons?).


==specials.xml==
An XML file which maps special action ids to corresponding client-sided effects (particle, sound, sprite animation etc.) and server-sided effects (execute script, inflict damage in an area).
<specials>
  <action id="1">
  <particlefx>graphics/particles/heal.particle.xml</particlefx>
  <soundfx>sounds/heal.ogg</soundfx>
  <saytext>HEAL!!</saytext>
  <gameeffect
    area="point"
    position-forward="32"
    position-sideways="0"
    effect-type="heal"
    effect-factor="10"
  />
  </action>
  <action id="2">
  <particlefx>graphics/particles/firebolt.particle.xml</particlefx>
  <soundfx>sounds/fire.ogg</soundfx>
  <saytext>FIREBOLT!!</saytext>
  <gameeffect
    area="projectile"
    range="256"
    effect-type="damage"
    effect-element="fire"
    effect-factor="5"
  />
  </action>
</specials>
==Protocol:==
*Client sends '''PGMSG_ATTACK B direction W type''' ("type" is the ID number of the special attack. No number is interpreted as a normal attack)
*Server checks if the character may perform this special action right now.
*If yes the server does whatever the special action requires it to do (damage beings in attack zone or whatever)
*Server sends '''GPMSG_BEING_ATTACK  W being id, B direction, W type''' to all clients nearby
*Clients respond with displaying the corresponding effects

Latest revision as of 10:50, 2 August 2010