| 33 | } |
| 34 | |
| 35 | void AIBlockUnit::init(GameState &state, BattleUnit &u) |
| 36 | { |
| 37 | // FIXME: Actually read this option |
| 38 | bool USER_OPTION_USE_HARDCORE_AI = false; |
| 39 | |
| 40 | aiList.clear(); |
| 41 | aiList.push_back(mksp<UnitAILowMorale>()); |
| 42 | aiList.push_back(mksp<UnitAIDefault>()); |
| 43 | aiList.push_back(mksp<UnitAIBehavior>()); |
| 44 | // Even player units have AI because when they're taken control of they will need that |
| 45 | if (USER_OPTION_USE_HARDCORE_AI) |
| 46 | { |
| 47 | aiList.push_back(mksp<UnitAIHardcore>()); |
| 48 | } |
| 49 | else |
| 50 | { |
| 51 | aiList.push_back(mksp<UnitAIVanilla>()); |
| 52 | } |
| 53 | |
| 54 | reset(state, u); |
| 55 | } |
| 56 | |
| 57 | void AIBlockUnit::reset(GameState &state, BattleUnit &u) |
| 58 | { |
no test coverage detected