DEFINE_ACTION_FUNCTION testing_suite BEGIN

ACTION_IF is_bg2 BEGIN

   // force rest
   
   <<<<<<<< .../stratagems-inline/forcerest.baf
IF
  !Global("DW_rest_party","GLOBAL",0)
THEN
    RESPONSE #100
             SetGlobal("DW_rest_party","GLOBAL",0)
             RestParty()
             Continue()
END
   >>>>>>>>

   LAF extend INT_VAR inline=1 STR_VAR script="baldur baldur25" top=forcerest END

   // test asylum irenicus

   <<<<<<<< .../stratagems-inline/ppiren_global.baf
IF
  Global("DW_pp_irenicus","GLOBAL",1)
THEN
   RESPONSE #100
       SetGlobal("DW_pp_irenicus","GLOBAL",2)
       SetGlobal("AsylumPlot","GLOBAL",53)
       ActionOverride(Player1,LeaveAreaLUA("AR1515","",[945.1010],NW))
       ActionOverride(Player2,LeaveAreaLUA("AR1515","",[947.1013],NW))
       ActionOverride(Player3,LeaveAreaLUA("AR1515","",[849.1020],NW))
       ActionOverride(Player4,LeaveAreaLUA("AR1515","",[991.1009],NW))
       ActionOverride(Player5,LeaveAreaLUA("AR1515","",[997.994],NW))
       ActionOverride(Player6,LeaveAreaLUA("AR1515","",[996.1087],NW))
       Continue()
END



   >>>>>>>>

LAF extend INT_VAR inline=1 STR_VAR script="baldur baldur25" top=ppiren_global END

   <<<<<<<< .../stratagems-inline/ppiren_ar1616.baf
IF
  Global("DW_pp_irenicus","GLOBAL",2)
THEN
   RESPONSE #100
       SetGlobal("DW_pp_irenicus","GLOBAL",3)
       CreateCreature("ppireni2",[800.1100],NW)
       Continue()
END

IF
  Global("DW_pp_irenicus","GLOBAL",3)
THEN
   RESPONSE #100
       SetGlobal("DW_pp_irenicus","GLOBAL",0)
       ActionOverride("ppireni2",Enemy())
       Continue()
END
   >>>>>>>>

LAF extend_area_script INT_VAR inline=1 STR_VAR area=ar1516 top=ppiren_ar1616 END

    // test Firkraag battle

<<<<<<<< .../stratagems-inline/firkraag_global.baf
IF
  Global("DW_firkraag","GLOBAL",1)
THEN
   RESPONSE #100
       SetGlobal("DW_firkraag","GLOBAL",2)
       ActionOverride(Player1,LeaveAreaLUA("AR1203","",[1269.1263],NW))
       ActionOverride(Player2,LeaveAreaLUA("AR1203","",[1259.1263],NW))
       ActionOverride(Player3,LeaveAreaLUA("AR1203","",[1279.1263],NW))
       ActionOverride(Player4,LeaveAreaLUA("AR1203","",[1269.1253],NW))
       ActionOverride(Player5,LeaveAreaLUA("AR1203","",[1269.1273],NW))
       ActionOverride(Player6,LeaveAreaLUA("AR1203","",[1259.1273],NW))
       Continue()
END

>>>>>>>>

LAF extend INT_VAR inline=1 STR_VAR script="baldur baldur25" top=firkraag_global END

<<<<<<<< .../stratagems-inline/firkraag_ar1203.baf
IF
  Global("DW_firkraag","GLOBAL",2)
THEN
   RESPONSE #100
       SetGlobal("DW_firkraag","GLOBAL",0)
       ActionOverride("firkra02",SetNumTimesTalkedTo(1))
       ActionOverride("firkra02",Enemy())
       ActionOverride("firmag01",DestroySelf())
       Continue()
END
>>>>>>>>
LAF extend_area_script INT_VAR inline=1 STR_VAR area=ar1203 top=firkraag_ar1203 END


// test Nizi

<<<<<<<< .../stratagems-inline/nizi_global.baf
IF
  Global("DW_nizi","GLOBAL",1)
THEN
   RESPONSE #100
       SetGlobal("DW_nizi","GLOBAL",2)
       ActionOverride(Player1,LeaveAreaLUA("AR2807","",[616.459],NW))
       ActionOverride(Player2,LeaveAreaLUA("AR2807","",[616.479],NW))
       ActionOverride(Player3,LeaveAreaLUA("AR2807","",[616.439],NW))
       ActionOverride(Player4,LeaveAreaLUA("AR2807","",[626.459],NW))
       ActionOverride(Player5,LeaveAreaLUA("AR2807","",[606.459],NW))
       ActionOverride(Player6,LeaveAreaLUA("AR2807","",[616.469],NW))
       Continue()
END

>>>>>>>>

LAF extend INT_VAR inline=1 STR_VAR script="baldur baldur25" top=nizi_global END

<<<<<<<< .../stratagems-inline/nizi_ar.baf
IF
  Global("DW_nizi","GLOBAL",2)
THEN
   RESPONSE #100
       SetGlobal("DW_nizi","GLOBAL",0)
       ActionOverride("dragblac",SetNumTimesTalkedTo(1))
       ActionOverride("dragblac",Enemy())
       Continue()
END
>>>>>>>>
LAF extend_area_script INT_VAR inline=1 STR_VAR area=ar2807 top=nizi_ar END

// test Adalon

<<<<<<<< .../stratagems-inline/ada_global.baf
IF
  Global("DW_ada","GLOBAL",1)
THEN
   RESPONSE #100
       SetGlobal("DW_ada","GLOBAL",2)
       ActionOverride(Player1,LeaveAreaLUA("AR2102","",[1180.1306],NW))
       ActionOverride(Player2,LeaveAreaLUA("AR2102","",[1190.1306],NW))
       ActionOverride(Player3,LeaveAreaLUA("AR2102","",[1170.1306],NW))
       ActionOverride(Player4,LeaveAreaLUA("AR2102","",[1180.1316],NW))
       ActionOverride(Player5,LeaveAreaLUA("AR2102","",[1180.1296],NW))
       ActionOverride(Player6,LeaveAreaLUA("AR2102","",[1170.1296],NW))
       Continue()
END

>>>>>>>>

LAF extend INT_VAR inline=1 STR_VAR script="baldur baldur25" top=ada_global END

<<<<<<<< .../stratagems-inline/ada_ar.baf
IF
  Global("DW_ada","GLOBAL",2)
THEN                                 
   RESPONSE #100
       SetGlobal("DW_ada","GLOBAL",0)
       ActionOverride("udsilver",SetNumTimesTalkedTo(1))
       ActionOverride("udsilver",Enemy())
       Continue()
END
>>>>>>>>
LAF extend_area_script INT_VAR inline=1 STR_VAR area=ar2102 top=ada_ar END

// test final battle with Jon

<<<<<<<< .../stratagems-inline/hellslay_global.baf
IF
  Global("DW_hellslay","GLOBAL",1)
THEN                                 
   RESPONSE #100
       SetGlobal("DW_hellslay","GLOBAL",2)
       SetGlobal("teardoor","GLOBAL",5)
       ActionOverride(Player1,LeaveAreaLUA("AR2900","",[1974.552],NW))
       ActionOverride(Player2,LeaveAreaLUA("AR2900","",[1964.552],NW))
       ActionOverride(Player3,LeaveAreaLUA("AR2900","",[1984.552],NW))
       ActionOverride(Player4,LeaveAreaLUA("AR2900","",[1974.562],NW))
       ActionOverride(Player5,LeaveAreaLUA("AR2900","",[1974.542],NW))
       ActionOverride(Player6,LeaveAreaLUA("AR2900","",[1964.562],NW))
       Continue()
END

>>>>>>>>

LAF extend INT_VAR inline=1 STR_VAR script="baldur baldur25" top=hellslay_global END

<<<<<<<< .../stratagems-inline/hellslay_ar2900.baf
IF
  Global("DW_hellslay","GLOBAL",2)
THEN
    RESPONSE #100
       SetGlobal("DW_hellslay","GLOBAL",0)
       SetGlobal("EnteredArea","AR2900",1)
       SetGlobal("PlayerIntro","AR2900",1)
       CreateCreature("HELLJON",[2009.513],S)
       StartCutScene("cut85c")
END

>>>>>>>>

LAF extend_area_script INT_VAR inline=1 STR_VAR area=ar2900 top=hellslay_ar2900 END

// test Demogorgon battle

<<<<<<<< .../stratagems-inline/demogorgon_global.baf
IF
  Global("DW_demogorgon","GLOBAL",1)
THEN                                 
   RESPONSE #100
       SetGlobal("DW_demogorgon","GLOBAL",0)
       SetGlobal("KnightsDead","GLOBAL",1)
       ActionOverride(Player1,LeaveAreaLUA("AR3020","",[930.912],NW))
       ActionOverride(Player2,LeaveAreaLUA("AR3020","",[930.922],NW))
       ActionOverride(Player3,LeaveAreaLUA("AR3020","",[930.902],NW))
       ActionOverride(Player4,LeaveAreaLUA("AR3020","",[920.912],NW))
       ActionOverride(Player5,LeaveAreaLUA("AR3020","",[940.912],NW))
       ActionOverride(Player6,LeaveAreaLUA("AR3020","",[940.922],NW))
       Continue()
END

>>>>>>>>

LAF extend INT_VAR inline=1 STR_VAR script="baldur baldur25" top=demogorgon_global END

// test Kangaxx

<<<<<<<< .../stratagems-inline/kangaxx_global.baf
IF
  Global("DW_kangaxx","GLOBAL",1)
THEN                                 
   RESPONSE #100
       SetGlobal("DW_kangaxx","GLOBAL",2)
       ActionOverride(Player1,LeaveAreaLUA("AR0331","",[611.536],NW))
       ActionOverride(Player2,LeaveAreaLUA("AR0331","",[566.591],NW))
       ActionOverride(Player3,LeaveAreaLUA("AR0331","",[510.626],NW))
       ActionOverride(Player4,LeaveAreaLUA("AR0331","",[467.665],NW))
       ActionOverride(Player5,LeaveAreaLUA("AR0331","",[378.673],NW))
       ActionOverride(Player6,LeaveAreaLUA("AR0331","",[449.718],NW))
       Continue()
END
>>>>>>>>

LAF extend STR_VAR INT_VAR inline=1 script="baldur baldur25" top=kangaxx_global END


<<<<<<<< .../stratagems-inline/kangaxx_ar0331.baf
IF
  Global("DW_kangaxx","GLOBAL",2)
THEN                                 
   RESPONSE #100
       SetGlobal("DW_kangaxx","GLOBAL",0)
       CreateCreature("HLKANG",[633.518],SW)
       Continue()
END
>>>>>>>>

LAF extend_area_script INT_VAR inline=1 STR_VAR area=ar0331 top=kangaxx_ar0331 END

// test C6 Bodhi fight

<<<<<<<< .../stratagems-inline/c6bodhi_global.baf

IF
  Global("DW_c6bodhi","GLOBAL",1)
THEN
    RESPONSE #100
       SetGlobal("DW_c6bodhi","GLOBAL",2)
       ActionOverride(Player1,LeaveAreaLUA("AR0809","",[1240.490],NE))
       ActionOverride(Player2,LeaveAreaLUA("AR0809","",[1245.495],NE))
       ActionOverride(Player3,LeaveAreaLUA("AR0809","",[1250.500],NE))
       ActionOverride(Player4,LeaveAreaLUA("AR0809","",[1255.505],NE))
       ActionOverride(Player5,LeaveAreaLUA("AR0809","",[1260.510],NE))
       ActionOverride(Player6,LeaveAreaLUA("AR0809","",[1265.515],NE))
       Continue()
END
>>>>>>>>

LAF extend INT_VAR inline=1 STR_VAR script="baldur baldur25" top=c6bodhi_global END

<<<<<<<< .../stratagems-inline/c6bodhi.d
APPEND c6bodhi

IF WEIGHT #-1000 ~Global("DW_c6bodhi","GLOBAL",2)~ THEN BEGIN bodhi_tangle SAY ~Let's cut to the chase, sweetheart.~
IF ~~ THEN DO ~SetGlobal("DW_c6bodhi","GLOBAL",0)~ GOTO 22 END
END
>>>>>>>>

COMPILE ".../stratagems-inline/c6bodhi.d"

// spellhold item confiscation

<<<<<<<< .../stratagems-inline/pp_items_global.baf
IF
  Global("DW_ppitems","GLOBAL",1)
THEN
    RESPONSE #100
       SetGlobal("DW_ppitems","GLOBAL",2)
       ActionOverride(Player1,LeaveAreaLUA("AR1515","",[1000.1000],NE))
       ActionOverride(Player2,LeaveAreaLUA("AR1515","",[1000.990],NE))
       ActionOverride(Player3,LeaveAreaLUA("AR1515","",[1000.1010],NE))
       ActionOverride(Player4,LeaveAreaLUA("AR1515","",[990.1010],NE))
       ActionOverride(Player5,LeaveAreaLUA("AR1515","",[1010.1000],NE))
       ActionOverride(Player6,LeaveAreaLUA("AR1515","",[990.1000],NE))
       SetGlobal("AsylumPlot","GLOBAL",20)
       Continue()
END

IF
  Global("DW_ppitems","GLOBAL",3)
THEN
    RESPONSE #100
       SetGlobal("DW_ppitems","GLOBAL",4)
       ActionOverride(Player1,LeaveAreaLUA("AR0012","",[1000.1000],NE))
       ActionOverride(Player2,LeaveAreaLUA("AR0012","",[1000.990],NE))
       ActionOverride(Player3,LeaveAreaLUA("AR0012","",[1000.1010],NE))
       ActionOverride(Player4,LeaveAreaLUA("AR0012","",[990.1010],NE))
       ActionOverride(Player5,LeaveAreaLUA("AR0012","",[1010.1000],NE))
       ActionOverride(Player6,LeaveAreaLUA("AR0012","",[990.1000],NE))
       SetGlobal("AsylumPlot","GLOBAL",20)
       Continue()
END
>>>>>>>>

LAF extend INT_VAR inline=1 STR_VAR script="baldur baldur25" top=pp_items_global END

<<<<<<<< .../stratagems-inline/pp_items_ar1515.baf
IF
  Global("DW_ppitems","GLOBAL",2)
THEN
    RESPONSE #100
             CreateCreatureObject("ppireni1",Player1,0,0,0)
             SetGlobal("DW_ppitems","GLOBAL",3)
END
>>>>>>>>

LAF extend_area_script INT_VAR inline=1 STR_VAR area=ar1515 top=pp_items_ar1515 END

<<<<<<<< .../stratagems-inline/iren_add.d
APPEND ppireni2

IF WEIGHT #-1000 ~Global("DW_ppitems","GLOBAL",3)~ THEN BEGIN irenicus_shortcut SAY ~Only losers banter.~
IF ~~ THEN DO ~SetGlobal("DW_ppitems","GLOBAL",4)~ GOTO 19 END
END

APPEND ppdrimov

IF WEIGHT #-1000 ~Global("DW_ppitems","GLOBAL",4)NumTimesTalkedTo(0)~ THEN BEGIN imoen_shortcut_1 SAY ~Find me inside, already.~
IF ~~ THEN EXIT END
END

APPEND ppdrimo

IF WEIGHT #-1000 ~Global("DW_ppitems","GLOBAL",4)NumTimesTalkedTo(0)~ THEN BEGIN imoen_shortcut_2 SAY ~So much for Bhaal.~
IF ~~ THEN DO ~SetGlobal("DW_ppitems","GLOBAL",5)~ GOTO 6 END
END
>>>>>>>>

COMPILE ".../stratagems-inline/iren_add.d"

<<<<<<<< .../stratagems-inline/dw#ppire.baf
IF
	True()
THEN
	RESPONSE #100
		CutSceneId(Player1)
                ApplySpell(Player2,NOHOLD_PARTY) // SPIN862.SPL (No such index)
		ApplySpell(Player3,NOHOLD_PARTY) // SPIN862.SPL (No such index)
		ApplySpell(Player4,NOHOLD_PARTY) // SPIN862.SPL (No such index)
		ApplySpell(Player5,NOHOLD_PARTY) // SPIN862.SPL (No such index)
		ApplySpell(Player6,NOHOLD_PARTY) // SPIN862.SPL (No such index)
		ActionOverride(Player2,MakeUnselectable(1))
		ActionOverride(Player3,MakeUnselectable(1))
		ActionOverride(Player4,MakeUnselectable(1))
		ActionOverride(Player5,MakeUnselectable(1))
		ActionOverride(Player6,MakeUnselectable(1))
		LeaveAreaLUAPanic("AR1515","",[1637.888],NW)
		LeaveAreaLUA("AR1515","",[1637.888],NW)
		ActionOverride(Player2,LeaveAreaLUA("AR1515","",[1647.888],NW))
		ActionOverride(Player3,LeaveAreaLUA("AR1515","",[1627.888],NW))
		ActionOverride(Player4,LeaveAreaLUA("AR1515","",[1637.898],NW))
		ActionOverride(Player5,LeaveAreaLUA("AR1515","",[1637.878],NW))
		ActionOverride(Player6,LeaveAreaLUA("AR1515","",[1627.878],NW))
END
>>>>>>>>

COMPILE ".../stratagems-inline/dw#ppire.baf"

// test aspects of Ascension

<<<<<<<< .../ascension-inline/asc_pp.baf
IF
  Global("DW_test_ascension","GLOBAL",1)   // Balthazar dead
THEN
    RESPONSE #100
             SetGlobal("DW_test_ascension","GLOBAL",0)
             SetGlobal("LeavingPocketPlane","AR4500",1)
             SetGlobal("GavePocketPlane","GLOBAL",1)
             SetGlobal("ChallengesDone","GLOBAL",1)
             SetGlobal("SPRITE_IS_DEADBALTH","GLOBAL",1)
             SetGlobal("fin_balth_checkpoint_passed","GLOBAL",1)
END

IF
  Global("DW_test_ascension","GLOBAL",2)   // Balthazar allied
THEN
    RESPONSE #100
             SetGlobal("DW_test_ascension","GLOBAL",0)
             SetGlobal("LeavingPocketPlane","AR4500",1)
             SetGlobal("GavePocketPlane","GLOBAL",1)
             SetGlobal("ChallengesDone","GLOBAL",1)
             SetGlobal("BalthazarFights","GLOBAL",1)
             SetGlobal("SPRITE_IS_DEADBALTH","GLOBAL",0)
             SetGlobal("fin_balth_checkpoint_passed","GLOBAL",1)
END

IF
  Global("DW_test_ascension","GLOBAL",3) // Sarevok on side
THEN
    RESPONSE #100
             ChangeAlignment("sarevok",CHAOTIC_GOOD)
             SetGlobal("fin_sarev_redeemed","GLOBAL",1)
             SetGlobal("DW_test_ascension","GLOBAL",0)
END

IF
  Global("DW_test_ascension","GLOBAL",4) // skip to Final Five
THEN
    RESPONSE #100
            SetGlobal("DW_test_asc_setup_in_progress","GLOBAL",1)
            SetGlobal("DW_test_ascension","GLOBAL",0)
END

IF
  Global("DW_test_ascension","GLOBAL",5) // just enter PP with no Melissan
THEN
    RESPONSE #100
            SetGlobal("DW_test_asc_setup_in_progress","GLOBAL",2)
            SetGlobal("DW_test_ascension","GLOBAL",0)
END

IF
  Global("DW_test_ascension","GLOBAL",6) // skip to pools
THEN
    RESPONSE #100
            SetGlobal("DW_test_asc_setup_in_progress","GLOBAL",3)
            SetGlobal("DW_test_ascension","GLOBAL",0)
END

IF
  Global("DW_test_ascension","GLOBAL",7) // Bodhi recruitable
THEN
    RESPONSE #100
             ChangeAlignment(Player1,CHAOTIC_EVIL)
             ReputationInc(-10)
             ApplySpell(Player1,WIZARD_FRIENDS)
             SetGlobal("DW_test_ascension","GLOBAL",0)
END

IF
  Global("DW_test_ascension","GLOBAL",8) // Final conversation
THEN
    RESPONSE #100
       SetGlobal("fin_test_disable_melissan_initial","GLOBAL",1)
            SetGlobal("DW_test_asc_setup_in_progress","GLOBAL",4)
            SetGlobal("allfive","GLOBAL",1)
             SetGlobal("DW_test_ascension","GLOBAL",0)
END
>>>>>>>>

EXTEND_TOP ar4500.bcs ".../ascension-inline/asc_pp.baf"




// Balthazar confrontation

<<<<<<<< .../ascension-inline/balth_global.baf
IF 
   Global("DW_test_balth","GLOBAL",1)
THEN
    RESPONSE #100
       SetGlobal("DW_test_balth","GLOBAL",2)
       SetGlobal("metbal","GLOBAL",1)
       SetGlobal("SPRITE_IS_DEADBALTH","GLOBAL",0)
       ActionOverride(Player1,LeaveAreaLUA("AR5505","",[945.1010],NW))
       ActionOverride(Player2,LeaveAreaLUA("AR5505","",[947.1013],NW))
       ActionOverride(Player3,LeaveAreaLUA("AR5505","",[849.1020],NW))
       ActionOverride(Player4,LeaveAreaLUA("AR5505","",[991.1009],NW))
       ActionOverride(Player5,LeaveAreaLUA("AR5505","",[997.994],NW))
       ActionOverride(Player6,LeaveAreaLUA("AR5505","",[996.1087],NW))
END
>>>>>>>>

EXTEND_TOP baldur25.bcs ".../ascension-inline/balth_global.baf"

<<<<<<<< .../ascension-inline/balth_area.baf
IF
	Global("DW_test_balth","GLOBAL",2)
	Global("BalthazarEncounter","AR5505",0)
THEN
	RESPONSE #100
		ClearAllActions()
		SetGlobal("BalthazarEncounter","AR5505",1)
		StartCutSceneMode()
		StartCutScene("cut242a")
END
>>>>>>>>

EXTEND_TOP ar5505.bcs ".../ascension-inline/balth_area.baf"

// Gromnir showdown

<<<<<<<< .../ascension-inline/gromnir_global.baf
IF
  Global("DW_test_gromnir","GLOBAL",1)
THEN
    RESPONSE #100   
             SetGlobal("EnteredAR5001","GLOBAL",0)
             SetGlobal("DW_test_gromnir","GLOBAL",0)
             SetGlobal("TalkedSarMel01","GLOBAL",1)
             SetGlobal("MelissanJob","GLOBAL",1)
             SetGlobal("SPRITE_IS_DEADGROMNIR","GLOBAL",0)
       ActionOverride(Player1,LeaveAreaLUA("AR5001","",[800.600],SSW))
       ActionOverride(Player2,LeaveAreaLUA("AR5001","",[810.600],SSW))
       ActionOverride(Player3,LeaveAreaLUA("AR5001","",[800.610],SSW))
       ActionOverride(Player4,LeaveAreaLUA("AR5001","",[800.590],SSW))
       ActionOverride(Player5,LeaveAreaLUA("AR5001","",[790.600],SSW))
       ActionOverride(Player6,LeaveAreaLUA("AR5001","",[790.590],SSW))
END

IF
  Global("DW_test_gromnir","GLOBAL",2)
THEN
    RESPONSE #100
             SetGlobal("DW_test_gromnir","GLOBAL",0)
             SetGlobal("TalkedSarMel01","GLOBAL",1)
             SetGlobal("MelissanJob","GLOBAL",1)
END
>>>>>>>>


EXTEND_TOP baldur25.bcs ".../ascension-inline/gromnir_global.baf"

// Yaga-Shura showdown

<<<<<<<< .../ascension-inline/yaga_global.baf
IF
  Global("DW_test_yaga","GLOBAL",1)
THEN
    RESPONSE #100
             SetGlobal("DW_test_yaga","GLOBAL",0)
             SetGlobal("YagaShuraHeart","GLOBAL",1)
             SetGlobal("TalkedSarMel01","GLOBAL",1)
             SetGlobal("MelissanJob","GLOBAL",1)
             SetGlobal("SPRITE_IS_DEADGROMNIR","GLOBAL",1)
             SetGlobal("Mel01GromnirDeath","GLOBAL",1)
             SetGlobal("DeathOfGromnir","GLOBAL",1)
       ActionOverride(Player1,LeaveAreaLUA("AR5203","",[3400.700],SSW))
       ActionOverride(Player2,LeaveAreaLUA("AR5203","",[3400.710],SSW))
       ActionOverride(Player3,LeaveAreaLUA("AR5203","",[3400.690],SSW))
       ActionOverride(Player4,LeaveAreaLUA("AR5203","",[3410.700],SSW))
       ActionOverride(Player5,LeaveAreaLUA("AR5203","",[3390.700],SSW))
       ActionOverride(Player6,LeaveAreaLUA("AR5203","",[3410.710],SSW))
END
>>>>>>>>

EXTEND_TOP baldur25.bcs ".../ascension-inline/yaga_global.baf"

// Abazigal battle

<<<<<<<< .../ascension-inline/abaz_global.baf
IF
  Global("DW_test_abaz","GLOBAL",1)
THEN
    RESPONSE #100
             SetGlobal("DW_test_abaz","GLOBAL",0)
             SetGlobal("SPRITE_IS_DEADABAZIGAL","GLOBAL",0)
       ActionOverride(Player1,LeaveAreaLUA("AR6005","",[2300.700],SSW))
       ActionOverride(Player2,LeaveAreaLUA("AR6005","",[2310.700],SSW))
       ActionOverride(Player3,LeaveAreaLUA("AR6005","",[2290.700],SSW))
       ActionOverride(Player4,LeaveAreaLUA("AR6005","",[2300.710],SSW))
       ActionOverride(Player5,LeaveAreaLUA("AR6005","",[2300.690],SSW))
       ActionOverride(Player6,LeaveAreaLUA("AR6005","",[2310.690],SSW))
END
>>>>>>>>

EXTEND_TOP baldur25.bcs ".../ascension-inline/abaz_global.baf"

// Illasera battle

<<<<<<<< .../ascension-inline/illa_global.baf
IF
  Global("DW_test_illa","GLOBAL",1)
THEN
    RESPONSE #100
        SetGlobal("DW_test_illa","GLOBAL",2)
	SetGlobal("DreamSolarTimer","GLOBAL",999999)
	SetGlobal("SolarDream","GLOBAL",0)
	SetGlobal("SPRITE_IS_DEADILLASERA","GLOBAL",0)
        ActionOverride(Player1,LeaveAreaLUA("AR4000","",[680.460],SSW))
        ActionOverride(Player2,LeaveAreaLUA("AR4000","",[700.460],SSW))
        ActionOverride(Player3,LeaveAreaLUA("AR4000","",[720.460],SSW))
        ActionOverride(Player4,LeaveAreaLUA("AR4000","",[700.480],SSW))
        ActionOverride(Player5,LeaveAreaLUA("AR4000","",[700.440],SSW))
        ActionOverride(Player6,LeaveAreaLUA("AR4000","",[720.480],SSW))
END
>>>>>>>>

EXTEND_TOP baldur25.bcs ".../ascension-inline/illa_global.baf"

<<<<<<<< .../ascension-inline/illa_ar4000.baf
IF
  Global("DW_test_illa","GLOBAL",2)
THEN
    RESPONSE #100
        SetGlobal("DW_test_illa","GLOBAL",0)
	SetGlobal("IllaseraSpawnTimer","GLOBAL",0)
	SetGlobal("IllaseraSpawn","GLOBAL",0)
	SetGlobal("SetSolarDreamTimer","AR4000",0)
        ActionOverride(Player1,LeaveAreaLUA("AR4000","",[680.460],SSW))
        ActionOverride(Player2,LeaveAreaLUA("AR4000","",[700.460],SSW))
        ActionOverride(Player3,LeaveAreaLUA("AR4000","",[720.460],SSW))
        ActionOverride(Player4,LeaveAreaLUA("AR4000","",[700.480],SSW))
        ActionOverride(Player5,LeaveAreaLUA("AR4000","",[700.440],SSW))
        ActionOverride(Player6,LeaveAreaLUA("AR4000","",[720.480],SSW))
END
>>>>>>>>

EXTEND_TOP ar4000.bcs ".../ascension-inline/illa_ar4000.baf"

// Sendai statue battle

<<<<<<<< .../stratagems-inline/sendai_statues_baldur.baf
IF
	Global("DW_test_send_stat","GLOBAL",1)
THEN
	RESPONSE #100
		SetGlobal("DW_test_send_stat","GLOBAL",2)
		SetGlobal("SendaiCutScene3","GLOBAL",3)
        ActionOverride(Player1,LeaveAreaLUA("AR6108","",[400.600],E))
        ActionOverride(Player2,LeaveAreaLUA("AR6108","",[400.660],E))
        ActionOverride(Player3,LeaveAreaLUA("AR6108","",[310.570],E))
        ActionOverride(Player4,LeaveAreaLUA("AR6108","",[310.620],E))
        ActionOverride(Player5,LeaveAreaLUA("AR6108","",[230.550],E))
        ActionOverride(Player6,LeaveAreaLUA("AR6108","",[230.600],E))
>>>>>>>>	
EXTEND_TOP "baldur25.bcs" ".../stratagems-inline/sendai_statues_baldur.baf"
<<<<<<<< .../stratagems-inline/dwssnpcc.baf
	IF
		Global("DW_test_send_stat","GLOBAL",2)
	THEN
		RESPONSE #100
			DestroySelf()
	END
>>>>>>>>	
COMPILE ".../stratagems-inline/dwssnpcc.baf"
COPY_EXISTING "senpri01.cre" override
				"senill01.cre" "override"
					WRITE_ASCII 0x248 dwssnpcc


// testing spells

COPY_EXISTING "%WIZARD_BREACH%.spl" "override/dw#test2.spl"
    SAY NAME1 "AoE Breach (test)"
    LPF ALTER_SPELL_HEADER INT_VAR projectile=254 END

COPY_EXISTING "%WIZARD_SPELL_STRIKE%.spl" "override/dw#test3.spl"
    SAY NAME1 "AoE Spellstrike (test)"
    LPF ALTER_SPELL_HEADER INT_VAR projectile=254 END

COPY_EXISTING "dw#test2.spl" "override/dw#test1.spl"
    SAY NAME1 "AoE megadamage (test)"
    LPF DELETE_EFFECT END
    LPF ADD_SPELL_EFFECT INT_VAR opcode=12 target=2 timing=1 parameter1=1000 parameter2=0 END
    LPF CLONE_EFFECT INT_VAR match_parameter2=0 parameter2=0x10000 END
    LPF CLONE_EFFECT INT_VAR match_parameter2=0 parameter2=0x20000 END

<<<<<<<< .../ascension-inline/dw_zap.baf
IF
  HotKey(E)
THEN
    RESPONSE #100
        ReallyForceSpellRES("dw#test1",Myself)
END

IF
  HotKey(F)
THEN
    RESPONSE #100
        ReallyForceSpellRES("dw#test2",Myself)
END

IF
  HotKey(G)
THEN
    RESPONSE #100
        ReallyForceSpellRES("dw#test3",Myself)
END

>>>>>>>>

COPY ".../ascension-inline/dw_zap.baf" "scripts/dw_zap.bs" COMPILE_BAF_TO_BCS



END // end of BG2 bit



ACTION_IF is_bg1 BEGIN


<<<<<<<< .../stratagems-inline/davaeorn.baf
IF
  Global("DW_test_davaeorn","GLOBAL",1)
THEN
    RESPONSE #100
       SetGlobal("DW_test_davaeorn","GLOBAL",0)
        ActionOverride(Player1,LeaveAreaLUA("AR1803","",[1069.647],SSW))
        ActionOverride(Player2,LeaveAreaLUA("AR1803","",[1049.647],SSW))
        ActionOverride(Player3,LeaveAreaLUA("AR1803","",[1089.647],SSW))
        ActionOverride(Player4,LeaveAreaLUA("AR1803","",[1069.667],SSW))
        ActionOverride(Player5,LeaveAreaLUA("AR1803","",[1069.627],SSW))
        ActionOverride(Player6,LeaveAreaLUA("AR1803","",[1079.637],SSW))
END
>>>>>>>>

EXTEND_TOP baldur.bcs ".../stratagems-inline/davaeorn.baf"

<<<<<<<< .../stratagems-inline/sarevok_bg1.baf
IF
  Global("DW_test_sarevok","GLOBAL",1)
THEN
    RESPONSE #100
       SetGlobal("DW_test_sarevok","GLOBAL",0)
       SetGlobal("SarevokBehavior","GLOBAL",1)
        ActionOverride(Player1,LeaveAreaLUA("AR0125","",[959.1100],NNW))
        ActionOverride(Player2,LeaveAreaLUA("AR0125","",[939.1100],NNW))
        ActionOverride(Player3,LeaveAreaLUA("AR0125","",[979.1100],NNW))
        ActionOverride(Player4,LeaveAreaLUA("AR1803","",[959.1120],NNW))
        ActionOverride(Player5,LeaveAreaLUA("AR1803","",[959.1080],NNW))
        ActionOverride(Player6,LeaveAreaLUA("AR1803","",[969.1110],NNW))
END
>>>>>>>>

EXTEND_TOP baldur.bcs ".../stratagems-inline/sarevok_bg1.baf"

END


END