示例#1
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!Validate(attacker) || !CheckMana(attacker, true))
            {
                return;
            }

            if (Registry.Contains(attacker))
            {
                DualWieldTimer existingtimer = (DualWieldTimer)Registry[attacker];
                existingtimer.Stop();
                Registry.Remove(attacker);
            }

            ClearCurrentAbility(attacker);

            attacker.SendLocalizedMessage(1063362);               // You dually wield for increased speed!

            attacker.FixedParticles(0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand);

            Timer t = new DualWieldTimer(attacker, (int)(20.0 + 3.0 * (attacker.Skills[SkillName.Magery].Value - 50.0) / 7.0));                 //20-50 % increase

            t.Start();
            Registry.Add(attacker, t);
        }
示例#2
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!Validate(attacker) || !CheckMana(attacker, true))
            {
                return;
            }

            if (Registry.TryGetValue(attacker, out var timer))
            {
                timer.Stop();
                Registry.Remove(attacker);
            }

            ClearCurrentAbility(attacker);

            attacker.SendLocalizedMessage(1063362); // You dually wield for increased speed!
            attacker.FixedParticles(0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand);

            timer = new DualWieldTimer(
                attacker,
                (int)(20.0 + 3.0 * (attacker.Skills.Ninjitsu.Value - 50.0) / 7.0)
                ); // 20-50 % increase

            timer.Start();
            Registry.Add(attacker, timer);
        }
示例#3
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!this.Validate(attacker) || !this.CheckMana(attacker, true))
            {
                return;
            }

            if (Registry.Contains(attacker))
            {
                DualWieldTimer existingtimer = (DualWieldTimer)Registry[attacker];
                existingtimer.Stop();
                Registry.Remove(attacker);
            }

            ClearCurrentAbility(attacker);

            attacker.SendLocalizedMessage(1063362); // You dually wield for increased speed!

            attacker.FixedParticles(0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand);

            Timer t = new DualWieldTimer(attacker, (int)(20.0 + 3.0 * (attacker.Skills[SkillName.Ninjitsu].Value - 50.0) / 7.0));       //20-50 % increase

            BuffInfo.AddBuff(defender, new BuffInfo(BuffIcon.DualWield, 1151294, 1151293, TimeSpan.FromSeconds(6.0), attacker, damage));

            t.Start();
            Registry.Add(attacker, t);
        }
示例#4
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!Validate(attacker) || !CheckMana(attacker, true))
            {
                return;
            }

            if (HasRegistry(attacker))
            {
                DualWieldTimer timer = m_Registry[attacker];

                if (timer.DualHitChance < .75)
                {
                    timer.Expires       += TimeSpan.FromSeconds(2);
                    timer.DualHitChance += .25;

                    BuffInfo.RemoveBuff(attacker, BuffIcon.DualWield);
                    BuffInfo.AddBuff(attacker, new BuffInfo(BuffIcon.DualWield, 1151294, 1151293, timer.Expires - DateTime.UtcNow, attacker, (timer.DualHitChance * 100).ToString()));

                    attacker.SendLocalizedMessage(timer.DualHitChance == .75 ? 1150283 : 1150282); // Dual wield level increased to peak! : Dual wield level increased!
                }

                ClearCurrentAbility(attacker);
                return;
            }

            ClearCurrentAbility(attacker);
            attacker.SendLocalizedMessage(1150281);                                         // You begin trying to strike with both your weapons at once.
            attacker.SendLocalizedMessage(1150284, true, Duration.TotalSeconds.ToString()); // Remaining Duration (seconds):

            DualWieldTimer t = new DualWieldTimer(attacker, .25);

            BuffInfo.AddBuff(attacker, new BuffInfo(BuffIcon.DualWield, 1151294, 1151293, Duration, attacker, "25"));

            Registry[attacker] = t;

            attacker.FixedParticles(0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand);
            Effects.PlaySound(attacker.Location, attacker.Map, 0x524);
        }
示例#5
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!this.Validate(attacker) || !this.CheckMana(attacker, true))
                return;

            if (Registry.Contains(attacker))
            {
                DualWieldTimer existingtimer = (DualWieldTimer)Registry[attacker];
                existingtimer.Stop();
                Registry.Remove(attacker);
            }

            ClearCurrentAbility(attacker);

            attacker.SendLocalizedMessage(1063362); // You dually wield for increased speed!

            attacker.FixedParticles(0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand);

            Timer t = new DualWieldTimer(attacker, (int)(20.0 + 3.0 * (attacker.Skills[SkillName.Ninjitsu].Value - 50.0) / 7.0));	//20-50 % increase

            t.Start();
            Registry.Add(attacker, t);
        }