Files
apollo/data/plugins/combat/combat.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

12 lines
314 B
Ruby

on :message, :npc_action do |player, message|
player_combat_state = get_combat_state player
player_combat_state.target = $world.npc_repository.get message.index
unless player.attacking
player.start_action CombatAction.new(player)
end
end
on :message, :player_action do |player, message|
end