home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2000 December / PCP_12_2000B.iso / bg2demo / data1.cab / hd0_scripts / Text / mage3.baf < prev    next >
Encoding:
Text File  |  2000-09-22  |  8.9 KB  |  383 lines

  1. // * Date Created:Mar 21, 2000.
  2. // * Created by:Brent Knowles
  3. // * Purpose: A disabler mage whose intention is to cripple an enemy group
  4. // *  using charm, hold, confusion type spells
  5.  
  6. // * Vocalize if silenced*
  7. IF
  8.     ActionListEmpty()
  9.     See(NearestEnemyOf(Myself))        
  10.     StateCheck(Myself,STATE_SILENCED)
  11.     HaveSpell(WIZARD_VOCALIZE)
  12. THEN
  13.     RESPONSE #100
  14.         Spell(Myself,WIZARD_VOCALIZE)
  15. END
  16.  
  17. // *Magic Attack*
  18. // * attemps to remove spell protections from an enemy mage
  19. // * Must check to see if it was able to bring down the shield
  20. // * if not, it should stop using this spell.
  21.  
  22. IF
  23.     ActionListEmpty()
  24.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  25.     HaveSpell(WIZARD_RUBY_RAY_OF_REVERSAL)
  26.     Global("pscript_SpellThrust","LOCALS",0)
  27.     OR(2)
  28.     HasBounceEffects(LastSeenBy(Myself))
  29.     HasImmunityEffects(LastSeenBy(Myself))
  30. THEN
  31.     RESPONSE #100
  32.         Spell(LastSeenBy(Myself),WIZARD_RUBY_RAY_OF_REVERSAL)
  33.         Wait(2)
  34.         SetGlobal("pscript_SpellThrust","LOCALS",1)        
  35. END
  36.  
  37. // *
  38. // * spellThrust=1 means to check to see if the shields went down
  39. // * if they didn't, it means this spell won't work against the level of shielding this mage has
  40. // * so set the local to 2 
  41. IF
  42.     Global("pscript_SpellThrust","LOCALS",1)
  43.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  44.     OR(2)
  45.     HasBounceEffects(LastSeenBy(Myself))
  46.     HasImmunityEffects(LastSeenBy(Myself))    
  47. THEN
  48.     RESPONSE #100
  49.         SetGlobal("pscript_SpellThrust","LOCALS",2)        
  50. END
  51. // * If the spell did work then reset the local to 0
  52. IF
  53.     Global("pscript_SpellThrust","LOCALS",1)
  54.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  55.     !HasBounceEffects(LastSeenBy(Myself))
  56.     !HasImmunityEffects(LastSeenBy(Myself))    
  57. THEN
  58.     RESPONSE #100
  59.         SetGlobal("pscript_SpellThrust","LOCALS",0)        
  60. END
  61.  
  62. // *
  63. // Khelben's warding whip.
  64. // *
  65. IF
  66.     ActionListEmpty()
  67.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  68.     HaveSpell(WIZARD_WARDING_WHIP)
  69.     Global("pscript_WHIP","LOCALS",0)
  70.     OR(2)
  71.     HasBounceEffects(LastSeenBy(Myself))
  72.     HasImmunityEffects(LastSeenBy(Myself))
  73. THEN
  74.     RESPONSE #100
  75.         Spell(LastSeenBy(Myself),WIZARD_WARDING_WHIP)
  76.         Wait(2)
  77.         SetGlobal("pscript_WHIP","LOCALS",1)        
  78. END
  79.  
  80. // *
  81. // * WHIP=1 means to check to see if the shields went down
  82. // * if they didn't, it means this spell won't work against the level of shielding this mage has
  83. // * so set the local to 2 
  84. IF
  85.     Global("pscript_WHIP","LOCALS",1)
  86.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  87.     OR(2)
  88.     HasBounceEffects(LastSeenBy(Myself))
  89.     HasImmunityEffects(LastSeenBy(Myself))    
  90. THEN
  91.     RESPONSE #100
  92.         SetGlobal("pscript_WHIP","LOCALS",2)        
  93. END
  94. // * If the spell did work then reset the local to 0
  95. IF
  96.     Global("pscript_WHIP","LOCALS",1)
  97.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  98.     !HasBounceEffects(LastSeenBy(Myself))
  99.     !HasImmunityEffects(LastSeenBy(Myself))    
  100. THEN
  101.     RESPONSE #100
  102.         SetGlobal("pscript_WHIP","LOCALS",0)        
  103. END
  104.  
  105. //*High-Level Disabling Spells*
  106. IF
  107.     ActionListEmpty()
  108.     See(NearestEnemyOf(Myself))        
  109.     HaveSpell(WIZARD_MAZE)
  110.     !HasBounceEffects(LastSeenBy(Myself))
  111. THEN
  112.     RESPONSE #100
  113.         Spell(NearestEnemyOf(Myself),WIZARD_MAZE)
  114. END
  115.  
  116. IF
  117.     ActionListEmpty()
  118.     See(SixthNearestEnemyOf(Myself))        
  119.     HaveSpell(WIZARD_SYMBOL_DEATH)
  120.     !HasBounceEffects(LastSeenBy(Myself))
  121.     !Range(LastSeenBy(Myself),20)
  122.     HPGT(LastSeenBy(Myself),20)
  123. THEN
  124.     RESPONSE #100
  125.         Spell(LastSeenBy(Myself),WIZARD_SYMBOL_DEATH)
  126. END
  127.  
  128. IF
  129.     ActionListEmpty()
  130.     See(SixthNearestEnemyOf(Myself))    
  131.     HaveSpell(WIZARD_SYMBOL_FEAR)
  132.     !HasBounceEffects(LastSeenBy(Myself))
  133.     !Range(LastSeenBy(Myself),20)
  134.     HPGT(LastSeenBy(Myself),20)
  135. THEN
  136.     RESPONSE #100
  137.         Spell(LastSeenBy(Myself),WIZARD_SYMBOL_FEAR)
  138. END
  139. // * target spell around myself because it won't affect party members
  140. IF
  141.     ActionListEmpty()
  142.     See(NearestEnemyOf(Myself))
  143.     HaveSpell(WIZARD_SPHERE_OF_CHAOS)
  144.     Range(LastSeenBy(Myself),10)
  145.     !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
  146. THEN
  147.     RESPONSE #100
  148.         Spell(Myself,WIZARD_SPHERE_OF_CHAOS)
  149. END
  150.  
  151. IF
  152.     ActionListEmpty()
  153.     See(FifthNearestEnemyOf(Myself))        
  154.     HaveSpell(WIZARD_SYMBOL_STUN)
  155.     !StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
  156.     !HasBounceEffects(LastSeenBy(Myself))
  157.     !Range(LastSeenBy(Myself),20)
  158.     HPGT(LastSeenBy(Myself),20)
  159. THEN
  160.     RESPONSE #100
  161.         Spell(LastSeenBy(Myself),WIZARD_SYMBOL_STUN)
  162. END
  163.  
  164. IF
  165.     ActionListEmpty()
  166.     See(NearestEnemyOf(Myself))        
  167.     HaveSpell(WIZARD_FLESH_TO_STONE)
  168.     !HasBounceEffects(LastSeenBy(Myself))
  169.     HPGT(LastSeenBy(Myself),20)
  170. THEN
  171.     RESPONSE #100
  172.         Spell(LastSeenBy(Myself),WIZARD_FLESH_TO_STONE)
  173. END
  174.  
  175. // * destroy stone creature
  176. IF
  177.     ActionListEmpty()
  178.     See(NearestEnemyOf(Myself))        
  179.     HaveSpell(WIZARD_MAGIC_MISSILE)
  180.     StateCheck(LastSeenBy(Myself),STATE_STONE_DEATH)
  181. THEN
  182.     RESPONSE #100
  183.         Spell(LastSeenBy(Myself),WIZARD_MAGIC_MISSILE)
  184. END
  185.  
  186. //*Mid-Level Disabling*
  187. IF
  188.     ActionListEmpty()
  189.     See(NearestEnemyOf(Myself))
  190.     !HasBounceEffects(LastSeenBy(Myself))    
  191.     HaveSpell(WIZARD_CHAOS)
  192.     HPGT(LastSeenBy(Myself),20)
  193.     !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
  194. THEN
  195.     RESPONSE #100
  196.         Spell(NearestEnemyOf(Myself),WIZARD_CHAOS)
  197. END
  198.  
  199. IF
  200.     ActionListEmpty()
  201.     See(NearestEnemyOf(Myself))        
  202.     HaveSpell(WIZARD_FEEBLEMIND)
  203.     !HasBounceEffects(LastSeenBy(Myself))
  204.     HPGT(LastSeenBy(Myself),20)
  205. THEN
  206.     RESPONSE #100
  207.         Spell(NearestEnemyOf(Myself),WIZARD_FEEBLEMIND)
  208. END
  209.  
  210. IF
  211.     ActionListEmpty()
  212.     See(NearestEnemyOf(Myself))        
  213.     HaveSpell(WIZARD_DOMINATION)
  214.     !HasBounceEffects(LastSeenBy(Myself))
  215.     HPGT(LastSeenBy(Myself),20)
  216. THEN
  217.     RESPONSE #100
  218.         Spell(NearestEnemyOf(Myself),WIZARD_DOMINATION)
  219. END
  220.  
  221. IF
  222.     ActionListEmpty()
  223.     See(NearestEnemyOf(Myself))        
  224.     HaveSpell(WIZARD_EMOTION_HOPELESSNESS)
  225.     !HasBounceEffects(LastSeenBy(Myself))
  226.     HPGT(LastSeenBy(Myself),20)
  227. THEN
  228.     RESPONSE #100
  229.         Spell(NearestEnemyOf(Myself),WIZARD_EMOTION_HOPELESSNESS)
  230. END
  231.  
  232. IF
  233.     ActionListEmpty()
  234.     See(NearestEnemyOf(Myself))        
  235.     HaveSpell(WIZARD_CONFUSION)
  236.     HPGT(LastSeenBy(Myself),20)
  237.     !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
  238. THEN
  239.     RESPONSE #100
  240.         Spell(NearestEnemyOf(Myself),WIZARD_CONFUSION)
  241. END
  242.  
  243.  
  244. //*Low-Level Disabling*
  245. IF
  246.     ActionListEmpty()
  247.     See(NearestEnemyOf(Myself))        
  248.     HaveSpell(WIZARD_DIRE_CHARM)
  249.     !HasBounceEffects(LastSeenBy(Myself))
  250.     HPGT(LastSeenBy(Myself),20)
  251.     !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
  252. THEN
  253.     RESPONSE #100
  254.         Spell(NearestEnemyOf(Myself),WIZARD_DIRE_CHARM)
  255. END
  256.  
  257. IF
  258.     ActionListEmpty()
  259.     See(NearestEnemyOf(Myself))        
  260.     HaveSpell(WIZARD_RAY_OF_ENFEEBLEMENT)
  261.     !HasBounceEffects(LastSeenBy(Myself))
  262.     HPGT(LastSeenBy(Myself),20)
  263. THEN
  264.     RESPONSE #100
  265.         Spell(Myself,WIZARD_RAY_OF_ENFEEBLEMENT)
  266. END
  267.  
  268. IF
  269.     ActionListEmpty()
  270.     See(NearestEnemyOf(Myself))
  271.     HPGT(LastSeenBy(Myself),30)
  272.     !HasBounceEffects(LastSeenBy(Myself))
  273.     General(LastSeenBy(Myself),HUMANOID)
  274.     !StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
  275.     HaveSpell(WIZARD_CHARM_PERSON)
  276. THEN
  277.     RESPONSE #100
  278.         Spell(LastSeenBy(Myself),WIZARD_CHARM_PERSON)
  279. END
  280.  
  281. //*Low-Level Offensive*
  282. IF
  283.     ActionListEmpty()
  284.     See(NearestEnemyOf(Myself))
  285.     HPGT(LastSeenBy(Myself),20)
  286.     !HasBounceEffects(LastSeenBy(Myself))
  287.     HaveSpell(WIZARD_BURNING_HANDS)
  288. THEN
  289.     RESPONSE #100
  290.         Spell(LastSeenBy(Myself),WIZARD_BURNING_HANDS)
  291. END
  292.  
  293. IF
  294.     ActionListEmpty()
  295.     See(NearestEnemyOf(Myself))
  296.     HPGT(LastSeenBy(Myself),20)
  297.     !HasBounceEffects(LastSeenBy(Myself))
  298.     HaveSpell(WIZARD_COLOR_SPRAY)
  299. THEN
  300.     RESPONSE #100
  301.         Spell(LastSeenBy(Myself),WIZARD_COLOR_SPRAY)
  302. END
  303.  
  304. IF
  305.     ActionListEmpty()
  306.     See(NearestEnemyOf(Myself))
  307.     HPGT(LastSeenBy(Myself),20)
  308.     !HasBounceEffects(LastSeenBy(Myself))
  309.     HaveSpell(WIZARD_MAGIC_MISSILE)
  310. THEN
  311.     RESPONSE #100
  312.         Spell(LastSeenBy(Myself),WIZARD_MAGIC_MISSILE)
  313. END
  314.  
  315. IF
  316.     ActionListEmpty()
  317.     See(NearestEnemyOf(Myself))
  318.     !HasBounceEffects(LastSeenBy(Myself))
  319.     HaveSpell(WIZARD_SLEEP)
  320.     !StateCheck(LastSeenBy(Myself),STATE_SLEEPING)
  321. THEN
  322.     RESPONSE #100
  323.         Spell(LastSeenBy(Myself),WIZARD_SLEEP)
  324. END
  325.  
  326. IF
  327.     ActionListEmpty()
  328.     See(NearestEnemyOf(Myself))
  329.     HPGT(LastSeenBy(Myself),20)
  330.     !HasBounceEffects(LastSeenBy(Myself))
  331.     HaveSpell(WIZARD_CHROMATIC_ORB)
  332. THEN
  333.     RESPONSE #100
  334.         Spell(LastSeenBy(Myself),WIZARD_CHROMATIC_ORB)
  335. END
  336.  
  337. IF
  338.     ActionListEmpty()
  339.     See(NearestEnemyOf(Myself))
  340.     HPGT(LastSeenBy(Myself),20)
  341.     !HasBounceEffects(LastSeenBy(Myself))
  342.     HaveSpell(WIZARD_LARLOCH_MINOR_DRAIN)
  343. THEN
  344.     RESPONSE #100
  345.         Spell(LastSeenBy(Myself),WIZARD_LARLOCH_MINOR_DRAIN)
  346. END
  347.  
  348. IF
  349.     ActionListEmpty()
  350.     See(NearestEnemyOf(Myself))
  351.     HPGT(LastSeenBy(Myself),20)
  352.     !HasBounceEffects(LastSeenBy(Myself))
  353.     HaveSpell(WIZARD_BLINDNESS)
  354.     !StateCheck(LastSeenBy(Myself),STATE_BLIND)
  355. THEN
  356.     RESPONSE #100
  357.         Spell(LastSeenBy(Myself),WIZARD_BLINDNESS)
  358. END
  359.  
  360.  
  361. //*Combat*
  362. IF
  363.     ActionListEmpty()
  364.     See(NearestEnemyOf(Myself))
  365.     Range(NearestEnemyOf(Myself),6)
  366. THEN
  367.     RESPONSE #100
  368.         RunAwayFrom(NearestEnemyOf(Myself),90)
  369. END
  370.  
  371. // * reset locals*
  372. // * if no enemies are around
  373. IF
  374.     !See(NearestEnemyOf(Myself))
  375.     CombatCounter(0)
  376.     OR(2)
  377.     GlobalGT("pscript_SpellThrust","LOCALS",0)
  378.     GlobalGT("pscript_WHIP","LOCALS",0)
  379. THEN
  380.     RESPONSE #100
  381.         SetGlobal("pscript_SpellThrust","LOCALS",0)
  382.         SetGlobal("pscript_WHIP","LOCALS",0)
  383. END