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

  1. // * Offensive mage...Berserk
  2. // * Fires off offensive spells and then closes to melee.
  3. // * Requires a mage with a large number of hit-points, else will die too easily.
  4.  
  5. //*Mixed Mid-Level Offensive and Area effect*
  6. IF
  7.     ActionListEmpty()
  8.     See(NearestEnemyOf(Myself))        
  9.     HaveSpell(WIZARD_ICE_STORM)
  10.     !Range(LastSeenBy(Myself),20)
  11. THEN
  12.     RESPONSE #100
  13.         Spell(NearestEnemyOf(Myself),WIZARD_ICE_STORM)
  14. END
  15.  
  16. IF
  17.     ActionListEmpty()
  18.     See(NearestEnemyOf(Myself))        
  19.     HaveSpell(WIZARD_MONSTER_SUMMONING_2)
  20. THEN
  21.     RESPONSE #100
  22.         Spell(Myself,WIZARD_MONSTER_SUMMONING_2)
  23. END
  24.  
  25. IF
  26.     ActionListEmpty()
  27.     See(NearestEnemyOf(Myself))        
  28.     HaveSpell(WIZARD_DEATH_SPELL)
  29. THEN
  30.     RESPONSE #100
  31.         Spell(NearestEnemyOf(Myself),WIZARD_DEATH_SPELL)
  32. END
  33.  
  34.  
  35. IF
  36.     ActionListEmpty()
  37.     See(NearestEnemyOf(Myself))        
  38.     HaveSpell(WIZARD_CONE_OF_COLD)
  39.     !HasBounceEffects(LastSeenBy(Myself))
  40. THEN
  41.     RESPONSE #100
  42.         Spell(NearestEnemyOf(Myself),WIZARD_CONE_OF_COLD)
  43. END
  44.  
  45.  
  46. IF
  47.     ActionListEmpty()
  48.     See(NearestEnemyOf(Myself))        
  49.     HaveSpell(WIZARD_FIREBALL)
  50.     !Range(LastSeenBy(Myself),20)
  51. THEN
  52.     RESPONSE #100
  53.         Spell(NearestEnemyOf(Myself),WIZARD_FIREBALL)
  54. END
  55.  
  56. IF
  57.     ActionListEmpty()
  58.     See(NearestEnemyOf(Myself))        
  59.     HaveSpell(WIZARD_LIGHTNING_BOLT)
  60.     !HasBounceEffects(LastSeenBy(Myself))
  61.     !Range(LastSeenBy(Myself),20)
  62. THEN
  63.     RESPONSE #100
  64.         Spell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
  65. END
  66.  
  67. // * cast delayed blast fireball and run
  68. IF
  69.     ActionListEmpty()
  70.     See(NearestEnemyOf(Myself))        
  71.     HaveSpell(WIZARD_DELAYED_BLAST_FIREBALL)
  72.     !Range(LastSeenBy(Myself),20)
  73. THEN
  74.     RESPONSE #100
  75.         Spell(LastSeenBy(Myself),WIZARD_DELAYED_BLAST_FIREBALL)
  76.         RunAwayFrom(LastSeenBy(Myself),100)
  77. END
  78. IF
  79.     ActionListEmpty()
  80.     See(NearestEnemyOf(Myself))        
  81.     HaveSpell(WIZARD_DISINTEGRATE)
  82.     !HasBounceEffects(LastSeenBy(Myself))
  83. THEN
  84.     RESPONSE #100
  85.         Spell(NearestEnemyOf(Myself),WIZARD_DISINTEGRATE)
  86. END
  87.  
  88. // *Magic Attack*
  89. // * attemps to remove spell protections from an enemy mage
  90. // * Must check to see if it was able to bring down the shield
  91. // * if not, it should stop using this spell.
  92.  
  93. IF
  94.     ActionListEmpty()
  95.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  96.     HaveSpell(WIZARD_RUBY_RAY_OF_REVERSAL)
  97.     Global("pscript_SpellThrust","LOCALS",0)
  98.     OR(2)
  99.     HasBounceEffects(LastSeenBy(Myself))
  100.     HasImmunityEffects(LastSeenBy(Myself))
  101. THEN
  102.     RESPONSE #100
  103.         Spell(LastSeenBy(Myself),WIZARD_RUBY_RAY_OF_REVERSAL)
  104.         Wait(2)
  105.         SetGlobal("pscript_SpellThrust","LOCALS",1)        
  106. END
  107.  
  108. // *
  109. // * spellThrust=1 means to check to see if the shields went down
  110. // * if they didn't, it means this spell won't work against the level of shielding this mage has
  111. // * so set the local to 2 
  112. IF
  113.     Global("pscript_SpellThrust","LOCALS",1)
  114.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  115.     OR(2)
  116.     HasBounceEffects(LastSeenBy(Myself))
  117.     HasImmunityEffects(LastSeenBy(Myself))    
  118. THEN
  119.     RESPONSE #100
  120.         SetGlobal("pscript_SpellThrust","LOCALS",2)        
  121. END
  122. // * If the spell did work then reset the local to 0
  123. IF
  124.     Global("pscript_SpellThrust","LOCALS",1)
  125.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  126.     !HasBounceEffects(LastSeenBy(Myself))
  127.     !HasImmunityEffects(LastSeenBy(Myself))    
  128. THEN
  129.     RESPONSE #100
  130.         SetGlobal("pscript_SpellThrust","LOCALS",0)        
  131. END
  132.  
  133. // *
  134. // Khelben's warding whip.
  135. // *
  136. IF
  137.     ActionListEmpty()
  138.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  139.     HaveSpell(WIZARD_WARDING_WHIP)
  140.     Global("pscript_WHIP","LOCALS",0)
  141.     OR(2)
  142.     HasBounceEffects(LastSeenBy(Myself))
  143.     HasImmunityEffects(LastSeenBy(Myself))
  144. THEN
  145.     RESPONSE #100
  146.         Spell(LastSeenBy(Myself),WIZARD_WARDING_WHIP)
  147.         Wait(2)
  148.         SetGlobal("pscript_WHIP","LOCALS",1)        
  149. END
  150.  
  151. // *
  152. // * WHIP=1 means to check to see if the shields went down
  153. // * if they didn't, it means this spell won't work against the level of shielding this mage has
  154. // * so set the local to 2 
  155. IF
  156.     Global("pscript_WHIP","LOCALS",1)
  157.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  158.     OR(2)
  159.     HasBounceEffects(LastSeenBy(Myself))
  160.     HasImmunityEffects(LastSeenBy(Myself))    
  161. THEN
  162.     RESPONSE #100
  163.         SetGlobal("pscript_WHIP","LOCALS",2)        
  164. END
  165. // * If the spell did work then reset the local to 0
  166. IF
  167.     Global("pscript_WHIP","LOCALS",1)
  168.     See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
  169.     !HasBounceEffects(LastSeenBy(Myself))
  170.     !HasImmunityEffects(LastSeenBy(Myself))    
  171. THEN
  172.     RESPONSE #100
  173.         SetGlobal("pscript_WHIP","LOCALS",0)        
  174. END
  175. //*Low-Level Offensive*
  176. IF
  177.     ActionListEmpty()
  178.     See(NearestEnemyOf(Myself))
  179.     HaveSpell(WIZARD_BURNING_HANDS)
  180.     HPGT(LastSeenBy(Myself),20)
  181.     !HasBounceEffects(LastSeenBy(Myself))
  182. THEN
  183.     RESPONSE #100
  184.         Spell(NearestEnemyOf(Myself),WIZARD_BURNING_HANDS)
  185. END
  186.  
  187. IF
  188.     ActionListEmpty()
  189.     See(NearestEnemyOf(Myself))
  190.     HaveSpell(WIZARD_COLOR_SPRAY)
  191.     HPGT(LastSeenBy(Myself),20)
  192.     !HasBounceEffects(LastSeenBy(Myself))
  193. THEN
  194.     RESPONSE #100
  195.         Spell(NearestEnemyOf(Myself),WIZARD_COLOR_SPRAY)
  196. END
  197.  
  198. IF
  199.     ActionListEmpty()
  200.     See(NearestEnemyOf(Myself))
  201.     HaveSpell(WIZARD_MAGIC_MISSILE)
  202.     HPGT(LastSeenBy(Myself),20)
  203.     !HasBounceEffects(LastSeenBy(Myself))
  204. THEN
  205.     RESPONSE #100
  206.         Spell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
  207. END
  208.  
  209. IF
  210.     ActionListEmpty()
  211.     See(NearestEnemyOf(Myself))
  212.     HaveSpell(WIZARD_SLEEP)
  213.     HPGT(LastSeenBy(Myself),20)
  214.     !HasBounceEffects(LastSeenBy(Myself))
  215. THEN
  216.     RESPONSE #100
  217.         Spell(NearestEnemyOf(Myself),WIZARD_SLEEP)
  218. END
  219.  
  220. IF
  221.     ActionListEmpty()
  222.     See(NearestEnemyOf(Myself))
  223.     HaveSpell(WIZARD_CHROMATIC_ORB)
  224.     HPGT(LastSeenBy(Myself),20)
  225.     !HasBounceEffects(LastSeenBy(Myself))
  226. THEN
  227.     RESPONSE #100
  228.         Spell(NearestEnemyOf(Myself),WIZARD_CHROMATIC_ORB)
  229. END
  230.  
  231. IF
  232.     ActionListEmpty()
  233.     See(NearestEnemyOf(Myself))
  234.     HaveSpell(WIZARD_LARLOCH_MINOR_DRAIN)
  235.     HPGT(LastSeenBy(Myself),20)
  236.     !HasBounceEffects(LastSeenBy(Myself))
  237. THEN
  238.     RESPONSE #100
  239.         Spell(NearestEnemyOf(Myself),WIZARD_LARLOCH_MINOR_DRAIN)
  240. END
  241.  
  242. IF
  243.     ActionListEmpty()
  244.     See(NearestEnemyOf(Myself))
  245.     HaveSpell(WIZARD_BLINDNESS)
  246.     !HasBounceEffects(LastSeenBy(Myself))
  247. THEN
  248.     RESPONSE #100
  249.         Spell(NearestEnemyOf(Myself),WIZARD_BLINDNESS)
  250. END
  251.  
  252. IF
  253.     ActionListEmpty()
  254.     See(NearestEnemyOf(Myself))
  255.     HaveSpell(WIZARD_CHARM_PERSON)
  256.     !StateCheck(LastSeenBy(Myself),STATE_CHARMED)
  257.     !HasBounceEffects(LastSeenBy(Myself))
  258. THEN
  259.     RESPONSE #100
  260.         Spell(NearestEnemyOf(Myself),WIZARD_CHARM_PERSON)
  261. END
  262.  
  263. IF
  264.     ActionListEmpty()
  265.     See(NearestEnemyOf(Myself))
  266.     HaveSpell(WIZARD_GREASE)
  267. THEN
  268.     RESPONSE #100
  269.         Spell(NearestEnemyOf(Myself),WIZARD_GREASE)
  270. END
  271.  
  272. //*Combat*
  273. IF
  274.     ActionListEmpty()
  275.     See(NearestEnemyOf(Myself))
  276. THEN
  277.     RESPONSE #100
  278.         EquipMostDamagingMelee()
  279.         AttackReevaluate(NearestEnemyOf(Myself),5)
  280. END
  281. // * reset locals*
  282. // * if no enemies are around
  283. IF
  284.     !See(NearestEnemyOf(Myself))
  285.     CombatCounter(0)
  286.     OR(2)
  287.     GlobalGT("pscript_SpellThrust","LOCALS",0)
  288.     GlobalGT("pscript_WHIP","LOCALS",0)
  289. THEN
  290.     RESPONSE #100
  291.         SetGlobal("pscript_SpellThrust","LOCALS",0)
  292.         SetGlobal("pscript_WHIP","LOCALS",0)
  293. END