private static bool IsElementals(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.ElementalBan)).Slays(m)); }
public Item Mutate(Mobile from, int luckChance, Item item) { if (item != null) { if (item is BaseWeapon && 1 > Utility.Random(100)) { item.Delete(); item = new FireHorn(); return(item); } if (item is BaseWeapon || item is BaseArmor || item is BaseJewel || item is BaseHat) { if (Core.AOS) { int bonusProps = GetBonusProperties(); int min = m_MinIntensity; int max = m_MaxIntensity; if (bonusProps < m_MaxProps && LootPack.CheckLuck(luckChance)) { ++bonusProps; } int props = 1 + bonusProps; // Make sure we're not spawning items with 6 properties. if (props > m_MaxProps) { props = m_MaxProps; } if (from is BaseCreature && RandomItemGenerator.GenerateRandomItem(item, ((BaseCreature)from).LastKiller, (BaseCreature)from)) { return(item); } if (item is BaseWeapon) { BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, false, luckChance, props, m_MinIntensity, m_MaxIntensity); } else if (item is BaseArmor) { BaseRunicTool.ApplyAttributesTo((BaseArmor)item, false, luckChance, props, m_MinIntensity, m_MaxIntensity); } else if (item is BaseJewel) { BaseRunicTool.ApplyAttributesTo((BaseJewel)item, false, luckChance, props, m_MinIntensity, m_MaxIntensity); } else if (item is BaseHat) { BaseRunicTool.ApplyAttributesTo((BaseHat)item, false, luckChance, props, m_MinIntensity, m_MaxIntensity); } } else // not aos { if (item is BaseWeapon) { BaseWeapon weapon = (BaseWeapon)item; if (80 > Utility.Random(100)) { weapon.AccuracyLevel = (WeaponAccuracyLevel)GetRandomOldBonus(); } if (60 > Utility.Random(100)) { weapon.DamageLevel = (WeaponDamageLevel)GetRandomOldBonus(); } if (40 > Utility.Random(100)) { weapon.DurabilityLevel = (WeaponDurabilityLevel)GetRandomOldBonus(); } if (5 > Utility.Random(100)) { weapon.Slayer = SlayerName.Silver; } if (from != null && weapon.AccuracyLevel == 0 && weapon.DamageLevel == 0 && weapon.DurabilityLevel == 0 && weapon.Slayer == SlayerName.None && 5 > Utility.Random(100)) { weapon.Slayer = SlayerGroup.GetLootSlayerType(from.GetType()); } } else if (item is BaseArmor) { BaseArmor armor = (BaseArmor)item; if (80 > Utility.Random(100)) { armor.ProtectionLevel = (ArmorProtectionLevel)GetRandomOldBonus(); } if (40 > Utility.Random(100)) { armor.Durability = (ArmorDurabilityLevel)GetRandomOldBonus(); } } } } else if (item is BaseInstrument) { SlayerName slayer = SlayerName.None; if (Core.AOS) { slayer = BaseRunicTool.GetRandomSlayer(); } else { slayer = SlayerGroup.GetLootSlayerType(from.GetType()); } if (slayer == SlayerName.None) { item.Delete(); return(null); } BaseInstrument instr = (BaseInstrument)item; instr.Quality = InstrumentQuality.Regular; instr.Slayer = slayer; } if (item.Stackable) { item.Amount = m_Quantity.Roll(); } } return(item); }
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckHSequence(m)) { if (Caster is TeiravonMobile && (((TeiravonMobile)Caster).IsCleric() || ((TeiravonMobile)Caster).IsDarkCleric() || ((TeiravonMobile)Caster).IsPaladin()) && ((TeiravonMobile)Caster).Faith != TeiravonMobile.Deity.None) { TeiravonMobile Cleric = Caster as TeiravonMobile; SpellHelper.Turn(Caster, m); SpellHelper.CheckReflect((int)this.Circle, Caster, ref m); if (m is TeiravonMobile && ((TeiravonMobile)m).m_CloakOfDarkness) { return; } double damage; switch (Cleric.Faith) { case TeiravonMobile.Deity.Adalia: { damage = GetNewAosDamage(10, 1, 5, Caster.Player && m.Player); SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 100); m.Stam -= (int)damage; m.FixedParticles(0x37B9, 10, 30, 5013, 1153, 4, EffectLayer.Waist); m.PlaySound(0x470); } break; case TeiravonMobile.Deity.Cultist: { damage = GetNewAosDamage(5, 1, 5, true); SpellHelper.Damage(this, Caster, damage); damage = GetNewAosDamage(25, 5, 10, true); SpellHelper.Damage(this, m, damage, 20, 20, 20, 20, 20); m.FixedParticles(0x37C3, 10, 30, 5013, 137, 4, EffectLayer.Waist); Caster.FixedParticles(0x37C3, 10, 30, 5013, 137, 4, EffectLayer.Waist); m.PlaySound(0x44E); } break; case TeiravonMobile.Deity.Gruumsh: { int hpMissing = (int)((Caster.HitsMax - Caster.Hits) * .2); damage = GetNewAosDamage(10 + hpMissing, 1, 5, Caster.Player && m.Player); SpellHelper.Damage(this, m, damage, 0, 100, 0, 0, 0); Caster.FixedParticles(0x36FE, 10, 30, 5013, 137, 4, EffectLayer.Waist); m.PlaySound(0x056); } break; case TeiravonMobile.Deity.Jareth: { damage = GetNewAosDamage(1, 2, 2, Caster.Player && m.Player); SpellHelper.Damage(this, m, damage); Caster.MovingEffect(m, 0x1CEE, 10, 30, false, false, 1886, 0); m.PlaySound(0x3AC); } break; case TeiravonMobile.Deity.Kamalini: { damage = GetNewAosDamage(22, 1, 5, Caster.Player && m.Player); if (!m.InRange(Caster, 4)) { damage *= 0.25; // 1/4 damage at > 4 tile range } else if (!m.InRange(Caster, 2)) { damage *= 0.50; // 1/2 damage at 2 tile range } SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0); Caster.Heal((int)damage * (1 - m.ColdResistance / 100)); Caster.PrivateOverheadMessage(MessageType.Spell, 495, false, damage.ToString(), Caster.NetState); Caster.FixedParticles(0x373A, 10, 30, 5013, 157, 4, EffectLayer.Waist); m.FixedParticles(0x374A, 10, 30, 5013, 157, 4, EffectLayer.Waist); m.PlaySound(0x4B2); } break; case TeiravonMobile.Deity.Kinarugi: { damage = GetNewAosDamage(1, 2, 3, Caster.Player && m.Player); int duration = GetNewAosDamage(8, 1, 3, Caster.Player && m.Player); if (!MortalStrike.IsWounded(m)) { MortalStrike.BeginWound(m, TimeSpan.FromSeconds(duration)); } Timer m_Timer = new KinTimer(this, Caster, m, duration, (int)damage); m_Timer.Start(); m.LocalOverheadMessage(MessageType.Spell, 250, false, duration.ToString()); m.FixedParticles(0x3789, 10, 30, 5013, 1888, 2, EffectLayer.Waist); m.PlaySound(0x4B2); } break; case TeiravonMobile.Deity.Lloth: { damage = GetNewAosDamage(10, 1, 5, Caster.Player && m.Player); TavWebbing webbing = XmlAttach.FindAttachmentOnMobile(m, typeof(TavWebbing), "web") as TavWebbing; if (webbing != null) { webbing.Expiration = TimeSpan.FromSeconds(3); webbing.DoWebbing(); } else { TavWebbing newweb = new TavWebbing(5); newweb.Name = "web"; XmlAttach.AttachTo(m, newweb); } int web = Utility.RandomMinMax(3811, 3814); Caster.MovingParticles(m, web, 12, 5, false, false, 0x377a, 0x377a, -1); SpellHelper.Damage(this, m, damage, 50, 0, 0, 50, 0); Spiderling spiderling = new Spiderling(Caster, m, TimeSpan.FromSeconds(5)); spiderling.Combatant = m; Spells.Necromancy.AnimateDeadSpell.Register(Caster, spiderling); spiderling.MoveToWorld(m.Location, m.Map); spiderling.YellowHealthbar = true; Caster.PlaySound(0x21B); } break; case TeiravonMobile.Deity.Narindun: { SlayerEntry atkSlayer = SlayerGroup.GetEntryByName(SlayerName.DaemonDismissal); int val = atkSlayer.Slays(m) ? 45 : 15; damage = GetNewAosDamage(val, 1, 5, Caster.Player & m.Player); SpellHelper.Damage(this, m, damage, 0, 0, 50, 0, 50); m.FixedParticles(0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist); m.PlaySound(0x0FC); } break; case TeiravonMobile.Deity.Occido: { int val = 0; ArrayList targets = new ArrayList(); SlayerEntry undead = SlayerGroup.GetEntryByName(SlayerName.Silver); foreach (Mobile u in m.GetMobilesInRange(5)) { if (undead.Slays(u) || (u is TeiravonMobile && ((TeiravonMobile)u).IsUndead())) { val++; targets.Add(u); } } if (val > 0) { for (int i = 0; i < targets.Count; ++i) { Mobile x = (Mobile)targets[i]; Effects.SendMovingEffect(x, m, Utility.Random(0x1AE0, 4), 30, 10, false, false, 2004, 3); } } val *= 3; damage = GetNewAosDamage(5 + val, 1, 5, Caster.Player & m.Player); SpellHelper.Damage(this, m, damage, 0, 0, 50, 0, 50); m.FixedParticles(0x1F1F, 10, 30, 5013, 2562, 3, EffectLayer.Waist); m.PlaySound(0x44E); } break; case TeiravonMobile.Deity.Saerin: { int rock = Utility.RandomMetalHue(); m.FixedParticles(0x2565, 15, 15, 5013, rock, 1, EffectLayer.Waist); damage = GetNewAosDamage(15, 1, 5, Caster.Player & m.Player); SpellHelper.Damage(this, m, damage, 100, 0, 0, 0, 0); int sound = Utility.RandomMinMax(0x3B8, 0x3BE); ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, -15); m.AddResistanceMod(mod); m.PlaySound(sound); SaerTimer timer = new SaerTimer(m, mod); timer.Start(); if (m.PhysicalResistance <= 0) { m.Animate(21, 5, 1, false, false, 0); m.Freeze(TimeSpan.FromSeconds(.5)); } } break; case TeiravonMobile.Deity.Talathas: { BaseWeapon weap = Caster.Weapon as BaseWeapon; weap.OnHit(Caster, m); Caster.NextCombatTime = DateTime.Now; int effect = weap is Fists ? 0x36FE : weap.ItemID; m.FixedParticles(effect, 10, 30, 5013, 2360, 2, EffectLayer.Waist); } break; case TeiravonMobile.Deity.Valar: { string name = Utility.Random(100).ToString(); StatMod themmod = new StatMod(StatType.Dex, "ValarDrain", (int)(m.Dex * -.33), TimeSpan.FromSeconds(15)); StatMod castmod = new StatMod(StatType.Dex, "ValarDrain", (int)(m.Dex * .33), TimeSpan.FromSeconds(15)); m.AddStatMod(themmod); Caster.AddStatMod(castmod); damage = GetNewAosDamage(15, 1, 5, Caster.Player & m.Player); SpellHelper.Damage(this, m, damage, 0, 0, 0, 50, 50); m.FixedParticles(0x374A, 10, 30, 5013, 2364, 3, EffectLayer.Waist); m.MovingParticles(Caster, 0x36E4, 10, 10, false, false, 2367, 3, 0x035, 0x36FE, 0x035, 0); m.PlaySound(0x456); } break; } } else { SpellHelper.Turn(Caster, m); SpellHelper.CheckReflect((int)this.Circle, Caster, ref m); double damage; if (Core.AOS) { damage = GetNewAosDamage(17, 1, 5, Caster.Player && m.Player); } else { damage = Utility.Random(1, 15); if (CheckResisted(m)) { damage *= 0.75; m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy. } damage *= GetDamageScalar(m); } /* * if ( !m.InRange( Caster, 2 ) ) * damage *= 0.25; // 1/4 damage at > 2 tile range * else if ( !m.InRange( Caster, 1 ) ) * damage *= 0.50; // 1/2 damage at 2 tile range */ if (Core.AOS) { m.FixedParticles(0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist); m.PlaySound(0x0FC); } else { m.FixedParticles(0x374A, 10, 15, 5013, EffectLayer.Waist); m.PlaySound(0x1F1); } SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0); } } FinishSequence(); }
public static string ComputeName(BaseWeapon bw) { if (bw.IsRenamed && !string.IsNullOrEmpty(bw.Name)) { return(bw.Name); } string name; if (bw.Name == null) { name = CliLoc.LocToString(bw.LabelNumber); } else { name = bw.Name; } if (bw.Amount > 1) { name = name + "s"; } var resource = string.Empty; if (bw.Slayer != SlayerName.None) { SlayerEntry entry = SlayerGroup.GetEntryByName(bw.Slayer); if (entry != null) { string slayername = CliLoc.LocToString(entry.Title); name = slayername + " " + name.ToLower(); } } if (bw.Resource != CraftResource.None && bw.Resource != CraftResource.Iron) { resource = CraftResources.GetName(bw.Resource); } if ((bw.DamageLevel != WeaponDamageLevel.Regular || bw.AccuracyLevel != WeaponAccuracyLevel.Regular) && bw.Resource == CraftResource.Iron) { //If the weapon is accurate or magical if (bw.DamageLevel != WeaponDamageLevel.Regular && bw.AccuracyLevel != WeaponAccuracyLevel.Regular) { name = string.Format("{0} {1} of {2}", ComputeAccuracyLevel(bw), name.ToLower(), CliLoc.LocToString((1038015 + (int)bw.DamageLevel)).ToLower()); } else if (bw.AccuracyLevel != WeaponAccuracyLevel.Regular) { name = string.Format("{0} {1}", ComputeAccuracyLevel(bw), name.ToLower()); } else { name = string.Format("{0} of {1}", name, CliLoc.LocToString((1038015 + (int)bw.DamageLevel)).ToLower()); } if (bw.Quality == WeaponQuality.Exceptional) { name = "Exceptional " + name.ToLower(); } } else if (bw.Resource != CraftResource.None) { //If it's crafted by a player if (bw.Crafter != null) { if (bw.Quality == WeaponQuality.Exceptional) { if (bw.Resource != CraftResource.Iron) { name = string.Format("{0} {1} {2} crafted by {3}", "Exceptional", resource.ToLower(), name.ToLower(), bw.Crafter.Name); } else { name = string.Format("{0} {1} crafted by {2}", "Exceptional", name.ToLower(), bw.Crafter.Name); } } else if (bw.Resource != CraftResource.Iron) { if (!string.IsNullOrEmpty(resource)) { name = string.Format("{0} {1} crafted by {2}", resource, name.ToLower(), bw.Crafter.Name); } else { name = string.Format("{0} crafted by {1}", name, bw.Crafter.Name); } } else { name = string.Format("{0} crafted by {1}", name, bw.Crafter.Name); } } else if (bw.Resource != CraftResource.Iron) { if (bw.Quality == WeaponQuality.Exceptional) { if (!string.IsNullOrEmpty(resource)) { name = string.Format("{0} {1} {2}", "Exceptional", resource.ToLower(), name.ToLower()); } else { name = string.Format("{0}, {1}", "Exceptional", name.ToLower()); } } else if (!string.IsNullOrEmpty(resource)) { name = string.Format("{0} {1}", resource, name.ToLower()); } else { name = string.Format(name); } } else if (bw.Resource == CraftResource.Iron) { if (bw.Quality == WeaponQuality.Exceptional) { name = string.Format("{0} {1}", "Exceptional", name.ToLower()); } } } if (bw.Amount > 1) { name = bw.Amount + " " + name; } return(name); }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (SpellHelper.CheckTown(p, Caster) && CheckSequence()) { SpellHelper.Turn(Caster, p); if (p is Item) { p = ((Item)p).GetWorldLocation(); } List <Mobile> targets = new List <Mobile>(); Map map = Caster.Map; if (map != null) { IPooledEnumerable eable = map.GetMobilesInRange(new Point3D(p), 8); bool CanAffect = true; SlayerEntry undead = SlayerGroup.GetEntryByName(SlayerName.Silver); SlayerEntry elly = SlayerGroup.GetEntryByName(SlayerName.ElementalBan); SlayerEntry golem = SlayerGroup.GetEntryByName(SlayerName.GolemDestruction); foreach (Mobile m in eable) { CanAffect = true; Mobile pet = m; if (m is BaseCreature) { pet = ((BaseCreature)m).GetMaster(); } if (m is BaseCreature) { if (undead.Slays(m) || elly.Slays(m) || golem.Slays(m)) { CanAffect = false; } } if (Caster.Region == m.Region && Caster != m && Caster != pet && Caster.InLOS(m) && m.Blessed == false && Caster.CanBeHarmful(m, true) && !m.Paralyzed && CanAffect) { targets.Add(m); } } eable.Free(); } if (targets.Count > 0) { Caster.PlaySound(0x651); for (int i = 0; i < targets.Count; ++i) { Mobile m = targets[i]; SpellHelper.Turn(Caster, m); SpellHelper.CheckReflect(CirclePower, Caster, ref m); TimeSpan duration = TimeSpan.FromSeconds((DamagingSkill(Caster) / 4)); m.Paralyze(duration); new SleepyTimer(m, duration, Caster).Start(); HarmfulSpell(m); } Server.Misc.Research.ConsumeScroll(Caster, true, spellIndex, true); } } FinishSequence(); }
public Item Mutate(Mobile from, int luckChance, Item item) { if (item != null) { if (item is BaseWeapon && Utility.Random(100) < 1) { item.Delete(); item = new FireHorn(); return(item); } if (item is BaseWeapon || item is BaseArmor || item is BaseJewel || item is BaseHat) { if (Core.AOS) { var bonusProps = GetBonusProperties(); var min = MinIntensity; var max = MaxIntensity; if (bonusProps < MaxProps && LootPack.CheckLuck(luckChance)) { ++bonusProps; } var props = 1 + bonusProps; // Make sure we're not spawning items with 6 properties. if (props > MaxProps) { props = MaxProps; } if (item is BaseWeapon weapon) { BaseRunicTool.ApplyAttributesTo(weapon, false, luckChance, props, MinIntensity, MaxIntensity); } else if (item is BaseArmor armor) { BaseRunicTool.ApplyAttributesTo(armor, false, luckChance, props, MinIntensity, MaxIntensity); } else if (item is BaseJewel jewel) { BaseRunicTool.ApplyAttributesTo(jewel, false, luckChance, props, MinIntensity, MaxIntensity); } else { BaseRunicTool.ApplyAttributesTo( (BaseHat)item, false, luckChance, props, MinIntensity, MaxIntensity ); } } else // not aos { if (item is BaseWeapon weapon) { if (Utility.Random(100) < 80) { weapon.AccuracyLevel = (WeaponAccuracyLevel)GetRandomOldBonus(); } if (Utility.Random(100) < 60) { weapon.DamageLevel = (WeaponDamageLevel)GetRandomOldBonus(); } if (Utility.Random(100) < 40) { weapon.DurabilityLevel = (WeaponDurabilityLevel)GetRandomOldBonus(); } if (Utility.Random(100) < 5) { weapon.Slayer = SlayerName.Silver; } if (from != null && weapon.AccuracyLevel == 0 && weapon.DamageLevel == 0 && weapon.DurabilityLevel == 0 && weapon.Slayer == SlayerName.None && Utility.Random(100) < 5) { weapon.Slayer = SlayerGroup.GetLootSlayerType(from.GetType()); } } else if (item is BaseArmor armor) { if (Utility.Random(100) < 80) { armor.ProtectionLevel = (ArmorProtectionLevel)GetRandomOldBonus(); } if (Utility.Random(100) < 40) { armor.Durability = (ArmorDurabilityLevel)GetRandomOldBonus(); } } } } else if (item is BaseInstrument instr) { SlayerName slayer; if (Core.AOS) { slayer = BaseRunicTool.GetRandomSlayer(); } else { slayer = SlayerGroup.GetLootSlayerType(from.GetType()); } if (slayer == SlayerName.None) { instr.Delete(); return(null); } instr.Quality = InstrumentQuality.Regular; instr.Slayer = slayer; } if (item.Stackable) { item.Amount = Quantity.Roll(); } } return(item); }
public void OnTarget(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (Caster == m) { Caster.SendMessage("You cannot target yourself!"); } else if (BardSpell.HasHarmfulEffects(m, this.GetType())) { Caster.SendLocalizedMessage(1115772); //Your target is already under the effect of this spellsong. } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); Target = m; HarmfulSpell(m); m.FixedParticles(0x374A, 10, 15, 5028, EffectLayer.Waist); double cast = Caster.Skills[CastSkill].Value; double dam = Caster.Skills[DamageSkill].Value; m_Rounds = (int)(5 + ((cast - 90) * .3667) + (14 * (int)CollectiveBonus)); // 5 - 11 (14) m_PropertyBonus = (int)((5 + ((cast - 90) * .567)) + (14 * (int)CollectiveBonus)); // 5 - 22 (36) m_DamageChance = Math.Max(15, ((dam / 10) * 5)) + (24 * (int)CollectiveBonus); // 15 - 60 (84) m_DamageFactor = Math.Max(8, ((cast / 10) * 2.667)) + (18 * (int)CollectiveBonus); // 8 - 32 (50) m_SlayerBonus = 1; ISlayer slayer = Instrument as ISlayer; if (slayer != null) { SlayerEntry se1 = SlayerGroup.GetEntryByName(slayer.Slayer); SlayerEntry se2 = SlayerGroup.GetEntryByName(slayer.Slayer2); if ((se1 != null && se1.Slays(Target)) || (se2 != null && se2.Slays(Target))) { m_SlayerBonus = 1.5; } } if (m.Player) { // ~1_HCI~% Hit Chance.<br>~2_SDI~% Spell Damage.<br>Damage taken has a ~3_EXP~% chance to cause additional burst of physical damage.<br> BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.TribulationTarget, 1115740, 1115742, String.Format("{0}\t{1}\t{2}", m_PropertyBonus, m_PropertyBonus, (int)m_DamageChance))); } // Target: ~1_val~ <br> Damage Factor: ~2_val~% <br> Damage Chance: ~3_val~% BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.TribulationCaster, 1115740, 1151388, String.Format("{0}\t{1}\t{2}", m.Name, (int)m_DamageFactor, (int)m_DamageChance))); BeginTimer(); } FinishSequence(); }
private static bool IsOrcs(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.OrcSlaying)).Slays(m)); }
private static bool IsTrolls(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.TrollSlaughter)).Slays(m)); }
private static bool IsHumanoids(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.Repond)).Slays(m)); }
private static bool IsOgres(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.OgreTrashing)).Slays(m)); }
private static bool IsGolems(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.GolemDestruction)).Slays(m)); }
private static bool IsGiants(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.GiantKiller)).Slays(m)); }
private static bool IsFey(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.Fey)).Slays(m)); }
private static bool IsSlimy(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.SlimyScourge)).Slays(m)); }
private static bool IsPlants(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.WeedRuin)).Slays(m)); }
private static bool IsWizards(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.WizardSlayer)).Slays(m)); }
private static bool IsReptiles(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.ReptilianDeath)).Slays(m)); }
public Item Mutate(Mobile from, int luckChance, Item item) { if (item != null) { if (item is BaseWeapon && 1 > Utility.Random(100)) { item.Delete(); item = new FireHorn(); return(item); } if (item is BaseWeapon || item is BaseArmor || item is BaseJewel || item is BaseHat) { if (item is BaseWeapon) { BaseWeapon weapon = (BaseWeapon)item; if (80 > Utility.Random(100)) { weapon.AccuracyLevel = (WeaponAccuracyLevel)GetRandomOldBonus(); } if (60 > Utility.Random(100)) { weapon.DamageLevel = (WeaponDamageLevel)GetRandomOldBonus(); } if (40 > Utility.Random(100)) { weapon.DurabilityLevel = (WeaponDurabilityLevel)GetRandomOldBonus(); } if (5 > Utility.Random(100)) { weapon.Slayer = SlayerName.Silver; } if (from != null && weapon.AccuracyLevel == 0 && weapon.DamageLevel == 0 && weapon.DurabilityLevel == 0 && weapon.Slayer == SlayerName.None && 5 > Utility.Random(100)) { weapon.Slayer = SlayerGroup.GetLootSlayerType(from.GetType()); } } else if (item is BaseArmor) { BaseArmor armor = (BaseArmor)item; if (80 > Utility.Random(100)) { armor.ProtectionLevel = (ArmorProtectionLevel)GetRandomOldBonus(); } if (40 > Utility.Random(100)) { armor.Durability = (ArmorDurabilityLevel)GetRandomOldBonus(); } } } else if (item is BaseInstrument) { SlayerName slayer = SlayerName.None; slayer = SlayerGroup.GetLootSlayerType(from.GetType()); if (slayer == SlayerName.None) { item.Delete(); return(null); } BaseInstrument instr = (BaseInstrument)item; instr.Quality = InstrumentQuality.Regular; instr.Slayer = slayer; } if (item.Stackable) { item.Amount = m_Quantity.Roll(); } } return(item); }
private static bool IsDragons(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.DragonSlaying)).Slays(m)); }
public static void DropSpecialItem(Mobile from, Mobile killer, Container c) { BaseCreature bc = (BaseCreature)from; if (killer != null && c != null && !bc.IsStabled && !bc.Controlled && !bc.IsBonded) { if (killer is BaseCreature) { killer = ((BaseCreature)killer).GetMaster(); } if (killer is PlayerMobile) { Region reg = Region.Find(from.Location, from.Map); if (Server.Misc.Worlds.IsOnSpaceship(from.Location, from.Map)) { int fameCycle = (int)(from.Fame / 2400); if (fameCycle > 10) { fameCycle = 10; } if (fameCycle < 1) { fameCycle = 1; } fameCycle = Utility.RandomMinMax(0, fameCycle); while (fameCycle > 0) { fameCycle--; c.DropItem(DungeonLoot.RandomSpaceBag()); } } if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(1, 20) == 1) { int stuffedHue = 1; if (from is ElderBrownBear) { stuffedHue = 0x840; } else if (from is SabretoothBear) { stuffedHue = 0x840; } else if (from is ElderPolarBear) { stuffedHue = 0; } else if (from is ElderBlackBear) { stuffedHue = 0x497; } else if (from is CaveBear) { stuffedHue = 0x6DE; } if (stuffedHue != 1) { StuffedBear trophy = new StuffedBear(); trophy.Hue = stuffedHue; trophy.Name = "stuffed trophy of " + from.Name; trophy.AnimalWhere = "From " + Server.Misc.Worlds.GetRegionName(from.Map, from.Location); string trophyKiller = killer.Name + " the " + Server.Misc.GetPlayerInfo.GetSkillTitle(killer); trophy.AnimalKiller = "Killed by " + trophyKiller; c.DropItem(trophy); } } if (from is ServiceDroid || from is BattleDroid || from is SecurityDroid || from is MaintenanceDroid || from is ExcavationDroid || from is CombatDroid) { if (Utility.RandomMinMax(1, 300) < (from.Fame / 100)) { c.DropItem(new RobotSheetMetal(Utility.RandomMinMax(4, 10))); } if (Utility.RandomMinMax(1, 300) < (from.Fame / 100)) { c.DropItem(new RobotBatteries()); } if (Utility.RandomMinMax(1, 300) < (from.Fame / 100)) { c.DropItem(new RobotEngineParts()); } if (Utility.RandomMinMax(1, 300) < (from.Fame / 100)) { c.DropItem(new RobotCircuitBoard()); } if (Utility.RandomMinMax(1, 300) < (from.Fame / 100)) { c.DropItem(new RobotTransistor()); } if (Utility.RandomMinMax(1, 300) < (from.Fame / 100)) { c.DropItem(new RobotBolt(Utility.RandomMinMax(1, 4))); } if (Utility.RandomMinMax(1, 300) < (from.Fame / 100)) { c.DropItem(new RobotGears(Utility.RandomMinMax(1, 4))); } if (Utility.RandomMinMax(1, 300) < (from.Fame / 100)) { c.DropItem(new RobotOil(Utility.RandomMinMax(1, 2))); } } if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(0, 100) > 95) { int min = (int)(from.Fame / 200); int max = (int)(from.Fame / 100); int props = (int)(from.Fame / 1500) + Utility.RandomMinMax(0, (int)(from.Fame / 2000)); int item = 0; int color = 0; string name = "trinket"; if (from is Cyclops) { item = 0x2C86; name = "eye of " + from.Name + " " + from.Title; } else if (from is ShamanicCyclops) { item = 0x2C86; name = "eye of " + from.Name + " " + from.Title; } else if (from is Beholder) { item = 0x2C9A; name = "eye of " + from.Name + " " + from.Title; } else if (from is Gazer) { item = 0x2C9A; name = "eye of " + from.Name + " " + from.Title; } else if (from is ElderGazer) { item = 0x2C9A; name = "eye of " + from.Name + " " + from.Title; } else if (from is Lich || from is Vordo || from is LichLord || from is DemiLich || from is AncientLich || from is Surtaz || from is LichKing || from is UndeadDruid) { if (from.Backpack.FindItemByType(typeof(EvilSkull)) == null) { item = 0x2C95; name = "skull of " + from.Name + " " + from.Title; } } if (item > 0) { BaseJewel trinket = new MagicTalisman(); BaseRunicTool.ApplyAttributesTo(trinket, false, killer.Luck, props, min, max); trinket.Hue = color; trinket.ItemID = item; trinket.Name = name; c.DropItem(trinket); } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (GetPlayerInfo.LuckyKiller(killer.Luck) && Utility.RandomMinMax(0, 100) > 90 && from.Skills[SkillName.Inscribe].Base >= 20 && from.Skills[SkillName.Magery].Base >= 20) { SlayerEntry wizardkiller = SlayerGroup.GetEntryByName(SlayerName.WizardSlayer); if (wizardkiller.Slays(from)) { c.DropItem(new TomeOfWands()); } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (reg.IsPartOf("the Tower of Brass")) { int BrassFame = (int)(from.Fame / 1000); BrassFame = 100 - BrassFame; if (from is FireGiant && Utility.RandomMinMax(1, 100) >= BrassFame) { if (Utility.RandomMinMax(1, 2) == 1) { BaseArmor drop = Loot.RandomArmorOrShield(); if (drop.Resource == CraftResource.Iron) { drop.Resource = CraftResource.Brass; c.DropItem(drop); } else { drop.Delete(); } } else { BaseWeapon drop = Loot.RandomWeapon(); if (drop.Resource == CraftResource.Iron) { drop.Resource = CraftResource.Brass; c.DropItem(drop); } else { drop.Delete(); } } } if (from is BloodDemon && Utility.RandomMinMax(1, 100) >= BrassFame) { if (Utility.RandomMinMax(1, 2) == 1) { BaseArmor drop = Loot.RandomArmorOrShield(); if (drop.Resource == CraftResource.Iron) { MorphingItem.MorphMyItem(drop, "IGNORED", "brass", "IGNORED", MorphingTemplates.TemplateIceDemon("armors")); c.DropItem(drop); } else { drop.Delete(); } } else { BaseWeapon drop = Loot.RandomWeapon(); if (drop.Resource == CraftResource.Iron) { MorphingItem.MorphMyItem(drop, "IGNORED", "brass", "IGNORED", MorphingTemplates.TemplateIceDemon("weapons")); c.DropItem(drop); } else { drop.Delete(); } } } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (reg.IsPartOf("the Ancient Elven Mine")) { if (from is ShamanicCyclops && Utility.RandomMinMax(1, 10) >= 9) { if (Utility.RandomMinMax(1, 2) == 1) { BaseArmor drop = Loot.RandomArmorOrShield(); if (drop.Resource == CraftResource.Iron) { MorphingItem.MorphMyItem(drop, "IGNORED", "silver", "IGNORED", MorphingTemplates.TemplateSilver("armors")); c.DropItem(drop); } else { drop.Delete(); } } else { BaseWeapon drop = Loot.RandomWeapon(); if (drop.Resource == CraftResource.Iron) { MorphingItem.MorphMyItem(drop, "IGNORED", "silver", "IGNORED", MorphingTemplates.TemplateSilver("weapons")); c.DropItem(drop); } else { drop.Delete(); } } } if (Utility.RandomMinMax(1, 10) == 1 && from.Fame > 2000) { Item stone = new RareMetals(Utility.RandomMinMax(5, 15), "silver stones"); c.DropItem(stone); } else if (Utility.RandomMinMax(1, 10) == 1 && from.Fame > 2000) { Item ingot = new ShinySilverIngot(Utility.RandomMinMax(2, 8)); c.DropItem(ingot); } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (reg.IsPartOf("the Daemon's Crag")) { if ((GetPlayerInfo.LuckyKiller(killer.Luck) || Utility.RandomMinMax(1, 20) == 1) && (from is EvilMage || from is EvilMageLord)) { PaganArtifact pagan = new PaganArtifact(0); pagan.PaganPoints = Utility.RandomMinMax(80, 100); if (from is EvilMageLord) { pagan.PaganPoints = Utility.RandomMinMax(100, 120); } c.DropItem(pagan); } } if (reg.IsPartOf("the Zealan Tombs")) { if ((GetPlayerInfo.LuckyKiller(killer.Luck) || Utility.RandomMinMax(1, 10) == 1) && from is KhumashGor) { PaganArtifact pagan = new PaganArtifact(16); pagan.PaganPoints = Utility.RandomMinMax(100, 150); c.DropItem(pagan); } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if ((from is DemonOfTheSea) || (from is BloodDemon) || (from is Devil) || (from is TitanPyros) || (from is Balron) || (from is LesserDemon) || (from is Xurtzar) || (from is FireDemon) || (from is DeepSeaDevil) || (from is ForestDemon) || (from is RadiationDemon) || (from is Daemon) || (from is IceFiend) || (from is BlackGateDemon)) { if (90 < Utility.Random(100)) { c.DropItem(new DemonClaw()); } if (90 < Utility.Random(100)) { DemonSkin goods = new DemonSkin(); goods.Amount = Utility.RandomMinMax(1, 3); c.DropItem(goods); } } if (90 < Utility.Random(100) && killer is PlayerMobile) { Server.Misc.Skulls.MakeSkull(from, c, killer, reg.Name); } // MAKE A SKULL //-------------------------- if ((from is Unicorn) || (from is DarkUnicorn)) { if (90 < Utility.Random(100)) { c.DropItem(new UnicornHorn()); } if ((from is Unicorn) && (70 < Utility.Random(100))) { UnicornSkin goods = new UnicornSkin(); goods.Amount = Utility.RandomMinMax(1, 3); c.DropItem(goods); } } if (from is Nightmare || from is AncientNightmare) { if (70 < Utility.Random(100)) { NightmareSkin goods = new NightmareSkin(); goods.Amount = Utility.RandomMinMax(1, 3); c.DropItem(goods); } } if (from is ObsidianElemental) { if (1 == Utility.Random(1000)) { c.DropItem(new ObsidianStone()); } } if ((from is Troll) || (from is SeaTroll) || (from is SwampTroll) || (from is FrostTroll)) { if (95 < Utility.Random(100)) { TrollSkin goods = new TrollSkin(); goods.Amount = Utility.RandomMinMax(1, 2); c.DropItem(goods); } } if ((from is GoldenSerpent) || (from is BloodSnake) || (from is SilverSerpent) || (from is JungleViper) || (from is IceSerpent) || (from is GiantSerpent) || (from is SeaSnake) || (from is LavaSerpent) || (from is LargeSnake) || (from is GiantAdder)) { if (95 < Utility.Random(100)) { SerpentSkin goods = new SerpentSkin(); goods.Amount = Utility.RandomMinMax(1, 2); c.DropItem(goods); } } if ((from is AncientWyrm) || (from is LavaDragon) || (from is BottleDragon) || (from is SeaDragon) || (from is DeepSeaDragon) || (from is Dragon) || (from is Dragons) || (from is DeepSeaDragon) || (from is SeaDragon) || (from is BlackDragon) || (from is PrimevalFireDragon) || (from is PrimevalGreenDragon) || (from is PrimevalNightDragon) || (from is PrimevalRedDragon) || (from is PrimevalRoyalDragon) || (from is PrimevalRunicDragon) || (from is PrimevalSeaDragon) || (from is ReanimatedDragon) || (from is VampiricDragon) || (from is PrimevalAbysmalDragon) || (from is PrimevalAmberDragon) || (from is PrimevalBlackDragon) || (from is PrimevalDragon) || (from is PrimevalSilverDragon) || (from is PrimevalVolcanicDragon) || (from is PrimevalStygianDragon) || (from is GemDragon) || (from is DragonKing) || (from is VolcanicDragon) || (from is RadiationDragon) || (from is CrystalDragon) || (from is VoidDragon) || (from is ElderDragon) || (from is BlueDragon) || (from is SlasherOfVoid) || (from is GreenDragon) || (from is WhiteDragon) || (from is ZombieDragon) || (from is NightWyrm) || (from is JungleWyrm) || (from is DesertWyrm) || (from is MountainWyrm) || (from is OnyxWyrm) || (from is EmeraldWyrm) || (from is AmethystWyrm) || (from is SapphireWyrm) || (from is GarnetWyrm) || (from is TopazWyrm) || (from is RubyWyrm) || (from is SpinelWyrm) || (from is Wyrms) || (from is QuartzWyrm) || (from is WhiteWyrm)) { if (95 < Utility.Random(100)) { DragonSkin goods = new DragonSkin(); goods.Amount = Utility.RandomMinMax(1, 3); c.DropItem(goods); } if (95 < Utility.Random(100)) { DragonBlood goods = new DragonBlood(); goods.Amount = Utility.RandomMinMax(1, 3); c.DropItem(goods); } if ((95 < Utility.Random(100)) && (from is DragonKing)) { DragonTooth goods = new DragonTooth(); goods.Amount = Utility.RandomMinMax(1, 3); c.DropItem(goods); } } if ((from is Lich) || (from is LichLord) || (from is AncientLich) || (from is UndeadDruid) || (from is TitanLich) || (from is DemiLich) || (from is Surtaz)) { if (from is AncientLich) { LichDust goods = new LichDust(); goods.Amount = Utility.RandomMinMax(1, 3); c.DropItem(goods); } else if (80 < Utility.Random(100)) { LichDust goods = new LichDust(); goods.Amount = Utility.RandomMinMax(1, 3); c.DropItem(goods); } } if ((from is MonstrousSpider) || (from is WhiteDragon) || (from is BlackDragon) || (from is PrimevalFireDragon) || (from is PrimevalGreenDragon) || (from is PrimevalNightDragon) || (from is PrimevalRedDragon) || (from is PrimevalRoyalDragon) || (from is PrimevalRunicDragon) || (from is PrimevalSeaDragon) || (from is ReanimatedDragon) || (from is VampiricDragon) || (from is PrimevalAbysmalDragon) || (from is PrimevalAmberDragon) || (from is PrimevalBlackDragon) || (from is PrimevalDragon) || (from is PrimevalSilverDragon) || (from is PrimevalVolcanicDragon) || (from is PrimevalStygianDragon) || (from is BlueDragon) || (from is SlasherOfVoid) || (from is Dragon) || (from is Dragons && from.Body == 59) || (from is Wyrms && from.Body == 12) || (from is GreenDragon) || (from is MetalDragon) || (from is LavaDragon) || (from is BottleDragon) || (from is IceDragon) || (from is CaddelliteDragon) || (from is WhiteWyrm) || (from is GemDragon) || (from is NightWyrm) || (from is RadiationDragon) || (from is CrystalDragon) || (from is VoidDragon) || (from is ElderDragon) || (from is JungleWyrm) || (from is DesertWyrm) || (from is MountainWyrm) || (from is AntLion) || (from is MetalBeetle) || (from is OnyxWyrm) || (from is EmeraldWyrm) || (from is AmethystWyrm) || (from is SapphireWyrm) || (from is GarnetWyrm) || (from is TopazWyrm) || (from is RubyWyrm) || (from is SpinelWyrm) || (from is QuartzWyrm) || (from is ShadowWyrm) || (from is AncientWyrm) || (from is DragonKing) || (from is VolcanicDragon)) { int nBodyChance = (int)(from.Fame * 0.002) + 2; int nBodyLevel = (int)(from.Fame * 0.0006); if (nBodyLevel > 10) { nBodyLevel = 10; } if (nBodyLevel < 1) { nBodyLevel = 1; } if (nBodyChance > Utility.Random(100)) { CorpseChest corpseBox = new CorpseChest(nBodyLevel); c.DropItem(corpseBox); } } SlayerEntry wizardrykiller = SlayerGroup.GetEntryByName(SlayerName.WizardSlayer); if (wizardrykiller.Slays(from)) { if (Utility.Random(4) == 1) { if (DifficultyLevel.GetUnidentifiedChance() >= Utility.RandomMinMax(1, 100)) { Item wand = new UnknownWand(); c.DropItem(wand); } else { Item wand = Loot.RandomWand(); Server.Misc.MaterialInfo.ColorMetal(wand, 0); string wandOwner = ""; if (Utility.RandomMinMax(1, 3) == 1) { wandOwner = Server.LootPackEntry.MagicWandOwner() + " "; } wand.Name = wandOwner + wand.Name; c.DropItem(wand); } } if (Utility.Random(20) == 1) { c.DropItem(Server.Items.DungeonLoot.RandomRuneMagic()); } } // WIZARD'S HIGH SEAS ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if ((from is DeepSeaSerpent) || (from is SeaDragon) || (from is GiantSquid) || (from is DeepSeaDragon) || (from is SeaSerpent) || (from is Kraken) || (from is Leviathan)) { int nBodyChance = (int)(from.Fame * 0.002) + 2; int nBodyLevel = (int)(from.Fame * 0.0006); if (nBodyLevel > 10) { nBodyLevel = 10; } if (nBodyLevel < 1) { nBodyLevel = 1; } if (nBodyChance > Utility.Random(100)) { CorpseSailor corpseBox = new CorpseSailor(nBodyLevel); c.DropItem(corpseBox); } } SlayerEntry neptune = SlayerGroup.GetEntryByName(SlayerName.NeptunesBane); if (neptune.Slays(from) && from.Fame >= 11500) { int nWeedChance = (int)(from.Fame * 0.002) + 2; if (nWeedChance > Utility.Random(100)) { EnchantedSeaweed goods = new EnchantedSeaweed(); goods.Amount = Utility.RandomMinMax(1, 3); c.DropItem(goods); } int nPearlChance = (int)(from.Fame * 0.001) + 1; if (nPearlChance > Utility.Random(100)) { c.DropItem(new MysticalPearl()); } } //------------------------------------------------------------------------- if ((neptune.Slays(from) && from.WhisperHue == 999) || Server.Misc.Worlds.IsSeaDungeon(from.Location, from.Map)) // ONLY SEA CREATURES ON THE HIGH SEAS DROP from STUFF { int nWreckChance = (int)(from.Fame * 0.002) + 2; if (nWreckChance > Utility.Random(100)) { HighSeasRelic goods = new HighSeasRelic(); goods.RelicGoldValue = goods.RelicGoldValue + (int)(from.RawStatTotal / 3); c.DropItem(goods); } int nBottleChance = (int)(from.Fame * 0.002) + 1; if (nBottleChance > Utility.Random(100)) { int messageLevel = 0; if (from.Fame < 2500) { messageLevel = 1; } else if (from.Fame < 5000) { messageLevel = 2; } else if (from.Fame < 10000) { messageLevel = 3; } else { messageLevel = 4; } if (20 > Utility.Random(100)) { messageLevel = 0; } // 20% CHANCE FOR A RANDOM LEVEL BOTTLE Item message = new MessageInABottle(killer.Map, messageLevel, killer.Location, killer.X, killer.Y); c.DropItem(message); } int nBoxChance = (int)(from.Fame * 0.001) - 1; if (nBoxChance > Utility.Random(100) && !(from is StormGiant)) // STORM GIANTS ALREADY DROP A BOX { int boxLevel = 0; if (from.Fame < 2500) { boxLevel = 1; } else if (from.Fame < 5000) { boxLevel = 2; } else if (from.Fame < 10000) { boxLevel = 3; } else if (from.Fame < 20000) { boxLevel = 4; } else { boxLevel = 5; } LootChest MyChest = new LootChest(boxLevel); MyChest.Name = "seaweed covered chest"; MyChest.Hue = Utility.RandomList(0xB97, 0xB98, 0xB99, 0xB9A, 0xB88); c.DropItem(MyChest); } } } } }
private static bool IsLizardmen(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.LizardmanSlaughter)).Slays(m)); }
protected override void OnTarget(Mobile from, object targeted) { if (!from.Alive) { from.SendLocalizedMessage(500331); // The spirits of the dead are not the province of animal lore. } else if (targeted is HenchmanMonster || targeted is HenchmanWizard || targeted is HenchmanFighter || targeted is HenchmanArcher) { from.SendLocalizedMessage(500329); // That's not an animal! } else if (targeted is BaseCreature) { BaseCreature c = (BaseCreature)targeted; SlayerEntry skipTypeA = SlayerGroup.GetEntryByName(SlayerName.SlimyScourge); SlayerEntry skipTypeB = SlayerGroup.GetEntryByName(SlayerName.ElementalBan); SlayerEntry skipTypeC = SlayerGroup.GetEntryByName(SlayerName.Repond); SlayerEntry skipTypeD = SlayerGroup.GetEntryByName(SlayerName.Silver); SlayerEntry skipTypeE = SlayerGroup.GetEntryByName(SlayerName.GiantKiller); SlayerEntry skipTypeF = SlayerGroup.GetEntryByName(SlayerName.GolemDestruction); if (!c.IsDeadPet) { if (!skipTypeA.Slays(c) && !skipTypeB.Slays(c) && !skipTypeC.Slays(c) && !skipTypeD.Slays(c) && !skipTypeE.Slays(c) && !skipTypeF.Slays(c)) { if (c.ControlMaster == from) { from.CloseGump(typeof(AnimalLoreGump)); from.SendGump(new AnimalLoreGump(c, 0)); } else if ((!c.Controlled || !c.Tamable) && from.Skills[SkillName.AnimalLore].Value < 100.0) { from.SendLocalizedMessage(1049674); // At your skill level, you can only lore tamed creatures. } else if (!c.Tamable && from.Skills[SkillName.AnimalLore].Value < 110.0) { from.SendLocalizedMessage(1049675); // At your skill level, you can only lore tamed or tameable creatures. } else if (!from.CheckTargetSkill(SkillName.AnimalLore, c, 0.0, 120.0)) { from.SendLocalizedMessage(500334); // You can't think of anything you know offhand. } else { from.CloseGump(typeof(AnimalLoreGump)); from.SendGump(new AnimalLoreGump(c, 0)); } } else { from.SendLocalizedMessage(500329); // That's not an animal! } } else { from.SendLocalizedMessage(500331); // The spirits of the dead are not the province of animal lore. } } else { from.SendLocalizedMessage(500329); // That's not an animal! } }
private static bool IsSerpentoids(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.Ophidian)).Slays(m)); }
public virtual double GetSlayerDamageScalar(Mobile defender) { Spellbook atkBook = Spellbook.FindEquippedSpellbook(m_Caster); double scalar = 1.0; if (atkBook != null) { SlayerEntry atkSlayer = SlayerGroup.GetEntryByName(atkBook.Slayer); SlayerEntry atkSlayer2 = SlayerGroup.GetEntryByName(atkBook.Slayer2); if (atkSlayer == null && atkSlayer2 == null) { atkSlayer = SlayerGroup.GetEntryByName(SlayerSocket.GetSlayer(atkBook)); } if (atkSlayer != null && atkSlayer.Slays(defender) || atkSlayer2 != null && atkSlayer2.Slays(defender)) { defender.FixedEffect(0x37B9, 10, 5); bool isSuper = false; if (atkSlayer != null && atkSlayer == atkSlayer.Group.Super) { isSuper = true; } else if (atkSlayer2 != null && atkSlayer2 == atkSlayer2.Group.Super) { isSuper = true; } scalar = isSuper ? 2.0 : 3.0; } TransformContext context = TransformationSpellHelper.GetContext(defender); if ((atkBook.Slayer == SlayerName.Silver || atkBook.Slayer2 == SlayerName.Silver) && context != null && context.Type != typeof(HorrificBeastSpell)) { scalar += .25; // Every necromancer transformation other than horrific beast take an additional 25% damage } if (scalar != 1.0) { return(scalar); } } ISlayer defISlayer = Spellbook.FindEquippedSpellbook(defender); if (defISlayer == null) { defISlayer = defender.Weapon as ISlayer; } if (defISlayer != null) { SlayerEntry defSlayer = SlayerGroup.GetEntryByName(defISlayer.Slayer); SlayerEntry defSlayer2 = SlayerGroup.GetEntryByName(defISlayer.Slayer2); if (defSlayer != null && defSlayer.Group.OppositionSuperSlays(m_Caster) || defSlayer2 != null && defSlayer2.Group.OppositionSuperSlays(m_Caster)) { scalar = 2.0; } } return(scalar); }
private static bool IsSnakes(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.SnakesBane)).Slays(m)); }
public override void AlterMeleeDamageFrom(Mobile m, ref int damage) { base.AlterMeleeDamageFrom(m, ref damage); BaseWeapon weapon = m.Weapon as BaseWeapon; if (weapon != null) { SlayerEntry slayer = SlayerGroup.GetEntryByName(weapon.Slayer); if (slayer != null && slayer.Slays(m)) { if (slayer == slayer.Group.Super) { damage *= 2; } else { damage *= 3; } } int highest; int type = GetHighestDamageType(weapon, out highest); int heal = (int)((double)damage * ((double)highest / 100.0)); switch (this.Form) { case Form.Human: /*if(type == 0) * { * damage -= heal; * Hits = Math.Min(Hits + heal, HitsMax); * }*/ break; case Form.Fire: if (type == 1) { damage -= heal; Hits = Math.Min(Hits + heal, HitsMax); } break; case Form.Cold: if (type == 2) { damage -= heal; Hits = Math.Min(Hits + heal, HitsMax); } break; case Form.Poison: if (type == 3) { damage -= heal; Hits = Math.Min(Hits + heal, HitsMax); } break; case Form.Energy: if (type == 4) { damage -= heal; Hits = Math.Min(Hits + heal, HitsMax); } break; } } }
private static bool IsSea(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.NeptunesBane)).Slays(m)); }
private bool IsUndead(BaseCreature bc) { SlayerEntry entry = SlayerGroup.GetEntryByName(SlayerName.Silver); return(entry != null && entry.Slays(bc)); }
private static bool IsAvians(Mobile m) { return((SlayerGroup.GetEntryByName(SlayerName.AvianHunter)).Slays(m)); }