Beispiel #1
0
        public void Suppress(Mobile target)
        {
            if (target == null || m_Suppressed.ContainsKey(target) || Deleted || !Alive || m_NextSuppress > DateTime.UtcNow ||
                0.1 < Utility.RandomDouble())
            {
                return;
            }

            TimeSpan delay = TimeSpan.FromSeconds(Utility.RandomMinMax(20, 80));

            if (!target.Hidden && CanBeHarmful(target))
            {
                target.SendLocalizedMessage(1072061); // You hear jarring music, suppressing your strength.

                for (int i = 0; i < target.Skills.Length; i++)
                {
                    Skill s = target.Skills[i];

                    target.AddSkillMod(new TimedSkillMod(s.SkillName, true, s.Base * -0.28, delay));
                }

                int   count = (int)Math.Round(delay.TotalSeconds / 1.25);
                Timer timer = new AnimateTimer(target, count);
                m_Suppressed.Add(target, timer);
                timer.Start();

                PlaySound(0x58C);
            }

            m_NextSuppress = DateTime.UtcNow + TimeSpan.FromSeconds(10);
        }
Beispiel #2
0
        public void Suppress(Mobile target)
        {
            if (target == null || m_Suppressed.ContainsKey(target) || Deleted || !Alive || m_NextSuppress > DateTime.UtcNow || 0.1 < Utility.RandomDouble())
            {
                return;
            }

            TimeSpan delay = TimeSpan.FromSeconds(Utility.RandomMinMax(20, 80));

            if (!target.Hidden && CanBeHarmful(target))
            {
                for (int i = 0; i < target.Skills.Length; i++)
                {
                    Skill s = target.Skills[i];

                    target.AddSkillMod(new TimedSkillMod(s.SkillName, true, -9, delay));
                }
                target.AddStatMod(new StatMod(StatType.Str, "PlichStr", (int)(-9), delay));
                target.AddStatMod(new StatMod(StatType.Dex, "PlichDex", (int)(-9), delay));
                target.AddStatMod(new StatMod(StatType.Int, "PlichInt", (int)(-9), delay));

                int   count = (int)Math.Round(delay.TotalSeconds / 1.25);
                Timer timer = new AnimateTimer(target, count);
                m_Suppressed.Add(target, timer);
                timer.Start();

                PlaySound(0x58C);
            }

            m_NextSuppress = DateTime.UtcNow + TimeSpan.FromSeconds(60);
        }
Beispiel #3
0
        public override void OnDeath(Container c)
        {
            if (!m_Unconscience)
            {
                m_AnimTimer = new AnimateTimer((VampireCorpse)c, VampireTimer, this);
                m_AnimTimer.Start();
                m_Unconscience = Hidden = Blessed = CantWalk = true;
            }
            else
            {
                c.Visible = false;

                base.OnDeath(c);

                //When they die, they create a new corpse, lets move the items!

                for (int i = c.Items.Count; i > 0; i--)
                {
                    m_AnimTimer.Corpse.DropItem((Item)c.Items[0]);
                }

                c.Delete();
                m_AnimTimer.Stop();
            }
        }
Beispiel #4
0
        private void ShadowBonus(Mobile m, int bonus)
        {
            if (m.AllowedStealthSteps > 0 && m.AllowedStealthSteps < 24)
            {
                m.AllowedStealthSteps += 10;
            }
            if (m == null || m_Shadowed.ContainsKey(m) || Deleted || !Alive)
            {
                return;
            }
            TimeSpan delay = TimeSpan.FromSeconds(60);

            m.AddSkillMod(new TimedSkillMod(m.Skills.Hiding.SkillName, true, 20, delay));
            m.AddSkillMod(new TimedSkillMod(m.Skills.Stealth.SkillName, true, 20, delay));
            int   count = (int)Math.Round(delay.TotalSeconds / 1.25);
            Timer timer = new AnimateTimer(m, count);

            m_Shadowed.Add(m, timer);
            timer.Start();
        }
Beispiel #5
0
        public void Suppress( Mobile target )
        {
            if ( target == null || m_Suppressed.ContainsKey( target ) || Deleted || !Alive || m_NextSuppress > DateTime.Now || 0.1 < Utility.RandomDouble() )
                return;

            TimeSpan delay = TimeSpan.FromSeconds( Utility.RandomMinMax( 20, 80 ) );

            if ( !target.Hidden && CanBeHarmful( target ) )
            {
                target.SendLocalizedMessage( 1072061 ); // You hear jarring music, suppressing your strength.

                for ( int i = 0; i < target.Skills.Length; i++ )
                {
                    Skill s = target.Skills[ i ];

                    target.AddSkillMod( new TimedSkillMod( s.SkillName, true, s.Base * -0.28, delay ) );
                }

                int count = (int) Math.Round( delay.TotalSeconds / 1.25 );
                Timer timer = new AnimateTimer( target, count );
                m_Suppressed.Add( target, timer );
                timer.Start();

                PlaySound( 0x58C );
            }

            m_NextSuppress = DateTime.Now + TimeSpan.FromSeconds( 10 );
        }