Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wind2009-Louse committed Dec 4, 2024
1 parent e5523b2 commit 80480dd
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions Game/AI/Decks/RyzealExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,19 +555,24 @@ public List<ClientCard> GetProblematicEnemyCardList(bool canBeTarget = false, bo
return resultList;
}

public List<ClientCard> GetNormalEnemyTargetList(bool canBeTarget = true, bool ignoreCurrentDestroy = false, CardType selfType = 0)
public List<ClientCard> GetNormalEnemyTargetList(bool canBeTarget = true, bool ignoreCurrentDestroy = false, CardType selfType = 0, bool forNegate = false)
{
List<ClientCard> targetList = GetProblematicEnemyCardList(canBeTarget, selfType: selfType);
List<ClientCard> enemyMonster = Enemy.GetMonsters().Where(card => card.IsFaceup() && !targetList.Contains(card)
&& (!ignoreCurrentDestroy || !currentDestroyCardList.Contains(card))).ToList();
&& (!ignoreCurrentDestroy || !currentDestroyCardList.Contains(card))
&& (!forNegate || (!card.IsDisabled() && card.HasType(CardType.Effect)))
).ToList();
enemyMonster.Sort(CardContainer.CompareCardAttack);
enemyMonster.Reverse();
targetList.AddRange(enemyMonster);
targetList.AddRange(ShuffleList(Enemy.GetSpells().Where(card =>
(!ignoreCurrentDestroy || !currentDestroyCardList.Contains(card)) && enemyPlaceThisTurn.Contains(card) && card.IsFacedown()).ToList()));
targetList.AddRange(ShuffleList(Enemy.GetSpells().Where(card =>
(!ignoreCurrentDestroy || !currentDestroyCardList.Contains(card)) && !enemyPlaceThisTurn.Contains(card) && card.IsFacedown()).ToList()));
targetList.AddRange(ShuffleList(Enemy.GetMonsters().Where(card => card.IsFacedown() && (!ignoreCurrentDestroy || !currentDestroyCardList.Contains(card))).ToList()));
targetList.AddRange(ShuffleList(Enemy.GetMonsters().Where(card => card.IsFacedown()
&& (!ignoreCurrentDestroy || !currentDestroyCardList.Contains(card))
&& (!forNegate || (!card.IsDisabled() && card.HasType(CardType.Effect)))
).ToList()));

return targetList;
}
Expand Down Expand Up @@ -3452,8 +3457,11 @@ public bool DonnerDaggerFurHireSpSummon()
public bool MereologicAggregatorActivateFirst()
{
List<Func<ClientCard, bool>> multiNegateFuncList = new List<Func<ClientCard, bool>> {
{c => c.IsCode(44665365, 48546368, 54178659) },
{c => c.IsCode(4280258) && c.Attack >= 800 }
{c => c.IsCode(44665365, 48546368, 54178659) && c.IsMonster() },
{c => c.IsCode(4280258) && c.Attack >= 800 },
{c => c.IsCode(47297616) && c.Attack >= 500 && c.Defense >= 500 },
{c => c.IsCode(19652159) && c.Attack >= 1000 && c.Defense >= 1000 },
{c => c.IsCode(79600447) && Enemy.MonsterZone.Any(m => m != null && m.IsFaceup() && m.IsCode(23288411) && m.Attack >= 1000) }
};
List<ClientCard> searchCardList = new List<ClientCard>(Enemy.GetMonsters());
searchCardList.AddRange(Enemy.GetSpells());
Expand Down Expand Up @@ -3494,7 +3502,7 @@ public bool MereologicAggregatorActivateLater()
}
}

List<ClientCard> targetList = GetNormalEnemyTargetList(true, false, CardType.Monster).Where(c => c.IsFaceup()).ToList();
List<ClientCard> targetList = GetNormalEnemyTargetList(true, false, CardType.Monster, true).Where(c => c.IsFaceup()).ToList();
if (targetList.Count() > 0)
{
currentNegateCardList.Add(targetList[0]);
Expand All @@ -3508,7 +3516,7 @@ public bool MereologicAggregatorActivateLater()
{
foreach (ClientCard card in Bot.GetMonsters())
{
if (card.IsFacedown() || Duel.CurrentChain.Contains(card) || card.IsDisabled()) continue;
if (card.IsFacedown() || Duel.CurrentChain.Contains(card) || card.IsDisabled() || !card.HasType(CardType.Effect)) continue;
bool flag = card.IsCode(CardId.IceRyzeal, CardId.ThodeRyzeal);
flag |= card.IsCode(CardId.NodeRyzeal) && activatedCardIdList.Contains(CardId.NodeRyzeal);
flag |= card.HasType(CardType.Xyz) && !card.HasXyzMaterial() && !card.IsCode(CardId.RyzealDeadnader, CardId.RyzealDuodrive, CardId.FullArmoredUtopicRayLancer);
Expand Down

0 comments on commit 80480dd

Please sign in to comment.