Exemple #1
0
        public static readonly TimeSpan BlockMountDuration = TimeSpan.FromSeconds(10.0);           // TODO: Taken from bola script, needs to be verified

        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!defender.Mounted && !AnimalForm.UnderTransformation(defender) && !defender.Flying)
            {
                attacker.SendLocalizedMessage(1060848);                   // This attack only works on mounted or flying targets
                ClearCurrentAbility(attacker);
                return;
            }

            if (!Validate(attacker) || !CheckMana(attacker, true))
            {
                return;
            }

            ClearCurrentAbility(attacker);

            IMount mount = defender.Mount;

            if (!attacker.Mounted)
            {
                defender.FixedParticles(0x376A, 9, 32, 0x13AF, 0, 0, EffectLayer.RightFoot);

                if (mount != null)
                {
                    mount.Rider = null;
                }
                else if (defender.Flying)
                {
                    defender.Flying = false;
                }
                else
                {
                    AnimalForm.RemoveContext(defender, true);
                }

                if (mount is Mobile)
                {
                    Mobile m = (Mobile)mount;

                    AOS.Damage(m, attacker, (int)(0.4 * m.Hits), 100, 0, 0, 0, 0);
                }
            }
            else
            {
                int amount = 10 + (int)(10.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 5);

                AOS.Damage(defender, attacker, amount, 100, 0, 0, 0, 0);

                ParalyzingBlow pb = new ParalyzingBlow();
                pb.IsBladeweaveAttack = true;
                pb.OnHit(attacker, defender, damage);
            }
        }
Exemple #2
0
        public static readonly TimeSpan BlockMountDuration = TimeSpan.FromSeconds( 10.0 ); // TODO: Taken from bola script, needs to be verified

        #endregion Fields

        #region Methods

        public override void OnHit( Mobile attacker, Mobile defender, int damage )
        {
            if ( !defender.Mounted && !AnimalForm.UnderTransformation( defender ) && !defender.Flying )
            {
                attacker.SendLocalizedMessage( 1060848 ); // This attack only works on mounted or flying targets
                ClearCurrentAbility( attacker );
                return;
            }

            if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
                return;

            ClearCurrentAbility( attacker );

            IMount mount = defender.Mount;

            if ( !attacker.Mounted )
            {
                defender.FixedParticles( 0x376A, 9, 32, 0x13AF, 0, 0, EffectLayer.RightFoot );

                if ( mount != null )
                    mount.Rider = null;
                else if ( defender.Flying )
                    defender.Flying = false;
                else
                    AnimalForm.RemoveContext( defender, true );

                if ( mount is Mobile )
                {
                    Mobile m = (Mobile) mount;

                    AOS.Damage( m, attacker, (int) ( 0.4 * m.Hits ), 100, 0, 0, 0, 0 );
                }
            }
            else
            {
                int amount = 10 + (int) ( 10.0 * ( attacker.Skills[SkillName.Bushido].Value - 50.0 ) / 70.0 + 5 );

                AOS.Damage( defender, attacker, amount, 100, 0, 0, 0, 0 );

                ParalyzingBlow pb = new ParalyzingBlow();
                pb.IsBladeweaveAttack = true;
                pb.OnHit( attacker, defender, damage );
            }
        }
Exemple #3
0
        public override void OnHit( Mobile attacker, Mobile defender, int damage )
        {
            if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
            {
                return;
            }

            attacker.PlaySound( 0x5BC ); // Bladeweave sound effect
            attacker.FixedParticles( 0x376A, 1, 20, 0x7F5, 0x960, 0x3, EffectLayer.Waist ); // TODO: Revisar efecto

            switch ( Utility.RandomMinMax( 1, 7 ) )
            {
                case 1:
                    {
                        attacker.SendLocalizedMessage( 1072841, "Paralyzing Blow" ); // You weave your blade to execute a ~1_attack~.
                        ParalyzingBlow at = new ParalyzingBlow();
                        at.IsBladeweaveAttack = true;
                        at.OnHit( attacker, defender, damage );
                        break;
                    }
                case 2:
                    {
                        attacker.SendLocalizedMessage( 1072841, "Bleed Attack" ); // You weave your blade to execute a ~1_attack~.
                        BleedAttack at = new BleedAttack();
                        at.IsBladeweaveAttack = true;
                        at.OnHit( attacker, defender, damage );
                        break;
                    }
                case 3:
                    {
                        attacker.SendLocalizedMessage( 1072841, "Double Strike" ); // You weave your blade to execute a ~1_attack~.
                        DoubleStrike at = new DoubleStrike();
                        at.IsBladeweaveAttack = true;
                        at.OnHit( attacker, defender, damage );
                        break;
                    }
                case 4:
                    {
                        attacker.SendLocalizedMessage( 1072841, "Feint" ); // You weave your blade to execute a ~1_attack~.
                        Feint at = new Feint();
                        at.IsBladeweaveAttack = true;
                        at.OnHit( attacker, defender, damage );
                        break;
                    }
                case 5:
                    {
                        attacker.SendLocalizedMessage( 1072841, "Mortal Strike" ); // You weave your blade to execute a ~1_attack~.
                        MortalStrike at = new MortalStrike();
                        at.IsBladeweaveAttack = true;
                        at.OnHit( attacker, defender, damage );
                        break;
                    }
                case 6:
                    {
                        attacker.SendLocalizedMessage( 1072841, "block" ); // You weave your blade to execute a ~1_attack~.
                        Block at = new Block();
                        at.IsBladeweaveAttack = true;
                        at.OnHit( attacker, defender, damage );
                        break;
                    }
                case 7:
                    {
                        attacker.SendLocalizedMessage( 1072841, "Crushing Blow" ); // You weave your blade to execute a ~1_attack~.
                        CrushingBlow at = new CrushingBlow();
                        at.IsBladeweaveAttack = true;
                        at.OnHit( attacker, defender, damage );
                        break;
                    }
            }
        }
Exemple #4
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!Validate(attacker) || !CheckMana(attacker, true))
            {
                return;
            }

            attacker.PlaySound(0x5BC);                                                    // Bladeweave sound effect
            attacker.FixedParticles(0x376A, 1, 20, 0x7F5, 0x960, 0x3, EffectLayer.Waist); // TODO: Revisar efecto

            switch (Utility.RandomMinMax(1, 7))
            {
            case 1:
            {
                attacker.SendLocalizedMessage(1072841, "Paralyzing Blow");                                   // You weave your blade to execute a ~1_attack~.
                ParalyzingBlow at = new ParalyzingBlow();
                at.IsBladeweaveAttack = true;
                at.OnHit(attacker, defender, damage);
                break;
            }

            case 2:
            {
                attacker.SendLocalizedMessage(1072841, "Bleed Attack");                                   // You weave your blade to execute a ~1_attack~.
                BleedAttack at = new BleedAttack();
                at.IsBladeweaveAttack = true;
                at.OnHit(attacker, defender, damage);
                break;
            }

            case 3:
            {
                attacker.SendLocalizedMessage(1072841, "Double Strike");                                   // You weave your blade to execute a ~1_attack~.
                DoubleStrike at = new DoubleStrike();
                at.IsBladeweaveAttack = true;
                at.OnHit(attacker, defender, damage);
                break;
            }

            case 4:
            {
                attacker.SendLocalizedMessage(1072841, "Feint");                                   // You weave your blade to execute a ~1_attack~.
                Feint at = new Feint();
                at.IsBladeweaveAttack = true;
                at.OnHit(attacker, defender, damage);
                break;
            }

            case 5:
            {
                attacker.SendLocalizedMessage(1072841, "Mortal Strike");                                   // You weave your blade to execute a ~1_attack~.
                MortalStrike at = new MortalStrike();
                at.IsBladeweaveAttack = true;
                at.OnHit(attacker, defender, damage);
                break;
            }

            case 6:
            {
                attacker.SendLocalizedMessage(1072841, "block");                                   // You weave your blade to execute a ~1_attack~.
                Block at = new Block();
                at.IsBladeweaveAttack = true;
                at.OnHit(attacker, defender, damage);
                break;
            }

            case 7:
            {
                attacker.SendLocalizedMessage(1072841, "Crushing Blow");                                   // You weave your blade to execute a ~1_attack~.
                CrushingBlow at = new CrushingBlow();
                at.IsBladeweaveAttack = true;
                at.OnHit(attacker, defender, damage);
                break;
            }
            }
        }