Commit af9831b8 authored by wind2009's avatar wind2009 Committed by GitHub

Fix bot against 原罪のディアベルゼ (#190)

parent 2d329511
......@@ -2916,5 +2916,15 @@ namespace WindBot.Game.AI.Decks
}
return base.OnSelectPlace(cardId, player, location, available);
}
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
AI.SelectPlace(SelectSTPlace(Card, true));
return true;
}
return false;
}
}
}
\ No newline at end of file
......@@ -2888,5 +2888,15 @@ namespace WindBot.Game.AI.Decks
return false;
}
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
SelectSTPlace(null, true);
return true;
}
return false;
}
}
}
\ No newline at end of file
......@@ -2976,5 +2976,15 @@ namespace WindBot.Game.AI.Decks
return false;
}
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
SelectSTPlace(null, true);
return true;
}
return false;
}
}
}
\ No newline at end of file
......@@ -3105,5 +3105,14 @@ namespace WindBot.Game.AI.Decks
return false;
}
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
SelectSTPlace(null, true);
return true;
}
return false;
}
}
}
\ No newline at end of file
......@@ -1823,5 +1823,15 @@ namespace WindBot.Game.AI.Decks
}
return base.OnPreBattleBetween(attacker, defender);
}
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
AI.SelectPlace(SelectSTPlace(Card, true));
return true;
}
return false;
}
}
}
......@@ -2899,5 +2899,15 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
protected override bool DefaultSetForDiabellze()
{
if (base.DefaultSetForDiabellze())
{
SelectSTPlace(null, true);
return true;
}
return false;
}
}
}
\ No newline at end of file
......@@ -192,6 +192,9 @@ namespace WindBot.Game.AI
public const int NovoxTheSilenforcerDisciple = 25801745;
public const int SilenforcingBarrier = 98477480;
public const int DiabellzeOfTheOriginalSin = 53765052;
public const int PotOfExtravagance = 49238328;
}
protected class _Setcode
......@@ -224,6 +227,7 @@ namespace WindBot.Game.AI
AddExecutor(ExecutorType.Activate, _CardId.VaylantzWorld_ShinraBansho, DefaultVaylantzWorld_ShinraBansho);
AddExecutor(ExecutorType.Activate, _CardId.VaylantzWorld_KonigWissen, DefaultVaylantzWorld_KonigWissen);
AddExecutor(ExecutorType.Activate, _CardId.SantaClaws);
AddExecutor(ExecutorType.SpellSet, DefaultSetForDiabellze);
}
protected int lightningStormOption = -1;
......@@ -1580,5 +1584,30 @@ namespace WindBot.Game.AI
return crossoutDesignatorIdList.Contains(cardId)
|| (calledbytheGraveIdCountMap.ContainsKey(cardId) && calledbytheGraveIdCountMap[cardId] > 0);
}
protected virtual bool DefaultSetForDiabellze()
{
if (Card == null) return false;
if (Card.Id == _CardId.PotOfExtravagance) return false;
if (Enemy.HasInMonstersZone(_CardId.DiabellzeOfTheOriginalSin, true, faceUp: true) && Card.HasType(CardType.Spell) && !Card.HasType(CardType.QuickPlay))
{
if (Bot.SpellZone.Any(c => c != null && Duel.MainPhase.ActivableCards.Contains(c) && c.HasType(CardType.Spell) && !Card.HasType(CardType.QuickPlay) && c.IsFacedown()))
{
return false;
}
foreach (CardExecutor exec in Executors)
{
if (exec.Type == ExecutorType.Activate && exec.CardId == Card.Id)
{
if (exec.Func == null || exec.Func())
{
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