Пример #1
0
		public override void OnThink()
		{
			base.OnThink();
			
			if(Combatant == null)
				return;
				
			if(m_NextSummon < DateTime.UtcNow && this.Mana > 40 && this.Followers + 5 <= this.FollowersMax)
			{
				Spell spell = new RisingColossusSpell(this, null);
				spell.Cast();
				m_NextSummon = DateTime.UtcNow + TimeSpan.FromSeconds(30);
			}

            Mobile combatant = Combatant;

			if(m_NextAIChange < DateTime.UtcNow)
			{
				if(AIObject is MageAI)
					ChangeAIType(AIType.AI_Mystic);
				else
					ChangeAIType(AIType.AI_Mage);

                Combatant = combatant;

                m_NextAIChange = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(10, 30));
			}
		}
Пример #2
0
		public override void OnThink()
		{
			base.OnThink();
			
			if(Combatant == null || m_NextSummon > DateTime.Now)
				return;
				
			if(this.Mana > 40 && this.Followers + 5 <= this.FollowersMax)
			{
                if (!m_Manifested && m_ManifestChance > Utility.RandomDouble())
                {
                    IDamageable m = this.Combatant;

                    if (m is BaseCreature && (((BaseCreature)m).Summoned || ((BaseCreature)m).Controlled))
                        m = ((BaseCreature)m).GetMaster();

                    this.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot);
                    BaseCreature vm = new VoidManifestation(m_Type);
                    vm.MoveToWorld(this.Location, this.Map);
                    vm.PlaySound(vm.GetAngerSound());

                    if (m != null)
                        vm.Combatant = m;

                    m_Manifested = true;
                    m_NextSummon = DateTime.Now + TimeSpan.FromMinutes(10);
                }
                else
                {
                    Spell spell = new RisingColossusSpell(this, null);
                    spell.Cast();
                    m_NextSummon = DateTime.Now + TimeSpan.FromSeconds(30);
                }
			}
		}