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:
@@ -15,30 +15,30 @@ module Combat
|
||||
|
||||
def other_bonuses(melee_strength: 0, ranged_strength: 0, prayer: 0)
|
||||
@other_bonuses = {
|
||||
:melee_strength => melee_strength,
|
||||
:ranged_strength => ranged_strength,
|
||||
:prayer => prayer
|
||||
melee_strength: melee_strength,
|
||||
ranged_strength: ranged_strength,
|
||||
prayer: prayer
|
||||
}
|
||||
end
|
||||
|
||||
def defence_bonuses(stab: 0, slash: 0, crush: 0, magic: 0, range: 0)
|
||||
@defence_bonuses = {
|
||||
:stab => stab,
|
||||
:slash => slash,
|
||||
:crush => crush,
|
||||
:magic => magic,
|
||||
:range => range
|
||||
stab: stab,
|
||||
slash: slash,
|
||||
crush: crush,
|
||||
magic: magic,
|
||||
range: range
|
||||
}
|
||||
end
|
||||
|
||||
def attack_bonuses(stab: 0, slash: 0, crush: 0, magic: 0, range: 0)
|
||||
@attack_bonuses = {
|
||||
:stab => stab,
|
||||
:slash => slash,
|
||||
:crush => crush,
|
||||
:magic => magic,
|
||||
:range => range
|
||||
stab: stab,
|
||||
slash: slash,
|
||||
crush: crush,
|
||||
magic: magic,
|
||||
range: range
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user