Esempio n. 1
0
            public RangerNoxBow(Mobile owner) : base(0x13B2)

            {
                WeaponAttributes.HitPoisonArea = 50;
                m_Owner    = owner;
                Weight     = 6.0;
                Layer      = Layer.TwoHanded;
                Hue        = 1272;
                BlessedFor = owner;
                Name       = "Nox Bow";

                double time = (owner.Skills[SkillName.Archery].Value / 20.0) * RangerHuntersAimSpell.GetScalar(owner);

                m_Expire = DateTime.Now + TimeSpan.FromMinutes((int)time);
                m_Timer  = new InternalTimer(this, m_Expire);

                m_Timer.Start();
            }
Esempio n. 2
0
        public override void OnCast()
        {
            if (!Caster.CanBeginAction(typeof(RangerHuntersAimSpell)))
            {
                Caster.SendLocalizedMessage(1005559);
            }

            else if (CheckSequence())
            {
                object[] mods = new object[]
                {
                    new StatMod(StatType.Dex, "[Ranger] Dex Offset", 5, TimeSpan.Zero),
                    new StatMod(StatType.Str, "[Ranger] Str Offset", 5, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Archery, true, 20),
                    new DefaultSkillMod(SkillName.Tactics, true, 20),
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddSkillMod((SkillMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);

                double span = 1.0 * RangerHuntersAimSpell.GetScalar(Caster);
                new InternalTimer(Caster, TimeSpan.FromMinutes((int)span)).Start();

                IMount mount = Caster.Mount;

                if (mount != null)
                {
                    mount.Rider = null;
                }


                Caster.BeginAction(typeof(RangerHuntersAimSpell));
            }
        }