Ejemplo n.º 1
0
        public static void CheckPlague(Mobile m)
        {
            if (m_Table.ContainsKey(m))
            {
                SpellPlagueContext context = m_Table[m];

                context.OnDamage();
            }
        }
Ejemplo n.º 2
0
        public static void RemoveEffect(Mobile m)
        {
            if (m_Table.ContainsKey(m))
            {
                SpellPlagueContext context = m_Table[m];

                context.EndPlague(false);
            }
        }
Ejemplo n.º 3
0
 public void SetNext(SpellPlagueContext context)
 {
     if (m_Next == null)
     {
         m_Next = context;
     }
     else
     {
         m_Next.SetNext(context);
     }
 }
Ejemplo n.º 4
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();
        }
Ejemplo n.º 5
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();
        }
Ejemplo n.º 6
0
 public void SetNext( SpellPlagueContext context )
 {
     if ( m_Next == null )
         m_Next = context;
     else
         m_Next.SetNext( context );
 }