Baldur's Gate Wiki
Advertisement

SHADRA01, short for shadow dragon …, is the override script used by Thaxll'ssillyia.

The original and the enhanced versions only differ slightly, while Throne of Bhaal didn't implement a change.

Shadows of Amn[]

IF
	OR(2)
		!PartyHasItem("MISC6P") // Shadow Dragon Wardstone
		AttackedBy([ANYONE],DEFAULT)
	NumTimesTalkedTo(0)
THEN
	RESPONSE #100
		StartDialogueNoSet([PC])
END

IF
	See([GOODCUTOFF.0.0.0.0.SUMMONED])
	Global("sdSummon","LOCALS",0)
THEN
	RESPONSE #100
		ForceSpell(LastSeenBy(Myself),WIZARD_DEATH_SPELL) // SPWI605.SPL (Death Spell)
		SetGlobal("sdSummon","LOCALS",1)
END

IF
	See(NearestEnemyOf(Myself))
	Global("RemoveMagic","LOCALS",0)
THEN
	RESPONSE #100
		ForceSpell(Myself,DRAGON_STONE_SKIN) // SPIN694.SPL (Stoneskin)
		ForceSpell(LastSeenBy(Myself),WIZARD_DISPEL_MAGIC) // SPWI302.SPL (Remove Magic)
		SetGlobal("StoneSkin","LOCALS",1)
		SetGlobal("RemoveMagic","LOCALS",1)
END

IF
	!Detect([PC])
	HPLT(Myself,50)
	CombatCounter(0)
THEN
	RESPONSE #100
		SetGlobal("RemoveMagic","LOCALS",0)
		SetGlobal("WingBuffet","LOCALS",0)
		SetGlobal("Haste","LOCALS",0)
		SetGlobal("DRAGONFEAR","LOCALS",0)
		ForceSpell(Myself,CLERIC_HEAL) // SPPR607.SPL (Heal)
END

IF
	See(NearestEnemyOf(Myself))
	Global("DRAGONFEAR","LOCALS",0)
THEN
	RESPONSE #100
		ReallyForceSpell(NearestEnemyOf(Myself),DRAGON_FEAR) // SPIN895.SPL (Dragon Fear)
		SetGlobal("DRAGONFEAR","LOCALS",1)
		SetGlobalTimer("SHADOWDRAGONBREATH","GLOBAL",1)
		ForceSpell(LastSeenBy(Myself),DRAGON_WING_BUFFET) // SPIN695.SPL (Wing Buffet)
END

IF
	GlobalTimerExpired("SHADOWDRAGONBREATH","GLOBAL")
	See(NearestEnemyOf(Myself))
	Range(LastSeenBy(Myself),11)
	Global("WingBuffet","LOCALS",0)
THEN
	RESPONSE #100
		ForceSpell(LastSeenBy(Myself),DRAGON_WING_BUFFET) // SPIN695.SPL (Wing Buffet)
		Wait(3)
		SetGlobal("WingBuffet","LOCALS",1)
	RESPONSE #60
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	!Range(LastSeenBy(Myself),10)
	GlobalTimerExpired("SHADOWDRAGONBREATH","GLOBAL")
THEN
	RESPONSE #100
		SetGlobal("WingBuffet","LOCALS",0)
		ForceSpell(LastSeenBy(Myself),SHADOW_DRAGON_BREATH) // SPIN893.SPL (Shadow Dragon Breath)
		SetGlobalTimer("SHADOWDRAGONBREATH","GLOBAL",18)
END

IF
	See(NearestEnemyOf(Myself))
	Global("Offensive","LOCALS",0)
THEN
	RESPONSE #100
		ForceSpell(Myself,PROTECTION_MAGIC_WEAPON_NOEFF) // SPIN686.SPL (Protection From Magical Weapons)
		SetGlobal("Offensive","LOCALS",2)
END

IF
	See(NearestEnemyOf(Myself))
	Global("Offensive","LOCALS",2)
THEN
	RESPONSE #100
		AttackOneRound(LastSeenBy(Myself))
		AttackOneRound(LastSeenBy(Myself))
		SetGlobal("Offensive","LOCALS",3)
END

IF
	See(NearestEnemyOf(Myself))
	Global("Offensive","LOCALS",3)
THEN
	RESPONSE #100
		ForceSpell(LastSeenBy(Myself),WIZARD_CHAOS) // SPWI508.SPL (Chaos)
		SetGlobal("Offensive","LOCALS",4)
END

IF
	See(NearestEnemyOf(Myself))
	Global("Offensive","LOCALS",4)
THEN
	RESPONSE #100
		ForceSpell(LastSeenBy(Myself),WIZARD_GREATER_MALISON) // SPWI412.SPL (Greater Malison)
		SetGlobal("Offensive","LOCALS",5)
END

IF
	See(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
		EquipMostDamagingMelee()
		AttackReevaluate(NearestEnemyOf(Myself),35)
	RESPONSE #10
		ForceSpell(LastSeenBy(Myself),WIZARD_CHROMATIC_ORB) // SPWI118.SPL (Chromatic Orb)
END

IF
	Allegiance(Myself,ENEMY)
	!See([ANYONE])
THEN
	RESPONSE #100
		MoveToObject(Player1)
END

IF
	AttackedBy([GOODCUTOFF],DEFAULT)
	Allegiance(Myself,NEUTRAL)
THEN
	RESPONSE #100
		Enemy()
END

Baldur's Gate II: Enhanced Edition[]

IF
	OR(2)
		!PartyHasItem("MISC6P") // Shadow Dragon Wardstone
		AttackedBy([ANYONE],DEFAULT)
	NumTimesTalkedTo(0)
THEN
	RESPONSE #100
		StartDialogueNoSet([PC])
END

IF
	See([GOODCUTOFF.0.0.0.0.SUMMONED])
	Global("sdSummon","LOCALS",0)
THEN
	RESPONSE #100
		ForceSpell(LastSeenBy(Myself),WIZARD_DEATH_SPELL) // SPWI605.SPL (Death Spell)
		SetGlobal("sdSummon","LOCALS",1)
END

IF
	See(NearestEnemyOf(Myself))
	Global("RemoveMagic","LOCALS",0)
THEN
	RESPONSE #100
		ForceSpell(Myself,DRAGON_STONE_SKIN) // SPIN694.SPL (Stoneskin)
		ForceSpell(LastSeenBy(Myself),WIZARD_DISPEL_MAGIC) // SPWI302.SPL (Remove Magic)
		SetGlobal("StoneSkin","LOCALS",1)
		SetGlobal("RemoveMagic","LOCALS",1)
END

IF
	!Detect([PC])
	HPLT(Myself,50)
	CombatCounter(0)
THEN
	RESPONSE #100
		SetGlobal("RemoveMagic","LOCALS",0)
		SetGlobal("WingBuffet","LOCALS",0)
		SetGlobal("Haste","LOCALS",0)
		SetGlobal("DRAGONFEAR","LOCALS",0)
		ForceSpell(Myself,CLERIC_HEAL) // SPPR607.SPL (Heal)
END

IF
	See(NearestEnemyOf(Myself))
	Global("DRAGONFEAR","LOCALS",0)
THEN
	RESPONSE #100
		ReallyForceSpell(NearestEnemyOf(Myself),DRAGON_FEAR) // SPIN895.SPL (Dragon Fear)
		SetGlobal("DRAGONFEAR","LOCALS",1)
		SetGlobalTimer("SHADOWDRAGONBREATH","GLOBAL",1)
		ForceSpell(LastSeenBy(Myself),DRAGON_WING_BUFFET) // SPIN695.SPL (Wing Buffet)
END

IF
	GlobalTimerExpired("SHADOWDRAGONBREATH","GLOBAL")
	See(NearestEnemyOf(Myself))
	Range(LastSeenBy(Myself),11)
	Global("WingBuffet","LOCALS",0)
THEN
	RESPONSE #100
		ForceSpell(LastSeenBy(Myself),DRAGON_WING_BUFFET) // SPIN695.SPL (Wing Buffet)
		Wait(3)
		SetGlobal("WingBuffet","LOCALS",1)
	RESPONSE #60
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	!Range(LastSeenBy(Myself),10)
	GlobalTimerExpired("SHADOWDRAGONBREATH","GLOBAL")
THEN
	RESPONSE #100
		SetGlobal("WingBuffet","LOCALS",0)
		ForceSpell(LastSeenBy(Myself),SHADOW_DRAGON_BREATH) // SPIN893.SPL (Shadow Dragon Breath)
		SetGlobalTimer("SHADOWDRAGONBREATH","GLOBAL",18)
END

IF
	See(NearestEnemyOf(Myself))
	Global("Offensive","LOCALS",0)
THEN
	RESPONSE #100
		ForceSpell(Myself,PROTECTION_MAGIC_WEAPON_NOEFF) // SPIN686.SPL (Protection From Magical Weapons)
		SetGlobal("Offensive","LOCALS",2)
END

IF
	See(NearestEnemyOf(Myself))
	Global("Offensive","LOCALS",2)
THEN
	RESPONSE #100
		AttackOneRound(LastSeenBy(Myself))
		AttackOneRound(LastSeenBy(Myself))
		SetGlobal("Offensive","LOCALS",3)
END

IF
	See(NearestEnemyOf(Myself))
	Global("Offensive","LOCALS",3)
THEN
	RESPONSE #100
		ForceSpell(LastSeenBy(Myself),WIZARD_CHAOS) // SPWI508.SPL (Chaos)
		SetGlobal("Offensive","LOCALS",4)
END

IF
	See(NearestEnemyOf(Myself))
	Global("Offensive","LOCALS",4)
THEN
	RESPONSE #100
		ForceSpell(LastSeenBy(Myself),WIZARD_GREATER_MALISON) // SPWI412.SPL (Greater Malison)
		SetGlobal("Offensive","LOCALS",5)
END

IF
	See(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
		EquipMostDamagingMelee()
		AttackReevaluate(NearestEnemyOf(Myself),35)
	RESPONSE #10
		ForceSpell(LastSeenBy(Myself),WIZARD_CHROMATIC_ORB) // SPWI118.SPL (Chromatic Orb)
END

IF
	Allegiance(Myself,ENEMY)
	!See([ANYONE])
THEN
	RESPONSE #100
		MoveToObject(Player1)
END

IF
	AttackedBy([GOODCUTOFF],DEFAULT)
	Allegiance(Myself,NEUTRAL)
THEN
	RESPONSE #100
		Enemy()
END
Advertisement