Beispiel #1
0
			public InternalTarget( CorpseSkinSpell owner ) : base( Core.ML ? 10 : 12, false, TargetFlags.Harmful )
			{
				m_Owner = owner;
			}
        public virtual Spell DoCombo(Mobile c)
        {
            Spell spell = null;

            if ( m_Mobile.HitsMax > 0 && (m_Mobile.Hits / m_Mobile.HitsMax) < 0.1 && m_Mobile.Hits < 300 )
            {
                spell = CheckCastHealingSpell();
                m_Combo = -1;
                return spell;
            }
            if (m_Combo == 0)
            {
                spell = new ExplosionSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Explosion" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 1)
            {
                spell = new CorpseSkinSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Corpse skin" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 2)
            {
                if ( !c.Poisoned )
                {
                    spell = new PoisonSpell(m_Mobile, null);
                    m_Mobile.DebugSay( "Poison" );
                }
                else
                {
                    spell = new CurseSpell(m_Mobile, null);
                    m_Mobile.DebugSay( "Curse" );
                }

                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 3)
            {
                spell = new StrangleSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Strangle" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 4)
            {
                spell = new PainSpikeSpell(m_Mobile, null);
                m_Mobile.DebugSay( "pain spike" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 7)
            {
                spell = new ExplosionSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Explosion" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 8)
            {
                if ( !c.Poisoned )
                {
                    spell = new PoisonSpell(m_Mobile, null);
                    m_Mobile.DebugSay( "Poison" );
                }
                else
                {
                    spell = new CurseSpell(m_Mobile, null);
                    m_Mobile.DebugSay( "Curse" );
                }

                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 9)
            {
                spell = new FlameStrikeSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Flamestrike" );
                m_Combo = -1;
            }
            else if (m_Combo == 10)
            {
                spell = new StrangleSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Strangle" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 11)
            {
                spell = new CorpseSkinSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Corpse skin" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 12)
            {
                spell = new ExplosionSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Explosion" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 13)
            {
                spell = new PoisonStrikeSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Poison strike" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 14)
            {
                spell = new PoisonStrikeSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Poison strike" );
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 15)
            {
                spell = new PainSpikeSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Pain spike" );
                m_Combo = -1;
            }
            if (m_Combo == 5 && spell == null)
            {
                switch (Utility.Random(3))
                {
                    default:
                    case 0:
                        {
                            spell = new ExplosionSpell(m_Mobile, null);
                            m_Mobile.DebugSay( "Explosion" );
                            break;
                        }
                    case 1:
                        {
                            spell = new PoisonStrikeSpell(m_Mobile, null);
                            m_Mobile.DebugSay( "Poison strike" );
                            break;
                        }
                    case 2:
                        {
                            spell = new FlameStrikeSpell(m_Mobile, null);
                            m_Mobile.DebugSay( "Flamestrike" );
                            ++m_Combo; // Move to next spell
                            break;
                        }
                }
            }
            else if (m_Combo == 6 && spell == null)
            {
                spell = new VengefulSpiritSpell(m_Mobile, null);
                m_Mobile.DebugSay( "Revenant" );
                m_Combo = -1;
            }

            return spell;
        }
        public virtual Spell ChooseSpell( Mobile c )
        {
            Spell spell = null;

            spell = CheckCastHealingSpell();

            if ( spell != null )
                return spell;

            switch (Utility.Random(5))
            {
                default:
                case 0: case 1: case 2: // Deal some damage
                    {
                        spell = GetRandomDamageSpell(c);
                        break;
                    }
                case 3: // Curse it
                    {
                        spell = GetRandomCurseSpell();
                        break;
                    }
                case 4: // Set up a combo of attacks
                    {
                        switch ( Utility.Random( 6 ) )
                        {
                            default: case  0:
                            {
                                m_Combo = 0;
                                spell = new PoisonSpell(m_Mobile, null);
                                m_Mobile.DebugSay( "Poison" );
                                break;
                            }
                            case  1:
                            {
                                m_Combo = 0;
                                spell = new EvilOmenSpell(m_Mobile, null);
                                m_Mobile.DebugSay( "Evil Omen" );
                                break;
                            }
                            case  2:
                            {
                                m_Combo = 7;
                                spell = new CorpseSkinSpell(m_Mobile, null);
                                m_Mobile.DebugSay( "Corpse Skin" );
                                break;
                            }
                            case  3:
                            {
                                m_Combo = 7;
                                spell = new CurseSpell(m_Mobile, null);
                                m_Mobile.DebugSay( "Curse" );
                                break;
                            }
                            case  4:
                            {
                                m_Combo = 10;
                                spell = new CurseSpell(m_Mobile, null);
                                m_Mobile.DebugSay( "Curse" );
                                break;
                            }
                            case  5:
                            {
                                m_Combo = 10;
                                spell = new ExplosionSpell(m_Mobile, null);
                                m_Mobile.DebugSay( "Explosion" );
                                break;
                            }
                        }
                        break;
                    }
            }

            return spell;
        }
Beispiel #4
0
 public InternalTarget(CorpseSkinSpell owner) : base(Core.ML ? 10 : 12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
 }