protected override void OnTick() { if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendLocalizedMessage(502136); // The poison seems to have worn off. m_Mobile.Poison = null; Stop(); return; } int damage; if (!Core.AOS && m_LastDamage != 0 && Utility.RandomBool()) { damage = m_LastDamage; } else { damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); if (damage < m_Poison.m_Minimum) { damage = m_Poison.m_Minimum; } else if (damage > m_Poison.m_Maximum) { damage = m_Poison.m_Maximum; } m_LastDamage = damage; } if (m_From != null) { m_From.DoHarmful(m_Mobile, true); } IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } m_Mobile.Damage(damage, m_From); if (0.60 <= Utility.RandomDouble()) // OSI: randomly revealed between first and third damage tick, guessing 60% chance { m_Mobile.RevealingAction(); } if ((m_Index % m_Poison.m_MessageInterval) == 0) { m_Mobile.OnPoisoned(m_From, m_Poison, m_Poison); } }
private static void Honor(PlayerMobile source, Mobile target) { IHonorTarget honorTarget = target as IHonorTarget; if (honorTarget == null || !source.CanBeHarmful(target, true)) { return; } if (honorTarget.ReceivedHonorContext != null) { if (honorTarget.ReceivedHonorContext.Source == source) { return; } if (honorTarget.ReceivedHonorContext.CheckDistance()) { source.SendLocalizedMessage(1063233); // Somebody else is honoring this opponent return; } } if (target.Hits < target.HitsMax) { source.SendLocalizedMessage(1063166); // You cannot honor this monster because it is too damaged. return; } if (Core.ML && target is PlayerMobile) { source.SendLocalizedMessage(1075614); // You cannot honor other players. return; } if (source.SentHonorContext != null) { source.SentHonorContext.Cancel(); } new HonorContext(source, target); source.Direction = source.GetDirectionTo(target); if (!source.Mounted) { source.Animate(32, 5, 1, true, true, 0); } // OSI apparently removed this message... it's nice though source.Say(1063231); // I honor you }
protected override void OnTick() { if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendAsciiMessage("The poison seems to have worn off."); // The poison seems to have worn off. m_Mobile.Poison = null; Stop(); return; } int damage; if (!Core.AOS && m_LastDamage != 0 && Utility.RandomMinMax(1, 3) != 1) { damage = m_LastDamage; } else { //damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); damage = 2 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); m_Mobile.OnPoisoned(m_From, m_Poison, m_Poison); /*if ( damage < m_Poison.m_Minimum ) * damage = m_Poison.m_Minimum; * else if ( damage > m_Poison.m_Maximum ) * damage = m_Poison.m_Maximum;*/ m_LastDamage = damage; } if (m_From != null) { m_From.DoHarmful(m_Mobile, true); } IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } AOS.Damage(m_Mobile, m_From, damage, 0, 0, 0, 100, 0); //if ( (m_Index % m_Poison.m_MessageInterval) == 0 ) // m_Mobile.OnPoisoned( m_From, m_Poison, m_Poison ); }
protected override void OnTick() { if ((Core.AOS && m_Poison.Level < 4 && TransformationSpellHelper.UnderTransformation(m_Mobile, typeof(VampiricEmbraceSpell))) || (m_Poison.Level < 3 && OrangePetals.UnderEffect(m_Mobile)) || AnimalForm.UnderTransformation(m_Mobile, typeof(Unicorn))) { if (m_Mobile.CurePoison(m_Mobile)) { m_Mobile.SendAsciiMessage("You feel yourself resisting the effects of the poison"); m_Mobile.NonlocalOverheadMessage(MessageType.Emote, 0x22, true, String.Format("* {0} seems resistant to the poison *", m_Mobile.Name)); Stop(); return; } } if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendLocalizedMessage(502136); // The poison seems to have worn off. m_Mobile.Poison = null; Stop(); return; } int damage; if (!Core.AOS && m_LastDamage != 0 && Utility.RandomBool()) { damage = m_LastDamage; } else { damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); if (damage < m_Poison.m_Minimum) { damage = m_Poison.m_Minimum; } else if (damage > m_Poison.m_Maximum) { damage = m_Poison.m_Maximum; } m_LastDamage = damage; } if (m_From != null) { m_From.DoHarmful(m_Mobile, true); } IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } AOS.Damage(m_Mobile, m_From, damage, 0, 0, 0, 100, 0); //if (0.60 <= Utility.RandomDouble()) // OSI: randomly revealed between first and third damage tick, guessing 60% chance // m_Mobile.RevealingAction(); if ((m_Index % m_Poison.m_MessageInterval) == 0) { m_Mobile.OnPoisoned(m_From, m_Poison, m_Poison); } }
private static void Honor(PlayerMobile source, Mobile target) { IHonorTarget honorTarget = target as IHonorTarget; GuardedRegion reg = (GuardedRegion)source.Region.GetRegion(typeof(GuardedRegion)); Map map = source.Map; if (honorTarget == null) { return; } if (honorTarget.ReceivedHonorContext != null) { if (honorTarget.ReceivedHonorContext.Source == source) { return; } if (honorTarget.ReceivedHonorContext.CheckDistance()) { source.SendLocalizedMessage(1063233); // Somebody else is honoring this opponent return; } } if (target.Hits < target.HitsMax) { source.SendLocalizedMessage(1063166); // You cannot honor this monster because it is too damaged. return; } BaseCreature cret = target as BaseCreature; if (target.Body.IsHuman && (cret == null || (!cret.AlwaysAttackable && !cret.AlwaysMurderer))) { if (reg == null || reg.IsDisabled()) { //Allow honor on blue if Out of guardzone } else if (map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0) { //Allow honor on blue if in Fel } else { source.SendLocalizedMessage(1001018); // You cannot perform negative acts return; //cannot honor in trammel town on blue } } if (Core.ML && target is PlayerMobile) { source.SendLocalizedMessage(1075614); // You cannot honor other players. return; } if (source.SentHonorContext != null) { source.SentHonorContext.Cancel(); } new HonorContext(source, target); source.Direction = source.GetDirectionTo(target); if (!source.Mounted) { source.Animate(32, 5, 1, true, true, 0); } }
protected override void OnTick() { if (m_Mobile is NubiaPlayer) { if (((NubiaPlayer)m_Mobile).hasDon(DonEnum.CorpDiamant)) { m_Mobile.LocalOverheadMessage(MessageType.Emote, 0x3F, true, "* Votre corps est imunisé contre le poison *"); m_Mobile.NonlocalOverheadMessage(MessageType.Emote, 0x3F, true, String.Format("* {0} ne semble pas affecté par le poison *", m_Mobile.Name)); Stop(); return; } } if ((Core.AOS && m_Poison.Level < 4 && TransformationSpellHelper.UnderTransformation(m_Mobile, typeof(VampiricEmbraceSpell))) || (m_Poison.Level < 3 && OrangePetals.UnderEffect(m_Mobile)) || AnimalForm.UnderTransformation(m_Mobile, typeof(Unicorn))) { if (m_Mobile.CurePoison(m_Mobile)) { m_Mobile.LocalOverheadMessage(MessageType.Emote, 0x3F, true, "* You feel yourself resisting the effects of the poison *"); m_Mobile.NonlocalOverheadMessage(MessageType.Emote, 0x3F, true, String.Format("* {0} seems resistant to the poison *", m_Mobile.Name)); Stop(); return; } } if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendLocalizedMessage(502136); // The poison seems to have worn off. m_Mobile.Poison = null; Stop(); return; } int damage; if (!Core.AOS && m_LastDamage != 0 && Utility.RandomBool()) { damage = m_LastDamage; } else { damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); if (damage < m_Poison.m_Minimum) { damage = m_Poison.m_Minimum; } else if (damage > m_Poison.m_Maximum) { damage = m_Poison.m_Maximum; } m_LastDamage = damage; } if (m_From != null) { m_From.DoHarmful(m_Mobile, true); } IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } AOS.Damage(m_Mobile, m_From, damage, 0, 0, 0, 100, 0); if ((m_Index % m_Poison.m_MessageInterval) == 0) { m_Mobile.OnPoisoned(m_From, m_Poison, m_Poison); } }
protected override void OnTick() { #region Mondain's Legacy if ((Core.AOS && m_Poison.RealLevel < 4 && TransformationSpellHelper.UnderTransformation(m_Mobile, typeof(VampiricEmbraceSpell))) || (m_Poison.RealLevel < 3 && OrangePetals.UnderEffect(m_Mobile)) || AnimalForm.UnderTransformation(m_Mobile, typeof(Unicorn))) { if (m_Mobile.CurePoison(m_Mobile)) { m_Mobile.LocalOverheadMessage( MessageType.Emote, 0x3F, true, "* You feel yourself resisting the effects of the poison *"); m_Mobile.NonlocalOverheadMessage( MessageType.Emote, 0x3F, true, String.Format("* {0} seems resistant to the poison *", m_Mobile.Name)); Stop(); return; } } #endregion if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendLocalizedMessage(502136); // The poison seems to have worn off. m_Mobile.Poison = null; Stop(); return; } int damage; if (!Core.AOS && m_LastDamage != 0 && Utility.RandomBool()) { damage = m_LastDamage; } else { damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); if (damage < m_Poison.m_Minimum) { damage = m_Poison.m_Minimum; } else if (damage > m_Poison.m_Maximum) { damage = m_Poison.m_Maximum; } m_LastDamage = damage; } if (m_From != null) { m_From.DoHarmful(m_Mobile, true); } IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } #region Mondain's Legacy if (Core.ML) { if (m_From != null && m_Mobile != m_From && !m_From.InRange(m_Mobile.Location, 1) && m_Poison.m_Level >= 10 && m_Poison.m_Level <= 13) // darkglow { m_From.SendLocalizedMessage(1072850); // Darkglow poison increases your damage! Stop(); new DarkglowTimer(m_Mobile, m_From, m_Poison, m_Index).Start(); } if (m_From != null && m_Mobile != m_From && m_From.InRange(m_Mobile.Location, 1) && m_Poison.m_Level >= 14 && m_Poison.m_Level <= 18) // parasitic { Stop(); new ParasiticTimer(m_Mobile, m_From, m_Poison, m_Index).Start(); } } #endregion AOS.Damage(m_Mobile, m_From, damage, 0, 0, 0, 100, 0); if (0.60 <= Utility.RandomDouble()) // OSI: randomly revealed between first and third damage tick, guessing 60% chance { m_Mobile.RevealingAction(); } if ((m_Index % m_Poison.m_MessageInterval) == 0) { m_Mobile.OnPoisoned(m_From, m_Poison, m_Poison); } }
private static void Honor(PlayerMobile source, Mobile target) { IHonorTarget honorTarget = target as IHonorTarget; GuardedRegion reg = (GuardedRegion)source.Region.GetRegion(typeof(GuardedRegion)); Map map = source.Map; if (honorTarget == null) { return; } if (honorTarget.ReceivedHonorContext != null) { if (honorTarget.ReceivedHonorContext.Source == source) { source.SendLocalizedMessage(1115882); // You don't need to declare again. You are already under Honorable Combat with this target. return; } if (honorTarget.ReceivedHonorContext.CheckDistance()) { source.SendLocalizedMessage(1063233); // Somebody else is honoring this opponent return; } } if (target.Hits < target.HitsMax) { source.SendLocalizedMessage(1063166); // You cannot honor this monster because it is too damaged. return; } BaseCreature cret = target as BaseCreature; if (target.Body.IsHuman && (cret == null || (!cret.AlwaysAttackable && !cret.AlwaysMurderer))) { if (reg == null || reg.IsDisabled()) { //Allow honor on blue if Out of guardzone } else if (map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0) { //Allow honor on blue if in Fel } else { source.SendLocalizedMessage(1001018); // You cannot perform negative acts return; //cannot honor in trammel town on blue } } if (Core.ML && target is PlayerMobile) { source.SendLocalizedMessage(1075614); // You cannot honor other players. return; } if (source.SentHonorContext != null) { source.SentHonorContext.Cancel(); } new HonorContext(source, target); source.Direction = source.GetDirectionTo(target); source.SendLocalizedMessage(1115884); // You Started Honorable Combat! if (!source.Mounted) { source.Animate(32, 5, 1, true, true, 0); } BuffInfo.AddBuff(source, new BuffInfo(BuffIcon.Honored, 1075649, 1153815, String.Format("{0}", target.Name))); BuffInfo.AddBuff(source, new BuffInfo(BuffIcon.Perfection, 1153786, 1151394, String.Format("0\t{0}", target.Name))); }
protected override void OnTick() { bool usingPetals = OrangePetals.UnderEffect(m_Mobile); if (Core.SA && usingPetals && m_Poison.RealLevel >= 3 && 0.25 > Utility.RandomDouble()) { OrangePetals.RemoveContext(m_Mobile); usingPetals = false; m_Mobile.LocalOverheadMessage(MessageType.Regular, 0x3F, 1053093); // * The strength of the poison overcomes your resistance! * } if ((Core.AOS && m_Poison.RealLevel < 4 && TransformationSpellHelper.UnderTransformation(m_Mobile, typeof(VampiricEmbraceSpell))) || (m_Poison.RealLevel <= 3 && usingPetals) || AnimalForm.UnderTransformation(m_Mobile, typeof(Unicorn))) { if (m_Mobile.CurePoison(m_Mobile)) { m_Mobile.LocalOverheadMessage(MessageType.Emote, 0x3F, 1053092); // * You feel yourself resisting the effects of the poison * m_Mobile.NonlocalOverheadMessage(MessageType.Emote, 0x3F, 1114442, m_Mobile.Name); // * ~1_NAME~ seems resistant to the poison * Stop(); return; } } if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendLocalizedMessage(502136); // The poison seems to have worn off. m_Mobile.Poison = null; if (m_Mobile is PlayerMobile) { BuffInfo.RemoveBuff((PlayerMobile)m_Mobile, BuffIcon.Poison); } Stop(); return; } int damage; if (!Core.AOS && m_LastDamage != 0 && Utility.RandomBool()) { damage = m_LastDamage; } else { damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); if (damage < m_Poison.m_Minimum) { damage = m_Poison.m_Minimum; } else if (damage > m_Poison.m_Maximum) { damage = m_Poison.m_Maximum; } m_LastDamage = damage; } if (m_From != null) { m_From.DoHarmful(m_Mobile, true); } IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } #region Mondain's Legacy if (Core.ML) { if (m_From != null && m_Mobile != m_From && !m_From.InRange(m_Mobile.Location, 1) && m_Poison.m_Level >= 10 && m_Poison.m_Level <= 13) // darkglow { m_From.SendLocalizedMessage(1072850); // Darkglow poison increases your damage! damage = (int)Math.Floor(damage * 1.1); } if (m_From != null && m_Mobile != m_From && m_From.InRange(m_Mobile.Location, 1) && m_Poison.m_Level >= 14 && m_Poison.m_Level <= 18) // parasitic { int toHeal = Math.Min(m_From.HitsMax - m_From.Hits, damage); if (toHeal > 0) { m_From.SendLocalizedMessage(1060203, toHeal.ToString()); // You have had ~1_HEALED_AMOUNT~ hit points of damage healed. m_From.Heal(toHeal, m_Mobile, false); } } } #endregion AOS.Damage(m_Mobile, m_From, damage, 0, 0, 0, 100, 0); if ((m_Index % m_Poison.m_MessageInterval) == 0) { m_Mobile.OnPoisoned(m_From, m_Poison, m_Poison); } }
protected override void OnTick() { if (Core.UOR && m_Poison.Level < 3 && OrangePetals.UnderEffect(m_Mobile)) { if (m_Mobile.CurePoison(m_Mobile)) { m_Mobile.LocalOverheadMessage(MessageType.Emote, 0x3F, true, "* You feel yourself resisting the effects of the poison *"); m_Mobile.NonlocalOverheadMessage(MessageType.Emote, 0x3F, true, String.Format("* {0} seems resistant to the poison *", m_Mobile.Name)); Stop(); return; } } if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendLocalizedMessage(502136); // The poison seems to have worn off. m_Mobile.Poison = null; Stop(); return; } int damage; if (m_LastDamage != 0 && Utility.RandomBool()) { damage = m_LastDamage; } else { damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); if (damage < m_Poison.m_Minimum) { damage = m_Poison.m_Minimum; } else if (damage > m_Poison.m_Maximum) { damage = m_Poison.m_Maximum; } m_LastDamage = damage; } // Note: Poison has no damage source after initial application pre AOS IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } AOS.Damage(m_Mobile, damage, 0, 0, 0, 100, 0); if ((m_Index % m_Poison.m_MessageInterval) == 0) { m_Mobile.OnPoisoned(m_Mobile, m_Poison, m_Poison); } }
protected override void OnTick() { if ((Core.AOS && m_Poison.Level < 4 && TransformationSpellHelper.UnderTransformation(m_Mobile, typeof(VampiricEmbraceSpell))) || (m_Poison.Level < 3 && OrangePetals.UnderEffect(m_Mobile)) || AnimalForm.UnderTransformation(m_Mobile, typeof(Unicorn))) { if (m_Mobile.CurePoison(m_Mobile)) { m_Mobile.LocalOverheadMessage(MessageType.Emote, 0x3F, true, "* You feel yourself resisting the effects of the poison *"); m_Mobile.NonlocalOverheadMessage(MessageType.Emote, 0x3F, true, String.Format("* {0} seems resistant to the poison *", m_Mobile.Name)); Stop(); return; } } if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendLocalizedMessage(502136); // The poison seems to have worn off. m_Mobile.Poison = null; Stop(); return; } int damage; if (!Core.AOS && m_LastDamage != 0 && Utility.RandomBool()) { damage = m_LastDamage; } else { damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); if (damage < m_Poison.m_Minimum) { damage = m_Poison.m_Minimum; } else if (damage > m_Poison.m_Maximum) { damage = m_Poison.m_Maximum; } m_LastDamage = damage; } if (m_From != null) { m_From.DoHarmful(m_Mobile, true); } IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } // Genova: suporte ao UO:ML. #region Mondain's Legacy if (m_Mobile != m_From && m_From.InRange(m_Mobile.Location, 1) && Utility.InsensitiveCompare(m_Poison.Name, "Parasitic") == 0) { m_From.Heal((int)(damage * 0.4)); // TODO check } #endregion AOS.Damage(m_Mobile, m_From, damage, 0, 0, 0, 100, 0); if ((m_Index % m_Poison.m_MessageInterval) == 0) { m_Mobile.OnPoisoned(m_From, m_Poison, m_Poison); } }
protected override void OnTick() { #region Mondain's Legacy if ((Core.AOS && this.m_Poison.RealLevel < 4 && TransformationSpellHelper.UnderTransformation(this.m_Mobile, typeof(VampiricEmbraceSpell))) || (this.m_Poison.RealLevel < 3 && OrangePetals.UnderEffect(this.m_Mobile)) || AnimalForm.UnderTransformation(this.m_Mobile, typeof(Unicorn))) { if (this.m_Mobile.CurePoison(this.m_Mobile)) { this.m_Mobile.LocalOverheadMessage(MessageType.Emote, 0x3F, true, "* You feel yourself resisting the effects of the poison *"); this.m_Mobile.NonlocalOverheadMessage(MessageType.Emote, 0x3F, true, String.Format("* {0} seems resistant to the poison *", this.m_Mobile.Name)); this.Stop(); return; } } #endregion if (this.m_Index++ == this.m_Poison.m_Count) { this.m_Mobile.SendLocalizedMessage(502136); // The poison seems to have worn off. this.m_Mobile.Poison = null; this.Stop(); return; } int damage; if (!Core.AOS && this.m_LastDamage != 0 && Utility.RandomBool()) { damage = this.m_LastDamage; } else { damage = 1 + (int)(this.m_Mobile.Hits * this.m_Poison.m_Scalar); if (damage < this.m_Poison.m_Minimum) { damage = this.m_Poison.m_Minimum; } else if (damage > this.m_Poison.m_Maximum) { damage = this.m_Poison.m_Maximum; } this.m_LastDamage = damage; } if (this.m_From != null) { this.m_From.DoHarmful(this.m_Mobile, true); } IHonorTarget honorTarget = this.m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } #region Mondain's Legacy if (Core.ML) { if (this.m_From != null && this.m_Mobile != this.m_From && !this.m_From.InRange(this.m_Mobile.Location, 1) && this.m_Poison.m_Level >= 10 && this.m_Poison.m_Level <= 13) // darkglow { this.m_From.SendLocalizedMessage(1072850); // Darkglow poison increases your damage! damage = (int)Math.Floor(damage * 1.1); } if (this.m_From != null && this.m_Mobile != this.m_From && this.m_From.InRange(this.m_Mobile.Location, 1) && this.m_Poison.m_Level >= 14 && this.m_Poison.m_Level <= 18) // parasitic { int toHeal = Math.Min(this.m_From.HitsMax - this.m_From.Hits, damage); if (toHeal > 0) { this.m_From.SendLocalizedMessage(1060203, toHeal.ToString()); // You have had ~1_HEALED_AMOUNT~ hit points of damage healed. this.m_From.Heal(toHeal, this.m_Mobile, false); } } } #endregion AOS.Damage(this.m_Mobile, this.m_From, damage, 0, 0, 0, 100, 0); if (0.60 <= Utility.RandomDouble()) // OSI: randomly revealed between first and third damage tick, guessing 60% chance { this.m_Mobile.RevealingAction(); } if ((this.m_Index % this.m_Poison.m_MessageInterval) == 0) { this.m_Mobile.OnPoisoned(this.m_From, this.m_Poison, this.m_Poison); } }
private static void Honor(PlayerMobile source, Mobile target) { IHonorTarget honorTarget = target as IHonorTarget; GuardedRegion reg = (GuardedRegion)source.Region.GetRegion(typeof(GuardedRegion)); Map map = source.Map; if (honorTarget == null) { return; } if (honorTarget.ReceivedHonorContext != null) { if (honorTarget.ReceivedHonorContext.Source == source) { return; } if (honorTarget.ReceivedHonorContext.CheckDistance()) { source.SendLocalizedMessage(1063233); // Somebody else is honoring this opponent return; } } if (target.Hits < target.HitsMax) { source.SendLocalizedMessage(1063166); // You cannot honor this monster because it is too damaged. return; } BaseCreature cret = target as BaseCreature; if (target.Body.IsHuman && (cret == null || (!cret.AlwaysAttackable && !cret.AlwaysMurderer))) { //Cannot honor if in guard zone, or out of felucca ruleset if ((reg != null && !reg.IsDisabled()) || (map != null && (map.Rules & MapRules.HarmfulRestrictions) != 0)) { source.SendLocalizedMessage(1001018); // You cannot perform negative acts return; } } if (Core.ML && target is PlayerMobile) { source.SendLocalizedMessage(1075614); // You cannot honor other players. return; } if (source.SentHonorContext != null) { source.SentHonorContext.Cancel(); } new HonorContext(source, target); source.Direction = source.GetDirectionTo(target); if (!source.Mounted) { source.Animate(32, 5, 1, true, true, 0); } // OSI apparently removed this message... it's nice though //source.Say( 1063231 ); // I honor you }
protected override void OnTick() { if (CheckResistPoison()) { // Curing this way cause we don't want to trigger the PoisonCured event, // so that the resistance timer is not refreshed. m_Mobile.Poison = null; BuffInfo.RemoveBuff(m_Mobile, BuffIcon.Poison); m_Mobile.LocalOverheadMessage(MessageType.Emote, 0x3F, true, "* You feel yourself resisting the effects of the poison *"); m_Mobile.NonlocalOverheadMessage(MessageType.Emote, 0x3F, true, String.Format("* {0} seems resistant to the poison *", m_Mobile.Name)); Stop(); return; } if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendLocalizedMessage(502136); // The poison seems to have worn off. m_Mobile.Poison = null; Stop(); return; } int damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); if (damage < m_Poison.m_Minimum) { damage = m_Poison.m_Minimum; } else if (damage > m_Poison.m_Maximum) { damage = m_Poison.m_Maximum; } m_LastDamage = damage; #region Darkglow Mobile poisoner = DarkglowPotion.GetPoisoner(m_Mobile); if (poisoner != null) { int distance = (int)m_Mobile.GetDistanceToSqrt(poisoner.Location); if (distance > 1) { if (distance > 20) { distance = 20; } damage += AOS.Scale(damage, distance * 5); poisoner.SendLocalizedMessage(1072850); // Darkglow poison increases your damage! } } #endregion IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } AOS.Damage(m_Mobile, damage, 0, 0, 0, 100, 0); if ((m_Index % m_Poison.m_MessageInterval) == 0) { m_Mobile.OnPoisoned(m_Mobile, m_Poison, m_Poison); } #region Parasitic poisoner = ParasiticPotion.GetPoisoner(m_Mobile); if (poisoner != null && m_Mobile.InRange(poisoner.Location, 1)) { int toHeal = Math.Min(damage, poisoner.HitsMax - poisoner.Hits); if (toHeal > 0) { poisoner.SendLocalizedMessage(1060203, toHeal.ToString()); // You have had ~1_HEALED_AMOUNT~ hit points of damage healed. poisoner.Hits += toHeal; } } #endregion }
protected override void OnTick() { if ((Core.AOS && m_Poison.Level < 4 && TransformationSpellHelper.UnderTransformation(m_Mobile, typeof(VampiricEmbraceSpell))) || (m_Poison.Level < 3 && OrangePetals.UnderEffect(m_Mobile)) || AnimalForm.UnderTransformation(m_Mobile, typeof(Unicorn))) { if (m_Mobile.CurePoison(m_Mobile)) { m_Mobile.LocalOverheadMessage(MessageType.Emote, 0x3F, true, "* You feel yourself resisting the effects of the poison *"); m_Mobile.NonlocalOverheadMessage(MessageType.Emote, 0x3F, true, String.Format("* {0} seems resistant to the poison *", m_Mobile.Name)); Stop(); return; } } if (m_Index++ == m_Poison.m_Count) { m_Mobile.SendAsciiMessage("The poison seems to have worn off."); // The poison seems to have worn off. m_Mobile.Poison = null; Stop(); return; } int damage; if (!Core.AOS && m_LastDamage != 0 && Utility.RandomMinMax(1, 3) != 1) { damage = m_LastDamage; } else { //damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); damage = 2 + (int)(m_Mobile.Hits * m_Poison.m_Scalar); m_Mobile.OnPoisoned(m_From, m_Poison, m_Poison); /*if ( damage < m_Poison.m_Minimum ) * damage = m_Poison.m_Minimum; * else if ( damage > m_Poison.m_Maximum ) * damage = m_Poison.m_Maximum;*/ m_LastDamage = damage; } if (m_From != null) { m_From.DoHarmful(m_Mobile, true); } IHonorTarget honorTarget = m_Mobile as IHonorTarget; if (honorTarget != null && honorTarget.ReceivedHonorContext != null) { honorTarget.ReceivedHonorContext.OnTargetPoisoned(); } AOS.Damage(m_Mobile, m_From, damage, 0, 0, 0, 100, 0); //if ( (m_Index % m_Poison.m_MessageInterval) == 0 ) // m_Mobile.OnPoisoned( m_From, m_Poison, m_Poison ); }