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 System.Collections.Generic;
using WindBot; using WindBot;
using WindBot.Game; using WindBot.Game;
...@@ -61,7 +62,7 @@ namespace WindBot.Game.AI.Decks ...@@ -61,7 +62,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.UnexpectedDai, UnexpectedDaiEffect); 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.RescueRabbit, RescueRabbitEffect);
AddExecutor(ExecutorType.Activate, CardId.PotOfDesires, DefaultPotOfDesires); AddExecutor(ExecutorType.Activate, CardId.PotOfDesires, DefaultPotOfDesires);
...@@ -207,6 +208,13 @@ namespace WindBot.Game.AI.Decks ...@@ -207,6 +208,13 @@ namespace WindBot.Game.AI.Decks
return true; 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() private bool RescueRabbitEffect()
{ {
if (AI.Utils.IsTurn1OrMain2()) if (AI.Utils.IsTurn1OrMain2())
...@@ -255,7 +263,7 @@ namespace WindBot.Game.AI.Decks ...@@ -255,7 +263,7 @@ namespace WindBot.Game.AI.Decks
} }
private bool NormalSummon() private bool NormalSummon()
{ {
return true; return Card.Id != CardId.RescueRabbit;
} }
private bool GagagaCowboySummon() 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