static MonsterList() { Monsters = new Dictionary <char, MonsterCharacter>(); char c; c = 'f'; Monsters[c] = new MonsterCharacter(); Monsters[c].Name = "Reptoid Footsoldier"; Monsters[c].Description = "The back-bone of the Reptoid army. Dangerous in large numbers."; Monsters[c].Chixel = new Chixel(c, ConsoleColor.Magenta); Monsters[c].Health = Monsters[c].MaxHealth = 5; Monsters[c].MeleeDamage = 4; c = 'm'; Monsters[c] = new MonsterCharacter(); Monsters[c].Name = "Tuboid Marauder"; Monsters[c].Description = "An extremely deadly and fearsome beast."; Monsters[c].Chixel = new Chixel(c, ConsoleColor.Magenta); Monsters[c].Health = Monsters[c].MaxHealth = 5; Monsters[c].MeleeDamage = 10; c = 'i'; Monsters[c] = new MonsterCharacter(); // TODO: NEEDS TO BE FAST Monsters[c].Name = "Reptoid Infiltrator"; Monsters[c].Description = "Reptoid special forces -- tougher than a footsoldier."; Monsters[c].Chixel = new Chixel(c, ConsoleColor.Magenta); Monsters[c].Health = Monsters[c].MaxHealth = 10; Monsters[c].MeleeDamage = 6; c = 't'; Monsters[c] = new MonsterCharacter(); Monsters[c].Name = "Behemoid Taskmaster"; Monsters[c].Description = "A massive, hulking, melee death machine. Very durable."; Monsters[c].Chixel = new Chixel(c, ConsoleColor.Magenta); Monsters[c].Health = Monsters[c].MaxHealth = 20; Monsters[c].MeleeDamage = 10; Monsters[c].DamageReduction = 2; // RANGED c = 'a'; Monsters[c] = new MonsterCharacter(); // Runs away, fires at long range Monsters[c].Name = "Reptoid Sniper"; Monsters[c].Description = "Likes to employ hit-and-run tactics."; Monsters[c].Chixel = new Chixel(c, ConsoleColor.Magenta); Monsters[c].Health = Monsters[c].MaxHealth = 3; Monsters[c].MeleeDamage = 2; Monsters[c].RangedDamage = 2; Monsters[c].RangedAmmo = 10; Monsters[c].MaximumRange = 10; Monsters[c].TriesToKeepMinimumDistance = 5; c = 's'; Monsters[c] = new MonsterCharacter(); // Toss 1 spear at short range, then charge into melee. Monsters[c].Name = "Behemoid Siegebreaker"; Monsters[c].Description = "Carries a single, massive javelin to toss."; Monsters[c].Chixel = new Chixel(c, ConsoleColor.Magenta); Monsters[c].Health = Monsters[c].MaxHealth = 20; Monsters[c].MeleeDamage = 10; Monsters[c].RangedDamage = 10; Monsters[c].RangedAmmo = 1; Monsters[c].MaximumRange = 5; c = 'r'; Monsters[c] = new MonsterCharacter(); // Medium Range, doesn't run away Monsters[c].Name = "Reptoid Marksman"; Monsters[c].Description = "The primary ranged fighter of the Reptoid military."; Monsters[c].Chixel = new Chixel(c, ConsoleColor.Magenta); Monsters[c].Health = Monsters[c].MaxHealth = 5; Monsters[c].MeleeDamage = 2; Monsters[c].RangedDamage = 2; Monsters[c].RangedAmmo = 5; Monsters[c].MaximumRange = 7; // Corrupted Warbot // Essentiod // Giant "Q" for final boss Dictionary <char, MonsterCharacter> BaseMonsters = new Dictionary <char, MonsterCharacter>(Monsters); foreach (MonsterCharacter baseMonster in BaseMonsters.Values) { // Make an elite version in uppercase? // Make sure no collision with items char newC = baseMonster.Chixel.Glyph.ToString().ToUpper()[0]; MonsterCharacter newM = new MonsterCharacter(baseMonster); newM.Name = "Elite " + newM.Name; newM.Health = newM.MaxHealth = newM.MaxHealth * 2; newM.MeleeDamage *= 2; newM.RangedDamage *= 2; Chixel ch = new Chixel(baseMonster.Chixel); ch.Glyph = newC; ch.ForegroundColor = ConsoleColor.Red; newM.Chixel = ch; Monsters.Add(newC, newM); } }
public Tile(int x, int y, Floor floor, char textChar) { this.X = x; this.Y = y; this.Floor = floor; Item item; TileType = TileType.FLOOR; switch (textChar) { case ' ': break; case '#': TileType = TileType.WALL; break; case 'x': case 'X': TileType = TileType.DEBRIS; Chixel.ForegroundColor = ConsoleColor.Gray; break; case '+': TileType = TileType.DOOR_CLOSED; break; case '-': TileType = TileType.DOOR_OPENED; break; case '<': TileType = TileType.UPSTAIR; Floor.Upstair = this; break; case '>': TileType = TileType.DOWNSTAIR; Floor.Downstair = this; break; case '*': TileType = TileType.DOOR_LOCKED; break; case '@': // Spawn a character (only if one doesn't exist) Game.Instance.DebugMessage("Character spawned!"); if (Game.Instance.PlayerCharacter != null) { throw new Exception("Already have a player character!"); } Game.Instance.PlayerCharacter = new PlayerCharacter(this, this.Floor, new Chixel('@', ConsoleColor.DarkYellow)); break; case '»': case '«': item = new Item(); item.Name = "Conveyor Belt"; item.Description = "Part of an old manufacturing system. Non-functional."; item.Chixel = new Chixel(textChar, ConsoleColor.Gray); item.Static = true; this.Item = item; break; case '{': case '}': item = new Item(); item.Name = "Fabricator Casing"; item.Description = "Stand on the '~' to interact."; item.Chixel = new Chixel(textChar, ConsoleColor.Gray); item.Static = true; this.Item = item; break; case '~': item = new Item(); item.Name = "Upgrade Station"; item.Description = "Permanently repair/upgrade some of your systems!"; item.Chixel = new Chixel(textChar, ConsoleColor.Green); item.Static = true; item.IsFabricator = true; this.Item = item; break; default: // Everything else is either a monster or item // so do that?? TileType = TileType.FLOOR; if (textChar >= '0' && textChar <= '9') { if (FloorMaps.ItemSpawner[Floor.FloorIndex, (int)textChar - '0'] == null) { throw new Exception(string.Format("No item spawner for FloorIndex={0} and ID={1}", floor.FloorIndex, textChar)); } FloorMaps.ItemSpawner[floor.FloorIndex, (int)textChar - '0'](this); return; } else if (MonsterList.Monsters.ContainsKey(textChar)) { // Yup, it's a monster. MonsterCharacter mc = new MonsterCharacter(MonsterList.Monsters[textChar]); mc.Tile = this; // Buff the monsters as we go down in level. mc.Health = mc.MaxHealth += Floor.FloorIndex; mc.RangedDamage += (Floor.FloorIndex - 1) / 2; mc.MeleeDamage += Floor.FloorIndex / 2; mc.DamageReduction += Floor.FloorIndex / 3; mc.ToHitBonus += (Floor.FloorIndex) / 2; mc.DodgeBonus += Floor.FloorIndex / 3; return; } else if (ItemList.Items.ContainsKey(textChar)) { // It's an item this.Item = new Item(ItemList.Items[textChar]); return; } //throw new Exception("No character entry for: " + textChar); Game.Instance.DebugMessage("No character entry for: " + textChar); item = new Item(); item.Name = "Furniture"; item.Description = "There is a word from some dead, long forgotten language engraved on it."; item.Chixel = new Chixel(textChar, ConsoleColor.Gray); item.Static = true; this.Item = item; break; } }