Author Topic: Guarding attacks after movement  (Read 347 times)

Offline StultusTemporis

  • Newbie
  • *
  • Posts: 38
Guarding attacks after movement
« on: September 03, 2017, 08:10:58 PM »
It is my understanding that if a combatant takes the "guard" action, and another combatant triggers the action, then the attack occurs after the target has finished moving.  Normally, the order that this happens in wouldn't matter.  However, there are a few instances where it does.  Consider, for example, the Giant Weasel.

The weasel applies the "IsHugged" SA to the target, which reduces the target's movement to 0.  If the weasel attacks as it normally does, this results in the target being hugged directly next to the weasel, which is how it's supposed to work.  If, however, the attack occurs due to the target moving while the weasel is guarding, then the attacker finishes the movement before having its movement reduced to 0 -- ending up being hugged with a square of space between it an the weasel.  The hapless character can only spin in place while the weasel sucks it safely dry from one square away. 

Would it be possible to resolve the guarding attack after the target is commanded to move, but before the computer moves the character?  That way, the character would still provoke the attack, but would not be put in a position where they could not reach the weasel that's hugging them.

Mini mod attached.

Online Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2235
Re: Guarding attacks after movement
« Reply #1 on: September 03, 2017, 09:58:36 PM »
We will most assuredly wait for Manikus to
provide his expertise.  Hopefully the day after
tomorrow. 

Perhaps "IsHugged" should not be successful
during a 'free attack'.  Perhaps it should wear off
quickly.  We will wait for instruction.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Guarding attacks after movement
« Reply #2 on: September 07, 2017, 01:48:29 PM »
Thanks for the mini-mod. I've downloaded and this bug is in the queue.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2180
    • Nol Drek's Web Site
Re: Guarding attacks after movement
« Reply #3 on: September 07, 2017, 06:24:53 PM »
I agree with Stultus Temporus that the guarding attack should take place BEFORE the combatant moves one square away, not after.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1952
Re: Guarding attacks after movement
« Reply #4 on: September 07, 2017, 07:04:29 PM »
I'm a bit confused. Are we talking about a "guarding" attack - which should occur when a combatant moves into a square adjacent to an enemy who is set to "Guarding" status - or are we talking about an attack of opportunity, which should occur whenever a combatant goes to move from a square that is adjacent to an enemy into a square that is not adjacent to the enemy (and this should not depend on whether the enemy is set to "Guarding" status)?

In the former case, the attack should occur immediately after the enemy moves into the adjacent square. In the latter case, the attack should occur when the enemy attempts to move away but before the move actually occurs.

Offline StultusTemporis

  • Newbie
  • *
  • Posts: 38
Re: Guarding attacks after movement
« Reply #5 on: September 07, 2017, 07:18:44 PM »
My apologies.  It's the Attack of Opportunity that is taking place after the movement has already occurred.  Thank you for the clarification.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2180
    • Nol Drek's Web Site
Re: Guarding attacks after movement
« Reply #6 on: September 08, 2017, 09:53:08 AM »
Sorry, I was referring to an attack of opportunity, regardless of whether or not the attacker is guarding.

In the former case (guarding attack), the attack should occur immediately after the enemy moves into the adjacent square. In the latter case (attack of opportunity), the attack should occur when the enemy attempts to move away but before the move actually occurs.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Guarding attacks after movement
« Reply #7 on: September 30, 2017, 03:08:00 PM »
I am looking at the Attack of Opportuinity bug this weekend. I don't think Paul needs to fix the engine, I think I just need to fix the script.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Guarding attacks after movement
« Reply #8 on: October 03, 2017, 04:29:17 PM »
Is it acceptable to you folk that the solution to this problem is that an attack of opportunity can not result in a "IsHugged" outcome?

Offline StultusTemporis

  • Newbie
  • *
  • Posts: 38
Re: Guarding attacks after movement
« Reply #9 on: October 03, 2017, 08:02:46 PM »
That would fix the problem for the time being.  It would stop the trouble I observed, and would prevent the player from ending up in an unwinnable situation.

That said, this might be a good problem to put a pin in for later.  The current way attacks of opportunity work is a little different from how a player, or module creator, would expect them to work at first glance.  Sometimes this is harmless, such as a character dying one square away from where one would expect them to die.  Sometimes it has the potential to break the game, such as in this example. 

Question:

Your question suggests that attacks of opportunity can be differentiated from normal attacks, and can be used to trigger scripts separate from normal attacks.  Could one write a script that tracks where a target is moving and moves the target back to the square they last occupied?  Could one then trigger this script if the "IsHugged" condition is applied due to an attack of opportunity?  Not only would this eliminate the problem, but it would also add a tool to the module creator's toolbox.  For instance, it could be used to create a creature that, when guarding, pushes characters that try to engage in melee away, forcing characters to either engage it at range or have it engage them first.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2180
    • Nol Drek's Web Site
Re: Guarding attacks after movement
« Reply #10 on: October 03, 2017, 08:42:56 PM »
Is it acceptable to you folk that the solution to this problem is that an attack of opportunity can not result in a "IsHugged" outcome?

Maybe. What about an attack of opportunity that results in an "IsParalyzed", "IsEngulfed", or "IsHeld" outcome?
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 143
Re: Guarding attacks after movement
« Reply #11 on: October 04, 2017, 02:37:53 AM »
Could one write a script that tracks where a target is moving and moves the target back to the square they last occupied? 
If so, I would like it if DungeonCraft implemented the same behavior of the ESC key in the game combat. The IBM versions of the Gold Box Games allowed the moving PC to expend their entire range—and optionally (if they chose) UNDO that entire movement, and revert to where the PC was at the start of their turn.

This allows the player to change their mind on the path their PC takes from point A to point B during combat.

**Notably: this does not undo and attack-of-opportunity damage they may have taken that turn before they canceled the move.  However, this may have been an engine limitation... It seems like it might be exploitable to use up the enemy's single Guard attack with one PC, so that another PC might pass them unharmed.

I would not mind if undoing the move negated AOO attack damage, and restored the guard attack to the NPC.
« Last Edit: October 04, 2017, 02:45:09 AM by Mechanaut »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Guarding attacks after movement
« Reply #12 on: October 04, 2017, 03:04:56 PM »
That would fix the problem for the time being.  It would stop the trouble I observed, and would prevent the player from ending up in an unwinnable situation.

That said, this might be a good problem to put a pin in for later.  The current way attacks of opportunity work is a little different from how a player, or module creator, would expect them to work at first glance.  Sometimes this is harmless, such as a character dying one square away from where one would expect them to die.  Sometimes it has the potential to break the game, such as in this example. 
i don't want to fix this issue twice if once will suffice.
I'll make a mini-mod so that Paul and I can discuss this. :D

Question:

Your question suggests that attacks of opportunity can be differentiated from normal attacks, and can be used to trigger scripts separate from normal attacks.  Could one write a script that tracks where a target is moving and moves the target back to the square they last occupied?  Could one then trigger this script if the "IsHugged" condition is applied due to an attack of opportunity?  Not only would this eliminate the problem, but it would also add a tool to the module creator's toolbox.  For instance, it could be used to create a creature that, when guarding, pushes characters that try to engage in melee away, forcing characters to either engage it at range or have it engage them first.
Attacks of Opportunity are not actuall attacks. Nor are guarding attacks. They are scripted damage that we have made to look like an attack.
As for scripts that move combatants around...I have been thinking about this for a while but have not actually messed areound iwth it yet (I want to create items or spells that have knockback). I will look into this and let y'all know, but this is a separate issue and would be a band-aid to fix the AoO IsHugged issue.

Is it acceptable to you folk that the solution to this problem is that an attack of opportunity can not result in a "IsHugged" outcome?

Maybe. What about an attack of opportunity that results in an "IsParalyzed", "IsEngulfed", or "IsHeld" outcome?
It could be for IsParalyzed and IsHeld that the combatants momentum carried them into the next cell, and for IsEngulfed, that the engulfing took just lone enough....no that doesn't work either. ;)

I am just joking about the rationalizations. I can do the same thing for these other issues as I can for IsHugged. So, I will make that mini-mod so Paul and I can work on this.

Could one write a script that tracks where a target is moving and moves the target back to the square they last occupied? 
If so, I would like it if DungeonCraft implemented the same behavior of the ESC key in the game combat. The IBM versions of the Gold Box Games allowed the moving PC to expend their entire range—and optionally (if they chose) UNDO that entire movement, and revert to where the PC was at the start of their turn.

This allows the player to change their mind on the path their PC takes from point A to point B during combat.
So, you only want UNDO if we can script a way to move combatants? ;)
I assume you mean that you would like to request UNDO and hope that is doable. When this was brought up before, both Paul and I said, "You can UNDO moves in FRUA?" This was news to us, and a good reason why no one had ever coded it into the program.
I suspect this will take quite some convincing, but I could be wrong. We'll find out when this works it way up the Feature Request list.

**Notably: this does not undo and attack-of-opportunity damage they may have taken that turn before they canceled the move.  However, this may have been an engine limitation... It seems like it might be exploitable to use up the enemy's single Guard attack with one PC, so that another PC might pass them unharmed.

I would not mind if undoing the move negated AOO attack damage, and restored the guard attack to the NPC.
We will worry about UNDO when we get to that bridge...

Offline ProphetSword

  • Mod Designer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2901
  • FRUA Lives!
    • Lands of Adventure
Re: Guarding attacks after movement
« Reply #13 on: October 04, 2017, 03:46:12 PM »
Attacks of Opportunity are not actual attacks. Nor are guarding attacks. They are scripted damage that we have made to look like an attack.

If these aren't actual attacks, is there a chance to miss?
LANDS OF ADVENTURE: An Old-School Style CRPG

More Information Here: http://landsadventure.blogspot.com/

Offline ProphetSword

  • Mod Designer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2901
  • FRUA Lives!
    • Lands of Adventure
Re: Guarding attacks after movement
« Reply #14 on: October 04, 2017, 03:48:15 PM »
I would not mind if undoing the move negated AOO attack damage, and restored the guard attack to the NPC.

Wouldn't that destroy some of the danger of tactical movement?

For example:  I move somewhere and provoke an AOO, only to have my character reduced to 1 HP.  Oops, let me back that up...

LANDS OF ADVENTURE: An Old-School Style CRPG

More Information Here: http://landsadventure.blogspot.com/