}// A tasty bite of the enchanted apple lifts all curses from your soul. public override bool Eat(Mobile from) { if (base.Eat(from)) { from.PlaySound(0xF6); from.PlaySound(0x1F7); from.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head); IEntity mfrom = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z - 10), from.Map); IEntity mto = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z + 50), from.Map); Effects.SendMovingParticles(mfrom, mto, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100); from.RemoveStatMod("[Magic] Str Curse"); from.RemoveStatMod("[Magic] Dex Curse"); from.RemoveStatMod("[Magic] Int Curse"); from.Paralyzed = false; from.Asleep = false; EvilOmenSpell.TryEndEffect(from); StrangleSpell.RemoveCurse(from); CorpseSkinSpell.RemoveCurse(from); CurseSpell.RemoveEffect(from); BuffInfo.RemoveBuff(from, BuffIcon.Clumsy); BuffInfo.RemoveBuff(from, BuffIcon.FeebleMind); BuffInfo.RemoveBuff(from, BuffIcon.Weaken); BuffInfo.RemoveBuff(from, BuffIcon.MassCurse); return true; } return false; }
public void Target( Mobile m ) { if ( !Caster.CanSee( m ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( CheckHSequence( m ) ) { SpellHelper.CheckReflect((int)Circle, Caster, ref m); if (m.Spell != null) m.Spell.OnCasterHurt(); if (BlessSpell.UnderEffect(m)) { if (m.Str > m.RawStr) m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Str)); else m.SendAsciiMessage("You are under the effect of a bless spell and cannot get any stat penalties"); } else SpellHelper.AddStatCurse(Caster, m, StatType.Str); m.FixedParticles( 0x374A, 10, 15, 5009, EffectLayer.Waist ); m.PlaySound( Sound ); HarmfulSpell(m); } FinishSequence(); }
public void Target( Mobile m ) { if ( !Caster.CanSee( m ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( CheckBSequence( m ) ) { if ((m.Player && m.Dex <= 120) || (!m.Player)) { if (CurseSpell.UnderEffect(m)) { if (m.Dex < m.RawDex) m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Dex)); else m.SendAsciiMessage("You are under the effect of a curse spell and cannot get any stat bonuses"); } else SpellHelper.AddStatBonus(Caster, m, StatType.Dex); } else { m.SendAsciiMessage(33, "You are too fast to benefit from that!"); return; } m.FixedParticles( 0x373A, 10, 15, 5010, EffectLayer.Waist ); m.PlaySound( Sound ); } FinishSequence(); }
public void Target( Mobile m ) { if ( !Caster.CanSee( m ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( CheckBSequence( m, false ) ) { SpellHelper.Turn( Caster, m ); m.PlaySound( 0xF6 ); m.PlaySound( 0x1F7 ); m.FixedParticles( 0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head ); IEntity from = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z - 10 ), Caster.Map ); IEntity to = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z + 50 ), Caster.Map ); Effects.SendMovingParticles( from, to, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100 ); StatMod mod; mod = m.GetStatMod( "[Magic] Str Offset" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Str Offset" ); mod = m.GetStatMod( "[Magic] Dex Offset" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Dex Offset" ); mod = m.GetStatMod( "[Magic] Int Offset" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Int Offset" ); m.Paralyzed = false; m.CurePoison( Caster ); EvilOmenSpell.CheckEffect( m ); StrangleSpell.RemoveCurse( m ); CorpseSkinSpell.RemoveCurse( m ); } FinishSequence(); }
public static void DoRemoveCurses(Mobile m) { StatMod mod; mod = m.GetStatMod("[Magic] Str Malus"); if (mod != null && mod.Offset < 0) { m.RemoveStatMod("[Magic] Str Malus"); } mod = m.GetStatMod("[Magic] Dex Malus"); if (mod != null && mod.Offset < 0) { m.RemoveStatMod("[Magic] Dex Malus"); } mod = m.GetStatMod("[Magic] Int Malus"); if (mod != null && mod.Offset < 0) { m.RemoveStatMod("[Magic] Int Malus"); } m.Paralyzed = false; EvilOmenSpell.CheckEffect(m); StrangleSpell.RemoveCurse(m); CorpseSkinSpell.RemoveCurse(m); CurseSpell.RemoveEffect(m); MortalStrike.EndWound(m); BloodOathSpell.EndEffect(m); SpellPlagueSpell.RemoveEffect(m); BuffInfo.RemoveBuff(m, BuffIcon.Clumsy); BuffInfo.RemoveBuff(m, BuffIcon.FeebleMind); BuffInfo.RemoveBuff(m, BuffIcon.Weaken); BuffInfo.RemoveBuff(m, BuffIcon.MassCurse); BuffInfo.RemoveBuff(m, BuffIcon.Curse); BuffInfo.RemoveBuff(m, BuffIcon.EvilOmen); BuffInfo.RemoveBuff(m, BuffIcon.MortalStrike); // TODO: Should this remove blood oath? Pain spike? }
public override void OnRemoved(object parent) { if (Core.AOS && parent is Mobile) { Mobile from = (Mobile)parent; if (Core.AOS) { m_AosSkillBonuses.Remove(); } string modName = this.Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); } }
public static void RemoveEffect(Mobile m) { object[] mods = (object[])m_Table[m]; if (mods != null) { m.RemoveStatMod(((StatMod)mods[0]).Name); m.RemoveStatMod(((StatMod)mods[1]).Name); m.RemoveStatMod(((StatMod)mods[2]).Name); m.RemoveSkillMod((SkillMod)mods[3]); m.RemoveSkillMod((SkillMod)mods[4]); m.RemoveSkillMod((SkillMod)mods[5]); } m_Table.Remove(m); m.EndAction(typeof(ClericAngelicFaithSpell)); m.BodyMod = 0; }
public override void OnDelete() { Mobile parent = RootParent as Mobile; if (parent != null) { parent.RemoveStatMod("[ArcaneFocus]"); } base.OnDelete(); }
public override void OnRemoved(object parent) { if (Core.AOS && parent is Mobile) { Mobile from = (Mobile)parent; m_AosSkillBonuses.Remove(); string modName = this.Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); } // XmlAttachment check for OnRemoved Server.Engines.XmlSpawner2.XmlAttach.CheckOnRemoved(this, parent); }
public static void RemoveEffect( Mobile m ) { object[] mods = (object[])m_Table[m]; if ( mods != null ) { m.RemoveStatMod( ((StatMod)mods[0]).Name ); m.RemoveStatMod( ((StatMod)mods[1]).Name ); m.RemoveStatMod( ((StatMod)mods[2]).Name ); m.RemoveSkillMod( (SkillMod)mods[3] ); m.RemoveSkillMod( (SkillMod)mods[4] ); m.RemoveSkillMod( (SkillMod)mods[5] ); } m_Table.Remove( m ); m.EndAction( typeof( ClericAngelicFaithSpell ) ); m.BodyMod = 0; }
}// A tasty bite of the enchanted apple lifts all curses from your soul. public override bool Eat(Mobile from) { if (base.Eat(from)) { from.PlaySound(0xF6); from.PlaySound(0x1F7); from.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head); IEntity mfrom = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z - 10), from.Map); IEntity mto = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z + 50), from.Map); Effects.SendMovingParticles(mfrom, mto, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100); from.RemoveStatMod("[Magic] Str Curse"); from.RemoveStatMod("[Magic] Dex Curse"); from.RemoveStatMod("[Magic] Int Curse"); from.Asleep = false; EvilOmenSpell.TryEndEffect(from); StrangleSpell.RemoveCurse(from); CorpseSkinSpell.RemoveCurse(from); CurseSpell.RemoveEffect(from); MortalStrike.EndWound(from); BloodOathSpell.RemoveCurse(from); MindRotSpell.ClearMindRotScalar(from); SpellPlagueSpell.RemoveFromList(from); BuffInfo.RemoveBuff(from, BuffIcon.Clumsy); BuffInfo.RemoveBuff(from, BuffIcon.FeebleMind); BuffInfo.RemoveBuff(from, BuffIcon.Weaken); BuffInfo.RemoveBuff(from, BuffIcon.MassCurse); BuffInfo.RemoveBuff(from, BuffIcon.Curse); BuffInfo.RemoveBuff(from, BuffIcon.MortalStrike); BuffInfo.RemoveBuff(from, BuffIcon.Mindrot); BuffInfo.RemoveBuff(from, BuffIcon.CorpseSkin); return(true); } return(false); }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("Cloak Of The Godly Smith"); if (m.Hits > m.HitsMax) { m.Hits = m.HitsMax; } if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } if (m_SkillMod2 != null) { m_SkillMod2.Remove(); } if (m_SkillMod3 != null) { m_SkillMod3.Remove(); } if (m_SkillMod4 != null) { m_SkillMod4.Remove(); } if (m_SkillMod5 != null) { m_SkillMod5.Remove(); } if (m_SkillMod6 != null) { m_SkillMod6.Remove(); } if (m_SkillMod7 != null) { m_SkillMod7.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("GorgetofExpertTinkering"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("Lilarcor"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnRemoved(object parent) { Mobile mob = parent as Mobile; if (mob != null) { if (Core.AOS) { m_AosSkillBonuses.Remove(); } string modName = this.Serial.ToString(); mob.RemoveStatMod(modName + "Str"); mob.RemoveStatMod(modName + "Dex"); mob.RemoveStatMod(modName + "Int"); mob.CheckStatTimers(); } base.OnRemoved(parent); }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; string modName = this.Serial.ToString(); m.RemoveStatMod(modName + "Str"); m.RemoveStatMod(modName + "Dex"); m.RemoveStatMod(modName + "Int"); if (Core.AOS) { m_AosSkillBonuses.Remove(); } ((Mobile)parent).Delta(MobileDelta.Armor); // Tell them armor rating has changed m.CheckStatTimers(); } base.OnRemoved(parent); }
public static void RemoveEffect(Mobile m) { if (m_Table.ContainsKey(m)) { object[] mods = (object[])m_Table[m]; if (mods != null) { m.RemoveStatMod(((StatMod)mods[0]).Name); m.RemoveStatMod(((StatMod)mods[1]).Name); m.RemoveSkillMod((SkillMod)mods[2]); m.RemoveSkillMod((SkillMod)mods[3]); m.RemoveSkillMod((SkillMod)mods[4]); m.RemoveSkillMod((SkillMod)mods[5]); m.RemoveSkillMod((SkillMod)mods[6]); } m_Table.Remove(m); m.EndAction(typeof(RogueIntimidationSpell)); } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("GlovesofExpertBlacksmithing"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("TunicofExpertFletching"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile from = (Mobile)parent; m_AosSkillBonuses.Remove(); if (HasSocket <Caddellite>()) { Caddellite.UpdateBuff(from); } string modName = Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("GargishTigerFurSash"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnDoubleClick(Mobile from) { if (Parent != from) { from.SendMessage("The Sword must be eqquiped to use."); } else if (from.Title != "Merlin's Apprentance") { from.Title = "Merlin's Apprentance"; from.BoltEffect(0); from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head); m_StatMod0 = new StatMod(StatType.Str, "MOD0", 10, TimeSpan.Zero); m_StatMod1 = new StatMod(StatType.Int, "MOD1", 10, TimeSpan.Zero); from.AddStatMod(m_StatMod0); from.AddStatMod(m_StatMod1); this.WeaponAttributes.HitLeechHits = 65; this.WeaponAttributes.HitLeechMana = 45; this.Attributes.WeaponSpeed = 30; } else { from.BoltEffect(0); from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head); from.Title = null; from.RemoveStatMod("MOD0"); from.RemoveStatMod("MOD1"); this.WeaponAttributes.HitLeechHits = 25; this.WeaponAttributes.HitLeechMana = 25; this.Attributes.WeaponSpeed = 15; } }
protected override void OnTargetRemoved(Mobile m) { BuffInfo.RemoveBuff(m, this.BuffIcon); foreach (AttributeMod mod in m_Mods) { m.RemoveAttributeMod(mod); } foreach (StatMod mod in m_StatMods) { m.RemoveStatMod(mod.Name); } }
public static void RemoveCurses(Mobile m) { // play the sound m.PlaySound(0xF6); m.PlaySound(0x1F7); // do the effects m.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head); IEntity from = new DummyEntity(Serial.Zero, new Point3D(m.X, m.Y, m.Z - 10), m.Map); IEntity to = new DummyEntity(Serial.Zero, new Point3D(m.X, m.Y, m.Z + 50), m.Map); Effects.SendMovingParticles(from, to, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100); // remove stat mods StatMod mod; foreach (string statModName in StatModNames) { mod = m.GetStatMod(statModName); if (mod != null && mod.Offset < 0) { m.RemoveStatMod(statModName); } } m.Paralyzed = false; EvilOmenSpell.CheckEffect(m); StrangleSpell.RemoveCurse(m); CorpseSkinSpell.RemoveCurse(m); CurseSpell.RemoveEffect(m); MortalStrike.EndWound(m); BloodOathSpell.EndEffect(m); SpellPlagueSpell.RemoveEffect(m); SleepSpell.RemoveEffect(m); MindRotSpell.ClearMindRotScalar(m); BuffInfo.RemoveBuff(m, BuffIcon.Clumsy); BuffInfo.RemoveBuff(m, BuffIcon.FeebleMind); BuffInfo.RemoveBuff(m, BuffIcon.Weaken); BuffInfo.RemoveBuff(m, BuffIcon.MassCurse); BuffInfo.RemoveBuff(m, BuffIcon.Curse); BuffInfo.RemoveBuff(m, BuffIcon.EvilOmen); BuffInfo.RemoveBuff(m, BuffIcon.MortalStrike); BuffInfo.RemoveBuff(m, BuffIcon.Sleep); BuffInfo.RemoveBuff(m, BuffIcon.MassSleep); BuffInfo.RemoveBuff(m, BuffIcon.Mindrot); }
public static void RemoveEffect(object state) { Mobile m = (Mobile)state; m.RemoveStatMod("[Magic] Str Curse"); m.RemoveStatMod("[Magic] Dex Curse"); m.RemoveStatMod("[Magic] Int Curse"); BuffInfo.RemoveBuff(m, BuffIcon.Curse); if (m_UnderEffect.ContainsKey(m)) { Timer t = m_UnderEffect[m]; if (t != null) { t.Stop(); } m_UnderEffect.Remove(m); } m.UpdateResistances(); }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile from = (Mobile)parent; m_AosSkillBonuses.Remove(); string modName = Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); #region Mondain's Legacy Sets if (IsSetItem && m_SetEquipped) { SetHelper.RemoveSetBonus(from, SetID, this); } #endregion } }
public void Clear() { for (int i = 0; i < m_Mods.Count; ++i) { object mod = m_Mods[i]; if (mod is StatMod) { m_Creature.RemoveStatMod(((StatMod)mod).Name); } else if (mod is SkillMod) { m_Creature.RemoveSkillMod((SkillMod)mod); } } }
public override void OnRemoved(object parent) { base.OnRemoved(parent); if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod(Serial.ToString() + "Forest-Dex"); if (m_Summon != null && !m_Summon.Deleted) { m_Summon.FixedParticles(0x3728, 1, 10, 9910, EffectLayer.Head); m.SendMessage("The summoned creature fades as you release the bow from your hands."); m_Summon.Delete(); } } }
public static void RemoveEffects(Mobile m) { if (m_Table.ContainsKey(m)) { Timer t = m_Table[m]; if (t != null && t.Running) { t.Stop(); } BuffInfo.RemoveBuff(m, BuffIcon.Clumsy); m.RemoveStatMod("[Magic] Dex Curse"); m_Table.Remove(m); } }
protected override bool OnDeactivate(Mobile m, Tuple <EquipmentSetPart, Item>[] equipped) { if (m == null || m.Deleted || equipped == null) { return(false); } if (EquipmentSets.CMOptions.ModuleDebug) { EquipmentSets.CMOptions.ToConsole( "OnDeactivate: '{0}', '{1}', '{2}', '{3}', '{4}'", m, UID, _Stat, _Offset, _Duration.ToSimpleString()); } m.RemoveStatMod(UID); return(true); }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("OdinBoots"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } } }
public void Clear() { for (int i = 0; i < m_Mods.Count; ++i) { object mod = m_Mods[i]; /*if ( mod is ResistanceMod ) * m_Creature.RemoveResistanceMod( (ResistanceMod) mod ); * else*/if (mod is StatMod) { m_Creature.RemoveStatMod(((StatMod)mod).Name); } else if (mod is SkillMod) { m_Creature.RemoveSkillMod((SkillMod)mod); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("SandalsoftheTamer"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("WickedClownshirt"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } } }
public static void RemoveEffects(Mobile m, bool removeMod = true) { if (m_Table.ContainsKey(m)) { Timer t = m_Table[m]; if (t != null && t.Running) { t.Stop(); } BuffInfo.RemoveBuff(m, BuffIcon.FeebleMind); if (removeMod) m.RemoveStatMod("[Magic] Int Curse"); m_Table.Remove(m); } }
public static void DoRemoveCurses( Mobile m ) { StatMod mod; mod = m.GetStatMod( "[Magic] Str Malus" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Str Malus" ); mod = m.GetStatMod( "[Magic] Dex Malus" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Dex Malus" ); mod = m.GetStatMod( "[Magic] Int Malus" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Int Malus" ); m.Paralyzed = false; EvilOmenSpell.CheckEffect( m ); StrangleSpell.RemoveCurse( m ); CorpseSkinSpell.RemoveCurse( m ); CurseSpell.RemoveEffect( m ); MortalStrike.EndWound( m ); BloodOathSpell.EndEffect( m ); SpellPlagueSpell.RemoveEffect( m ); BuffInfo.RemoveBuff( m, BuffIcon.Clumsy ); BuffInfo.RemoveBuff( m, BuffIcon.FeebleMind ); BuffInfo.RemoveBuff( m, BuffIcon.Weaken ); BuffInfo.RemoveBuff( m, BuffIcon.MassCurse ); BuffInfo.RemoveBuff( m, BuffIcon.Curse ); BuffInfo.RemoveBuff( m, BuffIcon.EvilOmen ); BuffInfo.RemoveBuff( m, BuffIcon.MortalStrike ); // TODO: Should this remove blood oath? Pain spike? }
public static void RemoveBonus( Mobile m ) { BaseArmor armor; if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is LeafweaveGloves ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is LeafweaveLeggings ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is LeafweaveSleeves ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is LeafweaveTunic ) RemoveBonus( armor ); if ( m_Bonus.ContainsKey( m ) ) { List<AttributeMod> mods = m_Bonus[m]; RemoveMods( m, mods ); m_Bonus.Remove( m ); } m.RemoveStatMod( "LeafweaveSetInt" ); }
public void RemoveStatMods( Mobile m ) { if ( m == null ) return; string modName = this.Serial.ToString(); m.RemoveStatMod( String.Format( "[Magic Hat] -Str {0}", modName ) ); m.RemoveStatMod( String.Format( "[Magic Hat] -Dex {0}", modName ) ); m.RemoveStatMod( String.Format( "[Magic Hat] +Int {0}", modName ) ); }
public static void Debuff( Mobile mob ) { mob.RemoveStatMod( "[Magic] Str Offset" ); mob.RemoveStatMod( "[Magic] Dex Offset" ); mob.RemoveStatMod( "[Magic] Int Offset" ); mob.RemoveStatMod( "Concussion" ); mob.RemoveStatMod( "blood-rose" ); mob.RemoveStatMod( "clarity-potion" ); OrangePetals.RemoveContext( mob ); mob.Paralyzed = false; mob.Hidden = false; if ( !Core.AOS ) { mob.MagicDamageAbsorb = 0; mob.MeleeDamageAbsorb = 0; Spells.Second.ProtectionSpell.Registry.Remove( mob ); Spells.Fourth.ArchProtectionSpell.RemoveEntry( mob ); mob.EndAction( typeof( DefensiveSpell ) ); } TransformationSpellHelper.RemoveContext( mob, true ); AnimalForm.RemoveContext( mob, true ); if( DisguiseTimers.IsDisguised( mob ) ) DisguiseTimers.StopTimer( mob ); if( !mob.CanBeginAction( typeof( PolymorphSpell ) ) ) { mob.BodyMod = 0; mob.HueMod = -1; mob.EndAction( typeof( PolymorphSpell ) ); } BaseArmor.ValidateMobile( mob ); BaseClothing.ValidateMobile( mob ); mob.Hits = mob.HitsMax; mob.Stam = mob.StamMax; mob.Mana = mob.ManaMax; mob.Poison = null; }
public void RevertFormOn( Mobile from ) { from.BodyValue = OriginalBody; from.Hue = OriginalHue; from.Emote( "*reverts to {0} original form*", from.Female == true ? "her" : "his" ); OriginalHue = 0; OriginalBody = 0; from.RemoveStatMod( "Bracelet of the Serpent" ); from.NameMod = null; }
public static void RemoveBonus( Mobile m ) { if ( m_Bonus.ContainsKey( m ) ) { List<object> mods = m_Bonus[m]; RemoveMods( m, mods ); m_Bonus.Remove( m ); } Item item; if ( ( item = m.FindItemOnLayer( Layer.InnerTorso ) ) != null ) item.InvalidateProperties(); if ( ( item = m.FindItemOnLayer( Layer.Pants ) ) != null ) item.InvalidateProperties(); if ( ( item = m.FindItemOnLayer( Layer.Arms ) ) != null ) item.InvalidateProperties(); if ( ( item = m.FindItemOnLayer( Layer.Gloves ) ) != null ) item.InvalidateProperties(); if ( ( item = m.FindItemOnLayer( Layer.Helm ) ) != null ) item.InvalidateProperties(); if ( ( item = m.FindItemOnLayer( Layer.Neck ) ) != null ) item.InvalidateProperties(); m.RemoveStatMod( "SorcerersSetInt" ); }
public override void OnDoubleClick(Mobile from) { if (Parent != from) { if( this.ItemID == 7107 ) this.ItemID = 7108; else if( this.ItemID == 7108 ) this.ItemID = 7107; } else if (from.Title != "Gaurdian of the Ages") { if (ItemID == 7107) { if (from.Karma <= 0) { from.Title = "Gaurdian of the Ages"; from.BodyMod = 753; from.HueMod = 1109; from.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist); m_StatMod5 = new StatMod(StatType.Str, "MOD5", 10, TimeSpan.Zero); from.AddStatMod(m_StatMod5); this.Attributes.WeaponDamage = 15; this.Attributes.ReflectPhysical = 15; this.Attributes.DefendChance = 25; this.Attributes.WeaponSpeed = 5; this.Attributes.SpellChanneling = 1; this.Attributes.SpellDamage = 10; this.Attributes.NightSight = 1; } else { from.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist); m_StatMod5 = new StatMod(StatType.Str, "MOD5", 10, TimeSpan.Zero); from.AddStatMod(m_StatMod5); this.Attributes.WeaponDamage = 15; this.Attributes.ReflectPhysical = 15; this.Attributes.DefendChance = 25; this.Attributes.WeaponSpeed = 5; this.Attributes.SpellChanneling = 1; this.Attributes.SpellDamage = 10; this.Attributes.NightSight = 1; } } else if (ItemID == 7108) { if (from.Karma >= 0) { from.Title = "Gaurdian of the Ages"; from.BodyMod = 752; from.HueMod = 1157; from.FixedParticles(0x373A, 1, 17, 1108, 7, 9914, 0); from.FixedParticles(0x376A, 1, 22, 67, 7, 9502, 0); m_StatMod5 = new StatMod(StatType.Str, "MOD5", 10, TimeSpan.Zero); from.AddStatMod(m_StatMod5); this.Attributes.WeaponDamage = 15; this.Attributes.ReflectPhysical = 15; this.Attributes.DefendChance = 25; this.Attributes.WeaponSpeed = 5; this.Attributes.SpellChanneling = 1; this.Attributes.SpellDamage = 10; this.Attributes.NightSight = 1; } else { from.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist); m_StatMod5 = new StatMod(StatType.Str, "MOD5", 10, TimeSpan.Zero); from.AddStatMod(m_StatMod5); this.Attributes.WeaponDamage = 15; this.Attributes.ReflectPhysical = 15; this.Attributes.DefendChance = 25; this.Attributes.WeaponSpeed = 5; this.Attributes.SpellChanneling = 1; this.Attributes.SpellDamage = 10; this.Attributes.NightSight = 1; } } } else { from.BoltEffect(0); from.FixedParticles(0x376A, 1, 29, 0x47D, 2, 9962, 0); from.HueMod = -1; from.Title = null; from.BodyMod = 0x0; from.RemoveStatMod("MOD5"); this.Attributes.WeaponDamage = 5; this.Attributes.ReflectPhysical = 5; this.Attributes.DefendChance = 15; this.Attributes.WeaponSpeed = 0; this.Attributes.SpellChanneling = 1; this.Attributes.SpellDamage = 5; this.Attributes.NightSight = 1; } }
public static bool ClearSkillLoss(Mobile mob) { try { SkillLossContext context; if (m_SkillLoss.TryGetValue(mob, out context) && context != null) { m_SkillLoss.Remove(mob); List<SkillMod> mods = context.m_SkillMods; foreach (SkillMod t in mods) { mob.RemoveSkillMod(t); } context.m_Timer.Stop(); mob.RemoveStatMod("Murder Penalty Str"); mob.RemoveStatMod("Murder Penalty Dex"); mob.RemoveStatMod("Murder Penalty Int"); return true; } } catch { } return false; }
public static bool AddStatBonus( Mobile caster, Mobile target, StatType type, int bonus, TimeSpan duration ) { int offset = bonus; string name = String.Format( "[Magic] {0} Offset", type ); StatMod mod = target.GetStatMod( name ); //one is negative and the other is positive, so adding up if( mod != null && ((mod.Offset <= 0 && offset > 0) || (offset < 0 && mod.Offset >= 0)) ) { target.RemoveStatMod( name ); target.AddStatMod( new StatMod( type, name, mod.Offset + offset, duration ) ); return true; } //nothing to replace, just adding else if( mod == null ) { target.AddStatMod( new StatMod( type, name, offset, duration ) ); return true; } //replacing the current mod with a larger one else if( mod != null && ((mod.Offset <= 0 && offset < mod.Offset) || (mod.Offset >= 0 && mod.Offset < offset)) ) { target.RemoveStatMod( name ); target.AddStatMod( new StatMod( type, name, offset, duration ) ); return true; } return false; }
public static void RemoveBonus( Mobile m ) { Feathernock f; Swiftflight s; if ( ( f = m.FindItemOnLayer( Layer.Cloak ) as Feathernock ) != null ) RemoveBonus( f ); if ( ( s = m.FindItemOnLayer( Layer.TwoHanded ) as Swiftflight ) != null ) RemoveBonus( s ); if ( m_Bonus.ContainsKey( m ) ) { List<AttributeMod> mods = m_Bonus[m]; RemoveMods( m, mods ); m_Bonus.Remove( m ); } m.RemoveStatMod( "MarksmanSetStr" ); }
private static void RemoveMorphEffect(Mobile m) { m.BodyMod = 0; string modName = m.Serial + "Polymorph"; m.RemoveStatMod(modName + "Str"); m.RemoveStatMod(modName + "Dex"); m.RemoveStatMod(modName + "Int"); m.VirtualArmorMod = 0; if (m is PlayerMobile) { PlayerMobile pm = ((PlayerMobile) m); pm.MinDamage = 0; pm.MaxDamage = 0; pm.SwingSpeed = 0; } m.EndAction(typeof(PolymorphSpell)); BaseArmor.ValidateMobile(m); if (m.NameMod != null) //Player has incognito, need to update name m.NameMod = IncognitoSpell.GetNameMod(m.BodyValue); }
public static void RemoveBonus( Mobile m ) { BaseArmor armor; BaseWeapon weapon; if ( ( armor = m.FindItemOnLayer( Layer.TwoHanded ) as BaseArmor ) is MalekisHonor ) RemoveBonus( armor ); if ( ( weapon = m.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon ) is Evocaricus ) RemoveBonus( weapon ); if ( m_Bonus.ContainsKey( m ) ) { List<AttributeMod> mods = m_Bonus[m]; RemoveMods( m, mods ); m_Bonus.Remove( m ); } m.RemoveStatMod( "JuggernautSetStr" ); }
public void Target( Mobile m ) { if ( !Caster.CanSee( m ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( CheckHSequence( m ) ) { SpellHelper.CheckReflect((int)Circle, Caster, ref m); if (m.Spell != null) m.Spell.OnCasterHurt(); if (BlessSpell.UnderEffect(m)) { bool message = true; if (m.Str > m.RawStr) { m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Str)); message = false; } if (m.Dex > m.RawDex) { m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Dex)); message = false; } if (m.Int > m.RawInt) { m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Int)); message = false; } if (message) m.SendAsciiMessage("You are under the effect of a bless spell and cannot get any stat penalties"); } else { SpellHelper.AddStatCurse(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true; SpellHelper.AddStatCurse(Caster, m, StatType.Dex); SpellHelper.AddStatCurse(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false; } TimeSpan duration = SpellHelper.GetDuration(Caster, m); m_UnderEffect[m] = Timer.DelayCall(duration, new TimerStateCallback(RemoveEffect), m); m.UpdateResistances(); //m.Paralyzed = false; m.FixedParticles(0x374A, 10, 15, 5028, EffectLayer.Waist); m.PlaySound( Sound ); int percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, true) * 100); TimeSpan length = SpellHelper.GetDuration(Caster, m); string args = String.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}", percentage, percentage, percentage, 10, 10, 10, 10); BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Curse, 1075835, 1075836, length, m, args)); HarmfulSpell(m); } FinishSequence(); }
private void FixMobile(Mobile m) { if (!m.Alive) m.Resurrect(); HandleCorpse(m); m.Aggressed.Clear(); m.Aggressors.Clear(); m.Hits = m.HitsMax; m.Stam = m.StamMax; m.Mana = m.ManaMax; m.DamageEntries.Clear(); m.Combatant = null; m.InvalidateProperties(); m.Criminal = false; StatMod mod; mod = m.GetStatMod("[Magic] Str Offset"); if (mod != null && mod.Offset < 0) m.RemoveStatMod("[Magic] Str Offset"); mod = m.GetStatMod("[Magic] Dex Offset"); if (mod != null && mod.Offset < 0) m.RemoveStatMod("[Magic] Dex Offset"); mod = m.GetStatMod("[Magic] Int Offset"); if (mod != null && mod.Offset < 0) m.RemoveStatMod("[Magic] Int Offset"); m.Paralyzed = false; m.CurePoison(m); // EvilOmenSpell.CheckEffect(m); StrangleSpell.RemoveCurse(m); CorpseSkinSpell.RemoveCurse(m); #region Buff Icons if (m is PlayerMobile) { PlayerMobile pm = (PlayerMobile)m; pm.RemoveBuff(BuffIcon.Clumsy); pm.RemoveBuff(BuffIcon.CorpseSkin); pm.RemoveBuff(BuffIcon.EvilOmen); pm.RemoveBuff(BuffIcon.Curse); pm.RemoveBuff(BuffIcon.FeebleMind); pm.RemoveBuff(BuffIcon.MassCurse); pm.RemoveBuff(BuffIcon.Paralyze); pm.RemoveBuff(BuffIcon.Poison); pm.RemoveBuff(BuffIcon.Strangle); pm.RemoveBuff(BuffIcon.Weaken); } #endregion m.SendMessage("The duel has ended."); }
public static void RemoveBonus( Mobile m ) { BaseArmor armor; if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is GauntletsOfTheGrizzle ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is GreavesOfTheGrizzle ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is VambracesOfTheGrizzle ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Helm ) as BaseArmor ) is SkullHelmOfTheGrizzle ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is TunicOfTheGrizzle ) RemoveBonus( armor ); if ( m_Bonus.ContainsKey( m ) ) { List<AttributeMod> mods = m_Bonus[m]; RemoveMods( m, mods ); m_Bonus.Remove( m ); } m.RemoveStatMod( "GrizzleSetStr" ); }
public void Target( Mobile m ) { if ( !Caster.CanSee( m ) ) { Caster.SendAsciiMessage("Target is not in line of sight."); DoFizzle();//One line so i could use VS Replace, feel free to change/remove comment:p } else if (SphereSpellTarget is BaseWand) { BaseWand bw = SphereSpellTarget as BaseWand; bw.RechargeWand(Caster, this); } else if ( CheckBSequence( m ) ) { if ((m.Player && m.Int <= 120 && m.Str <= 120 && m.Dex <= 120 && m.RawStatTotal <= 300) || (!m.Player)) { if (CurseSpell.UnderEffect(m)) { bool message = true; if (m.Str < m.RawStr) { m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Str)); message = false; } if (m.Dex < m.RawDex) { m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Dex)); message = false; } if (m.Int < m.RawInt) { m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Int)); message = false; } if (message) m.SendAsciiMessage("You are under the effect of a curse spell and cannot get any stat bonuses"); } else { SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true; SpellHelper.AddStatBonus(Caster, m, StatType.Dex); SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false; } } m.FixedParticles( 0x373A, 10, 15, 5018, EffectLayer.Waist ); m.PlaySound( Sound ); int percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100); TimeSpan length = SpellHelper.GetDuration(Caster, m); m_UnderEffect[m] = Timer.DelayCall(length, new TimerStateCallback(RemoveEffect), m); string args = String.Format("{0}\t{1}\t{2}", percentage, percentage, percentage); BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Bless, 1075847, 1075848, length, m, args)); } FinishSequence(); }
public override bool OnMoveOver( Mobile m ) { if( !Visible ) return true; if( m == null || !m.Player ) return true; if(!PvpCore.IsInDeathmatch( m ) ) return true; Visible = false; StatMod mod = m.GetStatMod( String.Format( "[DM] {0}", m_PowerUp ) ); if( mod != null ) m.RemoveStatMod( String.Format( "[DM] {0}", m_PowerUp ) ); switch( m_PowerUp ) { case PowerUpType.Dex: { m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist ); m.PlaySound( 0x1E6 ); m.AddStatMod( new StatMod( StatType.Dex, String.Format("[DM] {0}", m_PowerUp ), 5, TimeSpan.FromMinutes( 1.0 ) ) ); break; } case PowerUpType.Fury: { m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist ); m.PlaySound( 0x1E6 ); m.AddStatMod( new StatMod( StatType.All, String.Format( "[DM] {0}", m_PowerUp ), 5, TimeSpan.FromMinutes( 1.0 ) ) ); break; } case PowerUpType.Int: { m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist ); m.PlaySound( 0x1E6 ); m.AddStatMod( new StatMod( StatType.Int, String.Format( "[DM] {0}", m_PowerUp ), 5, TimeSpan.FromMinutes( 1.0 ) ) ); break; } case PowerUpType.Rage: { m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist ); m.PlaySound( 0x1E6 ); m.AddStatMod( new StatMod( StatType.All, String.Format( "[DM] {0}", m_PowerUp ), 10, TimeSpan.FromMinutes( 1.0 ) ) ); break; } case PowerUpType.Spirit: { m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist ); m.PlaySound( 0x1E6 ); m.AddStatMod( new StatMod( StatType.Int, String.Format( "[DM] {0}", m_PowerUp ), 15, TimeSpan.FromMinutes( 1.0 ) ) ); break; } case PowerUpType.Str: { m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist ); m.PlaySound( 0x1E6 ); m.AddStatMod( new StatMod( StatType.Str, String.Format( "[DM] {0}", m_PowerUp ), 5, TimeSpan.FromMinutes( 1.0 ) ) ); break; } case PowerUpType.Supremacy: { m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist ); m.PlaySound( 0x1E6 ); m.AddStatMod( new StatMod( StatType.All, String.Format( "[DM] {0}", m_PowerUp ), 20, TimeSpan.FromSeconds( 20.0 ) ) ); break; } } new RespawnTimer( this ).Start(); return true; }
public static void RemoveBonus( Mobile m ) { BaseArmor armor; if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is AssassinGloves ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is AssassinLeggings ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is AssassinSleeves ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is AssassinTunic ) RemoveBonus( armor ); m.RemoveStatMod( "AssassinSetDex" ); SkillMod skillmod = m_Table[m] as SkillMod; if ( skillmod != null ) { m.RemoveSkillMod( skillmod ); m_Table.Remove( m ); } }
public void Target( Mobile m ) { if ( CheckBSequence( m ) ) { SpellHelper.Turn( Caster, m ); /* Attempts to remove all Curse effects from Target. * Curses include Mage spells such as Clumsy, Weaken, Feeblemind and Paralyze * as well as all Necromancer curses. * Chance of removing curse is affected by Caster's Karma. */ int chance = 0; if ( Caster.Karma < -5000 ) chance = 0; else if ( Caster.Karma < 0 ) chance = (int) Math.Sqrt( 20000 + Caster.Karma ) - 122; else if ( Caster.Karma < 5625 ) chance = (int) Math.Sqrt( Caster.Karma ) + 25; else chance = 100; if ( chance > Utility.Random( 100 ) ) { m.PlaySound( 0xF6 ); m.PlaySound( 0x1F7 ); m.FixedParticles( 0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head ); IEntity from = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z - 10 ), Caster.Map ); IEntity to = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z + 50 ), Caster.Map ); Effects.SendMovingParticles( from, to, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100 ); StatMod mod; mod = m.GetStatMod( "[Magic] Str Offset" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Str Offset" ); mod = m.GetStatMod( "[Magic] Dex Offset" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Dex Offset" ); mod = m.GetStatMod( "[Magic] Int Offset" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Int Offset" ); m.Paralyzed = false; EvilOmenSpell.TryEndEffect( m ); StrangleSpell.RemoveCurse( m ); CorpseSkinSpell.RemoveCurse( m ); CurseSpell.RemoveEffect( m ); MortalStrike.EndWound( m ); if (Core.ML) { BloodOathSpell.RemoveCurse ( m ); } MindRotSpell.ClearMindRotScalar ( m ); BuffInfo.RemoveBuff( m, BuffIcon.Clumsy ); BuffInfo.RemoveBuff( m, BuffIcon.FeebleMind ); BuffInfo.RemoveBuff( m, BuffIcon.Weaken ); BuffInfo.RemoveBuff ( m, BuffIcon.Curse ); BuffInfo.RemoveBuff( m, BuffIcon.MassCurse ); BuffInfo.RemoveBuff( m, BuffIcon.MortalStrike ); BuffInfo.RemoveBuff ( m, BuffIcon.Mindrot ); // TODO: Should this remove blood oath? Pain spike? } else { m.PlaySound( 0x1DF ); } } FinishSequence(); }
public static void RemoveBonus( Mobile m ) { BaseArmor armor; if ( ( armor = m.FindItemOnLayer( Layer.Neck ) as BaseArmor ) is DarkwoodGorget ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Helm ) as BaseArmor ) is DarkwoodCrown ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is DarkwoodLeggings ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is DarkwoodPauldrons ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is DarkwoodGauntlets ) RemoveBonus( armor ); if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is DarkwoodChest ) RemoveBonus( armor ); if ( m_Bonus.ContainsKey( m ) ) { List<AttributeMod> mods = m_Bonus[m]; RemoveMods( m, mods ); m_Bonus.Remove( m ); } m.RemoveStatMod( "DarkwoodSetStr" ); }