Esempio n. 1
0
 public void IsHurtBad(bool willKill)
 {
     if (Hits < 15 || willKill)
     {
         BaseAttackHelperSE.SpillAcid(this, false);
     }
 }
Esempio n. 2
0
        public override void OnThink()
        {
            if (DateTime.UtcNow >= m_NextAbilityTime)
            {
                if (Utility.RandomBool())
                {
                    ThrowingTessenSE tessen = new ThrowingTessenSE(this);

                    tessen.ThrowIt();
                }
                else
                {
                    Mobile target = BaseAttackHelperSE.GetRandomAttacker(this, FanDancer.AbilityRange);

                    if (target != null)
                    {
                        LowerFireResist(target);
                    }
                }

                m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(m_MinTime, m_MaxTime));
            }

            base.OnThink();
        }
Esempio n. 3
0
        public void ThrowIt()
        {
            Mobile target = BaseAttackHelperSE.GetRandomAttacker(m_Mobile, m_ThrowRange);

            if (target != null)
            {
                Throw(target);
            }
        }
Esempio n. 4
0
        public override bool DoActionWander()
        {
            m_Mobile.DebugSay("I have no combatant");

            if (turnOrHideChance > Utility.RandomDouble() && !m_Mobile.Hidden)
            {
                if (Utility.RandomBool())
                {
                    if (m_Mobile.BodyMod == 0)
                    {
                        ChangeForm(m_Bodies[Utility.Random(m_Bodies.Length)]);
                    }
                    else
                    {
                        ChangeForm(0);
                    }
                }
                else
                {
                    PerformHide();
                    m_Mobile.UseSkill(SkillName.Stealth);
                }
            }

            if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
            {
                if (m_Mobile.Debug)
                {
                    m_Mobile.DebugSay("I have detected {0}, attacking", m_Mobile.FocusMob.Name);
                }

                m_Mobile.Combatant = m_Mobile.FocusMob;
                Action             = ActionType.Combat;
            }
            else
            {
                if (m_Mobile.Combatant != null)
                {
                    Action = ActionType.Combat;
                    return(true);
                }

                Mobile target = BaseAttackHelperSE.GetRandomAttacker(m_Mobile, m_Mobile.RangePerception);

                if (target != null)
                {
                    m_Mobile.Combatant = target;

                    Action = ActionType.Combat;
                }

                base.DoActionWander();
            }

            return(true);
        }
Esempio n. 5
0
        public override void OnThink()
        {
            if (DateTime.Now >= m_NextAbilityTime)
            {
                BaseAttackHelperSE.HiryuAbilitiesAttack(this, ref m_Timer);

                m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(m_MinTime, m_MaxTime));
            }

            base.OnThink();
        }
Esempio n. 6
0
        public void LowerResist(Mobile target)
        {
            if (BaseAttackHelperSE.IsUnderEffect(target, BaseAttackHelperSE.m_KazeKemonoRMT))
            {
                return;
            }

            TimeSpan duration = TimeSpan.FromSeconds(121 - (int)(target.Skills[SkillName.MagicResist].Value));

            ResistanceMod[] mod = new ResistanceMod[1] {
                new ResistanceMod(ResistanceType.Physical, -25)
            };

            BaseAttackHelperSE.LowerResistanceAttack(this, ref m_Timer, duration, target, mod, BaseAttackHelperSE.m_KazeKemonoRMT);
        }
Esempio n. 7
0
        public override void OnThink()
        {
            if (DateTime.Now >= m_NextAbilityTime)
            {
                Mobile target = BaseAttackHelperSE.GetRandomAttacker(this, KazeKemono.AbilityRange);

                if (target != null)
                {
                    LowerResist(target);
                }

                m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(m_MinTime, m_MaxTime));
            }

            base.OnThink();
        }
Esempio n. 8
0
        public override void OnThink()
        {
            if (DateTime.Now >= m_NextAbilityTime)
            {
                Mobile target = BaseAttackHelperSE.GetRandomAttacker(this, Yamandon.AbilityRange);

                if (target != null)
                {
                    BaseAttackHelperSE.SpillAcid(target, true);
                }

                m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(m_MinTime, m_MaxTime));
            }

            base.OnThink();
        }
Esempio n. 9
0
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (DateTime.Now >= m_NextAbilityTime)
            {
                if (BaseAttackHelperSE.IsUnderEffect(defender, BaseAttackHelperSE.m_RageTable))
                {
                    return;
                }

                BaseAttackHelperSE.RageAttack(this, defender, ref m_Timer);

                m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(MinTime, MaxTime));
            }
        }
Esempio n. 10
0
        public override void OnThink()
        {
            if (DateTime.Now >= m_NextAbilityTime)
            {
                Mobile target = BaseAttackHelperSE.GetRandomAttacker(this, LadyOfTheSnow.AbilityRange);

                if (target != null)
                {
                    BaseAttackHelperSE.IcyWindAttack(this, target);
                }

                m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(m_MinTime, m_MaxTime));
            }

            base.OnThink();
        }
Esempio n. 11
0
        public void LowerFireResist(Mobile target)
        {
            if (BaseAttackHelperSE.IsUnderEffect(target, BaseAttackHelperSE.m_FanDancerRMT))
            {
                return;
            }

            TimeSpan duration = TimeSpan.FromSeconds(121 - (int)(target.Skills[SkillName.MagicResist].Value));

            ResistanceMod[] mod = new ResistanceMod[1] {
                new ResistanceMod(ResistanceType.Fire, -25)
            };

            target.SendLocalizedMessage(1070833);               // The creature fans you with fire, reducing your resistance to fire attacks.

            BaseAttackHelperSE.LowerResistanceAttack(this, ref m_Timer, duration, target, mod, BaseAttackHelperSE.m_FanDancerRMT);
        }
Esempio n. 12
0
		public override void OnThink()
		{
			double value;
			int i;

			if ( Hits != m_HitsLast )
			{
				if ( m_HitsLast != -1 )
				{
					for ( i = 0; i < m_Mods.Length; i++ )
					{
						RemoveResistanceMod( m_Mods[ i ] );
					}
				}

				for ( i = 0; i < m_Mods.Length; i++ )
				{
					value = ((double) (HitsMax - Hits))*((double) ((m_ResistMax[ i ] - m_Resist[ i ])/(double) HitsMax));

					m_Mods[ i ] = new ResistanceMod( (ResistanceType) i, m_Resist[ i ] + (int) value );
				}

				for ( i = 0; i < m_Mods.Length; i++ )
				{
					AddResistanceMod( m_Mods[ i ] );
				}

				m_HitsLast = Hits;
			}

			if ( DateTime.Now >= m_NextAbilityTime )
			{
				Mobile target = BaseAttackHelperSE.GetRandomAttacker( this, Yamandon.AbilityRange );

				if ( target != null )
				{
					BaseAttackHelperSE.SpillAcid( target, true );
				}

				m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( m_MinTime, m_MaxTime ) );
			}

			base.OnThink();
		}
Esempio n. 13
0
        public override void OnThink()
        {
            if (!BardPacified)
            {
                if (DateTime.UtcNow >= m_NextAbilityTime)
                {
                    Mobile target = BaseAttackHelperSE.GetRandomAttacker(this, Oni.AbilityRange);

                    if (target != null)
                    {
                        BaseAttackHelperSE.AngryFireAttack(this, target);
                    }

                    m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(m_MinTime, m_MaxTime));
                }
            }

            base.OnThink();
        }
Esempio n. 14
0
        private void UseAttackAbility()
        {
            ArrayList t = BaseAttackHelperSE.GetAllAttackers(m_Mobile, 2);

            if (t.Count > 1)
            {
                if (Utility.Random(3) != 1)
                {
                    if (CanUseAbility(70.0, 10, 1.0))
                    {
                        SpecialMove.SetCurrentMove(m_Mobile, SpellRegistry.GetSpecialMove(405));                             // Momentum Strike
                        return;
                    }
                }
            }

            if (CanUseAbility(50.0, 5, 1.0))
            {
                SpecialMove.SetCurrentMove(m_Mobile, SpellRegistry.GetSpecialMove(404));                     // Lightning Strike
            }
            return;
        }
        public override bool DoActionWander()
        {
            m_Mobile.DebugSay("I have no combatant");

            PerformHide();

            if (AquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
            {
                if (m_Mobile.Debug)
                {
                    m_Mobile.DebugSay("I have detected {0}, attacking", m_Mobile.FocusMob.Name);
                }

                m_Mobile.Combatant = m_Mobile.FocusMob;
                Action             = ActionType.Combat;
            }
            else
            {
                if (m_Mobile.Combatant != null)
                {
                    Action = ActionType.Combat;
                    return(true);
                }

                Mobile target = BaseAttackHelperSE.GetRandomAttacker(m_Mobile, m_Mobile.RangePerception);

                if (target != null)
                {
                    m_Mobile.Combatant = target;

                    Action = ActionType.Combat;
                }

                base.DoActionWander();
            }

            return(true);
        }