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); }