예제 #1
0
        public void Target(Mobile targeted)
        {
            if (!Caster.CanSee(targeted))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(targeted))
            {
                SpellHelper.Turn(Caster, targeted);

                SpellHelper.CheckReflect(6, Caster, ref targeted);

                /* The target is hit with an explosion of chaos damage and then inflicted
                 * with the spell plague curse. Each time the target is damaged while under
                 * the effect of the spell plague, they may suffer an explosion of chaos
                 * damage. The initial chance to trigger the explosion starts at 90% and
                 * reduces by 30% every time an explosion occurs. Once the target is
                 * afflicted by 3 explosions or 8 seconds have passed, that spell plague
                 * is removed from the target. Spell Plague will stack with other spell
                 * plagues so that they are applied one after the other.
                 */

                VisualEffect(targeted);

                /* Deal the damage */
                var damage = GetNewAosDamage(33, 1, 5, targeted);

                var types = new int[4];
                types[Utility.Random(types.Length)] = 100;

                SpellHelper.Damage(this, targeted, damage, 0, types[0], types[1], types[2], types[3]);

                /* Plague */
                SpellPlagueContext context = new SpellPlagueContext(this, targeted);

                if (m_Table.ContainsKey(targeted))
                {
                    SpellPlagueContext oldContext = m_Table[targeted];
                    oldContext.SetNext(context);
                }
                else
                {
                    m_Table[targeted] = context;
                    context.Start();
                }
            }

            FinishSequence();
        }
예제 #2
0
            public void EndPlague(bool restart)
            {
                m_Timer?.Stop();

                if (restart && m_Next != null)
                {
                    m_Table[m_Target] = m_Next;
                    m_Next.Start();
                }
                else
                {
                    m_Table.Remove(m_Target);

                    BuffInfo.RemoveBuff(m_Target, BuffIcon.SpellPlague);
                }
            }
예제 #3
0
        public void Target( Mobile targeted )
        {
            if ( !Caster.CanSee( targeted ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            else if ( CheckHSequence( targeted ) )
            {
                SpellHelper.Turn( Caster, targeted );

                SpellHelper.CheckReflect( 6, Caster, ref targeted );

                /* The target is hit with an explosion of chaos damage and then inflicted
                 * with the spell plague curse. Each time the target is damaged while under
                 * the effect of the spell plague, they may suffer an explosion of chaos
                 * damage. The initial chance to trigger the explosion starts at 90% and
                 * reduces by 30% every time an explosion occurs. Once the target is
                 * afflicted by 3 explosions or 8 seconds have passed, that spell plague
                 * is removed from the target. Spell Plague will stack with other spell
                 * plagues so that they are applied one after the other.
                 */

                VisualEffect( targeted );

                /* Deal the damage */
                double damage = GetNewAosDamage( 33, 1, 5, targeted );

                int[] types = new int[4];
                types[Utility.Random( types.Length )] = 100;

                SpellHelper.Damage( this, targeted, damage, 0, types[0], types[1], types[2], types[3] );

                /* Plague */
                SpellPlagueContext context = new SpellPlagueContext( this, targeted );

                if ( m_Table.ContainsKey( targeted ) )
                {
                    SpellPlagueContext oldContext = m_Table[targeted];
                    oldContext.SetNext( context );
                }
                else
                {
                    m_Table[targeted] = context;
                    context.Start();
                }
            }

            FinishSequence();
        }