dr-scripts icon indicating copy to clipboard operation
dr-scripts copied to clipboard

tendme drops weapons - problem

Open yuoree opened this issue 8 years ago • 3 comments

[tendme]>drop my bastard sword

Tendme did this when it was called in combat to tend a bleeder. Caused combat to throw a fit trying to wield a sword on the ground in front of it, which lead to death.

yuoree avatar Jan 12 '18 15:01 yuoree

Do you have more of this log by any chance?

jandersson avatar Jan 23 '18 15:01 jandersson

This is from just before wounded, to when it causes things to hang up when it can't sheathe the weapon after it drops it - it stays broken and didn't fix itself.

Looking at it again, I actually suspect the arrow in me caused the issue - drops it then the sword.


< Driving in like an adept combatant, you jab a bastard sword at a Dragon Priest sentinel.  A Dragon Priest sentinel fails to evade, moving almost completely out of harm's reach.  The sword lands a light hit to the sentinel's chest.
[You're winded, adeptly balanced and overwhelming opponent.]
[Roundtime 2 sec.]
* Ineptly, an armored shalswar lowers its head slightly and lunges forward in an attempt to bite at you.  You dodge.  
[You're winded, adeptly balanced and in superior position.]

[combat-trainer]>pre DF 1

That won't affect your current attunement very much.
With calm movements you prepare your body for the Deadfall spell.

[combat-trainer]>attack

< Moving with the precision of a mongoose, you slice a bastard sword at a Dragon Priest sentinel.  A Dragon Priest sentinel fails to evade, avoiding only some of the blow.  The sword lands a heavy strike that painfully mashes several toes of the left foot.
[You're winded, adeptly balanced and overwhelming opponent.]
[Roundtime 4 sec.]
The Dragon Priest zealot riding the armored shalswar snatches the triangular dagger attached to a fine steel chain dangling at its hip and begins spinning the blade wildly through the air.  With a smooth snap of its wrist, the armored shalswar sends the dagger flying towards you in a blur of deadly steel!
Moving a moment too late, the triangular blade lands a heavy strike that rips into your chest!  With a savage pull, the Dragon Priest zealot yanks upward on the chain connected to the dagger, tearing the blade from your flesh with a shower of bone and blood!
[You're bruised, nimbly balanced and in strong position.]

[hunting-buddy: ***STATUS*** stopping due to bleeding]

[tendme]>heal

Your body feels slightly battered.
Your spirit feels full of life.
You are slightly fatigued.
You have some minor abrasions to the left arm, cuts and bruises about the right leg, a shattered chest area with gaping wounds, some tiny scratches to the abdomen.

Bleeding
            Area       Rate              
-----------------------------------------
           chest       severe

You have a silver-tipped arrow lodged shallowly into your left leg.


[combat-trainer]>sheath my bastard.sword

The Dragon Priest zealot riding the armored shalswar snatches the triangular dagger attached to a fine steel chain dangling at its hip and begins spinning the blade wildly through the air.  With a smooth snap of its wrist, the armored shalswar sends the dagger flying towards you in a blur of deadly steel!
Stepping sideways with agile movements, you manage to easily evade the triangular blade, which speeds past you to lodge shallowly in the ground nearby.
[You're bruised, nimbly balanced and in strong position.]
A Dragon Priest sentinel leaps to its feet with a bloodthirsty snarl.
You sheathe the bastard sword in your duffel bag.

[combat-trainer]>wield my bastard.sword

You draw out your bastard sword from the duffel bag, gripping it firmly in your right hand.

[tendme]>tend my left leg

[combat-trainer]>swap my sword

You skillfully remove the silver-tipped arrow from your leg leaving the wound no worse than it was before.
Roundtime: 5 seconds.
...wait 4 seconds.
You feel fully prepared to cast your spell.
* In a weak and directionless display of aggression, a Dragon Priest sentinel fires a silver-tipped arrow at you.  You block solidly with a gargoyle-hide buckler.  
The silver-tipped arrow hits the ground and shatters to pieces!
[You're bruised, nimbly balanced and in strong position.]
* Tentatively, a Dragon Priest sentinel snarls and snaps its fanged maw at you.  You evade.  
[You're bruised, nimbly balanced and in dominating position.]

[tendme]>drop my silver-tipped arrow

[combat-trainer]>swap my sword

You drop a silver-tipped arrow.

[tendme]>drop my bastard sword

With cat-like grace, you languidly shift your stance and grip your sword so it can be used as a two-handed edged weapon.

[combat-trainer]>cast

You drop a bastard sword.
You gesture at a Dragon Priest sentinel.
Small globes of blue and orange light appear and dart upward like fireflies.
Creating an ominous shadow, a long pine limb falls from above!
The limb slams heavily into a Dragon Priest sentinel, knocking it completely out!
Roundtime: 2 sec.

[tendme]>tend my left leg

...wait 1 seconds.

[tendme]>tend my left leg

That area is not bleeding.

[tendme]>tend my chest

The pine limb rapidly decays away.

[combat-trainer]>retreat

The armored shalswar begins to advance on you!
The armored shalswar is still a distance away from you and is closing steadily.
a Dragon Priest sentinel hisses softly in its sleep.
Your task is made more difficult by being in combat.
You work carefully at tending your wound.
Doing your best, you are able to stop the bleeding.
You retreat back to pole range.

[combat-trainer]>retreat

You retreat from combat.

[combat-trainer]>sheath my bastard.sword

Sheathe what?
You feel fully rested.
You feel fully attuned to the mana streams again.
The armored shalswar begins to advance on you!
The armored shalswar is still a distance away from you and is closing steadily.
The armored shalswar closes to pole weapon range on you!
A Dragon Priest sentinel makes a complex gesture and produces a slender silver needle from thin air, gripping it gently between its middle and index fingers.  With an agile flick of the wrist, it hurls the needle at you with a malicious sneer!
The air seems to hum as the silver needle flies toward you, lodging the face of your gargoyle-hide buckler before melting away into a viscous solution.
[You're bruised, nimbly balanced and in good position.]
The armored shalswar closes to pole weapon range on you!
An armored shalswar with a Dragon Priest perched upon its back skulks into view with a rumbling growl.
a Dragon Priest sentinel hisses softly in its sleep.
The armored shalswar closes to melee range on you!
A Dragon Priest perched upon the an armored shalswar yanks on its reins with a bloodthirsty cry, forcing the an armored shalswar to rear backwards with a vicious snarl.
The armored shalswar closes to melee range on you!

[combat-trainer: *** No match was found after 15 seconds, dumping info]

[combat-trainer: messages seen length: 22]

[combat-trainer: message: The armored shalswar closes to melee range on you!]```

yuoree avatar Jan 23 '18 15:01 yuoree

@KatoakDR There are so many issues like this, related to tending bleeders/wounds that I think it's worth looking at as a whole. @asechrest just tagging for visibility.

MahtraDR avatar Jan 05 '22 07:01 MahtraDR

Looking into this. A 15 second glance seems like tendme got confused about dropping the lodged item(s) it tended.

Fairly ugly issue. Item loss.

asechrest avatar Jan 22 '23 16:01 asechrest

I believe this was resolved since the issue was originally opened. We used to take a snapshot of what was in the left and right hands, then dispose of items in BOTH hands if the item in the hand no longer matched the snapshot of what was in that hand. Good in theory, but the log above shows that this was a recipe for item loss if the scenario changed just before or after the snapshot.

Old code:

    snap = [DRC.left_hand, DRC.right_hand]
    result = DRC.bput("tend #{person} #{body_part}", *tend_success, *tend_failure, *tend_dislodge)
    waitrt?
    case result
    when *tend_dislodge
      DRCI.dispose_trash(DRC.left_hand, get_settings.worn_trashcan, get_settings.worn_trashcan_verb) if DRC.left_hand != snap.first
      DRCI.dispose_trash(DRC.right_hand, get_settings.worn_trashcan, get_settings.worn_trashcan_verb) if DRC.right_hand != snap.last

The tendme code now captures the item that was tended and explicitly disposes of that item, rather than just whatever was in the hand.

New code:

tend_dislodge = [
      /^You \w+ remove (a|the|some) (.*) from/,
      /^As you reach for the clay fragment/
    ]

    result = DRC.bput("tend #{person} #{body_part}", *tend_success, *tend_failure, *tend_dislodge)
    waitrt?
    case result
    when *tend_dislodge
      DRCI.dispose_trash(Regexp.last_match(2), get_settings.worn_trashcan, get_settings.worn_trashcan_verb)
      bind_wound(body_part, person)

Closing as resolved.

asechrest avatar Jan 22 '23 16:01 asechrest