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;
using WindBot.Game.AI; using WindBot.Game.AI;
namespace WindBot.Game.AI.Decks namespace WindBot.Game.AI.Decks
{ {
[Deck("Rainbow", "AI_Rainbow")] [Deck("Rainbow", "AI_Rainbow")]
...@@ -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);
...@@ -136,8 +137,8 @@ namespace WindBot.Game.AI.Decks ...@@ -136,8 +137,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.TraptrixTrapHoleNightmare, DefaultUniqueTrap); AddExecutor(ExecutorType.Activate, CardId.TraptrixTrapHoleNightmare, DefaultUniqueTrap);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos); AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
} }
public override void OnNewTurn() public override void OnNewTurn()
{ {
NormalSummoned = false; NormalSummoned = false;
...@@ -206,6 +207,13 @@ namespace WindBot.Game.AI.Decks ...@@ -206,6 +207,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()
{ {
...@@ -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