Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wind2009-Louse committed Dec 9, 2024
1 parent f17b443 commit c67773d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Game/AI/Decks/RyzealExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ public int GetLevel4FinalCountOnField(bool checkSupport, out bool hasNode)
if (flag) level4Count++;
}
hasNode &= !CheckWhetherWillbeRemoved() && !activatedCardIdList.Contains(CardId.NodeRyzeal) && !DefaultCheckWhetherCardIdIsNegated(CardId.NodeRyzeal);
hasNode &= Bot.Graveyard.Any(c => c != null && c.IsMonster() && c.HasSetcode(SetcodeRyzeal) && !c.IsCode(CardId.NodeRyzeal) && c.Level == 4);
if (hasNode)
{
bool flag = Bot.Graveyard.Any(c => c != null && c.IsFaceup() && c.HasSetcode(SetcodeRyzeal) && !c.HasType(CardType.Xyz) && c.Level == 4 && !c.IsCode(CardId.NodeRyzeal));
Expand Down Expand Up @@ -703,7 +704,7 @@ public int GetLevel4FinalCountOnField(bool checkSupport, out bool hasNode)

public List<ClientCard> GetCostFromHandAndFieldFirst(ClientCard exceptCard)
{
return Bot.MonsterZone.Where(c => c != null && !c.IsDisabled() && c.IsCode(NeedIceToSolveIdList) && c != exceptCard).ToList();
return Bot.MonsterZone.Where(c => c != null && !c.IsDisabled() && c.IsCode(NeedIceToSolveIdList) && c != exceptCard && !c.HasType(CardType.Token)).ToList();
}

public List<ClientCard> GetCostFromHandAndField(ClientCard exceptCard, bool sendNotNecessary)
Expand Down Expand Up @@ -770,9 +771,13 @@ public List<ClientCard> GetCostFromHandAndField(ClientCard exceptCard, bool send

// sending monsters in spell zone
List<ClientCard> monstersInSpellZone = Bot.SpellZone.Where(c => c != null && c.Data != null
&& c.Data.HasType(CardType.Monster) && !c.Data.HasType(CardType.Pendulum) && !resultList.Contains(c)).ToList();
&& c.Data.HasType(CardType.Monster) && !c.Data.HasType(CardType.Pendulum | CardType.Token) && !resultList.Contains(c)).ToList();
resultList.AddRange(monstersInSpellZone);

// send enemy monsters
List<ClientCard> enemyMonsters = Bot.MonsterZone.Where(c => c != null && !resultList.Contains(c) && c.Owner == 1).ToList();
resultList.AddRange(enemyMonsters);

if (sendNotNecessary)
{
// send xyz monster with no material
Expand Down Expand Up @@ -1278,7 +1283,7 @@ public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min,
// gain material by plugin
if (currentSolvingChain.IsCode(CardId.RyzealPlugIn) && cards.All(c => c.Location == CardLocation.MonsterZone))
{
ClientCard abyssDweller = cards.FirstOrDefault(c => c != null && !c.IsDisabled() && c.IsCode(CardId.AbyssDweller));
ClientCard abyssDweller = cards.FirstOrDefault(c => c != null && !c.IsDisabled() && c.IsCode(CardId.AbyssDweller) && c.Overlays.Count() < 2);
if (abyssDweller != null && AbyssDwellerSummonCheck())
{
return Util.CheckSelectCount(new List<ClientCard> { abyssDweller }, cards, min, max);
Expand All @@ -1305,7 +1310,7 @@ public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min,
}
}

ClientCard tornadoDragon = cards.FirstOrDefault(c => c != null && !c.IsDisabled() && c.IsCode(CardId.TornadoDragon));
ClientCard tornadoDragon = cards.FirstOrDefault(c => c != null && !c.IsDisabled() && c.IsCode(CardId.TornadoDragon) && c.Overlays.Count() == 1);
if (tornadoDragon != null && TornadoDragonSummonCheck())
{
return Util.CheckSelectCount(new List<ClientCard> { tornadoDragon }, cards, min, max);
Expand Down Expand Up @@ -3550,7 +3555,7 @@ public bool MereologicAggregatorActivateLater()
}
}

List<ClientCard> targetList = GetNormalEnemyTargetList(true, false, CardType.Monster, true).Where(c => c.IsFaceup()).ToList();
List<ClientCard> targetList = GetNormalEnemyTargetList(true, false, CardType.Monster, true).Where(c => c.IsFaceup() && !c.IsDisabled()).ToList();
if (targetList.Count() > 0)
{
currentNegateCardList.Add(targetList[0]);
Expand Down

0 comments on commit c67773d

Please sign in to comment.