Пример #1
0
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible() && !defender.IsMonsterDangerous() && attacker.Id == 83104731)
     {
         return(true);
     }
     return(base.OnPreBattleBetween(attacker, defender));
 }
Пример #2
0
        /// <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 can't be done.</returns>
        public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
        {
            if (attacker.RealPower <= 0)
            {
                return(false);
            }

            if (!attacker.IsMonsterHasPreventActivationEffectInBattle())
            {
                if (defender.IsMonsterDangerous() || (defender.IsMonsterInvincible() && defender.IsDefense()))
                {
                    return(false);
                }

                if (defender.Id == _CardId.CrystalWingSynchroDragon && defender.IsAttack() && !defender.IsDisabled() && attacker.Level >= 5)
                {
                    return(false);
                }

                if (defender.Id == _CardId.NumberS39UtopiaTheLightning && defender.IsAttack() && !defender.IsDisabled() && defender.HasXyzMaterial(2, _CardId.Number39Utopia))
                {
                    defender.RealPower = 5000;
                }
            }

            if (!defender.IsMonsterHasPreventActivationEffectInBattle())
            {
                if (attacker.Id == _CardId.NumberS39UtopiaTheLightning && !attacker.IsDisabled() && attacker.HasXyzMaterial(2, _CardId.Number39Utopia))
                {
                    attacker.RealPower = 5000;
                }
            }

            if (Enemy.HasInMonstersZone(_CardId.DupeFrog, true) && defender.Id != _CardId.DupeFrog)
            {
                return(false);
            }

            if (Enemy.HasInMonstersZone(_CardId.MaraudingCaptain, true) && defender.Id != _CardId.MaraudingCaptain && defender.Race == (int)CardRace.Warrior)
            {
                return(false);
            }

            if (defender.Id == _CardId.UltimayaTzolkin && !defender.IsDisabled())
            {
                List <ClientCard> monsters = Enemy.GetMonsters();
                foreach (ClientCard monster in monsters)
                {
                    if (monster.HasType(CardType.Synchro))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
Пример #3
0
 public virtual bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible())
     {
         if (defender.IsMonsterDangerous() || defender.IsDefense())
             return false;
     }
     return true;
 }
Пример #4
0
 public virtual bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible())
     {
         if (defender.IsMonsterDangerous() || defender.IsDefense())
         {
             return(false);
         }
     }
     return(true);
 }
Пример #5
0
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible())
     {
         if (defender.IsMonsterDangerous() || defender.IsDefense())
         {
             return(false);
         }
     }
     return(attacker.Attack > 0);
 }
Пример #6
0
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (attacker.Id == (int)CardId.Unifrog || attacker.Id == (int)CardId.DewdarkOfTheIceBarrier)
     {
         return(true);
     }
     if (defender.IsMonsterInvincible() && !defender.IsMonsterDangerous() && attacker.Id == (int)CardId.SubmarineFrog)
     {
         return(true);
     }
     return(base.OnPreBattleBetween(attacker, defender));
 }
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible())
     {
         if (defender.IsMonsterDangerous() || defender.IsDefense())
         {
             return(false);
         }
     }
     if (!(defender.Id == (int)CardId.闪光No39希望皇霍普电光皇))
     {
         if (attacker.Id == (int)CardId.神骑矢车菊圣人马 && !attacker.IsDisabled() && attacker.HasXyzMaterial())
         {
             attacker.RealPower = Duel.LifePoints[0] + attacker.Attack;
         }
     }
     return(attacker.RealPower >= defender.GetDefensePower());
 }
Пример #8
0
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible())
     {
         if (defender.IsMonsterDangerous() || defender.IsDefense())
         {
             return(false);
         }
     }
     if (!(defender.Id == (int)CardId.闪光No39希望皇霍普电光皇))
     {
         //if (attacker.HasType(CardType.Fusion) && Bot.HasInHand((int)CardId.召唤师阿莱斯特))
         //    attacker.RealPower = attacker.RealPower + 1000;
         if (attacker.Id == (int)CardId.闪光No39希望皇霍普电光皇 && !attacker.IsDisabled() && attacker.HasXyzMaterial(2, (int)CardId.No39希望皇霍普))
         {
             attacker.RealPower = 5000;
         }
     }
     return(attacker.RealPower > defender.GetDefensePower());
 }
Пример #9
0
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible())
     {
         if (defender.IsMonsterDangerous() || defender.IsDefense())
         {
             return(false);
         }
     }
     if (!(defender.Id == (int)CardId.闪光No39希望皇霍普电光皇))
     {
         if (attacker.Attribute == (int)CardAttribute.Light && Duel.Fields[0].HasInHand((int)CardId.欧尼斯特))
         {
             attacker.RealPower = attacker.RealPower + defender.Attack;
         }
         if (attacker.Id == (int)CardId.闪光No39希望皇霍普电光皇 && !attacker.IsDisabled() && attacker.HasXyzMaterial(2, (int)CardId.No39希望皇霍普))
         {
             attacker.RealPower = 5000;
         }
     }
     return(attacker.RealPower > defender.GetDefensePower());
 }
Пример #10
0
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible())
     {
         if (defender.IsMonsterDangerous() || defender.IsDefense())
         {
             return(false);
         }
     }
     if (!(defender.Id == (int)CardId.闪光No39希望皇霍普电光皇))
     {
         if (attacker.Id == (int)CardId.闪光No39希望皇霍普电光皇 && !attacker.IsDisabled() && attacker.HasXyzMaterial(2, (int)CardId.No39希望皇霍普))
         {
             attacker.RealPower = 5000;
         }
         if (Duel.Fields[0].HasInMonstersZone((int)CardId.No37希望织龙蜘蛛鲨, true, true))
         {
             attacker.RealPower = attacker.RealPower + 1000;
         }
     }
     return(attacker.RealPower > defender.GetDefensePower());
 }
Пример #11
0
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible())
     {
         if (defender.IsMonsterDangerous() || defender.IsDefense())
         {
             return(false);
         }
     }
     if (!(defender.Id == (int)CardId.NumberS39UtopiatheLightning))
     {
         if (attacker.Attribute == (int)CardAttribute.Light && Bot.HasInHand((int)CardId.Honest))
         {
             attacker.RealPower = attacker.RealPower + defender.Attack;
         }
         if (attacker.Id == (int)CardId.NumberS39UtopiatheLightning && !attacker.IsDisabled() && attacker.HasXyzMaterial(2, (int)CardId.Number39Utopia))
         {
             attacker.RealPower = 5000;
         }
     }
     return(attacker.RealPower > defender.GetDefensePower());
 }
Пример #12
0
        /// <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);
        }
Пример #13
0
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (defender.IsMonsterInvincible() && !defender.IsMonsterDangerous() && attacker.Id == 83104731)
         return true;
     return base.OnPreBattleBetween(attacker, defender);
 }
Пример #14
0
 public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
 {
     if (attacker.Id == (int)CardId.Unifrog || attacker.Id == (int)CardId.DewdarkOfTheIceBarrier)
         return true;
     if (defender.IsMonsterInvincible() && !defender.IsMonsterDangerous() && attacker.Id == (int)CardId.SubmarineFrog)
         return true;
     return base.OnPreBattleBetween(attacker, defender);
 }
Пример #15
0
        /// <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 = false;
                    if (attacker.Id == _CardId.UltimateConductorTytanno && !attacker.IsDisabled() && defender.IsDefense())
                    {
                        canignoreit = true;
                    }
                    if (!canignoreit)
                    {
                        return(false);
                    }
                }

                if (defender.Id == _CardId.CrystalWingSynchroDragon && defender.IsAttack() && !defender.IsDisabled() && attacker.Level >= 5)
                {
                    return(false);
                }

                if (defender.Id == _CardId.NumberS39UtopiaTheLightning && defender.IsAttack() && !defender.IsDisabled() && defender.HasXyzMaterial(2, _CardId.Number39Utopia))
                {
                    defender.RealPower = 5000;
                }

                if (defender.Id == _CardId.VampireFräulein && !defender.IsDisabled())
                {
                    defender.RealPower += (Enemy.LifePoints > 3000) ? 3000 : (Enemy.LifePoints - 100);
                }

                if (defender.Id == _CardId.InjectionFairyLily && !defender.IsDisabled() && Enemy.LifePoints > 2000)
                {
                    defender.RealPower += 3000;
                }
            }

            if (!defender.IsMonsterHasPreventActivationEffectInBattle())
            {
                if (attacker.Id == _CardId.NumberS39UtopiaTheLightning && !attacker.IsDisabled() && attacker.HasXyzMaterial(2, _CardId.Number39Utopia))
                {
                    attacker.RealPower = 5000;
                }
            }

            if (Enemy.HasInMonstersZone(_CardId.DupeFrog, true) && defender.Id != _CardId.DupeFrog)
            {
                return(false);
            }

            if (Enemy.HasInMonstersZone(_CardId.MaraudingCaptain, true) && defender.Id != _CardId.MaraudingCaptain && defender.Race == (int)CardRace.Warrior)
            {
                return(false);
            }

            if (defender.Id == _CardId.UltimayaTzolkin && !defender.IsDisabled())
            {
                List <ClientCard> monsters = Enemy.GetMonsters();
                foreach (ClientCard monster in monsters)
                {
                    if (monster.HasType(CardType.Synchro))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }