Exemplo n.º 1
0
        public override void DoEffects(BaseCreature creature, Mobile defender, ref int damage)
        {
            if (_Table == null)
            {
                _Table = new Dictionary <Mobile, ExpireTimer>();
            }

            ExpireTimer timer = null;

            if (_Table.ContainsKey(defender))
            {
                timer = _Table[defender];
            }

            if (timer != null)
            {
                timer.DoExpire();
                defender.SendLocalizedMessage(1070837); // The creature lands another blow in your weakened state.
            }
            else
            {
                defender.SendLocalizedMessage(1070836); // The blow from the creature's claws has made you more susceptible to physical attacks.
            }
            int effect = -(defender.PhysicalResistance * 15 / 100);

            ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);

            defender.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
            defender.AddResistanceMod(mod);

            timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
            timer.Start();

            _Table[defender] = timer;
        }
Exemplo n.º 2
0
        // TODO: Put this attack shared with Hiryu and Lesser Hiryu in one place
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (0.1 > Utility.RandomDouble())
            {
                ExpireTimer timer = (ExpireTimer)m_Table[defender];

                if (timer != null)
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage(1070837);                       // The creature lands another blow in your weakened state.
                }
                else
                {
                    defender.SendLocalizedMessage(1070836);                       // The blow from the creature's claws has made you more susceptible to physical attacks.
                }
                int effect = -(defender.PhysicalResistance * 15 / 100);

                ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);

                defender.FixedEffect(0x37B9, 10, 5);
                defender.AddResistanceMod(mod);

                timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
                timer.Start();
                m_Table[defender] = timer;
            }
        }
Exemplo n.º 3
0
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (0.1 > Utility.RandomDouble())
            {
                /* Grasping Claw
                 * Start cliloc: 1070836
                 * Effect: Physical resistance -15% for 5 seconds
                 * End cliloc: 1070838
                 * Effect: Type: "3" - From: "0x57D4F5B" (player) - To: "0x0" - ItemId: "0x37B9" - ItemIdName: "glow" - FromLocation: "(1149 808, 32)" - ToLocation: "(1149 808, 32)" - Speed: "10" - Duration: "5" - FixedDirection: "True" - Explode: "False"
                 */
                ExpireTimer timer = (ExpireTimer)m_Table[defender];

                if (timer != null)
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage(1070837); // The creature lands another blow in your weakened state.
                }
                else
                {
                    defender.SendLocalizedMessage(1070836); // The blow from the creature's claws has made you more susceptible to physical attacks.
                }
                int effect = -(defender.PhysicalResistance * 15 / 100);

                ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);

                defender.FixedEffect(0x37B9, 10, 5);
                defender.AddResistanceMod(mod);

                timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
                timer.Start();
                m_Table[defender] = timer;
            }
        }
Exemplo n.º 4
0
        public override void DoEffects(BaseCreature creature, Mobile defender, ref int damage)
        {
            ExpireTimer timer = null;

            if (_Table == null)
            {
                _Table = new Dictionary <Mobile, ExpireTimer>();
            }

            if (_Table.ContainsKey(defender))
            {
                timer = _Table[defender];
            }

            if (timer != null)
            {
                timer.DoExpire();
                defender.SendLocalizedMessage(1070828); // The creature continues to hinder your energy resistance!
            }
            else
            {
                defender.SendLocalizedMessage(1070827); // The creature's attack has made you more susceptible to energy attacks!
            }
            int effect = -(defender.EnergyResistance / 2);

            ResistanceMod mod = new ResistanceMod(ResistanceType.Energy, effect);

            defender.FixedEffect(0x37B9, 10, 5);
            defender.AddResistanceMod(mod);

            timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(10.0));
            timer.Start();
            _Table[defender] = timer;
        }
Exemplo n.º 5
0
        public override void DoEffects(BaseCreature creature, Mobile defender, ref int damage)
        {
            ExpireTimer timer = null;

            if (_Table == null)
            {
                _Table = new Dictionary <Mobile, ExpireTimer>();
            }

            if (_Table.ContainsKey(defender))
            {
                timer = _Table[defender];
            }

            if (timer != null)
            {
                timer.DoExpire();
                defender.SendLocalizedMessage(1070851); // The creature lands another blow in your weakened state.
            }
            else
            {
                defender.SendLocalizedMessage(1070850); // The creature's flurry of twigs has made you more susceptible to physical attacks!
            }
            int effect = -(defender.PhysicalResistance * 15 / 100);

            ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);

            defender.FixedEffect(0x37B9, 10, 5);
            defender.AddResistanceMod(mod);

            timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(10.0));
            timer.Start();
            _Table[defender] = timer;
        }
Exemplo n.º 6
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!Validate(attacker) || !CheckMana(attacker, true))
            {
                return;
            }

            if (attacker.Map == null || attacker.Map == Map.Internal)
            {
                return;
            }

            ExpireTimer timer = null;

            if (m_Table.ContainsKey(defender))
            {
                timer = m_Table[defender];
            }

            if (timer != null)
            {
                timer.DoExpire();
                defender.SendLocalizedMessage(1070831); // The freezing wind continues to blow!
            }
            else
            {
                defender.SendLocalizedMessage(1070832); // An icy wind surrounds you, freezing your lungs as you breathe!
            }
            timer = new ExpireTimer(defender, attacker);
            timer.Start();
            m_Table[defender] = timer;
        }
Exemplo n.º 7
0
        public override void DoEffects(BaseCreature creature, Mobile defender, ref int damage)
        {
            if (_Table == null)
            {
                _Table = new Dictionary <Mobile, ExpireTimer>();
            }

            ExpireTimer timer = null;

            if (_Table.ContainsKey(defender))
            {
                timer = _Table[defender];
            }

            if (timer != null)
            {
                timer.DoExpire();
                defender.SendLocalizedMessage(1070825); // The creature continues to rage!
            }
            else
            {
                defender.SendLocalizedMessage(1070826); // The creature goes into a rage, inflicting heavy damage!
            }
            timer = new ExpireTimer(defender, creature);
            timer.Start();
            _Table[defender] = timer;
        }
Exemplo n.º 8
0
        public void Target(Mobile m)
        {
            if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                /* Transmogrifies the flesh of the target creature or player to resemble rotted corpse flesh,
                 * making them more vulnerable to Fire and Poison damage,
                 * but increasing their resistance to Physical and Cold damage.
                 *
                 * The effect lasts for ((Spirit Speak skill level - target's Resist Magic skill level) / 25 ) + 40 seconds.
                 *
                 * NOTE: Algorithm above is fixed point, should be:
                 * ((ss-mr)/2.5) + 40
                 *
                 * NOTE: Resistance is not checked if targeting yourself
                 */

                ExpireTimer timer = (ExpireTimer)m_Table[m];

                if (timer != null)
                {
                    timer.DoExpire();
                }
                else
                {
                    m.SendLocalizedMessage(1061689);                       // Your skin turns dry and corpselike.
                }
                m.FixedParticles(0x373A, 1, 15, 9913, 67, 7, EffectLayer.Head);
                m.PlaySound(0x1BB);

                double ss = GetDamageSkill(Caster);
                double mr = (Caster == m ? 0.0 : GetResistSkill(m));
                m.CheckSkill(SkillName.MagicResist, 0.0, 120.0);                        //Skill check for gain

                TimeSpan duration = TimeSpan.FromSeconds(((ss - mr) / 2.5) + 40.0);

                ResistanceMod[] mods = new ResistanceMod[4]
                {
                    new ResistanceMod(ResistanceType.Fire, -15),
                    new ResistanceMod(ResistanceType.Poison, -15),
                    new ResistanceMod(ResistanceType.Cold, +10),
                    new ResistanceMod(ResistanceType.Physical, +10)
                };

                timer = new ExpireTimer(m, mods, duration);
                timer.Start();

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.CorpseSkin, 1075663, duration, m));

                m_Table[m] = timer;

                for (int i = 0; i < mods.Length; ++i)
                {
                    m.AddResistanceMod(mods[i]);
                }
            }

            FinishSequence();
        }
Exemplo n.º 9
0
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (0.1 > Utility.RandomDouble())
            {
                /* Blood Bath
                 * Start cliloc 1070826
                 * Sound: 0x52B
                 * 2-3 blood spots
                 * Damage: 2 hps per second for 5 seconds
                 * End cliloc: 1070824
                 */

                ExpireTimer timer = (ExpireTimer)m_Table[defender];

                if (timer != null)
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage(1070825);                       // The creature continues to rage!
                }
                else
                {
                    defender.SendLocalizedMessage(1070826);                       // The creature goes into a rage, inflicting heavy damage!
                }
                timer = new ExpireTimer(defender, this);
                timer.Start();
                m_Table[defender] = timer;
            }
        }
Exemplo n.º 10
0
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            // TODO: Taken from "Lady of the snow". Check real ability at OSI.

            if (0.1 > Utility.RandomDouble())
            {
                ExpireTimer timer = (ExpireTimer)m_Table[defender];

                if (timer != null)
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage(1070831);                       // The freezing wind continues to blow!
                }
                else
                {
                    defender.SendLocalizedMessage(1070832);                       // An icy wind surrounds you, freezing your lungs as you breathe!
                }
                timer = new ExpireTimer(defender, this);
                timer.Start();

                m_Table[defender] = timer;
            }
        }
Exemplo n.º 11
0
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (0.1 > Utility.RandomDouble())
            {
                ExpireTimer timer = (ExpireTimer)m_Table[defender];

                if (timer != null)
                {
                    timer.DoExpire();
                    defender.SendMessage("The spiders fangs pour more venom into your already weakend body.");
                }
                else
                {
                    defender.SendMessage("The spider sinks it's fangs into your flesh, releasing it's toxic venom!");
                }

                int effect = -(defender.PhysicalResistance * 15 / 100);

                ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);

                defender.FixedEffect(0x37B9, 10, 5);
                defender.AddResistanceMod(mod);

                timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
                timer.Start();
                m_Table[defender] = timer;
            }
        }
Exemplo n.º 12
0
        // TODO: Snowball

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

            if (0.1 > Utility.RandomDouble())
            {
                /* Cold Wind
                 * Graphics: Message - Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x37B9" ItemIdName: "glow" FromLocation: "(928 164, 34)" ToLocation: "(928 164, 34)" Speed: "10" Duration: "5" FixedDirection: "True" Explode: "False"
                 * Start cliloc: 1070832
                 * Damage: 1hp per second for 5 seconds
                 * End cliloc: 1070830
                 * Reset cliloc: 1070831
                 */

                ExpireTimer timer = (ExpireTimer)m_Table[defender];

                if (timer != null)
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage(1070831);                       // The freezing wind continues to blow!
                }
                else
                {
                    defender.SendLocalizedMessage(1070832);                       // An icy wind surrounds you, freezing your lungs as you breathe!
                }
                timer = new ExpireTimer(defender, this);
                timer.Start();
                m_Table[defender] = timer;
            }
        }
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (0.15 > Utility.RandomDouble())
            {
                /* Blood Bath
                 * Start cliloc 1070826
                 * Sound: 0x52B
                 * 2-3 blood spots
                 * Damage: 1 hps per second for 600 seconds
                 * End cliloc: 1070824
                 */

                ExpireTimer timer = (ExpireTimer)m_Table[defender];

                if (timer != null)
                {
                    timer.DoExpire();
                    defender.SendMessage("The mound of maggot continues inflicting bleeding damage!");
                }
                else
                {
                    defender.SendMessage("The mound of maggot goes into a rage, inflicting continuous bleeding damage!");
                }

                timer = new ExpireTimer(defender, this);
                timer.Start();
                m_Table[defender] = timer;
            }
        }
Exemplo n.º 14
0
        public override void DoEffects(BaseCreature creature, Mobile defender, ref int damage)
        {
            if (_Table == null)
            {
                _Table = new Dictionary <Mobile, ExpireTimer>();
            }

            ExpireTimer timer = null;

            if (_Table.ContainsKey(defender))
            {
                timer = _Table[defender];
            }

            if (timer != null)
            {
                timer.DoExpire();
            }

            defender.SendLocalizedMessage(1070833); // The creature fans you with fire, reducing your resistance to fire attacks.

            int effect = -(defender.FireResistance / 4);

            ResistanceMod mod = new ResistanceMod(ResistanceType.Fire, effect);

            Effects.SendLocationParticles(defender, 0x3709, 10, 30, 5052);
            Effects.PlaySound(defender.Location, defender.Map, 0x208);

            timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
            timer.Start();

            _Table[defender] = timer;
        }
Exemplo n.º 15
0
        public void Target(Mobile m)
        {
            if (this.Caster == m || !(m is PlayerMobile || m is BaseCreature)) // only PlayerMobile and BaseCreature implement blood oath checking
            {
                this.Caster.SendLocalizedMessage(1080194);                     // You can't curse that.
            }
            else if (m_PlagueTable.Contains(this.Caster))
            {
                this.Caster.SendLocalizedMessage(1061607); // You are already bonded in a Blood Oath.
            }
            else if (m_PlagueTable.Contains(m))
            {
                this.Caster.SendLocalizedMessage(1080195); // That player is already bonded in a Blood Oath. // That creature is already bonded in a Blood Oath.
            }
            else if (this.CheckHSequence(m))
            {
                SpellHelper.Turn(this.Caster, m);

                /* Temporarily creates a dark pact between the caster and the target.
                 * Any damage dealt by the target to the caster is increased, but the target receives the same amount of damage.
                 * The effect lasts for ((Spirit Speak skill level - target's Resist Magic skill level) / 80 ) + 8 seconds.
                 *
                 * NOTE: The above algorithm must be fixed point, it should be:
                 * ((ss-rm)/8)+8
                 */

                ExpireTimer timer = (ExpireTimer)m_Table[m];
                if (timer != null)
                {
                    timer.DoExpire();
                }

                m_PlagueTable[this.Caster] = this.Caster;
                m_PlagueTable[m]           = this.Caster;

                this.Caster.PlaySound(0x659);

                this.Caster.FixedParticles(0x375A, 1, 17, 9919, 1161, 7, EffectLayer.Waist);
                this.Caster.FixedParticles(0x3728, 1, 13, 9502, 1161, 7, (EffectLayer)255);

                m.FixedParticles(0x375A, 1, 17, 9919, 1161, 7, EffectLayer.Waist);
                m.FixedParticles(0x3728, 1, 13, 9502, 1161, 7, (EffectLayer)255);

                TimeSpan duration = TimeSpan.FromSeconds(((this.GetDamageSkill(this.Caster) - this.GetResistSkill(m)) / 8) + 8);
                m.CheckSkill(SkillName.MagicResist, 0.0, 120.0);        //Skill check for gain

                timer = new ExpireTimer(this.Caster, m, duration);
                timer.Start();

                BuffInfo.AddBuff(this.Caster, new BuffInfo(BuffIcon.SpellPlague, 1075659, duration, this.Caster, m.Name.ToString()));
                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.SpellPlague, 1075661, duration, m, this.Caster.Name.ToString()));

                m_Table[m] = timer;
            }

            this.FinishSequence();
        }
Exemplo n.º 16
0
        public static bool RemoveCurse(Mobile m)
        {
            ExpireTimer t = (ExpireTimer)m_Table[m];

            if (t == null)
                return false;

            t.DoExpire();
            return true;
        }
Exemplo n.º 17
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }

            if (m_Table.Contains(m))
            {
                Caster.LocalOverheadMessage(MessageType.Regular, 0x481, false, "That target is under the effect of that spell already.");
            }

            if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                ExpireTimer timer = (ExpireTimer)m_Table[m];

                if (timer != null)
                {
                    timer.DoExpire();
                }
                else
                {
                    m.SendMessage("You feel hatred shielding you from physical harm.");
                }
                m.PlaySound(0x5C0);
                m.FixedParticles(0x376A, 1, 29, 9961, 1152, 0, EffectLayer.Waist);

                TimeSpan duration = TimeSpan.FromSeconds(GetKarmaPower(Caster));

                ResistanceMod[] mods = new ResistanceMod[4]
                {
                    new ResistanceMod(ResistanceType.Fire, +0),
                    new ResistanceMod(ResistanceType.Poison, +0),
                    new ResistanceMod(ResistanceType.Cold, +0),
                    new ResistanceMod(ResistanceType.Physical, +100)
                };

                timer = new ExpireTimer(m, mods, duration);
                timer.Start();

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.ReactiveArmor, 1044120, 1044118, duration, m));

                m_Table[m] = timer;

                for (int i = 0; i < mods.Length; ++i)
                {
                    m.AddResistanceMod(mods[i]);
                }
            }

            FinishSequence();
        }
Exemplo n.º 18
0
		public static bool RemoveCurse( Mobile m )
		{
			ExpireTimer t = (ExpireTimer)m_Table[m];

			if ( t == null )
				return false;

			m.SendMessage( "The shield around you dissipates..." );
			m.PlaySound( 488 );
			t.DoExpire();
			return true;
		}
Exemplo n.º 19
0
        public static bool RemoveCurse(Mobile m)
        {
            ExpireTimer t = (ExpireTimer)m_Table[m];

            if (t == null)
            {
                return(false);
            }

            t.DoExpire();
            return(true);
        }
Exemplo n.º 20
0
        public static bool RemoveCurse(Mobile m)
        {
            ExpireTimer t = (ExpireTimer)m_Table[m];

            if (t == null)
            {
                return(false);
            }

            m.SendLocalizedMessage(1061688);               // Your skin returns to normal.
            t.DoExpire();
            return(true);
        }
Exemplo n.º 21
0
        public void Target(Mobile m)
        {
            if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                ExpireTimer timer = (ExpireTimer)m_Table[m];

                if (timer != null)
                {
                    timer.DoExpire();
                }
                else
                {
                    m.SendLocalizedMessage(1061689); // Your skin turns dry and corpselike.
                }
                Effects.SendTargetParticles(m, 0x373A, 1, 15, 9913, 67, 7, EffectLayer.Head);
                m.PlaySound(0x1BB);

                double ss = Caster.Skills[DamageSkill].Value;
                double mr = 0;

                double value = Caster.Skills[DamageSkill].Value / 2.5;

                value = SpellHelper.AdjustValue(Caster, value);

                if (value > 40)
                {
                    value = 40;
                }

                double duration = ((ss - mr) / 2.5) + 30.0;

                duration = SpellHelper.AdjustValue(Caster, duration);

                if (duration > 90)
                {
                    duration = 90;
                }

                m.VirtualArmorMod -= (int)value;

                timer = new ExpireTimer(m, (int)value, TimeSpan.FromSeconds(duration));
                timer.Start();

                m_Table[m] = timer;
            }

            FinishSequence();
        }
Exemplo n.º 22
0
        public static bool RemoveCurse(Mobile m)
        {
            ExpireTimer t = (ExpireTimer)m_Table[m];

            if (t == null)
            {
                return(false);
            }

            m.SendMessage("The effects of the pirate curse have been removed");
            t.DoExpire();

            return(true);
        }
Exemplo n.º 23
0
        public static void CursePlayer(Mobile m)
        {
            if (IsCursed(m))
            {
                return;
            }

            if (!UnEquipPlayer(m))
            {
                return;
            }

            ExpireTimer timer = (ExpireTimer)m_Table[m];

            if (timer != null)
            {
                timer.DoExpire();
            }
            else
            {
                m.SendMessage("You feel yourself transform into a cursed pirate");
            }

            Effects.SendLocationEffect(m.Location, m.Map, 0x3709, 28, 10, 0x1D3, 5);

            TimeSpan duration = TimeSpan.FromSeconds(240.0);

            ResistanceMod[] mods = new ResistanceMod[4]
            {
                new ResistanceMod(ResistanceType.Fire, -10),
                new ResistanceMod(ResistanceType.Poison, -10),
                new ResistanceMod(ResistanceType.Cold, +10),
                new ResistanceMod(ResistanceType.Physical, +10)
            };

            timer = new ExpireTimer(m, mods, duration);
            timer.Start();

            m_Table[m] = timer;

            for (int i = 0; i < mods.Length; ++i)
            {
                m.AddResistanceMod(mods[i]);
            }

            m.ApplyPoison(m, Poison.Greater);

            m.Criminal = true;
        }
Exemplo n.º 24
0
        public void DoBurn(Mobile from, int duration)
        {
            ExpireTimer timer = (ExpireTimer)m_Table[from];

            if (timer != null)
            {
                timer.DoExpire();
            }

            Effects.SendTargetEffect(from, 0x19AB, 12);
            from.PlaySound(0x5CA);

            timer = new ExpireTimer(from, this, duration);
            timer.Start();
            m_Table[from] = timer;
        }
Exemplo n.º 25
0
        public void DoFreeze(Mobile from, int duration)
        {
            ExpireTimer timer = (ExpireTimer)m_Table[from];

            if (timer != null)
            {
                timer.DoExpire();
                from.SendLocalizedMessage(1070831); // The freezing wind continues to blow!
            }
            else
            {
                from.SendLocalizedMessage(1070832); // An icy wind surrounds you, freezing your lungs as you breathe!
            }
            timer = new ExpireTimer(from, this, duration);
            timer.Start();
            m_Table[from] = timer;
        }
Exemplo n.º 26
0
        public void ApplyEffects(Mobile m, double strength = 1.0)
        {
            /* Temporarily creates a dark pact between the caster and the target.
             * Any damage dealt by the target to the caster is increased, but the target receives the same amount of damage.
             * The effect lasts for ((Spirit Speak skill level - target's Resist Magic skill level) / 80 ) + 8 seconds.
             *
             * NOTE: The above algorithm must be fixed point, it should be:
             * ((ss-rm)/8)+8
             */

            ExpireTimer timer = (ExpireTimer)m_Table[m];

            if (timer != null)
            {
                timer.DoExpire();
            }

            m_OathTable[this.Caster] = this.Caster;
            m_OathTable[m]           = this.Caster;

            if (m.Spell != null)
            {
                m.Spell.OnCasterHurt();
            }

            this.Caster.PlaySound(0x175);

            this.Caster.FixedParticles(0x375A, 1, 17, 9919, 33, 7, EffectLayer.Waist);
            this.Caster.FixedParticles(0x3728, 1, 13, 9502, 33, 7, (EffectLayer)255);

            m.FixedParticles(0x375A, 1, 17, 9919, 33, 7, EffectLayer.Waist);
            m.FixedParticles(0x3728, 1, 13, 9502, 33, 7, (EffectLayer)255);

            TimeSpan duration = TimeSpan.FromSeconds((((GetDamageSkill(Caster) - GetResistSkill(m)) / 8) + 8) * strength);

            m.CheckSkill(SkillName.MagicResist, 0.0, 120.0);    //Skill check for gain

            timer = new ExpireTimer(this.Caster, m, duration);
            timer.Start();

            BuffInfo.AddBuff(this.Caster, new BuffInfo(BuffIcon.BloodOathCaster, 1075659, duration, this.Caster, m.Name.ToString()));
            BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.BloodOathCurse, 1075661, duration, m, this.Caster.Name.ToString()));

            m_Table[m] = timer;
            this.HarmfulSpell(m);
        }
Exemplo n.º 27
0
        public override void OnMovement(Mobile sucka, Point3D oldLocation)
        {
            if (InRange(sucka, 15) && InLOS(sucka) && !sucka.Hidden)
            {
                ExpireTimer timer = (ExpireTimer)m_Table[sucka];

                if (timer != null)
                {
                    timer.DoExpire();
                    sucka.SendMessage("The turdy ss bastard continues annoying the hell out of you!");
                }
                else
                {
                    sucka.SendMessage("The turdy ss bastard goes into a spastic fit, reducing you to sheer insanity!");
                }

                timer = new ExpireTimer(sucka, this);
                timer.Start();
                m_Table[sucka] = timer;
            }
        }
Exemplo n.º 28
0
        public void Target(Mobile m)
        {
            if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                ExpireTimer timer = (ExpireTimer)m_Table[m];

                if (timer != null)
                {
                    timer.DoExpire();
                }
                else
                {
                    m.SendLocalizedMessage(1061689); // Your skin turns dry and corpselike.
                }
                Effects.SendTargetParticles(m, 0x373A, 1, 15, 9913, 67, 7, EffectLayer.Head);
                m.PlaySound(0x1BB);

                double ss = Caster.Skills[CastSkill].Value;
                double mr = Caster.Skills[DamageSkill].Value;

                double value = 3 + 10 * ((ss + mr) / 225);//5 à 18

                value = SpellHelper.AdjustValue(Caster, value);

                TimeSpan duration = TimeSpan.FromSeconds(0);

                m.VirtualArmorMod += (int)value;

                timer = new ExpireTimer(m, (int)value, duration);
                timer.Start();

                m_Table[m] = timer;
            }

            FinishSequence();
        }
Exemplo n.º 29
0
//////////////////////////////////////////// Begin Insanity Attack Sequence

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

            if (0.25 > Utility.RandomDouble())
            {
                ExpireTimer timer = (ExpireTimer)m_Table[defender];

                if (timer != null)
                {
                    timer.DoExpire();
                    defender.SendMessage("The turdy f**k continues annoying the hell out of you!");
                }
                else
                {
                    defender.SendMessage("The turdy f**k goes into a spastic fit, reducing you to sheer insanity!");
                }

                timer = new ExpireTimer(defender, this);
                timer.Start();
                m_Table[defender] = timer;
            }
        }
Exemplo n.º 30
0
        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (0.05 > Utility.RandomDouble())
            {
                /* Rune Corruption
                 * Start cliloc: 1070846 "The creature magically corrupts your armor!"
                 * Effect: All resistances -70 (lowest 0) for 5 seconds
                 * End ASCII: "The corruption of your armor has worn off"
                 */

                ExpireTimer timer = (ExpireTimer)m_Table[defender];

                if (timer != null)
                {
                    timer.DoExpire();
                    defender.SendLocalizedMessage(1070845);                       // The creature continues to corrupt your armor!
                }
                else
                {
                    defender.SendLocalizedMessage(1070846);                       // The creature magically corrupts your armor!
                }
                List <ResistanceMod> mods = new List <ResistanceMod>();

                if (Core.ML)
                {
                    if (defender.PhysicalResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Physical, -(defender.PhysicalResistance / 2)));
                    }

                    if (defender.FireResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Fire, -(defender.FireResistance / 2)));
                    }

                    if (defender.ColdResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Cold, -(defender.ColdResistance / 2)));
                    }

                    if (defender.PoisonResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Poison, -(defender.PoisonResistance / 2)));
                    }

                    if (defender.EnergyResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Energy, -(defender.EnergyResistance / 2)));
                    }
                }
                else
                {
                    if (defender.PhysicalResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Physical, (defender.PhysicalResistance > 70) ? -70 : -defender.PhysicalResistance));
                    }

                    if (defender.FireResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Fire, (defender.FireResistance > 70) ? -70 : -defender.FireResistance));
                    }

                    if (defender.ColdResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Cold, (defender.ColdResistance > 70) ? -70 : -defender.ColdResistance));
                    }

                    if (defender.PoisonResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Poison, (defender.PoisonResistance > 70) ? -70 : -defender.PoisonResistance));
                    }

                    if (defender.EnergyResistance > 0)
                    {
                        mods.Add(new ResistanceMod(ResistanceType.Energy, (defender.EnergyResistance > 70) ? -70 : -defender.EnergyResistance));
                    }
                }

                for (int i = 0; i < mods.Count; ++i)
                {
                    defender.AddResistanceMod(mods[i]);
                }

                defender.FixedEffect(0x37B9, 10, 5);

                timer = new ExpireTimer(defender, mods, TimeSpan.FromSeconds(5.0));
                timer.Start();
                m_Table[defender] = timer;
            }
        }
Exemplo n.º 31
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile m = state.Mobile;
           
            BaseWeapon weapon = m.Weapon as BaseWeapon;
            TimeSpan duration = TimeSpan.FromSeconds((m.Skills[SkillName.Mysticism].Value / 1.2) + 1.0);//needs work, just a base formula.

            switch (info.ButtonID)
            {
                case 0:
                    {
                        m.CloseGump(typeof(EnchantGump));
                        break;
                    }
                case 1:
                    {
                        ExpireTimer t = (ExpireTimer)m_Table[weapon];
                        if (t != null)
                            t.DoExpire();
                        m.SendMessage("You added Hit Dispel to your weapon");
                        weapon.WeaponAttributes.HitDispel += 30;
                        m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
                        m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
                        if (weapon.Name == null)
                            this.m_Name = weapon.GetType().Name;
                        else
                            this.m_Name = weapon.Name;
                        weapon.Name = this.m_Name + " [Enchanted]";
                        m_Table[weapon] = t = new ExpireTimer(weapon, AosWeaponAttribute.HitDispel, m, duration);
                        t.Start();
                        m.CloseGump(typeof(EnchantGump));
                        EnchantSpell.AddEffects(m, weapon);
                        break;
                    }
                case 2:
                    {
                        ExpireTimer t = (ExpireTimer)m_Table[weapon];
                        if (t != null)
                            t.DoExpire();
                        m.SendMessage("You added Hit Fireball to your weapon");
                        weapon.WeaponAttributes.HitFireball += 30;
                        m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
                        m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
                        if (weapon.Name == null)
                            this.m_Name = weapon.GetType().Name;
                        else
                            this.m_Name = weapon.Name;
                        weapon.Name = this.m_Name + " [Enchanted]";
                        m_Table[weapon] = t = new ExpireTimer(weapon, AosWeaponAttribute.HitFireball, m, duration);
                        t.Start();
                        m.CloseGump(typeof(EnchantGump));
                        EnchantSpell.AddEffects(m, weapon);
                        break;
                    }
                case 3:
                    {
                        ExpireTimer t = (ExpireTimer)m_Table[weapon];
                        if (t != null)
                            t.DoExpire();
                        m.SendMessage("You added Hit Harm to your weapon");
                        weapon.WeaponAttributes.HitHarm += 30;
                        m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
                        m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
                        if (weapon.Name == null)
                            this.m_Name = weapon.GetType().Name;
                        else
                            this.m_Name = weapon.Name;
                        weapon.Name = this.m_Name + " [Enchanted]";
                        m_Table[weapon] = t = new ExpireTimer(weapon, AosWeaponAttribute.HitHarm, m, duration);
                        t.Start();
                        m.CloseGump(typeof(EnchantGump));
                        EnchantSpell.AddEffects(m, weapon);
                        break;
                    }
                case 4:
                    {
                        ExpireTimer t = (ExpireTimer)m_Table[weapon];
                        if (t != null)
                            t.DoExpire();
                        m.SendMessage("You added Hit Lightning to your weapon");
                        weapon.WeaponAttributes.HitLightning += 30;
                        m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
                        m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
                        if (weapon.Name == null)
                            this.m_Name = weapon.GetType().Name;
                        else
                            this.m_Name = weapon.Name;
                        weapon.Name = this.m_Name + " [Enchanted]";
                        m_Table[weapon] = t = new ExpireTimer(weapon, AosWeaponAttribute.HitLightning, m, duration);
                        t.Start();
                        m.CloseGump(typeof(EnchantGump));
                        EnchantSpell.AddEffects(m, weapon);
                        break;
                    }
                case 5:
                    {
                        ExpireTimer t = (ExpireTimer)m_Table[weapon];
                        if (t != null)
                            t.DoExpire();
                        m.SendMessage("You added Hit Magic Arrow to your weapon");
                        weapon.WeaponAttributes.HitMagicArrow += 30;
                        m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
                        m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
                        if (weapon.Name == null)
                            this.m_Name = weapon.GetType().Name;
                        else
                            this.m_Name = weapon.Name;
                        weapon.Name = this.m_Name + " [Enchanted]";
                        m_Table[weapon] = t = new ExpireTimer(weapon, AosWeaponAttribute.HitMagicArrow, m, duration);
                        t.Start();
                        m.CloseGump(typeof(EnchantGump));
                        EnchantSpell.AddEffects(m, weapon);
                        break;
                    }
            }
        }