public static void ArtiChance(Mobile m, BaseCreature bc) { if (bc == null || bc.Deleted) { return; } double hits = (double)bc.GetHits(); double stam = (double)bc.GetStam(); double mana = (double)bc.GetMana(); double fromluck = m.Luck; if (fromluck > (double)1200) { fromluck = (double)1200; } double luckscaler = (double)(1.0 + (fromluck / 1000)); double artichance = luckscaler * (20 * (hits + stam + mana) / 6000); PlayerMobile pm = m as PlayerMobile; XmlArtifactBonus xab = (XmlArtifactBonus)XmlAttach.FindAttachment(pm, typeof(XmlArtifactBonus)); if (xab != null) { artichance *= xab.Value; if (artichance > 100.00) { artichance = 100.00; } if (artichance < 0.00) { artichance = 0.00; } percent = artichance / 100.00; if (m.AccessLevel > AccessLevel.GameMaster) { m.SendMessage("[GM DEBUG] {0}% drop chance.", percent * 100); } } else { if (artichance > 100.00) { artichance = 100.00; } if (artichance < 0.00) { artichance = 0.00; } percent = artichance / 100.00; if (m.AccessLevel > AccessLevel.GameMaster) { m.SendMessage("[GM DEBUG] {0}% chance.", percent * 100); } } }