AmProsius / gothic-1-community-patch

Gothic 1 Community Patch
Other
50 stars 4 forks source link

Grash-Varrag-Arushat changes his mood to the opposite after every received hit because of aivar[AIV_SPECIALCOMBATDAMAGEREACTION] #357

Open OrcPriestPsychologist opened 2 years ago

OrcPriestPsychologist commented 2 years ago

Describe the bug

When you hit the shaman during a fight his TempAttitude and PermAttitude switch to "Neutral/Neutral". He removes the weapon. Then draws the weapon again but doesn't attack the player immediately. Because he is not angry or hostile. He just feels threat from the player because of the player's weapon. If the player doesn't attack him and removes the weapon too Grash-Varrag-Arushat removes his weapon again. And just stands without attacking.

If you attack him in this state his attitudes switch to hostile/angry. Attack him again -- neutral/neutral. Another attack -- hostile/angry. You can do this indefinitely.

The scripts that switch the shaman to the "now you can attack the player" mode doesn't clear aivar[AIV_SPECIALCOMBATDAMAGEREACTION]. That's why B_Story_EncounteredHighPriest(); keeps being called when it's unnecessary. And it affects both attitudes:

https://github.com/AmProsius/gothic-1-community-patch/blob/2892a60a3edf33340d7907fe7b3c137d079e8474/scriptbase/_work/Data/Scripts/Content/AI/B_Human/B_SpecialCombatDamageReaction.d#L12-L13

Clearing aivar[AIV_SPECIALCOMBATDAMAGEREACTION] manually with the console solves the problem. (edit abilities, aivar, 37 = 0)

Expected behavior Grash-Varrag-Arushat doesn't change his attitude to the opposide during combat after each hit. Both scripts that turn Grash-Varrag-Arushat against the player set aivar[AIV_SPECIALCOMBATDAMAGEREACTION] to 0.

Steps to reproduce the issue

  1. Get any weapon
  2. Enter the test mode
  3. Switch to Grash-Varrag-Arushat's body and press G to display his attitude.
  4. Return to the player's body.
  5. Start a fight against Grash-Varrag-Arushat.
  6. Notice his behaviour and how his attitude switches after the player hits him.
OrcPriestPsychologist commented 2 years ago

https://user-images.githubusercontent.com/117261406/200105845-2e111026-1225-4b2d-bde5-38449d9f3f9f.mp4

Looks like sometimes it requires more hits