Commit ac2aefb4 authored by mercury233's avatar mercury233

add DefaultChickenGame

parent 9371b29f
...@@ -6,14 +6,16 @@ namespace WindBot.Game.AI ...@@ -6,14 +6,16 @@ namespace WindBot.Game.AI
{ {
public abstract class DefaultExecutor : Executor public abstract class DefaultExecutor : Executor
{ {
protected DefaultExecutor(GameAI ai, Duel duel) private enum CardId
: base(ai, duel)
{ {
MysticalSpaceTyphoon = 5318639,
ChickenGame = 67616300
} }
private enum CardId protected DefaultExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{ {
MysticalSpaceTyphoon = 5318639 AddExecutor(ExecutorType.Activate, (int)CardId.ChickenGame, DefaultChickenGame);
} }
protected bool DefaultMysticalSpaceTyphoon() protected bool DefaultMysticalSpaceTyphoon()
...@@ -152,5 +154,22 @@ namespace WindBot.Game.AI ...@@ -152,5 +154,22 @@ namespace WindBot.Game.AI
return true; return true;
} }
protected bool DefaultChickenGame()
{
int count = 0;
foreach (CardExecutor exec in Executors)
{
if (exec.Type == Type && exec.CardId == Card.Id)
count++;
}
if (count > 1 || Duel.LifePoints[0] <= 1000)
return false;
if (Duel.LifePoints[0] <= Duel.LifePoints[1] && ActivateDescription == AI.Utils.GetStringId((int)CardId.ChickenGame, 0))
return true;
if (Duel.LifePoints[0] > Duel.LifePoints[1] && ActivateDescription == AI.Utils.GetStringId((int)CardId.ChickenGame, 1))
return true;
return false;
}
} }
} }
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