LivingObject CreateDwarf(int i) { var builder = new LivingObjectBuilder(LivingID.Dwarf) { Color = (GameColor)Helpers.GetRandomInt(GameColorRGB.NUMCOLORS - 1) + 1, Gender = LivingGender.Male, }; switch (i) { case 0: builder.Name = "Doc"; builder.SetSkillLevel(SkillID.Mining, 80); builder.SetSkillLevel(SkillID.Fighting, 40); break; case 1: builder.Name = "Grumpy"; builder.SetSkillLevel(SkillID.Carpentry, 80); builder.SetSkillLevel(SkillID.Fighting, 40); break; case 2: builder.Name = "Happy"; builder.SetSkillLevel(SkillID.WoodCutting, 80); builder.SetSkillLevel(SkillID.Fighting, 40); break; case 3: builder.Name = "Sleepy"; builder.SetSkillLevel(SkillID.Masonry, 80); builder.SetSkillLevel(SkillID.Fighting, 40); break; case 4: builder.Name = "Bashful"; builder.SetSkillLevel(SkillID.BlackSmithing, 80); builder.SetSkillLevel(SkillID.Fighting, 40); break; case 5: builder.Name = "Sneezy"; builder.SetSkillLevel(SkillID.GemCutting, 80); builder.SetSkillLevel(SkillID.Fighting, 40); break; case 6: builder.Name = "Dopey"; builder.SetSkillLevel(SkillID.Smelting, 80); builder.SetSkillLevel(SkillID.Fighting, 40); break; } var dwarf = builder.Create(this.World); Helpers.AddGem(dwarf); Helpers.AddBattleGear(dwarf); return(dwarf); }
LivingObject CreateRandomLiving(int z) { var li = m_livingInfos[Helpers.GetRandomInt(m_livingInfos.Length)]; var livingBuilder = new LivingObjectBuilder(li.ID); var living = livingBuilder.Create(m_world); living.SetAI(new Dwarrowdelf.AI.MonsterAI(living, m_world.PlayerID)); Helpers.AddBattleGear(living); return(living); }
static void AddMonsters(EnvironmentObject env) { var world = env.World; for (int i = 0; i < NUM_ORCS; ++i) { var livingBuilder = new LivingObjectBuilder(LivingID.Orc) { Color = GetRandomColor(), }; var living = livingBuilder.Create(world); living.SetAI(new Dwarrowdelf.AI.MonsterAI(living, world.PlayerID)); Helpers.AddGem(living); Helpers.AddBattleGear(living); living.MoveToMustSucceed(env, env.GetRandomEnterableSurfaceLocation()); } }