Inheritance: MagerySpell
Example #1
0
 public InternalTarget( ProtectionSpell owner )
     : base(12, false, TargetFlags.Beneficial)
 {
     m_Owner = owner;
 }
Example #2
0
 public InternalTarget(ProtectionSpell owner) : base(12, false, TargetFlags.Beneficial)
 {
     m_Owner = owner;
 }
Example #3
0
 public InternalTarget(ProtectionSpell owner) : base(12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
 }
Example #4
0
 public InternalSphereTarget(ProtectionSpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.Beneficial)
 {
     m_Owner = owner;
     m_Owner.Caster.SendAsciiMessage("Selecione o alvo...");
 }
Example #5
0
 public InternalTarget( ProtectionSpell owner )
     : base(12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
 }
Example #6
0
        public virtual Spell ChooseSpell( Mobile c )
        {
            Spell spell = null;

            if( !SmartAI )
            {
                spell = CheckCastHealingSpell();

                if( spell != null )
                    return spell;

                switch( Utility.Random(16) )
                {
                    case 0:
                        {
                            spell = new FireballSpell(m_Mobile, null);
                            break;
                        }
                    case 1:
                        {
                            m_Mobile.DebugSay("Protecting myself");

                            spell = new ProtectionSpell(m_Mobile, null);
                            break;
                        }
                    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");

                            spell = new BlessSpell(m_Mobile, null);
                            break;
                        }
                    case 4:
                        {
                            m_Mobile.DebugSay("Summoning FIRE FIELD!!!");

                            spell = new FireFieldSpell(m_Mobile, null);
                            break;
                        }
                    case 5:
                    case 6: // Curse them.
                        {
                            m_Mobile.DebugSay("Attempting to curse");

                            spell = GetRandomCurseSpell();
                            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();
                            break;
                        }

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

                            spell = GetRandomDamageSpell();
                            break;
                        }
                }

                return spell;
            }

            spell = CheckCastHealingSpell();

            if( spell != null )
                return spell;

            if( !c.Poisoned && c.Spell != null && c.Mana > (c.ManaMax / 2) )
                return GetRandomManaDrainSpell();

            if( m_Mobile.Hits < (m_Mobile.HitsMax / 2) && 0.30 > Utility.RandomDouble() )
            {
                spell = new ProtectionSpell(m_Mobile, null);

                if( spell == null )
                    spell = new BlessSpell(m_Mobile, null);

                if( spell != null )
                    return spell;
            }

            if( c.Hits < (c.HitsMax * 0.30) ) //They're dying, set up a kill combo
            {
                m_Combo = 0;

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

            switch( Utility.Random(10) )
            {
                default:
                case 0: // Deal some damage
                    {
                        spell = GetRandomDamageSpell();
                        break;
                    }
                case 1: // Poison them
                    {
                        if( !c.Poisoned )
                            spell = new PoisonSpell(m_Mobile, null);

                        break;
                    }
                case 2: // Set up a combo
                    {
                        if( m_Mobile.Mana < 40 && m_Mobile.Mana > 15 )
                        {
                            if( c.Paralyzed && !c.Poisoned )
                            {
                                m_Mobile.DebugSay("I am going to meditate");

                                m_Mobile.UseSkill(SkillName.Meditation);
                            }
                            else if( !c.Poisoned )
                            {
                                spell = new ParalyzeSpell(m_Mobile, null);
                            }
                        }
                        else if( m_Mobile.Mana > 60 )
                        {
                            if( Utility.Random(2) == 0 && !c.Paralyzed && !c.Frozen && !c.Poisoned )
                            {
                                m_Combo = 0;
                                spell = new ParalyzeSpell(m_Mobile, null);
                            }
                            else
                            {
                                m_Combo = 1;
                                spell = new ExplosionSpell(m_Mobile, null);
                            }
                        }

                        break;
                    }
                case 3:
                    {
                        spell = GetRandomCurseSpell();
                        break;
                    }
            }

            return spell;
        }
 public InternalSphereTarget(ProtectionSpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.Beneficial)
 {
     m_Owner = owner;
     m_Owner.Caster.SendAsciiMessage("Selecione o alvo...");
 }