public override void OnThink() { if ( this.m_NextSpawn <= DateTime.Now && this.m_Spawns != null && this.m_Spawns.Count < 5 ) { EvilBunny rabbit = new EvilBunny(); rabbit.MoveToWorld( this.Location, this.Map ); this.m_Spawns.Add( rabbit ); this.m_NextSpawn = DateTime.Now + TimeSpan.FromSeconds( 45.0 ); } if ( this.m_NextAbility < DateTime.Now ) { if ( this.Hits < this.HitsMaxSeed && this.Combatant == null && this.Mana > 10 ) { this.Hits += Utility.Random( 30, 40 ); this.Mana -= 10; this.m_NextAbility = DateTime.Now + TimeSpan.FromSeconds( 5.0 ); } if ( this.Combatant != null ) { if ( this.Hits < this.HitsMaxSeed / 2 && this.Mana >= 10 ) { this.Hits += Utility.Random( 40, 50 ); this.Mana -= 10; this.Say( "Spirit of the woods, ease my pain." ); this.m_NextAbility = DateTime.Now + TimeSpan.FromSeconds( 5.0 ); } else if ( this.Combatant.Hits < this.Combatant.HitsMax / 2 && this.Mana >= 15 ) { this.Say( "Guardians of Gaia, bring forth your grasping hands." ); Blood blood = new Blood(); blood.ItemID = 3391; blood.Name = "Grasping Roots"; this.Combatant.Paralyzed = true; this.Mana -= 15; this.m_NextAbility = DateTime.Now + TimeSpan.FromSeconds( 10.0 ); } else if ( this.Mana >= 30 ) { this.Say( "Gaia, bring forth your wrath!" ); ArrayList alist = new ArrayList(); IPooledEnumerable eable = this.Map.GetMobilesInRange( this.Location, 10 ); foreach( Mobile m in eable ) alist.Add( m ); eable.Free(); this.PlaySound( 518 ); this.m_NextAbility = DateTime.Now + TimeSpan.FromSeconds( 15.0 ); Effects.SendLocationParticles( EffectItem.Create( this.Location, this.Map, TimeSpan.FromSeconds( 10.0 ) ), 0x37CC, 1, 50, 2101, 7, 9909, 0 ); if ( alist.Count > 0 ) { for( int i = 0; i < alist.Count; i++ ) { Mobile m = (Mobile)alist[i]; if ( m is EvilBunny ) {} else { AOS.Damage( m, this, Utility.Random( 15, 20 ), 100, 0, 0, 0, 0 ); m.BoltEffect( 2 ); } } } } } } }
public override void OnThink() { if (this.m_NextSpawn <= DateTime.Now && this.m_Spawns != null && this.m_Spawns.Count < 5) { EvilBunny rabbit = new EvilBunny(); rabbit.MoveToWorld(this.Location, this.Map); this.m_Spawns.Add(rabbit); this.m_NextSpawn = DateTime.Now + TimeSpan.FromSeconds(45.0); } if (this.m_NextAbility < DateTime.Now) { if (this.Hits < this.HitsMaxSeed && this.Combatant == null && this.Mana > 10) { this.Hits += Utility.Random(30, 40); this.Mana -= 10; this.m_NextAbility = DateTime.Now + TimeSpan.FromSeconds(5.0); } if (this.Combatant != null) { if (this.Hits < this.HitsMaxSeed / 2 && this.Mana >= 10) { this.Hits += Utility.Random(40, 50); this.Mana -= 10; this.Say("Spirit of the woods, ease my pain."); this.m_NextAbility = DateTime.Now + TimeSpan.FromSeconds(5.0); } else if (this.Combatant.Hits < this.Combatant.HitsMax / 2 && this.Mana >= 15) { this.Say("Guardians of Gaia, bring forth your grasping hands."); Blood blood = new Blood(); blood.ItemID = 3391; blood.Name = "Grasping Roots"; this.Combatant.Paralyzed = true; this.Mana -= 15; this.m_NextAbility = DateTime.Now + TimeSpan.FromSeconds(10.0); } else if (this.Mana >= 30) { this.Say("Gaia, bring forth your wrath!"); ArrayList alist = new ArrayList(); IPooledEnumerable eable = this.Map.GetMobilesInRange(this.Location, 10); foreach (Mobile m in eable) { alist.Add(m); } eable.Free(); this.PlaySound(518); this.m_NextAbility = DateTime.Now + TimeSpan.FromSeconds(15.0); Effects.SendLocationParticles(EffectItem.Create(this.Location, this.Map, TimeSpan.FromSeconds(10.0)), 0x37CC, 1, 50, 2101, 7, 9909, 0); if (alist.Count > 0) { for (int i = 0; i < alist.Count; i++) { Mobile m = (Mobile)alist[i]; if (m is EvilBunny) { } else { AOS.Damage(m, this, Utility.Random(15, 20), 100, 0, 0, 0, 0); m.BoltEffect(2); } } } } } } }