public bool DoAgility(Mobile from) { if (from.CanBuff(from, icons: BuffIcon.Agility)) { from.TryAddBuff(new StatBuff(StatType.Dex) { Title = LabelNumber > 0 ? ClilocList.Translate(LabelNumber, string.Empty, true) : null, Details = new [] { $"Potion Strength: {PotionStrength}" }, Value = Utility.Dice(PotionStrength, 2, 5), Duration = TimeSpan.FromSeconds(PotionStrength * 120), }); return(true); } return(false); }
public bool DoStrength(Mobile from) { if (from.CanBuff(from, icons: BuffIcon.Strength)) { from.TryAddBuff(new StatBuff(StatType.Str) { Title = LabelNumber > 0 ? ClilocList.Translate(LabelNumber, string.Empty, true) : null, Details = new[] { $"Potion Strength: {PotionStrength}" }, Value = Utility.Dice(PotionStrength * 2, 5, 0), Duration = TimeSpan.FromSeconds(PotionStrength * 120), }); return(true); } from.SendLocalizedMessage(502173); // You are already under a similar effect. return(false); }
public virtual bool Apply(Mobile from) { var applied = from.TryAddBuff(new StatBuff(Type) { Title = LabelNumber > 0 ? ClilocList.Translate(LabelNumber, string.Empty, true) : null, Value = Bonus, Duration = TimeSpan.FromMinutes(1.0), Details = new[] { "Mmm... fishy." }, Dispellable = false, ExpireOnDeath = false }); if (!applied) { from.SendLocalizedMessage(502173); // You are already under a similar effect. } return(applied); }
protected MessagingConfiguration() { var path = Core.FindDataFile("Cliloc.enu"); Console.Write($"\tClilocList: loading {path} ... "); Cliloc = ClilocList.Load(path); Console.WriteLine("Done."); var config = ZhConfig.DeserializeJsonConfig <MessagingSettings>("Data/messaging.json"); SuccessHue = config.SuccessHue; FailureHue = config.FailureHue; ObjectPropertyList.Enabled = config.ObjectPropertyList; Mobile.VisibleDamageType = config.VisibleDamage ? VisibleDamageType.Related : VisibleDamageType.None; Mobile.GuildClickMessage = config.GuildClickMessage; Mobile.AsciiClickMessage = config.AsciiClickMessage; IncomingEntityPackets.SingleClickProps = config.SingleClickProps; SingleClickHandler.StaffRevealedMagicItems = config.StaffRevealMagicItems; }