public Species(Species cG) { this.damage = new DNotation(cG.damage); // Deep copy this.habitat = cG.habitat; this.rng = cG.rng; this.strength = cG.strength; this.dexterity = cG.dexterity; this.constitution = cG.constitution; this.intelligence = cG.intelligence; this.wisdom = cG.wisdom; this.charisma = cG.charisma; this.creatureImage = cG.creatureImage; this.speed = cG.speed; this.senseOfSmell = cG.senseOfSmell; this.damage = cG.damage; this.smelliness = cG.smelliness; this.bloodMax = cG.bloodMax; this.mass = cG.mass; this.color = cG.color; this.anatomy = cG.anatomy; this.weapon = cG.weapon; this.weaponChance = cG.weaponChance; this.armor = cG.armor; this.armorChance = cG.armorChance; this.name = cG.name; this.armorType = cG.armorType; this.inventory = cG.inventory; this.anatomy = cG.anatomy; }
public Creature(Creature c) { this.gold = c.gold; this.attack = new DNotation(c.attack); //Deep copy this.turn_energy = c.turn_energy; this.level = c.level; this.xpWorth = c.xpWorth; this.attack = c.attack; this.xp = c.xp; this.xpLevel = c.xpLevel; this.xpBorder = c.xpBorder; this.hp = c.hp; this.hpMax = c.hpMax; this.mp = c.mp; this.mpMax = c.mpMax; this.gp = c.gp; this.killCount = c.killCount; this.seed = c.seed; this.food = c.food; this.isPlayer = c.isPlayer; this.rng = c.rng; this.isAlive = true; this.creatureImage = c.creatureImage; this.speed = c.speed; this.turnsToWait = c.speed; this.mind = c.mind; this.name = c.name; this.smelliness = c.smelliness; this.senseOfSmell = c.senseOfSmell; this.mass = c.mass; this.color = c.color; this.pos = c.pos; this.minDLevel = c.minDLevel; this.armorType = c.armorType; this.weapon = c.weapon; this.strength = c.strength; this.dexterity = c.dexterity; this.constitution = c.constitution; this.intelligence = c.intelligence; this.wisdom = c.wisdom; this.charisma = c.charisma; this.anatomy = new List<BodyPart>(); foreach (BodyPart b in c.anatomy) this.anatomy.Add(new BodyPart(b)); this.inventory = new List<Item>(); foreach (Item i in c.inventory) this.inventory.Add(i); this.wornArmor = new List<Armor>(); foreach (Armor a in c.wornArmor) this.wornArmor.Add(a); this.isDextrous = c.isDextrous; }
public Species(byte speed, DNotation damage, int mass, byte imageIndex, Color color, string name, string habitat, List <BodyPart> anatomy, int seed) { rng = new Random(seed); rngDice = new Dice(rng.Next()); this.damage = damage; this.habitat = habitat; this.speed = speed; this.mass = mass; this.creatureImage = imageIndex; this.name = name; this.color = color; this.anatomy = anatomy; }
public QuestGiver(byte speed, DNotation attack, int creatureImage, string name, Color color, List <BodyPart> anatomy, int mass, int rngSeed, List <Item> giveWantOptions) : base(speed, attack, creatureImage, name, color, anatomy, mass, rngSeed) { rng = new Random(rngSeed); //Persistence possible wantObject = giveWantOptions[rng.Next(0, giveWantOptions.Count)].name; giveObject = wantObject; while (wantObject == giveObject && giveWantOptions.Count > 1) { Item giveItem = giveWantOptions[rng.Next(0, giveWantOptions.Count)]; giveObject = giveItem.name; inventory.Add(giveItem); //Make sure s/he actually has the item. } }
public QuestGiver(byte speed, DNotation attack, int creatureImage, string name, Color color, List<BodyPart> anatomy, int mass, int rngSeed, List<Item> giveWantOptions) : base(speed, attack, creatureImage, name, color, anatomy, mass, rngSeed) { rng = new Random(rngSeed); //Persistence possible wantObject = giveWantOptions[rng.Next(0, giveWantOptions.Count)].name; giveObject = wantObject; while (wantObject == giveObject && giveWantOptions.Count > 1) { Item giveItem = giveWantOptions[rng.Next(0, giveWantOptions.Count)]; giveObject = giveItem.name; inventory.Add(giveItem); //Make sure s/he actually has the item. } }
public Creature(byte speed, DNotation attack, int creatureImage, string name, Color color, List<BodyPart> anatomy, int mass, int rngSeed) { xpBorder = 10; level = 1; xpWorth = 1; hp = 10; hpMax = 10; mp = 10; mpMax = 10; gp = 0; xp = 0; xpLevel = 1; rng = new Random(rngSeed); this.gold = 0; this.attack = new DNotation(attack); this.killCount = 0; this.food = 15000; //Start with 15000 food units this.isPlayer = false; this.anatomy = new List<BodyPart>(anatomy); this.isAlive = true; this.creatureImage = creatureImage; this.speed = speed; this.turnsToWait = speed; this.mind = new Sentience(); this.name = name; this.smelliness = 32; this.senseOfSmell = 10; this.color = color; this.mass = mass; this.minDLevel = 1; this.rng = new Random(rngSeed); foreach (BodyPart b in this.anatomy) { if (b.flags.HasFlag(BodyPartFlags.CanPickUpItem)) { this.isDextrous = true; b.flags |= BodyPartFlags.CanUseWeapon; } } }
// TODO: Hold on to the level we're in. #endregion public Creature(byte speed, DNotation attack, int creatureImage, string name, Color color, List <BodyPart> anatomy, int mass, int rngSeed) { xpBorder = 10; level = 1; xpWorth = 1; hp = 10; hpMax = 10; mp = 10; mpMax = 10; gp = 0; xp = 0; xpLevel = 1; rng = new Random(rngSeed); this.gold = 0; this.attack = new DNotation(attack); this.killCount = 0; this.food = 15000; this.isPlayer = false; this.anatomy = new List <BodyPart>(anatomy); this.isAlive = true; this.creatureImage = creatureImage; this.speed = speed; this.turnsToWait = speed; this.mind = new Mind(this); this.name = name; this.smelliness = 32; this.senseOfSmell = 10; this.color = color; this.mass = mass; this.minDLevel = 1; this.rng = new Random(rngSeed); foreach (BodyPart b in this.anatomy) { if (b.Flags.HasFlag(BodyPartFlags.CanPickUpItem)) { this.isDextrous = true; b.Flags |= BodyPartFlags.CanUseWeapon; } } }
Room shop; //The room the shopkeeper patrols public Shopkeeper(byte speed, DNotation attack, int creatureImage, string name, Color color, List <BodyPart> anatomy, int mass, int rngSeed, List <Item> giveWantOptions) : base(speed, attack, creatureImage, name, color, anatomy, mass, rngSeed) { }
public Creature(Creature c) { this.gold = c.gold; this.attack = new DNotation(c.attack); // Deep copy this.turn_energy = c.turn_energy; this.level = c.level; this.xpWorth = c.xpWorth; this.attack = c.attack; this.xp = c.xp; this.xpLevel = c.xpLevel; this.xpBorder = c.xpBorder; this.hp = c.hp; this.hpMax = c.hpMax; this.mp = c.mp; this.mpMax = c.mpMax; this.gp = c.gp; this.killCount = c.killCount; this.seed = c.seed; this.food = c.food; this.isPlayer = c.isPlayer; this.rng = c.rng; this.isAlive = true; this.creatureImage = c.creatureImage; this.speed = c.speed; this.turnsToWait = c.speed; this.mind = c.mind; this.name = c.name; this.smelliness = c.smelliness; this.senseOfSmell = c.senseOfSmell; this.mass = c.mass; this.color = c.color; this.pos = c.pos; this.minDLevel = c.minDLevel; this.armorType = c.armorType; this.weapon = c.weapon; this.strength = c.strength; this.dexterity = c.dexterity; this.constitution = c.constitution; this.intelligence = c.intelligence; this.wisdom = c.wisdom; this.charisma = c.charisma; this.anatomy = new List <BodyPart>(); foreach (BodyPart b in c.anatomy) { this.anatomy.Add(new BodyPart(b)); } this.inventory = new List <Item>(); foreach (Item i in c.inventory) { this.inventory.Add(i); } this.wornArmor = new List <Armor>(); foreach (Armor a in c.wornArmor) { this.wornArmor.Add(a); } this.isDextrous = c.isDextrous; }
Room shop; //The room the shopkeeper patrols #endregion Fields #region Constructors public Shopkeeper(byte speed, DNotation attack, int creatureImage, string name, Color color, List<BodyPart> anatomy, int mass, int rngSeed, List<Item> giveWantOptions) : base(speed, attack, creatureImage, name, color, anatomy, mass, rngSeed) { }
public Weapon(float mass, float volume, string name, Color color, DNotation damage, List <Item> components, List <string> uses) : base(mass, volume, name, color, components, uses) { base.itemImage = 41; base.damage = damage; }