Пример #1
0
            private List <Mobile> GetTargets()
            {
                List <Mobile> targets = new List <Mobile>();

                WildfireSpell.DefragTable();

                IPooledEnumerable eable = m_Map.GetMobilesInRange(m_Location, m_Range);

                foreach (Mobile m in eable)
                {
                    if (WildfireSpell.Table.ContainsKey(m))
                    {
                        continue;
                    }

                    if (m != m_Owner && SpellHelper.ValidIndirectTarget(m_Owner, m) && m_Owner.CanBeHarmful(m, false) && m_Owner.InLOS(m))
                    {
                        targets.Add(m);
                    }
                }
                eable.Free();
                return(targets);
            }
Пример #2
0
 public InternalTarget(WildfireSpell owner)
     : base(12, true, TargetFlags.None)
 {
     this.m_Owner = owner;
 }
Пример #3
0
            private IEnumerable <Mobile> GetTargets()
            {
                WildfireSpell.DefragTable();

                return(m_Spell.AcquireIndirectTargets(m_Location, m_Range).OfType <Mobile>());
            }
Пример #4
0
            private IEnumerable <Mobile> GetTargets()
            {
                WildfireSpell.DefragTable();

                return(m_Spell.AcquireIndirectTargets(m_Location, m_Range).OfType <Mobile>().Where(m => !m_Table.ContainsKey(m)));
            }
Пример #5
0
			public InternalTarget( WildfireSpell owner ) : base( 12, true, TargetFlags.None )
			{
				m_Owner = owner;
			}
Пример #6
0
        public override Spell ChooseSpell( Mobile c )
        {
            Spell spell = CheckCastHealingSpell();

            if ( spell != null )
                return spell;

            switch ( Utility.Random( 16 ) )
            {
                case 0:
                case 1:
                case 2:	// Poison them
                    {
                        m_Mobile.DebugSay( "Attempting to poison" );

                        if ( !c.Poisoned )
                            spell = new PoisonSpell( m_Mobile, null );

                        break;
                    }
                case 3:	// Bless ourselves.
                    {
                        m_Mobile.DebugSay( "Blessing myself" );

                        if ( Utility.RandomBool() && !ArcaneEmpowermentSpell.IsBuffed( m_Mobile ) )
                            spell = new ArcaneEmpowermentSpell( m_Mobile, null );
                        else
                            spell = new BlessSpell( m_Mobile, null );

                        break;
                    }
                case 4: // Wildfire
                    {
                        m_Mobile.DebugSay( "Incendio!" );

                        spell = new WildfireSpell( m_Mobile, null );

                        break;
                    }
                case 5: // Reduce their cast speed
                    {
                        if ( c.InRange( m_Mobile.Location, 6 ) )
                        {
                            if ( m_Mobile.Skills[SkillName.Spellweaving].Value >= 90.0 )
                                spell = new EssenceOfWindSpell( m_Mobile, null );
                            else if ( c.InRange( m_Mobile.Location, 2 ) )
                                spell = new ThunderstormSpell( m_Mobile, null );
                        }

                        m_Mobile.DebugSay( "Attempting to reduce their cast speed" );

                        break;
                    }
                case 6: // Curse them.
                    {
                        m_Mobile.DebugSay( "Attempting to curse" );

                        spell = GetRandomCurseSpell( c );
                        break;
                    }
                case 7:	// Paralyze them.
                    {
                        m_Mobile.DebugSay( "Attempting to paralyze" );

                        if ( m_Mobile.Skills[SkillName.Magery].Value > 50.0 )
                            spell = new ParalyzeSpell( m_Mobile, null );

                        break;
                    }
                case 8: // Drain mana
                    {
                        m_Mobile.DebugSay( "Attempting to drain mana" );

                        spell = GetRandomManaDrainSpell( c );
                        break;
                    }

                default: // Damage them.
                    {
                        m_Mobile.DebugSay( "Just doing damage" );

                        spell = GetRandomDamageSpell( c );
                        break;
                    }
            }

            return spell;
        }