rpherbig / dr-scripts

A series of Lich 5 (https://github.com/elanthia-online/lich-5) scripts for use with DragonRealms (http://www.play.net/dr/). Donations are welcome (http://www.paypal.me/rcuhljr)!
GNU General Public License v2.0
52 stars 177 forks source link

Combat trainer: Face next or analyze issue in warklins? #3143

Closed lbacker88 closed 1 year ago

lbacker88 commented 6 years ago

Been running into this issue in warklins since I moved here. Not sure if you need more information.

Also - Had to remove whirlwind completely because it gets stuck in a broken loop trying to whirl with no weapons out after this bug occurs.

[combat-trainer]>loot You search the armored warklin. The warklin was carrying a huge covellite nugget!

[combat-trainer]>analyze flame

Analyze what?

[combat-trainer]>face next You turn to face an armored warklin.

[combat-trainer]> A shift in the breeze accompanies the arrival of an agitated warklin mauler. A warklin mauler carefully picks its way into view.

The warklin mauler begins to advance on you! The warklin mauler advances from nearby and is closing steadily.

  • As if fumbling muscle flab were natural, an armored warklin lunges with its razorlike mandibles at you. You repulse some of the mandibles with a steel bastard sword. [You're winded, nimbly balanced and in good position.]

An armored warklin's body falls apart.

Lord General Reverence just arrived.

Lord General Reverence goes south.

The warklin mauler closes to melee range on you!

  • Awkwardly, an armored warklin lunges with its razorlike mandibles at you. You slap away some of the mandibles with a steel bastard sword. [You're adeptly balanced and in very strong position.]

  • Apparently without direction or thought, an armored warklin thrusts its deadly mandibles at you. You knock aside most of the mandibles with a steel bastard sword. [You're adeptly balanced and in strong position.]

  • Looking as if this were a bad idea, a warklin mauler twists its torso wildly, thrusting its impalers at you. You knock aside most of the impaler with a steel bastard sword. [You're adeptly balanced and in better position.]

You feel fully rested.

l [Abandoned Mine, Tunnel] Carts still filled with ore, rich veins in the rock face, pick axes and shovels all provide further evidence of a hasty departure by the miners that plied their trade here. You also see an armored warklin, an armored warklin, a warklin mauler and a huge covellite nugget. Obvious exits: south. Room Number: 7277

  • As if fumbling muscle flab were natural, an armored warklin snaps its mandibles at you. You evade, stepping out of harm's way. [You're nimbly balanced and in better position.]

  • As if fumbling muscle flab were natural, an armored warklin lunges with its razorlike mandibles at you. You beat off some of the mandibles with a steel bastard sword. [You're nimbly balanced with no advantage.]

  • As if effort and skill were a bad thing, a warklin mauler twists its torso wildly, thrusting its impalers at you. You dodge, moving out of the way. [You're nimbly balanced with opponent in good position.]

[combat-trainer: ** No match was found after 15 seconds, dumping info] [combat-trainer: messages seen length: 32] [combat-trainer: message: [You're nimbly balanced with opponent in good position.]] [combat-trainer: message: As if effort and skill were a bad thing, a warklin mauler twists its torso wildly, thrusting its impalers at you. You dodge, moving out of the way. ] [combat-trainer: message: [You're nimbly balanced with no advantage.]] [combat-trainer: message: As if fumbling muscle flab were natural, an armored warklin lunges with its razorlike mandibles at you. You beat off some of the mandibles with a steel bastard sword. ] [combat-trainer: message: [You're nimbly balanced and in better position.]] [combat-trainer: message: As if fumbling muscle flab were natural, an armored warklin snaps its mandibles at you. You evade, stepping out of harm's way. ] [combat-trainer: message: Obvious exits: south.] [combat-trainer: message: Carts still filled with ore, rich veins in the rock face, pick axes and shovels all provide further evidence of a hasty departure by the miners that plied their trade here. You also see an armored warklin, an armored warklin, a warklin mauler and a huge covellite nugget.] [combat-trainer: message: [Abandoned Mine, Tunnel]] [combat-trainer: message: You feel fully rested.] [combat-trainer: message: [You're adeptly balanced and in better position.]] [combat-trainer: message: Looking as if this were a bad idea, a warklin mauler twists its torso wildly, thrusting its impalers at you. You knock aside most of the impaler with a steel bastard sword. ] [combat-trainer: message: [You're adeptly balanced and in strong position.]] [combat-trainer: message: Apparently without direction or thought, an armored warklin thrusts its deadly mandibles at you. You knock aside most of the mandibles with a steel bastard sword. ] [combat-trainer: message: [You're adeptly balanced and in very strong position.]] [combat-trainer: message: Awkwardly, an armored warklin lunges with its razorlike mandibles at you. You slap away some of the mandibles with a steel bastard sword. ] [combat-trainer: message: The warklin mauler closes to melee range on you!] [combat-trainer: message: Lord General Reverence goes south.] [combat-trainer: message: Lord General Reverence just arrived.] [combat-trainer: message: An armored warklin's body falls apart.] [combat-trainer: message: [You're winded, nimbly balanced and in good position.]] [combat-trainer: message: As if fumbling muscle flab were natural, an armored warklin lunges with its razorlike mandibles at you. You repulse some of the mandibles with a steel bastard sword. ] [combat-trainer: message: The warklin mauler advances from nearby and is closing steadily.] [combat-trainer: message: The warklin mauler begins to advance on you!] [combat-trainer: message: A warklin mauler carefully picks its way into view.] [combat-trainer: message: A shift in the breeze accompanies the arrival of an agitated warklin mauler.] [combat-trainer: checked against [/Wouldn't it be better if you used a melee weapon?/i, /Face What?/i, /Roundtime/i, /You aren't close enough to attack/i, /It would help if you were closer/i, /There is nothing else to face!/i, /You must be hidden/i]] [combat-trainer: for command ]

Tarhish commented 6 years ago

So we ran into this the other month where a condition existed if you were whirlwinding while use_weak_attacks was true.

I thought it got fixed, but it doesn't look like it was. I don't even know enough about barbs to know what the best way to fix it is, but the issue was in combat-trainer perform_analyze? when it gets an Analyze what? when your combo_array is empty. It then does 'face next' then returns true, which means it doesn't actually refill the combo array, and you don't end up with a melee action. So you get your last line 'combat-trainer: for command ] as the attack command.

I can't tell from your log, but if you have use_weak_attacks on then that's the same problem, and the temporary fix is to drop that.

Sarvatt commented 6 years ago

might be worth adding a warning to validate to not use_weak_attacks with whirlwind enabled

lbacker88 commented 6 years ago

Appears to be a different issue because my use_weak_attacks is not on.

Sarvatt commented 6 years ago

are you sure you're looking at the right yaml? use_weak_attacks: false exists in the warklin hunt yaml?

Sarvatt commented 6 years ago

so perform_analyze? needs to retry after this line in combat-trainer instead of just returning true most likely - https://github.com/rpherbig/dr-scripts/blob/master/combat-trainer.lic#L3294

Tarhish commented 6 years ago

Yeah that sounds right. But I don't want it to get stuck in a loop. Could we turn that fput face next into a case bput where it tries again if it gets 'You turn to face' or whatever, and just shoves something like a 'feint' into the array if it doesn't?

Tarhish commented 6 years ago

Actually, I'm not sure it would need anything when there aren't any mobs left, and I don't have a barbarian to help test debug stuff. But something like this?

    when 'Analyze what?'
      case bput('face next', 'You turn to face', 'There is nothing')
      when 'You turn to face'
        return perform_analyze?(combo_type, expertise_requirement)
      end
      return true
    end
lbacker88 commented 6 years ago

@Sarvatt the combat portion of the warklin yaml is as follows, willing to help test or lend the character for someone to test with if easier.

https://pastebin.com/XRYLJuy5

rpherbig commented 6 years ago

Let me know if I can help test a fix. I use both weak attacks and whirlwind on Sheltim, though I haven't seen this issue.

xtremenerdrage commented 6 years ago

This issue happens when kill a mob in between analyzes as well, not just when there are no mobs in the room.

Tarhish commented 6 years ago

I can see why that would happen after looking at this longer. Anything that uses update_analyze_array could run into problems if a mob is dead or it runs out of mobs right when the array empties.

I made a PR for this that I think should prevent this from happening, if some barbarian would mind trying it out someday.

MahtraDR commented 1 year ago

Closing as resolved by https://github.com/rpherbig/dr-scripts/pull/3170

Can reopen if it ever comes up again.