'The flip does shock you'

I really don’t know what happened here, but hopefully someone might be able to figure it out from my description…

I went down into a basement, saw it was spiders, and came back up. Meanwhile a skeletal dog tried to get in the way.
I arrived at the top of the stairs and tried to take a step. Suddenly a massive amount of time passes and I’m dead.

I view the deathcam and the message log is full of repetitions of
The Z9 hits your left hand.
but you grab it’s hand and flip it to the ground!
The flip does shock you…
The Z9 hits your torso.
but you grab it’s hand and flip it to the ground!
The flip does shock you…
The Z9 hits your head.
but you grab it’s hand and flip it to the ground!
The flip does shock you…
The skeletal dogs fails to push you back!

This went on for hours until I was dead.
I was unarmed and had Judo selected as my style and was not particularly skilled (about 3).

(The skeletal dog in question appears to have become a corpse at some point)

Version: cb7dabb
Mods: [

You’re supposed to judo-flip creatures who try to push you off the stairs. Someone (may have been me) simplified the function to remove the check for zapback.

Since monster attempting to push you off the stairs takes 50 (was 100 earlier) moves, being slower than that will mean you get attacked until you die. This judo flip prevents being pushed away from the stairs and the zapback keeps your moves too low to recover. “downed” status doesn’t work on creatures going upstairs, because they don’t process turns the normal way.

For now I’ll just remove the move cost and the flip. Monsters coming up the stairs will be altered radically relatively soon.

This is pretty messed up. If the monster doesn’t have zapback, it shouldn’t be zapping you, and the code doesn’t appear to actually care whether the monster actually has zapback - it would seem that when using the arm-flip thing, you always stand a chance of getting electrocuted, even if the monster in question is a housecat.

Also we might want to reword it so it doesn’t specifically say ‘you grab its hand’ for cases where the monster doesn’t actually have hands.

Flip by judo function is only used in two places: bio_op special ability and the stairs. If it was to be used against all the other stuff, it should have special cases for stuff to big to throw, for stuff too heavy to flip and for stuff that simply shouldn’t be thrown.

I’m pretty sure with the way it is currently handled you could cheese (to death) a tank drone with it.

The stairs is where I’m thinking it’s weird; since it’s not actually checking for the presence of zapback whatsoever, it would seem that a hostile squirrel trying to come up the stairs below you might just cause you to get electrocuted when this code executes.

Yeah, it may have been just me (or someone else) overly zealously pruning the code, since nothing there makes sense when you think of it as happening on the stairs.