Files
apollo/data/plugins/combat/attributes.rb
T
Gary Tierney 348e5cc8dc Build a framework for a maintainable combat plugin
* Uses a hierarchy of WeaponClasses -> Weapons for performing attacks,
  with WeaponClass having a set of styles and associated Attacks for
  those styles. Weapons and their classes are built with an easy to use
  and clean DSL.

* Adds a BonusContainer mixin, so that Equipment, Weapons, and
  WeaponClasses can all have their own set of bonuses which apply to the
  player.

* Allows attacks to be queued to the Mobs CombatState instance from
  external code, allowing e.g., NPCs or auto-cast to queue attacks to be
  executed.
2016-02-29 21:27:17 +00:00

29 lines
899 B
Ruby

module CombatModule
##
# The delay a <i>Mob</i> must wait before attacking again.
declare_attribute(:attack_delay, 0)
##
# 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)
##
# An integer between 0 and 100 indicating the amount of special energy a <i>Player</i> has.
declare_attribute(:special_energy, 100, :persistent)
end