public override bool OnMoveOver( Mobile m )
		{
			if( !m_AllowCreatures && !m.Player )
				return true;

			if( m.Backpack.ConsumeTotal( typeof( DracsKey ), 1 ) )
			{
				if( m_TelePets )
				{
					Server.Mobiles.BaseCreature.TeleportPets( m, m_DestLoc, m_DestMap );
				}

				m.Say("Have mercy on my soul");
				World.Broadcast( 32, true, "A Darkening chime is heard throughout the land as {0} has Entered Draculas inner room.", m.Name );
				m.PlaySound(0x1F7);

				m.MoveToWorld( m_DestLoc, m_DestMap );
				

				return false;
			}

			m.SendMessage( " You must have the Key to Draculas chamber to use this gate." );
			return true;
		}
Ejemplo n.º 2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.Map == Map.Trammel)
            {
                //Now where am I at?
                //from.SendMessage(11, "You are at {0} {1} {2} in {3}.", from.X, from.Y, from.Z, from.Map);

                from.SendLocalizedMessage(1005680); //teleporting to Felucca
                from.MoveToWorld(from.Location, Map.Felucca);
            }
            else
                if (from.Map == Map.Felucca)
                {
                    from.SendLocalizedMessage(502353); //Strange, that did not seem to work.

                    //To switch from Trammel to Felucca, remove the above line and add the two lines below.
                    //from.SendLocalizedMessage(1005681); //teleporting to Trammel
                    //from.MoveToWorld(from.Location, Map.Trammel);
                    //502353); //Strange, that did not seem to work.
                    //502369); //You hesitate, and decide to start again.
                }
                else
                {
                    from.SendLocalizedMessage(1042766); //Waaaaaaah!  I am lost!
                    //1010217);	 //I'm lost!
                    //1042766);  //Waaaaaaah!  I am lost!
                    //10495430); //You decide against traveling to Felucca while you are still young.
                    //501816);	 //You are too far away to do that.
                }
        }
		public override bool OnMoveOver( Mobile m )
		{
			if( !m_AllowCreatures && !m.Player )
				return true;
			
			if( m.Alive)
					{
					m.SendMessage( "You must be dead to use this portal." );
					m.Say("Duh... I am not dead... Hello? Use a Rune book..");
					m.PlaySound( 0x440 );
					return true;
					}
			if( m_TelePets)
				{
				Server.Mobiles.BaseCreature.TeleportPets( m, m_DestLoc, m_DestMap );
				}
				
				m.Say("Have mercy on my soul.");
				World.Broadcast( 32, true, "A Darkening chime is heard throughout the land as Dracula has consumed another victim. May {0} rest in peace.", m.Name );
				m.PlaySound(0x1F7);

				m.MoveToWorld( m_DestLoc, m_DestMap );

				return false;
				
			

		}
Ejemplo n.º 4
0
		public override void OnDoubleClick( Mobile from )
		{
			if( HomeMap != Map.Internal && HomeMap != null && from.AccessLevel > AccessLevel.Player )
			{
				from.MoveToWorld( HomeLoc, HomeMap );
			}
		}
Ejemplo n.º 5
0
        // When this object -- the bottle -- is double-clicked...
        public override void OnDoubleClick(Mobile m)
        {
            if (m.Followers >= m.FollowersMax) // If the player's followers is greater than or equal to his max followers...
            {
                m.SendMessage("You need at least one free follower slot to open the bottle.");
            }
            else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (!GetGooInBottle())) // If the bottle is in-range and the goo is not in its bottle...
            {
                m.SendMessage("The goo is out of its bottle!");
                m.SendLocalizedMessage(1010018); // What do you want to use this item on?

                m.Target = new BottleOfGooTarget(this, gooPet); // Creates a target from this mobile with the goo mobile thrown to the new class as a reference.
            }
            else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (GetGooInBottle())) // If the bottle is in-range and the goo IS in its bottle, this function creates a new goo mobile.
            {
                gooPet = new Goo(this);

                ((GenericWarrior)gooPet).Controlled = true;
                ((GenericWarrior)gooPet).ControlMaster = m;

                gooPet.MoveToWorld(m.Location, m.Map);
                gooPet.PlaySound(0x1CC);
                gooPet.Emote("*leaps out of " + m.Name + "'s bottle!*");

                SetGooInBottle(false);
            }
            else
            {
                m.SendLocalizedMessage(500446); //That is too far away.
            }
        }
Ejemplo n.º 6
0
        public override void DoTeleport(Mobile m)
        {
            Map map = MapDest;

            if (map == null || map == Map.Internal)
                map = m.Map;

            Point3D p = PointDest;

            if (p == Point3D.Zero)
                p = m.Location;

            //Server.Mobiles.BaseCreature.TeleportPets(m, p, map);

            bool sendEffect = (!m.Hidden || m.AccessLevel == AccessLevel.Player);

            if (SourceEffect && sendEffect)
                Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 10, 10);

            m.MoveToWorld(p, map);

            if (DestEffect && sendEffect)
                Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 10, 10);

            if (SoundID > 0 && sendEffect)
                Effects.PlaySound(m.Location, m.Map, SoundID);
        }
Ejemplo n.º 7
0
		public override void OnExit( Mobile m )
		{
			if ( m.IsPlayer && !m.Alive )
			{
				Rectangle2D rect = new Rectangle2D( 342, 168, 16, 16 );

				int x = Utility.Random( rect.X, rect.Width );
				int y = Utility.Random( rect.Y, rect.Height );

				if ( x >= 345 && x <= 352 && y >= 173 && y <= 179 )
				{
					x = 353;
					y = 172;
				}

				m.MoveToWorld( new Point3D( x, y, -1 ), Map.Malas );

				if ( m.Corpse != null )
				{
					Region region = Region.Find( m.Corpse.Location, Map.Malas );

					if ( region.Name == "Doom Dark Guardians Room" )
					{
						m.Corpse.MoveToWorld( new Point3D( x, y, -1 ), Map.Malas );
					}
				}
			}
		}
Ejemplo n.º 8
0
        public override void OnDoubleClick(Mobile from)
        {
            if (m_Boat == null || from == null)
                return;

            BaseBoat boat = BaseBoat.FindBoatAt(from, from.Map);
            int range = boat != null && boat == this.Boat ? 3 : 8;
            bool canMove = false;

            if (m_Boat != null)
                m_Boat.Refresh();

            if (boat != null && m_Boat != boat)
                boat.Refresh();

            if (!from.InRange(this.Location, range))
                from.SendLocalizedMessage(500295); //You are too far away to do that.
            else if (!from.InLOS(this.Location))
                from.SendLocalizedMessage(500950); //You cannot see that.
            else if (m_Boat.IsMoving || m_Boat.IsTurning)
                from.SendLocalizedMessage(1116611); //You can't use that while the ship is moving!
            else if (BaseBoat.IsDriving(from))
                from.SendLocalizedMessage(1116610); //You can't do that while piloting a ship!
            else if (BaseHouse.FindHouseAt(from) != null)
                from.SendLocalizedMessage(1149795); //You may not dock a ship while on another ship or inside a house.
            else if (!m_Boat.IsClassicBoat)
            {
                if (boat == m_Boat && !MoveToNearestDockOrLand(from))
                    from.SendLocalizedMessage(1149796); //You can not dock a ship this far out to sea. You must be near land or shallow water.
                else if (boat == null)
                {
                    if (!from.Alive)
                        from.SendLocalizedMessage(1060190); //You cannot do that while dead!
                    else if ((m_Boat is BaseGalleon && ((BaseGalleon)m_Boat).HasAccess(from)) || (m_Boat is RowBoat && ((RowBoat)m_Boat).HasAccess(from)))
                        canMove = true;
                    else
                        from.SendLocalizedMessage(1116617); //You do not have permission to board this ship.
                }
                else if (boat != null && m_Boat != boat)
                {
                    if (!from.Alive)
                        from.SendLocalizedMessage(1060190); //You cannot do that while dead!
                    else if (boat is BaseGalleon && m_Boat is RowBoat && ((RowBoat)m_Boat).HasAccess(from))
                        canMove = true;
                    else if (boat is RowBoat && m_Boat is BaseGalleon && ((BaseGalleon)m_Boat).HasAccess(from))
                        canMove = true;
                    else if (boat is BaseGalleon && m_Boat is BaseGalleon && ((BaseGalleon)m_Boat).HasAccess(from))
                        canMove = true;
                    else
                        from.SendLocalizedMessage(1149795); //You may not dock a ship while on another ship or inside a house.
                }
            }

            if (canMove)
            {
                BaseCreature.TeleportPets(from, this.Location, this.Map);
                from.MoveToWorld(this.Location, this.Map);
            }
        }
 public static void VerificarComRestricoes(Mobile personagem)
 {
     if (Confirmar(personagem))
     {
         personagem.MoveToWorld(PosicionamentoNoMapa.BritainCentro(), Map.Felucca);
         personagem.SendMessage("Você estava em um mundo restrito e fora movido para o ponto inicial.");
     }
 }
Ejemplo n.º 10
0
        public void KickOut( Mobile m )
        {
            if(m == null || EjectMap == null) return;

            m.SendMessage("Your {0} faction is too low to enter here", FactionType);
            m.MoveToWorld(EjectLocation, EjectMap);
            Effects.SendLocationParticles( Server.Items.EffectItem.Create( m.Location, m.Map, Server.Items.EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
        }
Ejemplo n.º 11
0
 public override void OnEnter(Mobile m)
 {
     m.SendMessage("Entering boardgame");
     if (_BoardGameControlItem.Players.IndexOf(m) == -1 && m.AccessLevel == AccessLevel.Player)
     {
         m.SendMessage("You are not allowed in there.");
         m.MoveToWorld(_BoardGameControlItem.Location, _BoardGameControlItem.Map);
     }
 }
Ejemplo n.º 12
0
		public void Teleport(Mobile m, Point3D destLoc, Map destMap)
		{
			if (m == null || m.Deleted || destLoc == Point3D.Zero || destMap == Map.Internal)
			{
				return;
			}

			var oldLoc = m.Location;
			var oldMap = m.Map;

			var pm = m as PlayerMobile;

			if (pm != null && !IsOnline(pm))
			{
				pm.LogoutLocation = destLoc;
				pm.LogoutMap = destMap;

				if (!pm.Alive && pm.Corpse != null && !pm.Corpse.Deleted)
				{
					pm.Corpse.MoveToWorld(pm.LogoutLocation, pm.LogoutMap);
				}

				OnTeleported(pm, oldLoc, oldMap);
				return;
			}

			if (!m.Hidden)
			{
				Effects.SendLocationParticles(
					EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration),
					0x3728,
					10,
					10,
					5023);
			}

			m.MoveToWorld(destLoc, destMap);
			m.Send(VNScreenLightFlash.Instance);
			SendSound(Options.Sounds.Teleport);

			if (!m.Hidden)
			{
				Effects.SendLocationParticles(EffectItem.Create(destLoc, destMap, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
			}

			if (m.Location != destLoc || m.Map != destMap)
			{
				return;
			}

			if (!m.Alive && m.Corpse != null && !m.Corpse.Deleted)
			{
				m.Corpse.MoveToWorld(m.Location, m.Map);
			}

			OnTeleported(m, oldLoc, oldMap);
		}
 public static void VerificarComRestricoes(Mobile personagem)
 {
     if (personagem.Name.Equals(NomePadrao))
     {
         personagem.Frozen = true;
         personagem.MoveToWorld(PosicionamentoNoMapa.BritainCentro(), Map.Felucca);
         personagem.Hidden = true;                
     }
 }
Ejemplo n.º 14
0
		public override void OnDoubleClick(Mobile from)
		{
			base.OnDoubleClick(from);

			if (ToLocation == Point3D.Zero ||
				ToMap == Map.Internal)
				return;

			from.MoveToWorld(ToLocation, ToMap);
		}
 public override void OnDoubleClick( Mobile m )
 {
     if ( ( m.Map == Map.Felucca || m.Map == Map.Trammel ) && m.X > 6435 && m.Y > 9 && m.X < 6631 && m.Y < 244 ) // Prism of Light
     {
         BaseCreature.TeleportPets( m, m_Dest, m.Map );
         m.MoveToWorld( m_Dest, m.Map );
     }
     else
         m.SendLocalizedMessage( 1074840 ); // This ticket can only be used while you are in the Prism of Light dungeon.
 }
        public static void GoEvent(Mobile caller, EnumEventBase.EnumEventType pEvent)
        {
            switch ((int)pEvent)
            {
                case 0:
                    caller.MoveToWorld(new Point3D(47, 836, -28), Map.Ilshenar);
                    break;

                default:
                    break;
            }
        }
Ejemplo n.º 17
0
        public static void TeleportToFerry( Mobile from )
        {
            Point3D loc = new Point3D( 408, 251, 2 );
            Map map = Map.Malas;

            Effects.SendLocationParticles( EffectItem.Create( loc, map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0, 0, 2023, 0 );
            Effects.PlaySound( loc, map, 0x1FE );

            BaseCreature.TeleportPets( from, loc, map );

            from.MoveToWorld( loc, map );
        }
Ejemplo n.º 18
0
        public static void Followers_OnTarget(Mobile from, object obj)
        {
            if (from == null || from.Deleted || !(obj is Mobile) )
                return;

            if (((Mobile)obj).Player)
            {

                Mobile m_from = from;
                Mobile master = null;
                ArrayList pets = new ArrayList();

                master = (Mobile)obj;

                foreach (Mobile m in World.Mobiles.Values)
                {
                    if (m is BaseCreature)
                    {
                        BaseCreature bc = (BaseCreature)m;

                        if ((bc.Controlled && bc.ControlMaster == master) || (bc.Summoned && bc.SummonMaster == master))
                            pets.Add(bc);
                    }
                }

                m_from.CloseGump(typeof(FollowersGump));
                m_from.SendGump(new FollowersGump(pets, master));
            }
            else if ((Mobile)obj is BaseCreature)
            {
                BaseCreature pet = (BaseCreature)obj;
                if (pet.Controlled && pet.ControlMaster != null)
                {
                    if (pet.ControlMaster == from)
                    {
                        from.SendMessage("Genius!");
                        return;
                    }
                    if (pet.ControlMaster.Map == Map.Internal)
                    {
                        from.SendMessage("The owner of this pet is currently not online.");
                        return;
                    }
                    from.MoveToWorld(pet.ControlMaster.Location , pet.ControlMaster.Map);
                    from.SendMessage("You have been moved to the creatures master: {0}.", pet.ControlMaster.Name);
                }
                else
                {
                    from.SendMessage("That creature is unowned.");
                }
            }
        }
Ejemplo n.º 19
0
		public override bool OnMoveOver( Mobile m )
		{
			if ( m.Player )
			{
				if ( Utility.RandomBool() )
					m.MoveToWorld( new Point3D( 6523, 71, -10 ), m.Map );
				
				Delete();
				return false;
			}
			else
				return true;
		}		
Ejemplo n.º 20
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( from.InRange( Location, 2 ) )
			{
				if ( !m_Locked && m_Active )
				{
					from.MoveToWorld( m_PointDest, m_MapDest );
					from.SendLocalizedMessage( 1072790 ); // The wall becomes transparent, and you push your way through it.
				}
				else
					from.Say( 502684 ); // This door appears to be locked.
			}
		}
 //public virtual bool AllowMaleWearer { get ;set; }
 public static bool GoEvent(Mobile caller)
 {
     if (SingletonEvent.Instance.IsEventRunning)
     {
         caller.MoveToWorld(SingletonEvent.Instance.CurrentEventLocation, SingletonEvent.Instance.CurrentEventMap);
         return true;
     }
     else
     {
         caller.SendMessage("Nao existe Evento em andamento.");
         return false;
     }
 }
Ejemplo n.º 22
0
        public void Target(IPoint3D p, Mobile defender)
        {
            Map map = defender.Map;

            if (this.Parent == null || !(this.Parent is Mobile))
                return;

            Mobile attacker = (Mobile)this.Parent;

            if (p is RecallRune)
            {
                RecallRune rune = (RecallRune)p;

                if (rune.Marked)
                {
                    defender.PublicOverheadMessage(Server.Network.MessageType.Regular, defender.SpeechHue, true, "*the earth trembles and time slows, a small rift appearing and drawing you both into its depth*");
                    attacker.SendMessage("You and your combatant have been sent to the rune\'s location.");

                    defender.MoveToWorld(rune.Target, rune.TargetMap);
                    attacker.MoveToWorld(rune.Target, rune.TargetMap);

                    Effects.PlaySound(defender, map, 510);
                    Effects.SendLocationParticles(defender, 0x37C4, 10, 10, 2023);
                    Effects.PlaySound(attacker, map, 510);
                    Effects.SendLocationParticles(attacker, 0x37C4, 10, 10, 2023);
                }
                else
                    attacker.SendMessage("That is not a valid target.");
            }
            else if (map == null || !map.CanSpawnMobile(p.X, p.Y, p.Z))
            {
                attacker.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if (Server.Spells.SpellHelper.CheckMulti(new Point3D(p), map))
            {
                attacker.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if (defender.BodyValue != 402 && defender.BodyValue != 403)
            {
                _lastUsed = DateTime.Now;

                Point3D to = new Point3D(p);

                defender.MoveToWorld(to, map);
                defender.ProcessDelta();

                Effects.PlaySound(defender, map, 510);
                Effects.SendLocationParticles(defender, 0x37C4, 10, 10, 2023);
                Effects.SendLocationParticles(EffectItem.Create(to, map, EffectItem.DefaultDuration), 0x37C4, 10, 10, 5023);
            }
        }
        public override void OnDoubleClick(Mobile from)
        {
            if (from != base.Owner || !base.IncludedEntities.Contains(from))
                from.SendMessage("You are not permitted to board this carpet.");

            if (!from.InRange(this.Location, 1))
                from.SendMessage("You must be closer if you wish to board this.");

            if ((from == base.Owner || base.IncludedEntities.Contains(from))
                && from.InRange(this.Location, 1))
            {
                from.MoveToWorld(this.Location, this.Map);
            }
        }
Ejemplo n.º 24
0
        public override void OnDoubleClick(Mobile from)
        {
            base.OnDoubleClick(from); 
          
            // if (IsChildOf(from.Backpack) && from.InRange(new Point3D(498, 2012, 2), Map.Trammel, 2))
            // if (IsChildOf(from.Backpack) && from (new Point3D(498, 2012, 2), Map.Trammel))
            // I was trying to make the ring only work from a certian location. Gave up and made it spawn where I wanted it to be used. :) 

                        if (from != null) 
            {
                from.MoveToWorld(new Point3D(5256, 1839, 0), Map.Trammel);   
                this.Delete(); 
            }
        }
        public override void OnDoubleClick( Mobile m )
        {
            if ( !m.InRange( this.GetWorldLocation(), 3 ) )
                return;
            if ( m_Controller.Enabled )
                return;

            if ( (m_Wanderer == null || !m_Wanderer.Alive) )
            {
                m_Wanderer = new WandererOfTheVoid();
                m_Wanderer.MoveToWorld( LeverPuzzleController.lr_Enter, Map.Malas );
                m_Wanderer.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1060002, "" ); // I am the guardian of...
                Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerCallback( CallBackMessage ) );
            }
        }
Ejemplo n.º 26
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( from.InRange( this, 2 ) )
			{
				Map map = Map;

				if ( map == Map.Trammel || map == Map.Felucca )
				{
					from.MoveToWorld( new Point3D( 5922, 2024, 0 ), map );
					PublicOverheadMessage( MessageType.Regular, 0x3B2, true, String.Format( "* {0} dives into the hole and disappears!*", from.Name ) ); 
				}
			}
			else
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
		}
Ejemplo n.º 27
0
		public override void OnDoubleClick( Mobile from )
		{
			if( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack to use it.
			}
			else if( Target == null || Target.Map == null || Target.Map == Map.Internal )
			{
				from.SendMessage( "The target map is unavailable." );
			}
			else
			{
				from.MoveToWorld( Target.Location, Target.Map );
			}
		}
Ejemplo n.º 28
0
		public override bool OnMoveInto( Mobile m, Direction d, Point3D newLocation, Point3D oldLocation )
		{
			if ( m is IUnjust && !Contains( oldLocation ) )
			{
				IUnjust uj = m as IUnjust;

				if ( uj.HomeMap == null || uj.HomeMap == Map.Internal )
					uj.HomeMap = Map.Felucca;

				m.MoveToWorld( uj.Home, uj.HomeMap );
				return false;
			}

			return true;
		}
Ejemplo n.º 29
0
		public MonsterNest() : base( 4962 )
		{
			m_NestSpawnType = null;
			Name = "Monster Nest";
			m_Spawn = new ArrayList();
			Weight = 0.1;
			Hue = 1818;
			HitsMax = 300;
			Hits = 300;
			RangeHome = 10;
			RespawnTime = TimeSpan.FromSeconds( 15.0 );
			new InternalTimer( this ).Start();
			new RegenTimer( this ).Start();
			Movable = false;
			m_Entity = new MonsterNestEntity( this );
			m_Entity.MoveToWorld( this.Location, this.Map );
		}
Ejemplo n.º 30
0
        public override bool OnMoveOver( Mobile m )
        {
            if ( m.IsPlayer )
            {
                BaseCreature.TeleportPets( m, m_Dest, Map.TerMur );
                m.MoveToWorld( m_Dest, Map.TerMur );

                m.PlaySound( 0x1FE );
                Effects.SendLocationParticles( m, 0x3728, 10, 10, 0x139F );

                // You have been returned to the antechamber of the tomb, directly in front of the Serpent's Breath.
                m.SendLocalizedMessage( 1112182 );

                return false;
            }

            return base.OnMoveOver( m );
        }
Ejemplo n.º 31
0
        public static int Damage(Mobile m, Mobile from, int damage, bool ignoreArmor, int phys, int contondant, int tranchant, int perforant, int magie, int chaos, int direct, bool keepAlive, bool archer, bool deathStrike)
        {
            if (m == null || m.Deleted || !m.Alive || damage <= 0)
            {
                return(0);
            }

            //if( phys == 0 && fire == 100 && cold == 0 && pois == 0 && nrgy == 0 )
            //	Mobiles.MeerMage.StopEffect( m, true );

            if (!Core.AOS)
            {
                m.Damage(damage, from);
                return(damage);
            }

            Fix(ref phys);
            Fix(ref contondant);
            Fix(ref tranchant);
            Fix(ref perforant);
            Fix(ref magie);
            Fix(ref chaos);
            Fix(ref direct);

            if (Core.ML && chaos > 0)
            {
                switch (Utility.Random(5))
                {
                case 0: phys += chaos; break;

                case 1: contondant += chaos; break;

                case 2: tranchant += chaos; break;

                case 3: perforant += chaos; break;

                case 4: magie += chaos; break;
                }
            }

            BaseQuiver quiver = null;

            if (archer && from != null)
            {
                quiver = from.FindItemOnLayer(Layer.Cloak) as BaseQuiver;
            }

            int totalDamage = damage;

            if (!ignoreArmor)
            {
                // Armor Ignore on OSI ignores all defenses, not just physical.
                int resPhys  = (int)m.PhysicalResistance;
                int resMagie = (int)m.MagicResistance;

                totalDamage  = damage * phys * (150 - resPhys);
                totalDamage += damage * magie * (150 - resMagie);

                totalDamage /= 10000;

                if (Core.ML)
                {
                    totalDamage += damage * direct / 100;

                    if (quiver != null)
                    {
                        totalDamage += totalDamage * quiver.DamageIncrease / 100;
                    }
                }

                if (totalDamage < 1)
                {
                    totalDamage = 1;
                }
            }
            else if (Core.ML && m is PlayerMobile && from is PlayerMobile)
            {
                if (quiver != null)
                {
                    damage += damage * quiver.DamageIncrease / 100;
                }

                if (!deathStrike)
                {
                    totalDamage = Math.Min(damage, 35); // Direct Damage cap of 35
                }
                else
                {
                    totalDamage = Math.Min(damage, 70); // Direct Damage cap of 70
                }
            }
            else
            {
                totalDamage = damage;

                if (Core.ML && quiver != null)
                {
                    totalDamage += totalDamage * quiver.DamageIncrease / 100;
                }
            }

            #region Dragon Barding
            if ((from == null || !from.Player) && m.Player && m.Mount is DragonMarais)
            {
                DragonMarais pet = m.Mount as DragonMarais;

                if (pet != null && pet.HasBarding)
                {
                    int percent  = (pet.BardingExceptional ? 20 : 10);
                    int absorbed = Scale(totalDamage, percent);

                    totalDamage   -= absorbed;
                    pet.BardingHP -= absorbed;

                    if (pet.BardingHP < 0)
                    {
                        pet.HasBarding = false;
                        pet.BardingHP  = 0;

                        m.SendLocalizedMessage(1053031); // Your dragon's barding has been destroyed!
                    }
                }
            }
            #endregion

            if (keepAlive && totalDamage > m.Hits)
            {
                totalDamage = m.Hits;
            }

            if (from != null && !from.Deleted && from.Alive)
            {
                //int reflectPhys = AosAttributes.GetValue(m, AosAttribute.ReflectPhysical);

                //if (reflectPhys > 5)
                //    reflectPhys = 5;

                //if (reflectPhys != 0)
                //{
                //    from.Damage(Scale((damage * phys * (100 - (ignoreArmor ? 0 : (int)m.PhysicalResistance))) / 10000, reflectPhys), m);
                //}
            }

            if (ExaltationMiracle.m_ExaltationTable.Contains(m))
            {
                ExaltationInfo info = (ExaltationInfo)ExaltationMiracle.m_ExaltationTable[m];

                if (info != null && info.Caster != null && info.Caster.Alive && !info.Caster.Deleted && info.Percent > 0)
                {
                    AOS.Damage(info.Caster, from, (int)(totalDamage * info.Percent), 0, 0, 0, 100, 0);
                    totalDamage = (int)(totalDamage * (1 - info.Percent));
                }

                ReligiousSpell.MiracleEffet(info.Caster, m, 8902, 10, 15, 5013, 0x7f9, 0, EffectLayer.CenterFeet);
                //Effects.SendTargetParticles(m,8902, 10, 15, 5013, 1437, 0, EffectLayer.CenterFeet); //ID, speed, dura, effect, hue, render, layer
                m.PlaySound(555);

                ReligiousSpell.MiracleEffet(info.Caster, info.Caster, 8902, 10, 15, 5013, 0x860, 0, EffectLayer.CenterFeet);
                //info.Effects.SendTargetParticles(Caster,8902, 10, 15, 5013, 1437, 0, EffectLayer.CenterFeet); //ID, speed, dura, effect, hue, render, layer
                info.Caster.PlaySound(555);
            }

            m.Damage(totalDamage, from);

            if (SauvegardeMiracle.m_SauvegardeTable.Contains(m))
            {
                Mobile target = (Mobile)SauvegardeMiracle.m_SauvegardeTable[m];

                if (target != null && m.Alive && m.Map == target.Map)
                {
                    m.MoveToWorld(target.Location, target.Map);
                    SauvegardeMiracle.StopTimer(m);

                    ReligiousSpell.MiracleEffet(m, m, 14138, 10, 15, 5013, 0, 0, EffectLayer.CenterFeet);
                    ReligiousSpell.MiracleEffet(m, target, 14138, 10, 15, 5013, 0, 0, EffectLayer.CenterFeet);

                    //Effects.SendTargetParticles(m,14170, 10, 15, 5013, 0, 0, EffectLayer.CenterFeet); //ID, speed, dura, effect, hue, render, layer
                    //Effects.SendTargetParticles(target,14170, 10, 15, 5013, 0, 0, EffectLayer.CenterFeet); //ID, speed, dura, effect, hue, render, layer
                    m.PlaySound(1923);
                }
            }

            return(totalDamage);
        }