mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 00:38:14 +00:00
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:
@@ -0,0 +1,25 @@
|
||||
BOW_WIDGET_ID = 77
|
||||
BOW_SPECIAL_CONFIG_ID = 10
|
||||
BOW_SPECIAL_BUTTON_ID = 8
|
||||
|
||||
create_weapon_class :shortbow, widget: BOW_WIDGET_ID, type: :ranged do
|
||||
defaults animation: 426
|
||||
special_bar BOW_SPECIAL_CONFIG_ID, BOW_SPECIAL_BUTTON_ID
|
||||
|
||||
style :accurate, speed: 4, range: 7, button: 2
|
||||
style :rapid, speed: 3, range: 7, button: 3
|
||||
style :long_range, speed: 4, range: 9, button: 4
|
||||
end
|
||||
|
||||
create_weapon :shortbow
|
||||
|
||||
create_weapon_class :longbow, widget: BOW_WIDGET_ID, type: :ranged do
|
||||
defaults animation: 426
|
||||
special_bar BOW_SPECIAL_CONFIG_ID, BOW_SPECIAL_BUTTON_ID
|
||||
|
||||
style :accurate, speed: 6, range: 7, button: 2
|
||||
style :rapid, speed: 6, range: 7, button: 3
|
||||
style :long_range, speed: 6, range: 9, button: 4
|
||||
end
|
||||
|
||||
create_weapon :longbow
|
||||
Reference in New Issue
Block a user