Support various types of enemy AI
Closed this issue · 1 comments
wateret commented
Infra
- AIExecutor interface
- Bind with lua interface
Types of AI mode
- do_nothing
- Do nothing
- random
- Move to random position and do act
- unit_in_range_random
- Rush to a random unit in range
-
unit_in_range_priority(postponed)- Rush to a unit with priority in range
- Priority : weakest unit in range first, or a unit that is likely to be killed with this move
- hold_position
- Stay in current position and do act if possible
Later works
These types requires additional parameter so it will be done in the future.
- trace_specific_enemy
- Trace specific enemy unit
- trace_any_enemy
- Trace any of enemy units (Maybe nearest)
- rush_to_position
- Rush to a specific position
% User defined AI is not the feature in near future.
Usage
Those types should be a thing that can be set by script
For example, in lua scenario script
game:set_ai_mode(unit_id, "hold_position")