Commit d2bdb15f authored by mercury233's avatar mercury233

Rainbow no longer summon rescue rabbit in vain

parent 1007700b
using YGOSharp.OCGWrapper.Enums;
using System;
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
namespace WindBot.Game.AI.Decks
{
[Deck("Rainbow", "AI_Rainbow")]
......@@ -61,7 +62,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.UnexpectedDai, UnexpectedDaiEffect);
AddExecutor(ExecutorType.Summon, CardId.RescueRabbit);
AddExecutor(ExecutorType.Summon, CardId.RescueRabbit, RescueRabbitSummon);
AddExecutor(ExecutorType.Activate, CardId.RescueRabbit, RescueRabbitEffect);
AddExecutor(ExecutorType.Activate, CardId.PotOfDesires, DefaultPotOfDesires);
......@@ -136,8 +137,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.TraptrixTrapHoleNightmare, DefaultUniqueTrap);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
}
}
public override void OnNewTurn()
{
NormalSummoned = false;
......@@ -206,6 +207,13 @@ namespace WindBot.Game.AI.Decks
}
return true;
}
private bool RescueRabbitSummon()
{
return AI.Utils.GetBotAvailZonesFromExtraDeck() > 0
|| AI.Utils.GetMatchingCards(Enemy.MonsterZone, card => card.GetDefensePower() >= 1900).Count == 0
|| AI.Utils.GetMatchingCards(Enemy.MonsterZone, card => card.GetDefensePower() < 1900).Count > AI.Utils.GetMatchingCards(Bot.MonsterZone, card => card.Attack >= 1900).Count;
}
private bool RescueRabbitEffect()
{
......@@ -255,7 +263,7 @@ namespace WindBot.Game.AI.Decks
}
private bool NormalSummon()
{
return true;
return Card.Id != CardId.RescueRabbit;
}
private bool GagagaCowboySummon()
......
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