Skip to content

Commit

Permalink
Tool special attack now executes when the orb is clicked. Just one is…
Browse files Browse the repository at this point in the history
…sue: It does not un-focus the special attack bar.
  • Loading branch information
CloudS3c committed May 11, 2023
1 parent f313797 commit 52c1b23
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ on_button(interfaceId = ATTACK_TAB_INTERFACE_ID, component = 30) {
player.toggleVarp(DISABLE_AUTO_RETALIATE_VARP)
}


on_button(interfaceId = 160, component = 35) {
val weaponId = player.equipment[EquipmentType.WEAPON.id]!!.id
if (SpecialAttacks.executeOnEnable(weaponId)) {
if (!SpecialAttacks.execute(player,null, world)) {
player.message("You don't have enough power left.")
}
} else {
player.toggleVarp(SPECIAL_ATTACK_VARP)
}
}


/**
* Toggle special attack.
*/
Expand Down

0 comments on commit 52c1b23

Please sign in to comment.