home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 61 / CDPowerplay61Disc2.iso / data1.cab / hd0_scripts / Text / cleric2.baf < prev    next >
Encoding:
Text File  |  2000-10-12  |  4.6 KB  |  218 lines

  1. // * Defensive Spell Cleric
  2. // * Will defend self and Heal (healing being the highest priority action, after the Control section)
  3. //  freedom, slow poison, restoration, holy might
  4. // *Notes: don't have a cleric cast blade barrier on self and be Script controlled
  5. // * the blade barrier will constantly kill your own party members
  6.  
  7. //*Assistance*
  8. // * Cast freedoms, cure poisons and stuff like that
  9.  
  10. IF
  11.     ActionListEmpty()
  12.     See(NearestEnemyOf(Myself))        
  13.     HaveSpell(CLERIC_FREE_ACTION)
  14.     See([PC])
  15.     StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
  16.     !StateCheck(LastSeenBy(Myself),STATE_INVISIBLE)
  17. THEN
  18.     RESPONSE #100
  19.         Spell(LastSeenBy(Myself),CLERIC_FREE_ACTION)
  20. END
  21.  
  22. IF
  23.     ActionListEmpty()
  24.     See(NearestEnemyOf(Myself))        
  25.     HaveSpell(CLERIC_SLOW_POISON)
  26.     See([PC])
  27.     StateCheck(LastSeenBy(Myself),STATE_POISONED)
  28. THEN
  29.     RESPONSE #100
  30.         Spell(LastSeenBy(Myself),CLERIC_SLOW_POISON)
  31. END
  32.  
  33. IF
  34.     ActionListEmpty()
  35.     See(NearestEnemyOf(Myself))        
  36.     HaveSpell(CLERIC_NEUTRALIZE_POISON)
  37.     See([PC])
  38.     StateCheck(LastSeenBy(Myself),STATE_POISONED)
  39. THEN
  40.     RESPONSE #100
  41.         Spell(LastSeenBy(Myself),CLERIC_NEUTRALIZE_POISON)
  42. END
  43.  
  44.  
  45.  
  46. //*Heal*
  47.  
  48. // * Mass cure if both myself and one other member is not doing going
  49.  
  50. IF
  51.     ActionListEmpty()
  52.     See(NearestEnemyOf(Myself))        
  53.     HaveSpell(CLERIC_MASS_CURE)
  54.     See([PC])
  55.     OR(2)
  56.     HPPercentLT(Player1,60)
  57.     HPPercentLT(Player3,60)
  58.     OR(2)
  59.     HPPercentLT(Player2,60)
  60.     HPPercentLT(Player5,60)
  61.     OR(2)
  62.     HPPercentLT(Player4,60)
  63.     HPPercentLT(Player6,60)
  64. THEN
  65.     RESPONSE #100
  66.         Spell(LastSeenBy(Myself),CLERIC_MASS_CURE)
  67. END
  68.  
  69. IF
  70.     ActionListEmpty()
  71.     HPPercentLT(LastSeenBy(Myself),10)
  72.     !StateCheck(LastSeenBy(Myself),STATE_INVISIBLE)
  73.     HaveSpell(CLERIC_HEAL)
  74. THEN
  75.     RESPONSE #100
  76.         Spell(LastSeenBy(),CLERIC_HEAL)
  77. END
  78.  
  79. IF
  80.     ActionListEmpty()
  81.     HPPercentLT(MostDamagedOf(),60)
  82.     !StateCheck(MostDamagedOf(),STATE_INVISIBLE)
  83.     HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
  84. THEN
  85.     RESPONSE #100
  86.         Spell(MostDamagedOf(),CLERIC_CURE_SERIOUS_WOUNDS)
  87. END
  88.  
  89.  
  90. IF
  91.     ActionListEmpty()
  92.     HPPercentLT(MostDamagedOf(),50)
  93.     !StateCheck(MostDamagedOf(),STATE_INVISIBLE)
  94.     HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
  95. THEN
  96.     RESPONSE #100
  97.         Spell(MostDamagedOf(),CLERIC_CURE_LIGHT_WOUNDS)
  98. END
  99.  
  100. IF
  101.     ActionListEmpty()
  102.     HPPercentLT(MostDamagedOf(),50)
  103.     !StateCheck(MostDamagedOf(),STATE_INVISIBLE)
  104.     HaveSpell(CLERIC_AID)
  105. THEN
  106.     RESPONSE #100
  107.         Spell(MostDamagedOf(),CLERIC_AID)
  108. END
  109.  
  110.  
  111. // * Defensive Spells*
  112.  
  113. IF
  114.     ActionListEmpty()
  115.     See(NearestEnemyOf(Myself))        
  116.     HaveSpell(CLERIC_PHYSICAL_MIRROR)
  117.     HPGT(LastSeenBy(Myself),20)
  118.     !HasBounceEffects(Myself)
  119. THEN
  120.     RESPONSE #100
  121.         Spell(Myself,CLERIC_PHYSICAL_MIRROR)
  122. END
  123.  
  124. // *Removed, but will probably add a scripting state for Death Ward (waiting for a PR)
  125. // * this will let me detect if a death ward has already been cast on myself
  126. IF
  127.     ActionListEmpty()
  128.     See(NearestEnemyOf(Myself))        
  129.     HaveSpell(CLERIC_DEATH_WARD)
  130.     HPGT(LastSeenBy(Myself),20)
  131.     CheckStat(Myself,0,SCRIPTINGSTATE2)
  132. THEN
  133.     RESPONSE #100    
  134.         Spell(Myself,CLERIC_DEATH_WARD)
  135. END
  136.  
  137. IF
  138.     ActionListEmpty()
  139.     See(NearestEnemyOf(Myself))        
  140.     HaveSpell(CLERIC_ARMOR_OF_FAITH)
  141.     CheckStatGT(Myself,3,ARMORCLASS)
  142.     HPGT(LastSeenBy(Myself),20)
  143. THEN
  144.     RESPONSE #100
  145.         Spell(Myself,CLERIC_ARMOR_OF_FAITH)
  146. END
  147.  
  148. IF
  149.     ActionListEmpty()
  150.     See(NearestEnemyOf(Myself))        
  151.     HaveSpell(CLERIC_BLESS)
  152.     HPGT(LastSeenBy(Myself),20)
  153.     !StateCheck(LastSeenBy(Myself),STATE_BLESS)
  154. THEN
  155.     RESPONSE #100
  156.         Spell(Myself,CLERIC_BLESS)
  157. END
  158.  
  159. //*Heal Myself (lower-priority)*
  160. IF
  161.     ActionListEmpty()
  162.     HPPercentLT(Myself,10)
  163.     HaveSpell(CLERIC_HEAL)
  164. THEN
  165.     RESPONSE #100
  166.         Spell(Myself,CLERIC_HEAL)
  167. END
  168.  
  169. IF
  170.     ActionListEmpty()
  171.     HPPercentLT(Myself,60)
  172.     HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
  173. THEN
  174.     RESPONSE #100
  175.         Spell(Myself,CLERIC_CURE_SERIOUS_WOUNDS)
  176. END
  177.  
  178. // * only cast cure light wounds on self if enemy is at range (otherwise its usually wasted by a spell interruption)
  179. IF
  180.     See(NearestEnemyOf(Myself))
  181.     !Range(LastSeenBy(Myself),10)
  182.     HPPercentLT(Myself,90)
  183.     HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
  184. THEN
  185.     RESPONSE #100
  186.         Spell(MostDamagedOf(),CLERIC_CURE_LIGHT_WOUNDS)
  187. END
  188.  
  189.  
  190. // * Combat*
  191.  
  192. IF
  193.     ActionListEmpty()
  194.     Help([PC])
  195. THEN
  196.     RESPONSE #100
  197.         AttackReevaluate(LastAttackerOf(LastHelp(Myself)),60)
  198. END
  199.  
  200. IF
  201.     ActionListEmpty()
  202.     See(NearestEnemyOf(Myself))
  203.     Range(NearestEnemyOf(Myself),4)
  204. THEN
  205.     RESPONSE #100
  206.         EquipMostDamagingMelee()
  207.         AttackReevaluate(NearestEnemyOf(Myself),30)
  208. END
  209.  
  210. IF
  211.     ActionListEmpty()
  212.     See(NearestEnemyOf(Myself))
  213.     !Range(NearestEnemyOf(Myself),4)
  214. THEN
  215.     RESPONSE #100
  216.         EquipRanged()
  217.         AttackReevaluate(NearestEnemyOf(Myself),30)
  218. END