private static void DrinkFromBlood(PlayerInstance ch, ObjectInstance obj) { if (CheckFunctions.CheckIfTrue(ch, !ch.IsVampire(), "It is not in your nature to do such things.")) { return; } if (obj.Timer < 0 && ch.Level > 5 && ch.GetCondition(ConditionTypes.Bloodthirsty) > 5 + ch.Level / 10) { ch.SendTo("It is beneath you to stoop to drinking blood from the ground!"); ch.SendTo("Unless in dire need, you'd much rather have blood from a victim's neck!"); return; } if (CheckFunctions.CheckIfTrue(ch, ch.GetCondition(ConditionTypes.Bloodthirsty) >= 10 + ch.Level, "Alas... you cannot consume any more blood.")) { return; } var maxCond = GetMaximumCondition(); if (CheckFunctions.CheckIfTrue(ch, ch.GetCondition(ConditionTypes.Bloodthirsty) >= maxCond || ch.GetCondition(ConditionTypes.Thirsty) >= maxCond, "You are too full to drink any blood.")) { return; } if (!MudProgHandler.ExecuteObjectProg(MudProgTypes.Use, ch, obj, null, null)) { comm.act(ATTypes.AT_BLOOD, "$n drinks from the spilled blood.", ch, null, null, ToTypes.Room); ch.SetColor(ATTypes.AT_BLOOD); ch.SendTo("You relish in the replenishment of this vital fluid..."); if (obj.Values.Quantity <= 1) { ch.SetColor(ATTypes.AT_BLOOD); ch.SendTo("You drink the last drop of blood from the spill"); comm.act(ATTypes.AT_BLOOD, "$n drinks the last drop of blood from the spill.", ch, null, null, ToTypes.Room); } } ch.GainCondition(ConditionTypes.Bloodthirsty, 1); ch.GainCondition(ConditionTypes.Full, 1); ch.GainCondition(ConditionTypes.Thirsty, 1); if (obj.Values.Quantity - 1 <= 0) { obj.Extract(); ObjectFactory.CreateBloodstain(ch, RepositoryManager.Instance); } }
private static void EvaluateThirstCondition(PlayerInstance ch) { var cond = ch.GetCondition(ConditionTypes.Thirsty); var maxCond = GetMaximumCondition(); if (cond > maxCond / 2 && cond < maxCond * 0.4f) { ch.SendTo("Your stomach begins to slosh around."); } else if (cond >= maxCond * 0.4f && cond < maxCond * 0.6f) { ch.SendTo("You start to feel bloated."); } else if (cond >= maxCond * 0.6f && cond < maxCond * 0.9f) { ch.SendTo("You feel bloated."); } else if (cond >= maxCond * 0.9f && cond < maxCond) { ch.SendTo("Your stomach is almost filled to it's brim!"); } else if (cond == maxCond) { ch.SendTo("Your stomach is full, you can't manage to get anymore down."); } }
private static void EvaluateDrunkCondition(PlayerInstance ch) { var cond = ch.GetCondition(ConditionTypes.Drunk); var maxCond = GetMaximumCondition(); if (cond > maxCond / 2 && cond < maxCond * 0.4f) { ch.SendTo("You feel quite sloshed."); } else if (cond >= maxCond * 0.4f && cond < maxCond * 0.6f) { ch.SendTo("You start to feel a little drunk."); } else if (cond >= maxCond * 0.6f && cond < maxCond * 0.9f) { ch.SendTo("Your vision starts to get blurry."); } else if (cond >= maxCond * 0.9f && cond < maxCond) { ch.SendTo("You feel very drunk."); } else if (cond == maxCond) { ch.SendTo("You feel like you're going to pass out."); } }
private static void EvaluateBloodthirstCondition(PlayerInstance ch) { var cond = ch.GetCondition(ConditionTypes.Bloodthirsty); var maxCond = GetMaximumCondition(); if (cond > maxCond / 2 && cond < maxCond * 0.4f) { ch.SendTo("&rYou replenish your body with the vital fluid."); } else if (cond >= maxCond * 0.4f && cond < maxCond * 0.6f) { ch.SendTo("&rYour thirst for blood begins to decrease."); } else if (cond >= maxCond * 0.6f && cond < maxCond * 0.9f) { ch.SendTo("&RThe thirst for blood begins to leave you..."); } else if (cond >= maxCond * 0.9f && cond < maxCond) { ch.SendTo("&RYou drink the last drop of the fluid, the thirst for more leaves your body."); } }