Commit 113f696e authored by mercury233's avatar mercury233

add DefaultHonestEffect

parent d3fa6c30
......@@ -83,7 +83,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.PerformageTrickClown, PerformageTrickClownEffect);
AddExecutor(ExecutorType.Activate, CardId.ThousandBlades);
AddExecutor(ExecutorType.Activate, CardId.Honest, HonestEffect);
AddExecutor(ExecutorType.Activate, CardId.Honest, DefaultHonestEffect);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
}
......@@ -255,10 +255,6 @@ namespace WindBot.Game.AI.Decks
return true;
}
}
private bool HonestEffect()
{
return Duel.Phase != DuelPhase.Main1;
}
}
}
\ No newline at end of file
......@@ -105,7 +105,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.TinGoldfish, GoblindberghEffect);
AddExecutor(ExecutorType.Activate, CardId.Kagetokage);
AddExecutor(ExecutorType.Activate, CardId.SummonerMonk, SummonerMonkEffect);
AddExecutor(ExecutorType.Activate, CardId.Honest, Honest);
AddExecutor(ExecutorType.Activate, CardId.Honest, DefaultHonestEffect);
// Reposition
AddExecutor(ExecutorType.Repos, MonsterRepos);
......@@ -213,11 +213,6 @@ namespace WindBot.Game.AI.Decks
return Bot.LifePoints > 500;
}
private bool Honest()
{
return Duel.Phase != DuelPhase.Main1 || Duel.Turn == 1;
}
private bool GoblindberghFirst()
{
foreach (ClientCard card in Bot.Hand.GetMonsters())
......
......@@ -752,5 +752,20 @@ namespace WindBot.Game.AI
return (oppoCount > 0 && selfCount <= oppoCount) || oppoCount >= 3;
}
/// <summary>
/// Clever enough.
/// </summary>
protected bool DefaultHonestEffect()
{
if (Card.Location == CardLocation.Hand)
{
return Bot.BattlingMonster.IsAttack() &&
(((Bot.BattlingMonster.Attack < Enemy.BattlingMonster.Attack) || Bot.BattlingMonster.Attack >= Enemy.LifePoints)
|| ((Bot.BattlingMonster.Attack < Enemy.BattlingMonster.Defense) && (Bot.BattlingMonster.Attack + Enemy.BattlingMonster.Attack > Enemy.BattlingMonster.Defense)));
}
else return AI.Utils.IsTurn1OrMain2();
}
}
}
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