OpenDungeons/OpenDungeons — pull request #325 by hwoarangmy (2014-11-18 19:17:27+00:00)
Title: Add a new AI that build every useful rooms + small fixes

Fixes:
- Added a building type to buildiong class (to prepare for tile.getCoveringBuilding instead of room/trap)
- Fixed a bug in tile claiming where it is not displayed claimed if the kobold has a certain dance rate
- Replaced Player.getHasAI per Player.getIsHuman since it is what we want to know (and because inactive players have no ai assigned and should be handled like AI players)
- Added support to allow AI to pickup/drop creatures
- Fixed the map info reading in levels to display configurable players

Concerning AI:
- To place rooms, it uses a point system (about distance from dungeon heart and active spots). That can allow to easily change how the computer places rooms and maybe even change between different AI levels.
- If the AI has no treasury, it builds 1.
- If the an allied unit gets attacked on a nearby allied claimed tile, the AI drops creatures to help
- If its creatures get wounded, the AI picks them up and drops them in its dungeon heart so they can recover

As always, I've changed the skirmish 2v2 small test map to allow testing. Now, players 3 and 4 start without treasury.
Player 4 has 3 available claimed tiles and should build on it. Player 3 have available claimed tiles in your dungeon only (not reachable). Thus, he should wait for his kobolds to claim before building the treasury

While testing, don't hesitate to play with the editor to see how the AI adapts when it cannot build somewhere or when certain rooms are already built
Moreover, if you build something on allied claimed tiles where a room was going to be built, the AI should start digging somewhere else.