private static void DoFrogsRibbit(Location location) { string text = ""; switch (rng.Next(6)) { case 0: text = $" * You hear a frog croaking {FlavorText.FromSomewhere()}."; break; case 1: text = "A loud 'ribbit' bursts out from the shallows."; break; case 2: text = $" * You see a splash of water {FlavorText.FromSomewhere()}."; break; case 3: text = "A frog ribbits."; break; case 4: text = "A pair of eyes emerge from the water staring at you, then re-submerge."; break; case 5: text = $" * You hear a 'ribbit-ribbit' come {FlavorText.FromSomewhere()}."; break; } GameEngine.SayToLocation(location, text); }
private static void DoBirdsFlyBy(Location location) { string text = ""; switch (rng.Next(11)) { case 0: text = $"{FlavorText.ARandomBird()} goes flying past overhead."; break; case 1: text = " * You see a large eagle overhead."; break; case 2: text = " * You hear the chirping of birds."; break; case 3: text = " * The chirping of birds fills the air."; break; case 4: text = $" * You hear a fluttering of wings {FlavorText.ToSomewhere()}."; break; case 5: text = " * Some leaves rustle as two birds fly through them."; break; case 6: text = $"{FlavorText.ARandomBird()} flies through the air."; break; case 7: case 8: case 9: case 10: text = $"{FlavorText.ARandomBird()} can be seen flying {FlavorText.ToSomewhere()}."; break; } GameEngine.SayToLocation(location, text); }
public string LookString() { StringBuilder sb = new StringBuilder(); if (IsAlive) { sb.Append($" * {Name} has {FlavorText.AmountOfAComparedtoB(HP, MaxHP)} {Genderize("his", "her", "its")} HP left.\n"); } else { sb.Append($" * {Genderize("He", "She", "It")} fell to {causeOfDeath}.\n"); } if (IsHumanoid) { if (IsArmed && IsArmored) { sb.Append($" * {Genderize("He", "She", "It")} is equipped with {Weapon.SetName()} and {Armor.SetName()}.\n"); } else if (IsArmed) { sb.Append($" * {Genderize("He", "She", "It")} is armed with {Weapon.SetName()}.\n"); } else if (IsArmored) { sb.Append($" * {Genderize("He", "She", "It")} is wearing {Armor.SetName()}.\n"); } else { sb.Append($" * {Genderize("He", "She", "It")} is not equipped with anything.\n"); } if (!IsAlive && (IsArmed || IsArmored)) { sb.Append($" * {Genderize("His", "Her", "Its")} equipment's too damaged to salvage.\n"); } /* * if (Inventory.GetCount() > 0) * sb.Append($" * {Genderize("He", "She", "It")} is carrying {Inventory}.\n"); * else * sb.Append($" * {Genderize("He", "She", "It")} doesn't seem to be carrying anything.\n"); */ } else { if (IsArmed && IsArmored) { sb.Append($" * {Genderize("He", "She", "It")} has {Weapon.SetName()} and {Armor.SetName()}.\n"); } else if (IsArmed) { sb.Append($" * {Genderize("He", "She", "It")} has {Weapon.SetName()}.\n"); } else if (IsArmored) { sb.Append($" * {Genderize("He", "She", "It")} has {Armor.SetName()}.\n"); } } string ailments = "", comma = ""; foreach (StatusEffect se in GetStatusEffects()) { if (!se.EffectClass.Equals(EffectClass.Decay) && se.OnTurnTick != null && se.OnTurnTick != StatusEvents.DoNothing) { ailments += $"{comma}{se.EffectClass.ToString().ToLower()}"; comma = ", "; } } if (ailments == "") { sb.Append($" * {Genderize("He", "She", "It")} doesn't seem to be suffering from anything.\n"); } else { sb.Append($" * {Genderize("He", "She", "Tt")} seems to be suffering from {ailments}.\n"); } if (!IsAlive) { sb.Replace(" is ", " was "); sb.Replace(" be ", " have been "); sb.Replace(" has ", " had "); } return(sb.ToString()); }