public override bool OnDamage(Mobile m, ref int Damage) { Mobile attacker = m.FindMostRecentDamager(false); if (MyrmidexInvasionSystem.IsEnemies(m, attacker) && EodonianPotion.IsUnderEffects(attacker, PotionEffect.Kurak)) { Damage *= 3; if (Damage > 0) { m.FixedEffect(0x37B9, 10, 5); } } return(base.OnDamage(m, ref Damage)); }
public BuffType GetRandomBuff(Mobile target) { List <BuffType> buffs = new List <BuffType>(); if (MagicReflectSpell.HasReflect(target)) { buffs.Add(BuffType.MagicReflect); } if (ReactiveArmorSpell.HasArmor(target)) { buffs.Add(BuffType.ReactiveArmor); } if (ProtectionSpell.HasProtection(target)) { buffs.Add(BuffType.Protection); } TransformContext context = TransformationSpellHelper.GetContext(target); if (context != null && context.Type != typeof(AnimalForm)) { buffs.Add(BuffType.Transformation); } StatMod mod = target.GetStatMod("[Magic] Str Buff"); if (mod != null) { buffs.Add(BuffType.StrBonus); } mod = target.GetStatMod("[Magic] Dex Buff"); if (mod != null) { buffs.Add(BuffType.DexBonus); } mod = target.GetStatMod("[Magic] Int Buff"); if (mod != null) { buffs.Add(BuffType.IntBonus); } if (EodonianPotion.IsUnderEffects(target, PotionEffect.Barrab)) { buffs.Add(BuffType.BarrabHemolymph); } if (EodonianPotion.IsUnderEffects(target, PotionEffect.Urali)) { buffs.Add(BuffType.UraliTrance); } if (buffs.Count == 0) { return(BuffType.None); } BuffType type = buffs[Utility.Random(buffs.Count)]; buffs.Clear(); return(type); }