Beispiel #1
0
        public void CreateCiv(int id, int whichHumanPlayerIsUsed, bool alive, int style, string leaderName, string tribeName, string adjective,
                              int gender, int money, int tribeNumber, int researchProgress, int researchingTech, int sciRate, int taxRate,
                              int government, int reputation, bool[] techs)
        {
            // If leader name string is empty (no manual input), find the name in RULES.TXT (don't search for barbarians)
            if (id != 0 && leaderName.Length == 0)
            {
                leaderName = (gender == 0) ? Rules.LeaderNameHIS[tribeNumber] : Rules.LeaderNameHER[tribeNumber];
            }

            // If tribe name string is empty (no manual input), find the name in RULES.TXT (don't search for barbarians)
            if (id != 0 && tribeName.Length == 0)
            {
                tribeName = Rules.LeaderPlural[tribeNumber];
            }

            // If adjective string is empty (no manual input), find adjective in RULES.TXT (don't search for barbarians)
            if (id != 0 && adjective.Length == 0)
            {
                adjective = Rules.LeaderAdjective[tribeNumber];
            }

            // Set citystyle from input only for player civ. Other civs (AI) have set citystyle from RULES.TXT
            if (id != 0 && id != whichHumanPlayerIsUsed)
            {
                style = Rules.LeaderCityStyle[tribeNumber];
            }

            Civilization civ = new Civilization
            {
                Id             = id,
                Alive          = alive,
                CityStyle      = (CityStyleType)style,
                LeaderName     = leaderName,
                TribeName      = tribeName,
                Adjective      = adjective,
                Money          = money,
                ReseachingTech = researchingTech,
                Techs          = techs,
                ScienceRate    = sciRate * 10,
                TaxRate        = taxRate * 10,
                Government     = (GovernmentType)government
            };

            _civs.Add(civ);
        }
Beispiel #2
0
 public CivEventArgs(CivEventType eventType, Civilization civ)
 {
     EventType = eventType;
     Civ       = civ;
 }