Beispiel #1
0
        public override void OnGotMeleeAttack(Mobile attacker)
        {
            base.OnGotMeleeAttack(attacker);

            if (0.2 >= Utility.RandomDouble() && DoSpawnEvil)
            {
                SpawnEvil(attacker);
            }

            if (0.25 >= Utility.RandomDouble() && DoAreaDrainLife > 0)
            {
                DrainLife();
            }

            if (0.25 >= Utility.RandomDouble() && DoAreaDrainMana > 0)
            {
                DrainMana();
            }

            if (0.25 >= Utility.RandomDouble() && DoAreaDrainStam > 0)
            {
                DrainStam();
            }

            if (0.33 >= Utility.RandomDouble() && attacker is BaseCreature && DoProvoPets)
            {
                BaseCreature c = (BaseCreature)attacker;

                if (c.Controlled && c.ControlMaster != null)
                {
                    c.ControlTarget = c.ControlMaster;
                    c.ControlOrder  = OrderType.Attack;
                    c.Combatant     = c.ControlMaster;
                    ApplySkillLoss(c.ControlMaster);
                }
            }

            if (0.1 >= Utility.RandomDouble() && DoEarthquake)
            {
                Earthquake();
            }

            if (0.1 >= Utility.RandomDouble() && DoSpawnMobile)
            {
                BaseCreature spawn = new DecayingSpawn(this);

                spawn.BodyValue   = this.BodyValue;
                spawn.Hue         = this.Hue;
                spawn.BaseSoundID = this.BaseSoundID;
                spawn.Team        = this.Team;
                spawn.MoveToWorld(attacker.Location, attacker.Map);
                spawn.Combatant = attacker;
                spawn.Say("I am here my master!");
            }
        }
Beispiel #2
0
        public override void OnDamage(int amount, Mobile from, bool willKill)           // Taken from Questboss.cs and m_ability removed
        {
            if (from != null && 0.05 >= Utility.RandomDouble())
            {
                BaseCreature spawn = new DecayingSpawn(this);

                spawn.BodyValue   = this.BodyValue;
                spawn.Hue         = this.Hue;
                spawn.BaseSoundID = this.BaseSoundID;
                spawn.Team        = this.Team;
                spawn.MoveToWorld(from.Location, from.Map);
                spawn.Combatant = from;
            }
            base.OnDamage(amount, from, willKill);
        }
		public override void OnDamage( int amount, Mobile from, bool willKill ) // Taken from Questboss.cs and m_ability removed
		{
			if ( from != null && 0.05 >= Utility.RandomDouble() )
			{
				BaseCreature spawn = new DecayingSpawn ( this );

				spawn.BodyValue = this.BodyValue;
				spawn.Hue = this.Hue;
				spawn.BaseSoundID = this.BaseSoundID;
				spawn.Team = this.Team;
				spawn.MoveToWorld( from.Location, from.Map );
				spawn.Combatant = from;
			}
			base.OnDamage(amount, from, willKill);
		}
Beispiel #4
0
        public override void OnDamagedBySpell(Mobile caster)
        {
            base.OnDamagedBySpell(caster);

            if (0.25 >= Utility.RandomDouble() && DoTeleport)
            {
                Teleport(caster);
            }

            if (caster != this && DoSpawnWyvern)
            {
                BaseCreature spawn = new DecayingWyvern(this);

                spawn.Team = this.Team;
                spawn.MoveToWorld(caster.Location, caster.Map);
                spawn.Combatant = caster;

                Say("*Borkarth summons a Wyvern to help him!*");
            }

            if (0.1 >= Utility.RandomDouble() && DoSpawnMobile)
            {
                BaseCreature spawn = new DecayingSpawn(this);

                spawn.BodyValue   = this.BodyValue;
                spawn.Hue         = this.Hue;
                spawn.BaseSoundID = this.BaseSoundID;
                spawn.Team        = this.Team;
                spawn.MoveToWorld(caster.Location, caster.Map);
                spawn.Combatant = caster;
                spawn.Say("I am here my master!");
            }

            if (0.05 >= Utility.RandomDouble() && CanCastReflect > 0)
            {
                this.Say("In Jux Sanct");
                this.FixedParticles(0x375A, 10, 15, 5037, EffectLayer.Waist);
                this.PlaySound(0x1E9);
                this.MagicDamageAbsorb = CanCastReflect;
            }

            if (0.1 >= Utility.RandomDouble() && ThrowAtomicBomb)
            {
                Effects.SendMovingEffect(this, caster, 0xF0D & 0x3FFF, 7, 0, false, false, 1161, 0);
                Effects.SendMovingEffect(this, caster, 0xF0D & 0x3FFF, 7, 0, false, false, 349, 0);
                Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback(Bomb), caster);
            }
        }
Beispiel #5
0
        public override void OnDamage(int amount, Mobile from, bool willKill)
        {
            if (from != null && 0.1 >= Utility.RandomDouble())
            {
                BaseCreature spawn = new DecayingSpawn(this);

                spawn.BodyValue   = this.BodyValue;
                spawn.Hue         = this.Hue;
                spawn.BaseSoundID = this.BaseSoundID;
                spawn.Team        = this.Team;
                spawn.MoveToWorld(from.Location, from.Map);
                spawn.Combatant = from;
                spawn.Say("I am here my master!");
            }
            base.OnDamage(amount, from, willKill);
        }
Beispiel #6
0
        }                                                              //not on dfi

        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (0.80 >= Utility.RandomDouble() && DoPolymorphOnGaveMelee > 0)
            {
                Polymorph(defender);
            }

            if (0.2 >= Utility.RandomDouble() && DoSpawnEvil)
            {
                SpawnEvil(defender);
            }

            if (0.1 >= Utility.RandomDouble() && DoEarthquake)
            {
                Earthquake();
            }

            if (0.1 >= Utility.RandomDouble() && DoSkillLoss)
            {
                ApplySkillLoss(defender);
            }

            if (0.25 >= Utility.RandomDouble() && DoAreaDrainLife > 0)
            {
                DrainLife();
            }

            if (0.25 >= Utility.RandomDouble() && DoAreaDrainMana > 0)
            {
                DrainMana();
            }

            if (0.25 >= Utility.RandomDouble() && DoAreaDrainStam > 0)
            {
                DrainStam();
            }

            if (0.33 >= Utility.RandomDouble() && defender is BaseCreature && DoProvoPets)
            {
                BaseCreature c = (BaseCreature)defender;

                if (c.Controlled && c.ControlMaster != null)
                {
                    c.ControlTarget = c.ControlMaster;
                    c.ControlOrder  = OrderType.Attack;
                    c.Combatant     = c.ControlMaster;
                    ApplySkillLoss(c.ControlMaster);
                }
            }

            if (0.05 >= Utility.RandomDouble() && DoSpawnMobile)
            {
                BaseCreature spawn = new DecayingSpawn(this);

                spawn.BodyValue   = this.BodyValue;
                spawn.Hue         = this.Hue;
                spawn.BaseSoundID = this.BaseSoundID;
                spawn.Team        = this.Team;
                spawn.MoveToWorld(defender.Location, defender.Map);
                spawn.Combatant = defender;
                spawn.Say("I am here my master!");
            }

            if (0.25 >= Utility.RandomDouble() && DoDisarmPlayer && defender is PlayerMobile)
            {
                Item toDisarm = defender.FindItemOnLayer(Layer.OneHanded);

                if (toDisarm == null || !toDisarm.Movable)
                {
                    toDisarm = defender.FindItemOnLayer(Layer.TwoHanded);
                }

                Container pack = defender.Backpack;

                if (pack == null)
                {
                    return;
                }

                if (toDisarm != null && toDisarm.Movable)
                {
                    pack.DropItem(toDisarm);
                    defender.PlaySound(0x3B9);
                    defender.SendMessage("The intensity of the attack disarms you!");
                }
            }

            if (0.25 >= Utility.RandomDouble() && DoStunPunch > 0)
            {
                defender.Freeze(TimeSpan.FromSeconds(DoStunPunch));
                defender.SendMessage("You have been stunned!");
            }
        }
		public override void OnDamage(int amount, Mobile from, bool willKill)
		{
			if (from != null && 0.1 >= Utility.RandomDouble() && m_SpawnMobile)
			{
				BaseCreature spawn = new DecayingSpawn(this);

				spawn.BodyValue = this.BodyValue;
				spawn.Hue = this.Hue;
				spawn.BaseSoundID = this.BaseSoundID;
				spawn.Team = this.Team;
				spawn.MoveToWorld(from.Location, from.Map);
				spawn.Combatant = from;
				spawn.Say("I am here my master!");
			}
			base.OnDamage(amount, from, willKill);
		}
		public override void OnDamagedBySpell(Mobile caster)
		{
			base.OnDamagedBySpell(caster);

			if (DoTeleport && 0.25 >= Utility.RandomDouble())
				Teleport(caster);

			if (DoSpawnMobile && 0.1 >= Utility.RandomDouble())
			{
				BaseCreature spawn = new DecayingSpawn(this);

				spawn.BodyValue = this.BodyValue;
				spawn.Hue = this.Hue;
				spawn.BaseSoundID = this.BaseSoundID;
				spawn.Team = this.Team;
				spawn.MoveToWorld(caster.Location, caster.Map);
				spawn.Combatant = caster;
				spawn.Say("I am here my master!");
			}

            		if (CanCastReflect > 0 && 0.05 >= Utility.RandomDouble())
			{
				this.Say("In Jux Sanct");
				this.FixedParticles( 0x375A, 10, 15, 5037, EffectLayer.Waist );
				this.PlaySound( 0x1E9 );
				this.MagicDamageAbsorb = CanCastReflect;
			}

			if ( ThrowAtomicBomb && 0.1 >=Utility.RandomDouble() )
			{
				Effects.SendMovingEffect( this, caster, 0xF0D & 0x3FFF, 7, 0, false, false, 1161, 0 );
				Effects.SendMovingEffect( this, caster, 0xF0D & 0x3FFF, 7, 0, false, false, 349, 0 );
				Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( Bomb ), caster );
			}
		}
		public override void OnGotMeleeAttack(Mobile attacker)
		{
			base.OnGotMeleeAttack(attacker);

			if ( DoSpawnEvil && 0.2 >= Utility.RandomDouble() )
                		SpawnEvil( attacker );

            		if (DoAreaDrainLife > 0 && 0.25 >= Utility.RandomDouble())
				DrainLife();

            		if (DoAreaDrainMana > 0 && 0.25 >= Utility.RandomDouble())
				DrainMana();

            		if (DoAreaDrainStam > 0 && 0.25 >= Utility.RandomDouble())
				DrainStam();

			if (DoProvoPets && 0.33 >= Utility.RandomDouble() && attacker is BaseCreature)
			{
				BaseCreature c = (BaseCreature)attacker;

				if (c.Controlled && c.ControlMaster != null)
				{
					c.ControlTarget = c.ControlMaster;
					c.ControlOrder = OrderType.Attack;
					c.Combatant = c.ControlMaster;
				}
			}

			if (DoEarthquake && 0.1 >= Utility.RandomDouble() )
				Earthquake();

			if (DoSpawnMobile && 0.1 >= Utility.RandomDouble())
			{
				BaseCreature spawn = new DecayingSpawn(this);

				spawn.BodyValue = this.BodyValue;
				spawn.Hue = this.Hue;
				spawn.BaseSoundID = this.BaseSoundID;
				spawn.Team = this.Team;
				spawn.MoveToWorld(attacker.Location, attacker.Map);
				spawn.Combatant = attacker;
				spawn.Say("I am here my master!");
			}
		}
		public override void OnGaveMeleeAttack(Mobile defender)
		{
			base.OnGaveMeleeAttack(defender);

			if (DoPolymorphOnGaveMelee > 0 && 0.80 >= Utility.RandomDouble())
				Polymorph(defender);

			if ( DoSpawnEvil && 0.2 >= Utility.RandomDouble() )
                		SpawnEvil( defender );

			if ( DoEarthquake && 0.1 >= Utility.RandomDouble() )
				Earthquake();

			if ( DoSkillLoss && 0.1 >= Utility.RandomDouble())
				ApplySkillLoss( defender );

            		if (DoAreaDrainLife > 0 && 0.25 >= Utility.RandomDouble())
				DrainLife();

            		if (DoAreaDrainMana > 0 && 0.25 >= Utility.RandomDouble())
				DrainMana();

            		if (DoAreaDrainStam > 0 && 0.25 >= Utility.RandomDouble())
				DrainStam();

			if (DoProvoPets && 0.33 >= Utility.RandomDouble() && defender is BaseCreature)
			{
				BaseCreature c = (BaseCreature)defender;

				if (c.Controlled && c.ControlMaster != null)
				{
					c.ControlTarget = c.ControlMaster;
					c.ControlOrder = OrderType.Attack;
					c.Combatant = c.ControlMaster;
				}
			}

			if (DoSpawnMobile && 0.05 >= Utility.RandomDouble())
			{
				BaseCreature spawn = new DecayingSpawn(this);

				spawn.BodyValue = this.BodyValue;
				spawn.Hue = this.Hue;
				spawn.BaseSoundID = this.BaseSoundID;
				spawn.Team = this.Team;
				spawn.MoveToWorld(defender.Location, defender.Map);
				spawn.Combatant = defender;
				spawn.Say("I am here my master!");
			}

            		if (DoDisarmPlayer && 0.25 >= Utility.RandomDouble() && defender is PlayerMobile)
			{
				Item toDisarm = defender.FindItemOnLayer( Layer.OneHanded );

				if ( toDisarm == null || !toDisarm.Movable )
				    toDisarm = defender.FindItemOnLayer( Layer.TwoHanded );

				Container pack = defender.Backpack;

                		if (toDisarm != null && toDisarm.Movable && defender.Backpack != null)
                		{
                    			pack.DropItem(toDisarm);
                    			defender.SendMessage("The intensity of the attack disarms you!");
                		}
			}

            			if (DoStunPunch > 0 && 0.25 >= Utility.RandomDouble())
				{
					defender.Freeze( TimeSpan.FromSeconds( DoStunPunch ) );
					defender.SendMessage( "You have been stunned!" );
				}
		}