public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (attacker.IsCode(CardId.PacifisThePhantasmCity + 1) && defender.IsCode(CardId.EaterOfMillions)) { if (attacker.RealPower >= defender.RealPower) { return(true); } } if (attacker.Level >= 5) { foreach (ClientCard s in Bot.GetSpells()) { if (s.IsFaceup() && s.IsCode(CardId.SeaStealthAttack) && Bot.HasInSpellZone(CardId.PacifisThePhantasmCity)) { attacker.RealPower = 9999; if (defender.IsCode(CardId.EaterOfMillions)) { return(true); } } } } return(base.OnPreBattleBetween(attacker, defender)); }
private bool LightStageEffect() { if (Card.Location == CardLocation.Hand || Card.IsFacedown()) { ClientCard field = Bot.GetFieldSpellCard(); if ((field?.IsCode(CardId.OrcustratedBabel) ?? false) && Bot.GetMonsterCount() > 1) { return(false); } if ((field?.IsCode(CardId.TrickstarLightStage) ?? false) && Bot.HasInHandOrInMonstersZoneOrInGraveyard(CardId.TrickstarCandina) && Bot.HasInHandOrInMonstersZoneOrInGraveyard(CardId.TrickstarCarobein)) { return(false); } AI.SelectYesNo(true); if (Bot.HasInHandOrHasInMonstersZone(CardId.TrickstarCandina)) { AI.SelectCard(CardId.TrickstarCarobein); } else { AI.SelectCard(CardId.TrickstarCandina); } return(true); } ClientCard target = Enemy.SpellZone.GetFirstMatchingCard(card => card.IsFacedown()); AI.SelectCard(target); return(true); }
/// <summary> /// Same as DefaultBreakthroughSkill /// </summary> protected bool DefaultEffectVeiler() { ClientCard LastChainCard = Util.GetLastChainCard(); if (LastChainCard != null && (LastChainCard.IsCode(_CardId.GalaxySoldier) && Enemy.Hand.Count >= 3 || LastChainCard.IsCode(_CardId.EffectVeiler, _CardId.InfiniteImpermanence))) { return(false); } return(DefaultBreakthroughSkill()); }
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (!defender.IsMonsterHasPreventActivationEffectInBattle()) { if (!attacker.IsDisabled() && (attacker.IsCode(CardId.MekkKnightCrusadiaAstram) && defender.IsSpecialSummoned || attacker.IsCode(CardId.CrystalWingSynchroDragon) && defender.Level >= 5)) { attacker.RealPower = attacker.RealPower + defender.Attack; } } return(base.OnPreBattleBetween(attacker, defender)); }
/// <summary> /// Default InfiniteImpermanence effect /// </summary> protected bool DefaultInfiniteImpermanence() { // TODO: disable s & t ClientCard LastChainCard = Util.GetLastChainCard(); if (LastChainCard != null && (LastChainCard.IsCode(_CardId.GalaxySoldier) && Enemy.Hand.Count >= 3 || LastChainCard.IsCode(_CardId.EffectVeiler, _CardId.InfiniteImpermanence))) { return(false); } return(DefaultDisableMonster()); }
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (attacker.IsCode(_CardId.EaterOfMillions) && (Bot.HasInMonstersZone(CardId.InspectBoarder) && eater_eff) && !attacker.IsDisabled()) { attacker.RealPower = 9999; return(true); } if (attacker.IsCode(_CardId.EaterOfMillions) && !Bot.HasInMonstersZone(CardId.InspectBoarder) && !attacker.IsDisabled()) { attacker.RealPower = 9999; return(true); } return(base.OnPreBattleBetween(attacker, defender)); }
private bool CalledByTheGraveeff() { if (this.Duel.LastChainPlayer == 1) { ClientCard lastCard = this.Util.GetLastChainCard(); if (lastCard.IsCode(CardId.MaxxC)) { this.AI.SelectCard(CardId.MaxxC); if (this.Util.ChainContainsCard(CardId.TheMelodyOfAwakeningDragon)) { this.AI.SelectNextCard(CardId.BlueEyesChaosMaxDragon, CardId.BlueEyesChaosMaxDragon, CardId.BlueEyesAlternativeWhiteDragon); } return(this.UniqueFaceupSpell()); } if (lastCard.IsCode(CardId.LockBird)) { this.AI.SelectCard(CardId.LockBird); if (this.Util.ChainContainsCard(CardId.TheMelodyOfAwakeningDragon)) { this.AI.SelectNextCard(CardId.BlueEyesChaosMaxDragon, CardId.BlueEyesChaosMaxDragon, CardId.BlueEyesAlternativeWhiteDragon); } return(this.UniqueFaceupSpell()); } if (lastCard.IsCode(CardId.Ghost)) { this.AI.SelectCard(CardId.Ghost); if (this.Util.ChainContainsCard(CardId.TheMelodyOfAwakeningDragon)) { this.AI.SelectNextCard(CardId.BlueEyesChaosMaxDragon, CardId.BlueEyesChaosMaxDragon, CardId.BlueEyesAlternativeWhiteDragon); } return(this.UniqueFaceupSpell()); } if (lastCard.IsCode(CardId.AshBlossom)) { this.AI.SelectCard(CardId.AshBlossom); if (this.Util.ChainContainsCard(CardId.TheMelodyOfAwakeningDragon)) { this.AI.SelectNextCard(CardId.BlueEyesChaosMaxDragon, CardId.BlueEyesChaosMaxDragon, CardId.BlueEyesAlternativeWhiteDragon); } return(this.UniqueFaceupSpell()); } } return(false); }
//装甲 至宝黄金叉 效果 private bool MzhibaohuangjinchaEffect() { List <ClientCard> bot_monsters = Bot.GetMonsters(); bot_monsters.Sort(CardContainer.CompareCardAttack); bot_monsters.Reverse(); if (Bot.GetMonsters().Count > 1) { for (int i = 0; i < bot_monsters.Count; i++) { ClientCard card = bot_monsters[i]; if (card.IsCode(CardId.Zdongfengdaqi) && !card.IsDisabled()) { bot_monsters.Add(card); } } AI.SelectCard(bot_monsters); return(true); } else { AI.SelectCard(bot_monsters); return(true); } }
public override bool OnPreActivate(ClientCard card) { ClientCard LastChainCard = Util.GetLastChainCard(); if (LastChainCard != null && Duel.Phase == DuelPhase.Standby && LastChainCard.IsCode( _CardId.SandaionTheTimelord, _CardId.GabrionTheTimelord, _CardId.MichionTheTimelord, _CardId.ZaphionTheTimelord, _CardId.HailonTheTimelord, _CardId.RaphionTheTimelord, _CardId.SadionTheTimelord, _CardId.MetaionTheTimelord, _CardId.KamionTheTimelord, _CardId.LazionTheTimelord )) { return(false); } if ((card.Location == CardLocation.Hand || card.Location == CardLocation.SpellZone && card.IsFacedown()) && (card.IsSpell() && DefaultSpellWillBeNegated() || card.IsTrap() && DefaultTrapWillBeNegated())) { return(false); } return(true); }
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (!defender.IsMonsterHasPreventActivationEffectInBattle()) { if (attacker.IsCode(CardId.TrickstarCandina) && Bot.HasInHand(CardId.TrickstarCarobein)) { attacker.RealPower = attacker.RealPower + 1800; } if (attacker.IsCode(CardId.BorrelswordDragon) && !attacker.IsDisabled() && !BorrelswordDragonUsed) { attacker.RealPower = attacker.RealPower + defender.GetDefensePower() / 2; defender.RealPower = defender.RealPower - defender.GetDefensePower() / 2; } } return(base.OnPreBattleBetween(attacker, defender)); }
private bool CrossoutDesignatorCheck(ClientCard LastChainCard, int id, int count) { if (LastChainCard.IsCode(id) && Bot.GetRemainingCount(id, count) > 0) { AI.SelectAnnounceID(id); return(true); } return(false); }
public override ClientCard OnSelectAttacker(IList<ClientCard> attackers, IList<ClientCard> defenders) { for (int i = 0; i < attackers.Count; ++i) { ClientCard attacker = attackers[i]; if (attacker.IsCode(CardId.BirrelswordDragon, CardId.BorreloadDragon)) return attacker; } return null; }
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (attacker.IsCode(CardId.Linkuriboh) && defender.IsFacedown()) { return(false); } if (attacker.IsCode(CardId.SandaionTheTimelord) && !attacker.IsDisabled()) { attacker.RealPower = 9999; return(true); } if (attacker.IsCode(CardId.MichionTimelord) && !attacker.IsDisabled()) { attacker.RealPower = 9999; return(true); } return(base.OnPreBattleBetween(attacker, defender)); }
// update stats for battle prediction based on effects public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (!defender.IsMonsterHasPreventActivationEffectInBattle()) { if (attacker.IsCode(CardId.ShaddollConstruct) && !attacker.IsDisabled() && defender.IsSpecialSummoned) // NOTE: Possible to check destruction immunity? { attacker.RealPower = 9999; } if (attacker.IsCode(CardId.DragmaFleur) && !attacker.IsDisabled() && !FleurAttackUsed) { attacker.RealPower += 500; } if (attacker.HasType(CardType.Fusion) && Bot.HasInHand(CardId.InvokedAleister)) { attacker.RealPower += 1000; } } return(base.OnPreBattleBetween(attacker, defender)); }
public override ClientCard OnSelectAttacker(IList <ClientCard> attackers, IList <ClientCard> defenders) { List <ClientCard> att = new List <ClientCard>(); foreach (ClientCard tc in attackers) { att.Add(tc); } if (att.Count > 0) { att.Sort(CardContainer.CompareCardAttack); att.Reverse(); for (int i = 0; i < attackers.Count; i++) { ClientCard attacker = attackers[i]; if (attacker.IsCode(13701) && !attacker.IsDisabled() && (Bot.GetMonsters().GetMatchingCardsCount(card => card.IsAttack() && card.HasSetcode(0x14b)) > 0 && (attacker.HasXyzMaterial() || (Bot.GetFieldSpellCard().IsFaceup() && !Bot.GetFieldSpellCard().IsDisabled() && Bot.GetFieldSpellCard().IsCode(12201, 13706))) || Bot.SpellZone.GetMatchingCardsCount(card => card.IsAttack() && card.HasSetcode(0x14b)) > 0 && (attacker.HasXyzMaterial() || (Bot.GetFieldSpellCard().IsFaceup() && !Bot.GetFieldSpellCard().IsDisabled() && Bot.GetFieldSpellCard().IsCode(12201, 13706))))) { att.Remove(attacker); att.Add(attacker); attackers.Remove(attacker); attackers.Add(attacker); } } for (int i = 0; i < attackers.Count; i++) { ClientCard attacker = attackers[i]; if ((attacker.IsCode(13702) || attacker.IsCode(13703) || attacker.IsCode(13704)) && !attacker.IsDisabled() && Bot.GetMonsters().GetMatchingCardsCount(card => card.IsAttack() && card.HasSetcode(0x14b)) > 0 && (attacker.HasXyzMaterial() || (Bot.GetFieldSpellCard().IsFaceup() && !Bot.GetFieldSpellCard().IsDisabled() && Bot.GetFieldSpellCard().IsCode(12201, 13706))) || (Bot.SpellZone.GetMatchingCardsCount(card => card.IsAttack() && card.HasSetcode(0x14b)) > 0 && (attacker.HasXyzMaterial() || (Bot.GetFieldSpellCard().IsFaceup() && !Bot.GetFieldSpellCard().IsDisabled() && Bot.GetFieldSpellCard().IsCode(12201, 13706))))) { att.Remove(attacker); att.Add(attacker); attackers.Remove(attacker); attackers.Add(attacker); } } att.Reverse(); } for (int i = 0; i < att.Count; ++i) { ClientCard attacker = attackers[i]; Logger.DebugWriteLine(attacker.Name); return(attacker); } return(base.OnSelectAttacker(attackers, defenders)); }
public bool is_should_not_negate() { ClientCard last_card = Util.GetLastChainCard(); if (last_card != null && last_card.Controller == 1 && last_card.IsCode(should_not_negate)) { return(true); } return(false); }
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (!defender.IsMonsterHasPreventActivationEffectInBattle()) { if (attacker.IsCode(CardId.SkyCavalryCentaurea) && !attacker.IsDisabled() && attacker.HasXyzMaterial()) { attacker.RealPower = Bot.LifePoints + attacker.Attack; } } return(base.OnPreBattleBetween(attacker, defender)); }
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (!defender.IsMonsterHasPreventActivationEffectInBattle()) { if (attacker.IsCode(CardId.HiSpeedroidChanbara) && !attacker.IsDisabled()) { attacker.RealPower = attacker.RealPower + 200; } } return(base.OnPreBattleBetween(attacker, defender)); }
public override ClientCard OnSelectAttacker(IList <ClientCard> attackers, IList <ClientCard> defenders) { for (int i = 0; i < attackers.Count; ++i) { ClientCard attacker = attackers[i]; if (attacker.IsCode(CardId.BirrelswordDragon, CardId.EaterOfMillions)) { return(attacker); } } return(null); }
public override ClientCard OnSelectAttacker(IList <ClientCard> attackers, IList <ClientCard> defenders) { for (int i = 0; i < attackers.Count; ++i) { ClientCard attacker = attackers[i]; if (attacker.IsCode(CardId.BlueEyesChaosMaxDragon)) { Logger.DebugWriteLine(attacker.Name); return(attacker); } } return(base.OnSelectAttacker(attackers, defenders)); }
public override BattlePhaseAction OnSelectAttackTarget(ClientCard attacker, IList <ClientCard> defenders) { for (int i = 0; i < defenders.Count; ++i) { ClientCard defender = defenders[i]; attacker.RealPower = attacker.Attack; defender.RealPower = defender.GetDefensePower(); if (defender.IsCode(732) && defender.IsAttack()) { defender.RealPower = defender.Attack * 2; } if (attacker.IsCode(CardId.Number100Dragon, CardId.CNumber100Dragon, 592) && !attacker.IsDisabled()) { defender.RealPower = 0; } if (defender.IsCode(CardId.Number100Dragon, CardId.CNumber100Dragon, 592) && !defender.IsDisabled()) { attacker.RealPower = 0; } if (attacker.IsCode(13701) && attacker.RealPower < defender.RealPower && Bot.LifePoints > defender.RealPower - attacker.RealPower && Bot.HasInHand(13717) && Bot.HasInExtra(CardId.CNo1000) && Bot.Graveyard.GetMatchingCardsCount(card => card.HasSetcode(0x48) || card.IsCode(12201, 13706)) + Bot.Banished.GetMatchingCardsCount(card => (card.HasSetcode(0x48) || card.IsCode(12201, 13706)) && card.IsFaceup()) > 4) { return(AI.Attack(attacker, defender)); } if (!OnPreBattleBetween(attacker, defender)) { continue; } if (attacker.RealPower >= defender.RealPower || (attacker.RealPower >= defender.RealPower && ((attacker.HasSetcode(0x48) && !attacker.IsDisabled() && !(defender.HasSetcode(0x48) && !defender.IsDisabled())) || attacker.IsLastAttacker && defender.IsAttack()))) { return(AI.Attack(attacker, defender)); } } if (Enemy.GetMonsterCount() == 0 || attacker.CanDirectAttack) { return(AI.Attack(attacker, null)); } return(null); }
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (attacker.IsCode(CardId.CrystalWingSynchroDragon)) { if (defender.Level >= 5) { attacker.RealPower = attacker.Attack + defender.Attack; } return(true); } else if (attacker.IsCode(CardId.DaigustoSphreez)) { attacker.RealPower = attacker.Attack + defender.Attack + defender.Defense; return(true); } else if (Bot.HasInMonstersZone(CardId.DaigustoSphreez) && attacker.IsCode(CardId.DaigustoSphreez, CardId.GustoGulldo, CardId.GustoEgul, CardId.WindaPriestessOfGusto, CardId.PilicaDescendantOfGusto, CardId.DaigustoGulldos)) { attacker.RealPower = attacker.Attack + defender.Attack + defender.Defense; return(true); } return(base.OnPreBattleBetween(attacker, defender)); }
//青眼幻龙 private bool QingyanhuanlongEffect() { ClientCard card = Util.GetLastChainCard(); if (Card.IsDisabled() || (card != null && card.IsCode(CardId.Lan))) { return(false); } AI.SelectCard( CardId.Shengyuelong, CardId.WhiteDragon ); return(true); }
private bool MonsterReborn() { List <ClientCard> cards = new List <ClientCard>(this.Bot.Graveyard.GetMatchingCards(card => card.IsCanRevive())); cards.Sort(CardContainer.CompareCardAttack); ClientCard selectedCard = null; for (int i = cards.Count - 1; i >= 0; --i) { ClientCard card = cards[i]; if (card.Attack < 2000) { break; } if (card.IsCode(CardId.StardustDragonAssaultMode, CardId.FiveHeadedDragon)) { continue; } if (card.IsMonster()) { selectedCard = card; break; } } cards = new List <ClientCard>(this.Enemy.Graveyard.GetMatchingCards(card => card.IsCanRevive())); cards.Sort(CardContainer.CompareCardAttack); for (int i = cards.Count - 1; i >= 0; --i) { ClientCard card = cards[i]; if (card.Attack < 2000) { break; } if (card.IsMonster() && card.HasType(CardType.Normal) && (selectedCard == null || card.Attack > selectedCard.Attack)) { selectedCard = card; break; } } if (selectedCard != null) { this.AI.SelectCard(selectedCard); return(true); } return(false); }
private bool AlmirajSummon() { if (Bot.GetMonsterCount() > 1) { return(false); } ClientCard mat = Bot.GetMonsters().First(); if (mat.IsCode(new[] { CardId.JetSynchron, CardId.ThePhantomKnightsofAncientCloak, CardId.ThePhantomKnightsofSilentBoots })) { AI.SelectMaterials(mat); return(true); } return(false); }
public override IList <ClientCard> OnSelectPendulumSummon(IList <ClientCard> cards, int max) { Logger.DebugWriteLine("OnSelectPendulumSummon"); // select the last cards IList <ClientCard> selected = new List <ClientCard>(); for (int i = 1; i <= max; ++i) { ClientCard card = cards[cards.Count - i]; if (!card.IsCode(CardId.Scout) || (card.Location == CardLocation.Extra && !Duel.IsNewRule)) { selected.Add(card); } } if (selected.Count == 0) { selected.Add(cards[cards.Count - 1]); } return(selected); }
public override BattlePhaseAction OnSelectAttackTarget(ClientCard attacker, IList <ClientCard> defenders) { if (attacker.IsCode(CardId.BlueEyesChaosMaxDragon) && !attacker.IsDisabled() && Enemy.HasInMonstersZone(new[] { CardId.DeviritualTalismandra, CardId.DevirrtualCandoll })) { for (int i = 0; i < defenders.Count; i++) { ClientCard defender = defenders[i]; attacker.RealPower = attacker.Attack; defender.RealPower = defender.GetDefensePower(); if (!OnPreBattleBetween(attacker, defender)) { continue; } if (defender.IsCode(CardId.DevirrtualCandoll, CardId.DeviritualTalismandra)) { return(AI.Attack(attacker, defender)); } } } return(base.OnSelectAttackTarget(attacker, defenders)); }
/// <summary> /// Decide whether to declare attack between attacker and defender. /// Can be overrided to update the RealPower of attacker for cards like Honest. /// </summary> /// <param name="attacker">Card that attack.</param> /// <param name="defender">Card that defend.</param> /// <returns>false if the attack shouldn't be done.</returns> public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) { if (attacker.RealPower <= 0) { return(false); } if (!attacker.IsMonsterHasPreventActivationEffectInBattle()) { if (defender.IsMonsterInvincible() && defender.IsDefense()) { return(false); } if (defender.IsMonsterDangerous()) { bool canIgnoreIt = !attacker.IsDisabled() && ( attacker.IsCode(_CardId.UltimateConductorTytanno) && defender.IsDefense() || attacker.IsCode(_CardId.ElShaddollConstruct) && defender.IsSpecialSummoned || attacker.IsCode(_CardId.AllyOfJusticeCatastor) && !defender.HasAttribute(CardAttribute.Dark)); if (!canIgnoreIt) { return(false); } } foreach (ClientCard equip in defender.EquipCards) { if (equip.IsCode(_CardId.MoonMirrorShield) && !equip.IsDisabled()) { return(false); } } if (!defender.IsDisabled()) { if (defender.IsCode(_CardId.MekkKnightCrusadiaAstram) && defender.IsAttack() && attacker.IsSpecialSummoned) { return(false); } if (defender.IsCode(_CardId.CrystalWingSynchroDragon) && defender.IsAttack() && attacker.Level >= 5) { return(false); } if (defender.IsCode(_CardId.AllyOfJusticeCatastor) && !attacker.HasAttribute(CardAttribute.Dark)) { return(false); } if (defender.IsCode(_CardId.NumberS39UtopiaTheLightning) && defender.IsAttack() && defender.HasXyzMaterial(2, _CardId.Number39Utopia)) { defender.RealPower = 5000; } if (defender.IsCode(_CardId.VampireFraeulein)) { defender.RealPower += (Enemy.LifePoints > 3000) ? 3000 : (Enemy.LifePoints - 100); } if (defender.IsCode(_CardId.InjectionFairyLily) && Enemy.LifePoints > 2000) { defender.RealPower += 3000; } } } if (!defender.IsMonsterHasPreventActivationEffectInBattle()) { if (attacker.IsCode(_CardId.NumberS39UtopiaTheLightning) && !attacker.IsDisabled() && attacker.HasXyzMaterial(2, _CardId.Number39Utopia)) { attacker.RealPower = 5000; } foreach (ClientCard equip in attacker.EquipCards) { if (equip.IsCode(_CardId.MoonMirrorShield) && !equip.IsDisabled()) { attacker.RealPower = defender.RealPower + 100; } } } if (Enemy.HasInMonstersZone(_CardId.MekkKnightCrusadiaAstram, true) && !(defender).IsCode(_CardId.MekkKnightCrusadiaAstram)) { return(false); } if (Enemy.HasInMonstersZone(_CardId.DupeFrog, true) && !(defender).IsCode(_CardId.DupeFrog)) { return(false); } if (Enemy.HasInMonstersZone(_CardId.MaraudingCaptain, true) && !defender.IsCode(_CardId.MaraudingCaptain) && defender.Race == (int)CardRace.Warrior) { return(false); } if (defender.IsCode(_CardId.UltimayaTzolkin) && !defender.IsDisabled() && Enemy.GetMonsters().Any(monster => !monster.Equals(defender) && monster.HasType(CardType.Synchro))) { return(false); } if (defender.OwnTargets.Any(card => card.IsCode(_CardId.PhantomKnightsFogBlade) && !card.IsDisabled())) { return(false); } return(true); }
private bool DragonsRebirth() { List <ClientCard> cards = new List <ClientCard>(Bot.GetMonsters()); if (cards.Count == 0) { return(false); } cards.Sort(CardContainer.CompareCardAttack); ClientCard tributeCard = null; foreach (ClientCard monster in cards) { if (monster.Attack > 2000) { return(false); } if (!monster.IsFacedown() && monster.Race == (int)CardRace.Dragon) { tributeCard = monster; break; } } if (tributeCard == null) { return(false); } cards = new List <ClientCard>(Bot.Hand); cards.AddRange(Bot.Graveyard); if (cards.Count == 0) { return(false); } cards.Sort(CardContainer.CompareCardAttack); ClientCard summonCard = null; for (int i = cards.Count - 1; i >= 0; --i) { ClientCard monster = cards[i]; if (monster.Attack < 2300) { return(false); } if (monster.Race == (int)CardRace.Dragon && !monster.IsCode(CardId.HorusTheBlackFlameDragonLv8)) { summonCard = monster; break; } } if (summonCard == null) { return(false); } AI.SelectCard(tributeCard); AI.SelectNextCard(summonCard); return(true); }
public override int OnAnnounceCard(IList <int> avail) { ClientCard orica = Bot.GetFieldSpellCard(); ClientCard last_chain_card = Util.GetLastChainCard(); if (orica == null && avail.Contains(CardId.Oricha)) { return(CardId.Oricha); } if (last_chain_card != null && last_chain_card.IsCode(CardId.CNo1000)) { if ((Bot.MonsterZone.GetMonsters().ContainsCardWithId(CardId.CNumber100Dragon) || Bot.SpellZone.GetMonsters().ContainsCardWithId(CardId.CNumber100Dragon))) { return(CardId.CNo1000); } return(CardId.CNumber100Dragon); } IList <ClientCard> last_cards = Bot.Graveyard.GetMatchingCards(card => card.Sequence == Bot.Graveyard.Count - 1); if (orica != null && orica.IsCode(CardId.Oricha) && last_chain_card != null && last_chain_card == orica) { if (ActivateDescription == Util.GetStringId(12744567, 0) || (ActivateDescription == -1 && !(orica.HasXyzMaterial(1, 13706)))) { if (!(orica.HasXyzMaterial(1, 13706)) && avail.Contains(13706)) { return(13706); } else if (!(orica.HasXyzMaterial(1, 12)) && avail.Contains(12)) { return(12); } else if (!(orica.HasXyzMaterial(1, 10)) && avail.Contains(10)) { return(10); } else if (!(orica.HasXyzMaterial(1, 160000107)) && avail.Contains(160000107)) { return(160000107); } else if (!(orica.HasXyzMaterial(1, 100000382)) && avail.Contains(100000382)) { return(100000382); } else if (!(orica.HasXyzMaterial(1, 146)) && avail.Contains(146)) { return(146); } else if (avail.Contains(11)) { return(11); } } if (last_cards.Count > 0) { ClientCard last_card = last_cards[0]; if (last_card.IsCode(593)) { return(CardId.No1000); } else if (last_card.IsCode(588)) { return(CardId.CNo1000); } else { No1annouce++; return(13701); } } } return(Program.Rand.Next(avail.Count)); }