mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
3082fade1d
* 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.
32 lines
946 B
Ruby
32 lines
946 B
Ruby
##
|
|
# 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.
|
|
declare_attribute(:attacking, false)
|
|
|
|
##
|
|
# A flag indicating whether our <i>Mob</i> is dead.
|
|
declare_attribute(:dead, false)
|
|
|
|
##
|
|
# The amount of ticks a <i>Player</i> must wait before logging out after combat.
|
|
declare_attribute(:logout_timer, Time.now.to_i)
|
|
|
|
##
|
|
# The <i>CombatStyle</i> offset that a <i>Mob</i> is currently using.
|
|
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)
|