Add ranged combat support

* Clean up the CombatAction and Attack code to make it easier to use for
  range.

* Add collision detection to the distance checks before attacking in the
  CombatAction.

* Create a Ruby DSL for defining projectile types and fix the
  ProjectileUpdateOperation so it uses the correct position offset.

* Fix the packet structure of the HintIconMessageEncoder.
This commit is contained in:
Gary Tierney
2016-01-03 22:24:43 +00:00
parent f80ea82ce7
commit 3082fade1d
35 changed files with 741 additions and 433 deletions
+6 -2
View File
@@ -1,6 +1,6 @@
##
# The delay a <i>Mob</i> must wait before attacking again.
declare_attribute(:attack_delay, 0)
# The number of ticks since a <i>Mob<i>s last attack.
declare_attribute(:attack_timer, 100)
##
# A flag indicating whether this <i>Mob</i> is currently in combat.
@@ -22,6 +22,10 @@ declare_attribute(:combat_style, 0, :persistent)
# A flag indicating whether the special bar is flagged for the next attack.
declare_attribute(:using_special, false, :persistent)
##
# A flag indicating whether auto retaliation is enabled.
declare_attribute(:auto_retaliate, true, :persistent)
##
# An integer between 0 and 100 indicating the amount of special energy a <i>Player</i> has.
declare_attribute(:special_energy, 100, :persistent)