mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 00:38:18 +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,10 @@
|
||||
def create_bolt(item, hash)
|
||||
hash[:projectile_type] = :bolt
|
||||
hash[:weapon_classes] = [:crossbow]
|
||||
hash[:projectile] = 27 unless hash.key? :projectile
|
||||
create_ammo item, hash
|
||||
end
|
||||
|
||||
create_projectile_type :bolt, start_height: 44, end_height: 44, delay: 41, speed: 5, slope: 5, radius: 10
|
||||
|
||||
create_bolt :iron_bolts, level_requirement: 1, drop_rate: 0.35
|
||||
Reference in New Issue
Block a user