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(); }
public void ThrowIt() { Mobile target = BaseAttackHelperSE.GetRandomAttacker(m_Mobile, m_ThrowRange); if (target != null) { Throw(target); } }
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); }
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(); }
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(); }
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(); }
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(); }
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(); }
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); }