Skip to content

Commit

Permalink
v1.01.05
Browse files Browse the repository at this point in the history
Added enemy checks to Slow AI conditionals.
  • Loading branch information
valkrana committed Sep 27, 2024
1 parent 4123cfe commit a054aed
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Binary file modified BG2EE - Valkrana Companion NPC.zip
Binary file not shown.
24 changes: 21 additions & 3 deletions Valkrana/Scripts/vvVALKAI.baf
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,8 @@ IF
ActionListEmpty()
Global("BDAI_DISABLE_OFFENSIVE","LOCALS",0)
Global("BDAI_NO_ARCANE","LOCALS",0)
See(NearestEnemyOf(Myself))
NumCreatureGT([EVILCUTOFF],4)
HaveSpell(WIZARD_CHAIN_LIGHTNING) // SPWI615.SPL (Chain Lightning)
!HasBounceEffects(LastSeenBy(Myself))
!Range(LastSeenBy(Myself),10)
Expand Down Expand Up @@ -1698,8 +1700,24 @@ IF
Global("BDAI_DISABLE_OFFENSIVE","LOCALS",0)
Global("BDAI_NO_ARCANE","LOCALS",0)
HaveSpell(WIZARD_SLOW) // SPWI312.SPL (Slow)
NumCreatureGT([EVILCUTOFF],3)
See(NearestEnemyOf(Myself))
!StateCheck(LastSeenBy(Myself),STATE_SLOWED)
!Range(LastSeenBy(Myself),10)
!StateCheck(LastSeenBy(Myself),STATE_NOT_TARGETABLE)
!StateCheck(LastSeenBy(Myself),STATE_DISABLED)
!StateCheck(Myself,STATE_SILENCED)
CheckStatGT(LastSeenBy(Myself),0,SAVEVSSPELL)
CheckStatLT(LastSeenBy(Myself),50,RESISTMAGIC)
CheckStat(LastSeenBy(Myself),0,MINORGLOBE)
!CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
!CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
!CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TRAP)
!CheckStat(LastSeenBy(Myself),1,CLERIC_SHIELD_OF_THE_ARCHONS)
!CheckStat(LastSeenBy(Myself),7,WIZARD_SPELL_IMMUNITY)
CheckStatLT(Myself,50,SPELLFAILUREMAGE)
!CheckStatGT(Myself,0,CLERIC_INSECT_PLAGUE)
!StateCheck(Myself,STATE_SILENCED)
RandomNum(2,1)
THEN
RESPONSE #100
Expand All @@ -1713,7 +1731,7 @@ IF
!GlobalTimerNotExpired("BD_Horror","LOCALS")
HaveSpell(WIZARD_HORROR) // SPWI205.SPL (Horror)
NumCreatureGT([EVILCUTOFF],2)
See([EVILCUTOFF])
See(NearestEnemyOf(Myself))
!InParty(LastSeenBy(Myself))
!General(LastSeenBy(Myself),UNDEAD)
!Race(LastSeenBy(Myself),DEMONIC)
Expand Down Expand Up @@ -1753,7 +1771,7 @@ IF
!GlobalTimerNotExpired("BD_Horror","LOCALS")
HaveSpell(WIZARD_HORROR) // SPWI205.SPL (Horror)
NumCreatureGT([EVILCUTOFF],2)
See(SecondNearest([EVILCUTOFF]))
See(SecondNearestEnemyOf(Myself))
!InParty(LastSeenBy(Myself))
!General(LastSeenBy(Myself),UNDEAD)
!Race(LastSeenBy(Myself),DEMONIC)
Expand Down Expand Up @@ -1793,7 +1811,7 @@ IF
!GlobalTimerNotExpired("BD_Horror","LOCALS")
HaveSpell(WIZARD_HORROR) // SPWI205.SPL (Horror)
NumCreatureGT([EVILCUTOFF],2)
See(ThirdNearest([EVILCUTOFF]))
See(ThirdNearestEnemyOf(Myself))
!InParty(LastSeenBy(Myself))
!General(LastSeenBy(Myself),UNDEAD)
!Race(LastSeenBy(Myself),DEMONIC)
Expand Down

0 comments on commit a054aed

Please sign in to comment.