mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 08:39:27 +00:00
Complete special attacks; Fix WeaponClass issues
* Adds a button property to a WeaponClasses styles, which maps a combat style to the button that was pressed in the combat tab. * Adds full support for special attacks, with their config IDs and buttons. * Adds the DDS special attack, along with the D2H special attack as some starting examples. * Rename the "no_weapon" Weapon to "unarmed", so it shows up better in the UI.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
DAGGER_WIDGET_ID = 89
|
||||
DAGGER_SPECIAL_CONFIG_ID = 12
|
||||
DAGGER_SPECIAL_BUTTON_ID = 10
|
||||
|
||||
create_weapon_class :dagger, widget: DAGGER_WIDGET_ID do
|
||||
default_speed 4
|
||||
|
||||
attack_bonuses crush: -4, magic: 1
|
||||
defence_bonuses magic: 1
|
||||
|
||||
add_style :accurate, attack_type: :stab, animation: 7041, button: 2
|
||||
add_style :aggressive, attack_type: :stab, animation: 7041, button: 3
|
||||
add_style :alt_aggressive, attack_type: :slash, animation: 7048, button: 4
|
||||
add_style :defensive, attack_type: :stab, animation: 7049, button: 5
|
||||
end
|
||||
|
||||
# Need a separate WeaponClass for the dragon dagger because
|
||||
# of the differing animations
|
||||
create_weapon_class :dragon_dagger, widget: DAGGER_WIDGET_ID do
|
||||
default_speed 4
|
||||
special_bar DAGGER_SPECIAL_CONFIG_ID, DAGGER_SPECIAL_BUTTON_ID
|
||||
|
||||
attack_bonuses crush: -4, magic: 1
|
||||
defence_bonuses magic: 1
|
||||
|
||||
add_style :accurate, attack_type: :stab, animation: 402, button: 2
|
||||
add_style :aggressive, attack_type: :stab, animation: 402, button: 3
|
||||
add_style :alt_aggressive, attack_type: :slash, animation: 402, button: 4
|
||||
add_style :defensive, attack_type: :stab, animation: 402, button: 5
|
||||
end
|
||||
|
||||
create_weapon /(?:drag|dragon) dagger.*/, :dragon_dagger do
|
||||
set_special_attack energy_requirement: 25, animation: 1062, graphic: {id: 252, height: 100} do |source, target|
|
||||
damage! source, target, CombatUtil::calculate_hit(source, target)
|
||||
damage! source, target, CombatUtil::calculate_hit(source, target), 1
|
||||
end
|
||||
end
|
||||
@@ -1,17 +1,18 @@
|
||||
SCIMITAR_WIDGET_ID = 81
|
||||
SCIMITAR_SPECIAL_BAR_ID = 21
|
||||
SCIMITAR_WIDGET_ID = 81
|
||||
SCIMITAR_SPECIAL_BAR_CONFIG_ID = 21
|
||||
SCIMITAR_SPECIAL_BAR_BUTTON_ID = 21
|
||||
|
||||
create_weapon_class :scimitar, widget: SCIMITAR_WIDGET_ID do
|
||||
default_speed 4
|
||||
special_bar SCIMITAR_SPECIAL_BAR_ID
|
||||
special_bar SCIMITAR_SPECIAL_BAR_CONFIG_ID, SCIMITAR_SPECIAL_BAR_BUTTON_ID
|
||||
|
||||
attack_bonuses crush: -2
|
||||
defence_bonuses slash: -1
|
||||
|
||||
add_style :accurate, attack_type: :slash, animation: 390
|
||||
add_style :aggressive, attack_type: :slash, animation: 390
|
||||
add_style :alt_aggressive, attack_type: :stab, animation: 391
|
||||
add_style :defensive, attack_type: :slash, animation: 390
|
||||
add_style :accurate, attack_type: :slash, animation: 390, button: 2
|
||||
add_style :aggressive, attack_type: :slash, animation: 390, button: 3
|
||||
add_style :alt_aggressive, attack_type: :stab, animation: 391, button: 4
|
||||
add_style :defensive, attack_type: :slash, animation: 390, button: 5
|
||||
end
|
||||
|
||||
create_weapon :iron_scimitar do
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
TWO_HANDED_SWORD_WIDGET_ID = 82
|
||||
TWO_HANDED_SWORD_SPECIAL_ID = 12
|
||||
TWO_HANDED_SWORD_SPECIAL_CONFIG_ID = 12
|
||||
TWO_HANDED_SWORD_SPECIAL_BUTTON_ID = 10
|
||||
|
||||
create_weapon_class :two_handed_sword, widget: TWO_HANDED_SWORD_WIDGET_ID do
|
||||
default_speed 7
|
||||
special_bar TWO_HANDED_SWORD_SPECIAL_ID
|
||||
|
||||
special_bar TWO_HANDED_SWORD_SPECIAL_CONFIG_ID, TWO_HANDED_SWORD_SPECIAL_BUTTON_ID
|
||||
|
||||
animations stand: 7047, walk: 7046, run: 7039, idle_turn: 7044, turn_around: 7044, turn_left: 7043, turn_right: 7044
|
||||
|
||||
|
||||
attack_bonuses stab: -4, magic: -4
|
||||
defence_bonuses range: -1
|
||||
|
||||
add_style :accurate, attack_type: :slash, animation: 7041
|
||||
add_style :aggressive, attack_type: :crush, animation: 7041
|
||||
add_style :alt_aggressive, attack_type: :crush, animation: 7048
|
||||
add_style :defensive, attack_type: :slash, animation: 7049
|
||||
add_style :accurate, attack_type: :slash, animation: 7041, button: 2
|
||||
add_style :aggressive, attack_type: :crush, animation: 7041, button: 3
|
||||
add_style :alt_aggressive, attack_type: :crush, animation: 7048, button: 4
|
||||
add_style :defensive, attack_type: :slash, animation: 7049, button: 5
|
||||
end
|
||||
|
||||
create_weapon :iron_2h_sword do
|
||||
@@ -49,4 +50,8 @@ end
|
||||
create_weapon :dragon_2h_sword do
|
||||
attack_bonuses slash: 92, crush: 80
|
||||
other_bonuses melee_strength: 70
|
||||
|
||||
set_special_attack energy_requirement: 60, animation: 3157, graphic: 1225 do |source, target|
|
||||
damage! source, target, 5
|
||||
end
|
||||
end
|
||||
@@ -1,4 +1,4 @@
|
||||
create_weapon_class :unarmed, widget: -1 do
|
||||
create_weapon_class :no_weapon, widget: 92 do
|
||||
default_speed 4
|
||||
|
||||
add_style :accurate, animation: 422, block_animation: 424
|
||||
@@ -6,6 +6,6 @@ create_weapon_class :unarmed, widget: -1 do
|
||||
add_style :defensive, animation: 422, block_animation: 424
|
||||
end
|
||||
|
||||
create_weapon :no_weapon, :unarmed, named: true do
|
||||
create_weapon :unarmed, :no_weapon, named: true do
|
||||
# Todo factor out empty blocks
|
||||
end
|
||||
Reference in New Issue
Block a user