Author Topic: Possible bug in the combat AI (or is it a feature?)  (Read 314 times)

Online Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2235
Re: Possible bug in the combat AI (or is it a feature?)
« Reply #15 on: August 16, 2017, 08:18:09 PM »
Quote
cardinality of the set of free attacks should be aleph-null.

Experience tells me that someone will complain
that it is not sufficient for his design.
 "FRUA has no such limit!!!"

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Possible bug in the combat AI (or is it a feature?)
« Reply #16 on: August 23, 2017, 04:36:15 PM »
99999 seems like too small a number. I think the number of free attacks should be infinity.

Change these two scripts in the "Competing" Special Ability. This should allow for unlimited free attacks, unless the combatant is holding a ranged weapon.

Code: [Select]
[FreeAttack-AttackOver] = $RETURN;

[FreeAttack-CanFreeAttack] = $VAR rangeWpn; $VAR par8;
rangeWpn = $GET_ITEM_SA($GET_CHAR_Ready($AttackerContext(), "WEAPON", 0),"item_CombatAim");
par8 = $GET_HOOK_PARAM(8);
$IF (rangeWpn != "-?-?-"){$RETURN "N";}
$ELSE {$RETURN "Y";};

Thanks, Nol. :) Now everyone who wants the unlimited free attacks in their designs can easily do it.

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1952
Re: Possible bug in the combat AI (or is it a feature?)
« Reply #17 on: August 24, 2017, 12:27:27 AM »
It appears from the initial animation that, when the fighter moves away from the werewolf, the werewolf's attack pose is shown, but with the text "Werewolf is guarding" instead of the werewolf attacking. I think this must be an error/bug. The "is guarding" text should not be displayed when the character moves away.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Possible bug in the combat AI (or is it a feature?)
« Reply #18 on: August 24, 2017, 12:27:42 PM »
If it should say anything else, it should say "free attacking..."

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 143
Re: Possible bug in the combat AI (or is it a feature?)
« Reply #19 on: August 24, 2017, 05:35:39 PM »
Or 'Attack of Opportunity'.

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1952
Re: Possible bug in the combat AI (or is it a feature?)
« Reply #20 on: August 24, 2017, 09:09:06 PM »
Shouldn't it just say "X attacks Y, hitting for Z points of damage" (or whatever the standard "attack" text is)?

(I agree that, if something special is to be displayed, then "Attack of opportunity" is preferable.) The ability to make an attack of opportunity does not (or should not) depend upon whether the combatant is "guarding" -- so the present message does seem inapt.
« Last Edit: August 24, 2017, 09:10:40 PM by steve_mcdee »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Possible bug in the combat AI (or is it a feature?)
« Reply #21 on: August 25, 2017, 01:15:45 PM »
Shouldn't it just say "X attacks Y, hitting for Z points of damage" (or whatever the standard "attack" text is)?

(I agree that, if something special is to be displayed, then "Attack of opportunity" is preferable.) The ability to make an attack of opportunity does not (or should not) depend upon whether the combatant is "guarding" -- so the present message does seem inapt.

It actually doesn't depend on whether or not the combatant is guarding. It was just coincidence that it said that.
Why? As far as the player is concerned, the combatant is making an attack (oc opportunity), but as far as the engine goes, a script is being run that emulates an attack.