attack style failsafe.

This commit is contained in:
Tooze 2026-05-27 00:25:25 -04:00
parent 5aecc3f4a0
commit 6b2d123184

View file

@ -23,14 +23,12 @@ import core.tools.RandomFunction
class BACombatState(private val bot: BABot) {
//session.roleCalls[BarbRole.ATTACKER]?.toCall
fun fightNPCs() {
bot.customState = "Fight NPCs"
bot.AttackNpcsInRadius(25)
//use Called AttackStyle
val baSession = getBASession(bot) ?: return
val called = baSession.roleCalls[BarbRole.COLLECTOR]?.called as AttackerStyle
val called = (baSession.roleCalls[BarbRole.COLLECTOR]?.called ?: AttackerStyle.values().random() ) as AttackerStyle
bot.properties.attackStyle = AttackStyle(called.attackStyle, BONUS_SLASH)
}