mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 00:38:11 +00:00
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.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
create_weapon_class :unarmed, widget: -1 do
|
||||
default_speed 4
|
||||
|
||||
add_style :accurate, animation: 422, block_animation: 424
|
||||
add_style :aggressive, animation: 423, block_animation: 424
|
||||
add_style :defensive, animation: 422, block_animation: 424
|
||||
end
|
||||
|
||||
create_weapon :no_weapon, :unarmed, named: true do
|
||||
# Todo factor out empty blocks
|
||||
end
|
||||
Reference in New Issue
Block a user