Jump to content

Githyanki Captain (Watcher's Keep) summons fallen deva too early


Recommended Posts

Posted

The Captain in the Githyanki Encampment is scripted to summon a fallen deva (GITHCAPT.BCS) but, because the area entrance is outside his visual range, he summons it immediately with himself as the target. By the time the party reaches him, the deva gets unsummoned. It seems that all the relevant targeting blocks fail (because the party is outside of visual range), so `See(LastSeenBy(Myself))` gets triggered by a previous block:

IF
    See(Myself)  // <-- This here
    !INI("DMWW_genai_difficulty",1)
    OR(2)
        DifficultyGT(EASIEST)
        !INI("DMWW_genai_difficulty",0)
    Heard([ANYONE],412)
    Range(LastHeardBy(Myself),20)
    !CheckStatGT(Myself,99,RESISTCOLD)
    OR(2)
        !CheckStatGT(Myself,80,RESISTMAGIC)
        !See(NearestEnemyOf(Myself))
    OR(2)
        !CheckStatGT(Myself,59,RESISTCOLD)
        !See(NearestEnemyOf(Myself))
    !See([PC])
THEN
    RESPONSE #100
        SetGlobalTimer("seencloud","LOCALS",FOUR_MINUTES)
        RunAwayFromNoLeaveArea(LastHeardBy(Myself),30)
END

 

A quick-and-dirty fix is to add a range check:

IF
    !GlobalTimerNotExpired("castspell","LOCALS")
    HaveSpell(BLACKGUARD_SUMMON_FALLEN_DEVA)  // SPCL935.SPL (Summon Fallen Deva)
    !StateCheck(LastSeenBy(Myself),STATE_INVISIBLE)
    !CheckStatGT(LastSeenBy(Myself),0,SANCTUARY)
    !CheckSpellState(LastSeenBy(Myself),DO_NOT_TARGET_SPELLS)
    OR(6)
        INI("DMWW_genai_difficulty",0)
        INI("DMWW_genai_difficulty",3)
        INI("DMWW_genai_difficulty",4)
        INI("DMWW_genai_difficulty",5)
        INI("DMWW_genai_difficulty",6)
        INI("DMWW_genai_difficulty",7)
    OR(6)
        DifficultyGT(EASY)
        INI("DMWW_genai_difficulty",3)
        INI("DMWW_genai_difficulty",4)
        INI("DMWW_genai_difficulty",5)
        INI("DMWW_genai_difficulty",6)
        INI("DMWW_genai_difficulty",7)
    See(LastSeenBy(Myself))
    Range([GOODCUTOFF],30)  // <-- This here
THEN
    RESPONSE #300
        ApplySpellRES("dw#mgsee",Myself)  // Armor
        SetGlobalTimer("castspell","LOCALS",ONE_ROUND)
        Spell(LastSeenBy(Myself),BLACKGUARD_SUMMON_FALLEN_DEVA)  // SPCL935.SPL (Summon Fallen Deva)
    RESPONSE #100
        Continue()
END

 

SSL details:

Spoiler

The relevant block in 'stratagems/psionic/ssl/gith/githcapt.ssl' is:

//////////////// HLAs and powers ///////////////////////////////////////////////////////

IF TRIGGER
        TriggerBlock(CorePlus)
        RequireBlock(EnhancedEdition)
	TargetBlock(PCsPreferringWeak)
THEN DO
        Combine()
        Action(SpellArea,BLACKGUARD_SUMMON_FALLEN_DEVA|300|100)
END

 

Posted

Hmm... what's different between this and other scripts that do work?

For comparison, this is the SSL block for deva summoning on generic priests:

IF TRIGGER
        IgnoreBlock(IsBG1Only)
	TargetBlock(PCsPreferringWeak)
	TargetBlock(Celestials)
	TriggerBlock(Enemy|HLAPriest)
	!See([ENEMY.0.SOLAR]) // only one at a time
	!See([ENEMY.0.ANTISOLAR])
	Allegiance(Myself,ENEMY)
THEN DO
	Combine()
	Action(SpellL7AreaRES,CLERIC_SUMMON_FALLEN_DEVA|300|100)
	Action(SpellL7AreaRES,CLERIC_SUMMON_DEVA|300|100)

Most of the differences aren't relevant, but that TriggerBlock(Enemy)? I'm pretty sure that means that enemy priests won't summon a deva until they can see a worthy target that doesn't share their allegiance. Adding it to the githyanki captain's deva-summoning block would, if I'm reading it right, delay that deva until you actually come in range.

Posted

Yep, that `TriggerBlock(Enemy)` seems to be the fix:

IF
    !GlobalTimerNotExpired("castspell","LOCALS")
    HaveSpell(BLACKGUARD_SUMMON_FALLEN_DEVA)  // SPCL935.SPL (Summon Fallen Deva)
    !StateCheck(LastSeenBy(Myself),STATE_INVISIBLE)
    !CheckStatGT(LastSeenBy(Myself),0,SANCTUARY)
    !CheckSpellState(LastSeenBy(Myself),DO_NOT_TARGET_SPELLS)
    Allegiance(Myself,ENEMY)               // <-- Here
    !Allegiance(LastSeenBy(Myself),ENEMY)  // <-- Here
    OR(6)
        INI("DMWW_genai_difficulty",0)
        INI("DMWW_genai_difficulty",3)
        INI("DMWW_genai_difficulty",4)
        INI("DMWW_genai_difficulty",5)
        INI("DMWW_genai_difficulty",6)
        INI("DMWW_genai_difficulty",7)
    OR(6)
        DifficultyGT(EASY)
        INI("DMWW_genai_difficulty",3)
        INI("DMWW_genai_difficulty",4)
        INI("DMWW_genai_difficulty",5)
        INI("DMWW_genai_difficulty",6)
        INI("DMWW_genai_difficulty",7)
    See(LastSeenBy(Myself))
THEN
    RESPONSE #300
        ApplySpellRES("dw#mgsee",Myself)  // Armor
        SetGlobalTimer("castspell","LOCALS",ONE_ROUND)
        Spell(LastSeenBy(Myself),BLACKGUARD_SUMMON_FALLEN_DEVA)  // SPCL935.SPL (Summon Fallen Deva)
    RESPONSE #100
        Continue()
END

 

He can't target himself with the spell now.

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...