home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 July / maximum-cd-2010-07.iso / DiscContents / wesnoth-1.8-win32.exe / data / core / macros / ai_candidate_actions.cfg < prev    next >
Encoding:
Text File  |  2010-02-10  |  3.9 KB  |  160 lines

  1.  
  2. # scores of well-known candidate actions
  3.  
  4. #define AI_CA_GOTO_SCORE
  5.     200000
  6. #enddef
  7.  
  8. #define AI_CA_RECRUITMENT_SCORE
  9.     180000
  10. #enddef
  11.  
  12. #define AI_CA_MOVE_LEADER_TO_GOALS_SCORE
  13.     140000
  14. #enddef
  15.  
  16. #define AI_CA_MOVE_LEADER_TO_KEEP_SCORE
  17.     120000
  18. #enddef
  19.  
  20. #define AI_CA_COMBAT_SCORE
  21.     100000
  22. #enddef
  23.  
  24. #define AI_CA_HEALING_SCORE
  25.     80000
  26. #enddef
  27.  
  28. #define AI_CA_VILLAGES_SCORE
  29.     60000
  30. #enddef
  31.  
  32. #define AI_CA_RETREAT_SCORE
  33.     40000
  34. #enddef
  35.  
  36. #define AI_CA_MOVE_TO_TARGETS_SCORE
  37.     20000
  38. #enddef
  39.  
  40. # well-known candidate actions
  41.  
  42. #define AI_CA_GOTO
  43.     [candidate_action]
  44.         id=goto
  45.         engine=cpp
  46.         name=testing_ai_default::goto_phase
  47.         max_score={AI_CA_GOTO_SCORE}
  48.         score={AI_CA_GOTO_SCORE}
  49.     [/candidate_action]
  50. #enddef
  51.  
  52. #define AI_CA_RECRUITMENT
  53.     [candidate_action]
  54.         id=recruitment
  55.         engine=cpp
  56.         name=testing_ai_default::aspect_recruitment_phase
  57.         max_score={AI_CA_RECRUITMENT_SCORE}
  58.         score={AI_CA_RECRUITMENT_SCORE}
  59.     [/candidate_action]
  60. #enddef
  61.  
  62. #define AI_CA_MOVE_LEADER_TO_GOALS
  63.     [candidate_action]
  64.         id=move_leader_to_goals
  65.         engine=cpp
  66.         name=testing_ai_default::move_leader_to_goals_phase
  67.         max_score={AI_CA_MOVE_LEADER_TO_GOALS_SCORE}
  68.         score={AI_CA_MOVE_LEADER_TO_GOALS_SCORE}
  69.     [/candidate_action]
  70. #enddef
  71.  
  72. #define AI_CA_MOVE_LEADER_TO_KEEP
  73.     [candidate_action]
  74.         id=move_leader_to_keep
  75.         engine=cpp
  76.         name=testing_ai_default::move_leader_to_keep_phase
  77.         max_score={AI_CA_MOVE_LEADER_TO_KEEP_SCORE}
  78.         score={AI_CA_MOVE_LEADER_TO_KEEP_SCORE}
  79.     [/candidate_action]
  80. #enddef
  81.  
  82. #define AI_CA_COMBAT
  83.     [candidate_action]
  84.         id=combat
  85.         engine=cpp
  86.         name=testing_ai_default::combat_phase
  87.         max_score={AI_CA_COMBAT_SCORE}
  88.         score={AI_CA_COMBAT_SCORE}
  89.     [/candidate_action]
  90. #enddef
  91.  
  92. #define AI_CA_HEALING
  93.     [candidate_action]
  94.         id=healing
  95.         engine=cpp
  96.         name=testing_ai_default::get_healing_phase
  97.         max_score={AI_CA_HEALING_SCORE}
  98.         score={AI_CA_HEALING_SCORE}
  99.     [/candidate_action]
  100. #enddef
  101.  
  102. #define AI_CA_VILLAGES
  103.     [candidate_action]
  104.         id=villages
  105.         engine=cpp
  106.         name=testing_ai_default::get_villages_phase
  107.         max_score={AI_CA_VILLAGES_SCORE}
  108.         score={AI_CA_VILLAGES_SCORE}
  109.     [/candidate_action]
  110. #enddef
  111.  
  112. #define AI_CA_RETREAT
  113.     [candidate_action]
  114.         id=retreat
  115.         engine=cpp
  116.         name=testing_ai_default::retreat_phase
  117.         max_score={AI_CA_RETREAT_SCORE}
  118.         score={AI_CA_RETREAT_SCORE}
  119.     [/candidate_action]
  120. #enddef
  121.  
  122. #define AI_CA_MOVE_TO_TARGETS
  123.     [candidate_action]
  124.         id=move_to_targets
  125.         engine=cpp
  126.         name=testing_ai_default::testing_move_to_targets_phase
  127.         max_score={AI_CA_MOVE_TO_TARGETS_SCORE}
  128.         score={AI_CA_MOVE_TO_TARGETS_SCORE}
  129.     [/candidate_action]
  130. #enddef
  131.  
  132. # extra candidate actions
  133.  
  134. #define AI_CA_SIMPLE_MOVE_TO_TARGETS
  135.     [candidate_action]
  136.         id=simple_move_to_targets
  137.         engine=cpp
  138.         name=testing_ai_default::simple_move_and_targeting_phase
  139.         max_score={AI_CA_MOVE_TO_TARGETS_SCORE}
  140.         score={AI_CA_MOVE_TO_TARGETS_SCORE}
  141.     [/candidate_action]
  142. #enddef
  143.  
  144. #define AI_CA_POISONING
  145.     # candidate action for poisoners to spread poison around
  146.  
  147.     [candidate_action]
  148.         engine=fai
  149.         id=poisoning
  150.         name=poisoning
  151.         type=attack
  152.         [filter]
  153.             me="filter( input, 'me', filter(me.attacks,'att',filter(att.special,'spe',contains_string(spe,'poison'))))"
  154.             target="filter( input, 'target', target.undead = 0 and target.hitpoints > 5 and index_of('poisoned',keys(target.states)) = -1)"
  155.         [/filter]
  156.         evaluation="{ai/formula/poisoner_eval.fai}"
  157.         action="{ai/formula/poisoner_attack.fai}"
  158.     [/candidate_action]
  159. #enddef
  160.