public Item(string _name, string _id) { Name = _name; Adjectives = new List <string>(); Buffs = Buff.Randomized(_name.GetHashCode(), 10); ID = _id; }
public Item(string _name, string _id, int _value, int _weight) { Name = _name; Value = _value; Weight = _weight; Adjectives = new List <string>(); Buffs = Buff.Randomized(_name.GetHashCode(), 10); ID = _id; }
public Monster(string _name, string _id, int _damage, int _accuracy) { Health = 25; Damage = _damage; Accuracy = _accuracy; Name = _name; Adjectives = new List <string>(); Buffs = Buff.Randomized(_name.GetHashCode(), 10); ID = _id; }
public Monster(string _name, string _id) { Health = 25; Damage = 10; Accuracy = 75; Name = _name; Adjectives = new List <string>(); Buffs = Buff.Randomized(_name.GetHashCode(), 50); ID = _id; }
public Weapon(string _name, string _id) { Weight = 5; Value = 10; Damage = 10; Accuracy = 75; Name = _name; Adjectives = new List <string>(); Buffs = Buff.Randomized(_name.GetHashCode(), 10); ID = _id; }
public Weapon(string _name, string _id, int _value, int _weight) { Weight = 5; Value = 10; Damage = 10; Accuracy = 75; Name = _name; Accuracy = 1 + Accuracy * (int)((float)_value / (float)Value); Damage = 1 + Damage * (int)((float)_weight / (float)Weight); Value = _value; Weight = _weight; Adjectives = new List <string>(); Buffs = Buff.Randomized(_name.GetHashCode(), 10); ID = _id; }
public void GenerateRandom(int _seed, List <Item> _itemsMaster, List <Weapon> _weaponsMaster, List <Monster> _monstersMaster) { Random RNG = new Random(_seed); Buffs = Buff.Randomized(RNG.Next(), 10); Description = "You enter a randomly generated room. "; ExtraDescript = "This room was generated at random, so there's not much of a description. Sorry."; int rt = RNG.Next(5); if (rt == 0) { Description = "This room is poorly lit. "; ExtraDescript = "The only source of light in the room is a faint glow off some green fungus, "; ExtraDescript += "but from what you can see it is roughly square, with a dirt floor and rough "; ExtraDescript += "stone brick walls. The room stinks of mildew and decay. "; } else if (rt == 1) { Description = "You are in a large, round room. "; ExtraDescript = "This room is large and circular. It is brightly lit by an ornate, gold chandelier in the center, "; ExtraDescript += "and you can see file gold and lapis lazuli inlays in the marble floor. "; ExtraDescript += "The walls are ornamented with masterful bas relief sculptures of wars long past. "; } else if (rt == 2) { Description = "You are now standing in water. "; ExtraDescript = "This room is small and irregular in shape, and you are standing in ankle-deep water. "; ExtraDescript += "The water is murky with scum floating on top, but you feel silt beneath your feet "; ExtraDescript += "with no indication of a solid floor. "; } else if (rt == 3) { Description = "This room is warm and has a sandy floor. "; ExtraDescript = "This room is long and rectangular, with smooth stone brick walls and a floor covered in "; ExtraDescript += "pale yellow sand. It is very warm in here, and you sweat a little as you look around. "; } else if (rt == 4) { Description = "You are in a dim, hot room. "; ExtraDescript = "This is less of a room than a cave. The walls are craggy reddish stone covered in "; ExtraDescript += "scrapes, as if gouged by claws. It is very, very hot in here, and from cracks "; ExtraDescript += "in the floor you can hear screams rising from the dark. What is this awful place? "; } int n = RNG.Next(5); for (int i = 0; i < n; i++) { Contents.Add(_itemsMaster[(int)RNG.Next(_itemsMaster.Count)].Copy()); } n = RNG.Next(3); for (int i = 0; i < n; i++) { Contents.Add(_weaponsMaster[(int)RNG.Next(_weaponsMaster.Count)].Copy()); } n = RNG.Next(5); for (int i = 0; i < n; i++) { Contents.Add(_monstersMaster[(int)RNG.Next(_monstersMaster.Count)].Copy()); } Description += "There "; if (n == 0) { Description += "are no monsters "; } else if (n == 1) { Description += "is one monster "; } else if (n == 2) { Description += "are two monsters "; } else { Description += "are several monsters "; } Description += "in here.\n"; }