コード例 #1
0
 protected override void OnTick()
 {
     if (Summon.Deleted)
     {
         AnimateDeadSpell.Unregister(this);
         Stop();
     }
     else
     {
         if (Summon.Hits > 0)
         {
             Summon.Hits--;
         }
         else
         {
             Summon.Kill();
             AnimateDeadSpell.Unregister(this);
             Stop();
         }
     }
 }
コード例 #2
0
 public InternalTarget( AnimateDeadSpell owner )
     : base(12, false, TargetFlags.None)
 {
     m_Owner = owner;
 }
コード例 #3
0
ファイル: NecromancerAI.cs プロジェクト: Ravenwolfe/xrunuo
        public override Spell ChooseSpell( Mobile c )
        {
            Spell spell = null;

            spell = GetRandomBlessSpell();

            if ( spell != null )
                return spell;

            spell = CheckCastHealingSpell();

            if ( spell != null )
                return spell;

            switch ( Utility.Random( 12 ) )
            {
                default:
                case 0:
                case 1: // Curse them.
                    {
                        spell = GetRandomCurseSpell( c );

                        break;
                    }
                case 2: // Poison them
                    {
                        if ( !c.Poisoned )
                            spell = new PoisonSpell( m_Mobile, null );

                        break;
                    }
                case 3: // Drain some mana
                    {
                        spell = GetRandomManaDrainSpell( c );

                        break;
                    }
                case 4: // Animate dead
                    {
                        spell = new AnimateDeadSpell( m_Mobile, null );

                        break;
                    }
                case 5: // Vengeful spirit
                    {
                        spell = new VengefulSpiritSpell( m_Mobile, null );

                        break;
                    }
                case 6:
                case 7:
                case 8: // Deal some damage
                    {
                        spell = GetRandomDamageSpell( c );

                        break;
                    }
                case 9:
                case 10:
                case 11: // 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;
                    }
            }

            return spell;
        }
コード例 #4
0
ファイル: AnimateDeadSpell.cs プロジェクト: pallop/Servuo
 public InternalTarget(AnimateDeadSpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.None)
 {
     this.m_Owner = owner;
 }
コード例 #5
0
ファイル: AnimateDeadSpell.cs プロジェクト: Crome696/ServUO
 public InternalTarget(AnimateDeadSpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.None)
 {
     this.m_Owner = owner;
 }
コード例 #6
0
ファイル: NecroMageAI.cs プロジェクト: Crome696/ServUO
        public virtual Spell ChooseSpell(Mobile c)
        {
            Spell spell = this.CheckCastHealingSpell();

            if (spell != null)
                return spell;
				
            double damage = ((this.m_Mobile.Skills[SkillName.SpiritSpeak].Value - c.Skills[SkillName.MagicResist].Value) / 10) + (c.Player ? 18 : 30);
			
            if (damage > c.Hits)
                return new PainSpikeSpell(this.m_Mobile, null);

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

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

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

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

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

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

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

                        spell = this.GetRandomManaDrainSpell();
                        break;
                    }
                case 9:
                case 10: // Blood oath them
                    {
                        this.m_Mobile.DebugSay("Attempting to blood oath");
										
                        if (this.m_Mobile.Skills[SkillName.Necromancy].Value > 30 && BloodOathSpell.GetBloodOath(c) != this.m_Mobile)
                            spell = new BloodOathSpell(this.m_Mobile, null);
						
                        break;
                    }
                case 11:
                case 12: // Animate dead
                    {
                        this.m_Mobile.DebugSay("Attempting to animate dead");

                        if ((this.m_Animated == null || !this.m_Animated.Alive) && this.m_Mobile.Skills[SkillName.Necromancy].Value > 40)
                            spell = new AnimateDeadSpell(this.m_Mobile, null);

                        break;
                    }
                case 13:
                case 14:
                    {
                        this.m_Mobile.DebugSay("Attempting to cast vengeful spirit");

                        if (this.m_Mobile.Skills[SkillName.Necromancy].Value > 80 && (this.m_Mobile.Followers + 3) < this.m_Mobile.FollowersMax)
                            spell = new VengefulSpiritSpell(this.m_Mobile, null);

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

                        spell = this.GetRandomDamageSpell();
                        break;
                    }
            }

            return spell;
        }
コード例 #7
0
 public InternalTarget(AnimateDeadSpell owner)
     : base(10, false, TargetFlags.None)
 {
     m_Owner = owner;
 }
コード例 #8
0
		public Spell GetNecromancerSpell()
		{
			Spell spell = null;

			switch ( Utility.Random( 12 ) )
			{
				case 0:
				case 1:	// Create an army for our ourselves
				{
					int whichone = Utility.RandomMinMax( 1, 2 );

					if ( whichone == 2 && m_Mobile.Skills[SkillName.Necromancy].Value > 50.0 )
					{
						if ( m_Mobile.Debug )
							m_Mobile.Say( 1109, "Undead: Casting Animate Dead" );

						spell = new AnimateDeadSpell( m_Mobile, null );
					}
					else if ( m_Mobile.Followers == 0 || m_Mobile.Followers == 3 )
					{
						if ( m_Mobile.Debug )
							m_Mobile.Say( 1109, "Undead: Summoning Familiar " );

						CreateNecromancerFamiliar();
					}
					else
						goto default;

					break;
				}
				case 2:
				case 3: // Curse them
				{
					if ( m_Mobile.Debug )
						m_Mobile.Say( 1109, "Cursing Them" );

					spell = GetNecromancerCurseSpell();
					break;
				}
				case 4:
				case 5:	// Reverse combat
				{
					if ( m_Mobile.Debug )
						m_Mobile.Say( 1109, "Casting Blood Oath" );

					if ( m_Mobile.Skills[SkillName.Necromancy].Value > 30.0 )
						spell = new BloodOathSpell( m_Mobile, null );

					break;
				}
				case 6: // Shapeshift
				{
					if ( m_CanShapeShift )
					{
						if ( m_Mobile.Debug )
							m_Mobile.Say( 1109, "Shapechange " );

						spell = GetNecromancerShapeshiftSpell();
					}
					else
						goto case 3; // Curse them

					break;
				}

				default: // Damage them
				{
					if ( m_Mobile.Debug )
						m_Mobile.Say( 1109, "Random damage spell" );

					spell = GetNecromancerDamageSpell();
					break;
				}
			}

			return spell;
		}