Bug #39569

Script trigger SpellCastInnate() should work correctly

Added by Daniel Rehr about 1 month ago. Updated about 1 month ago.

Status:SubmittedStart date:12/06/2018
Classification:Public ItemDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Found In Version:Public Bug Reports - 2.5.17.0

Description

1. Start a new BG2:ToB game with the Abdel pregen
2. C:SetCurrentXP(3000000)
3. Level up and choose the "War Cry" HLA
4. C:MoveToArea("AR5003") and move near Viekang (around x=1070,y=820)
5. Use War Cry ability

Observed
Viekang doesn't react to the War Cry effect.

Expected
War Cry should enable Viekang to teleport away.

Notes
Internal ticket #39643.

Only BG2:EE and IWD:EE appear to be affected.

The script trigger counterpart SpellCastInnateRES() works correctly with War Cry and any other innate abilities (in all games).

History

#1 Updated by Robert "Galactygon" Rath about 1 month ago

  • Status changed from New to Needs More Info

VIEKANG.bcs does not have any SpellCastInnate() checks in an unmodded game, see below:

IF
  OR(6)
    AttackedBy([0],DEFAULT)
    HitBy([0],CRUSHING)
    HPPercentLT(Myself,100)
    See([ENEMY])
    Heard([0],99)
    Heard([0],57)
  Global("Attacked","LOCALS",0)
  !Global("ViekangSeesPC","LOCALS",1)
THEN
  RESPONSE #100
    SetGlobal("Attacked","LOCALS",1)
    StartDialogNoSet([PC])
END

IF
  See(Player1)
  Range(Player1,30)
  Global("ViekangSeesPC","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobal("ViekangSeesPC","LOCALS",1)
    StartDialogNoSet(Player1)
END

Do you have repro steps that work?

#2 Updated by Daniel Rehr about 1 month ago

Saradush version of Viekang uses SARVIE01.BCS. This is the relevant script block:

IF
  OR(12)
    SpellCastPriest([ANYONE],CLERIC_CLOAK_OF_FEAR)  // SPPR416.SPL (Cloak of Fear)
    SpellCastPriest([ANYONE],CLERIC_SYMBOL_FEAR)  // SPPR706.SPL (Symbol, Fear)
    SpellCastPriest([ANYONE],CLERIC_INSECT_PLAGUE)  // SPPR517.SPL (Insect Plague)
    SpellCast([ANYONE],WIZARD_HORROR)  // SPWI205.SPL (Horror)
    SpellCast([ANYONE],WIZARD_SYMBOL_FEAR)  // SPWI811.SPL (Symbol, Fear)
    SpellCastOnMe([ANYONE],CLERIC_SYMBOL_FEAR)  // SPPR706.SPL (Symbol, Fear)
    SpellCastOnMe([ANYONE],WIZARD_SPOOK)  // SPWI125.SPL (Spook)
    SpellCastOnMe([ANYONE],WIZARD_HORROR)  // SPWI205.SPL (Horror)
    SpellCastOnMe([ANYONE],WIZARD_SYMBOL_FEAR)  // SPWI811.SPL (Symbol, Fear)
    SpellCastInnate([ANYONE],AURA_OF_DESPAIR)  // SPCL103.SPL (Aura of Despair)
    SpellCastInnate([ANYONE],WARRIOR_WAR_CRY)  // SPCL908.SPL (War Cry)
    StateCheck(Myself,STATE_PANIC)
  Global("ViekangBye","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobal("ViekangBye","LOCALS",1)
    StartDialogueNoSet([PC])
END

Changing the SpellCastInnate() instances into their SpellCastInnateRES() counterparts makes Viekang detect the abilities correctly.

#3 Updated by Daniel Rehr about 1 month ago

  • Description updated (diff)

#4 Updated by Robert "Galactygon" Rath about 1 month ago

  • Description updated (diff)
  • Status changed from Needs More Info to Submitted

Thanks, was able to reproduce. Filed internally as #39643.

Also available in: Atom PDF