示例#1
0
 public Guards()
 {
     xdocGuards = new XmlDocument();
     xdocGuards.Load(GUARDSSOURCEFILENAME);
     ca_parser_ = new ComboArmyParser(xdocGuards.DocumentElement);
     m_parser_  = new MonstersParser(xdocGuards.DocumentElement);
     tg_parser_ = new TownGarrisonParser(xdocGuards.DocumentElement,
                                         EnumConvert.MapSizeFromInt(Settings.Default.SelectedSizeIndex));
     ts_parser_ = new TownSpecParser();
 }
示例#2
0
        public ComboArmyBuilder(ComboArmyParser ca_parser, MonstersParser m_parser, int size)
        {
            ca_parser_ = ca_parser;
            m_parser_  = m_parser;
            size_      = size;

            //define weakest monster
            weakest_monster_.Power = int.MaxValue;
            m_parser_.Monsters.ForEach(
                delegate(Monster m) {
                if (m.Level == 1 && m.Power < weakest_monster_.Power)
                {
                    weakest_monster_ = m;
                }
            }
                );

            gen_placeholders(null); //generate placeholders for monsters in army
        }