Commit 0f47b3c6 authored by mercury233's avatar mercury233

add AI.Utils.GetBestBotMonster

parent d0454523
......@@ -132,6 +132,25 @@ namespace WindBot.Game.AI
return IsAllEnemyBetterThanValue(bestBotPower, onlyATK);
}
public ClientCard GetBestBotMonster(bool onlyATK = false)
{
int bestPower = -1;
ClientCard bestMonster = null;
for (int i = 0; i < 7; ++i)
{
ClientCard card = Bot.MonsterZone[i];
if (card == null || card.Data == null) continue;
if (onlyATK && card.IsDefense()) continue;
int newPower = card.GetDefensePower();
if (newPower > bestPower)
{
bestPower = newPower;
bestMonster = card;
}
}
return bestMonster;
}
public ClientCard GetOneEnemyBetterThanValue(int value, bool onlyATK = false)
{
ClientCard bestCard = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment