Skip to content
jeffplang edited this page Aug 6, 2012 · 4 revisions

First, a rough outline of how battles are initiated:

  • this.makePlayerAttack(entity) called in game.click().
  • this.createAttackLink(this.player, mob) called in this.makePlayerAttack(mob).
  • attacker.engage(target) called in this.createAttackLink(attacker, target).
  • TODO: finish

Networking

  • Client sends a message Types.Messages.ATTACK passing mob.id
  • The player's Player instance on the server listens on the websocket connection and handles the Types.Messages.ATTACK message on line 117.

Clone this wiki locally