コード例 #1
0
        public void AddFactions(WorldManager world, List <Faction> factionsInSpawn)
        {
            if (Factions == null)
            {
                Factions = new Dictionary <string, Faction>();

                Factions["Player"] = new Faction(world)
                {
                    Name = "Player",
                    Race = RaceLibrary.FindRace("Dwarf"),
                    DistanceToCapital = 0,
                    ClaimsColony      = true
                };

                Factions["The Motherland"] = new Faction(world)
                {
                    Name              = "The Motherland",
                    Race              = RaceLibrary.FindRace("Dwarf"),
                    IsRaceFaction     = false,
                    TradeMoney        = 10000,
                    IsMotherland      = true,
                    TerritorySize     = 9999,
                    DistanceToCapital = 600,
                    ClaimsColony      = true
                };

                Factions["Herbivore"] = new Faction(world)
                {
                    Name          = "Herbivore",
                    Race          = RaceLibrary.FindRace("Herbivore"),
                    IsRaceFaction = true
                };

                Factions["Carnivore"] = new Faction(world)
                {
                    Name          = "Carnivore",
                    Race          = RaceLibrary.FindRace("Carnivore"),
                    IsRaceFaction = true
                };
            }
            foreach (Faction faction in factionsInSpawn)
            {
                Factions[faction.Name] = faction;
            }
        }
コード例 #2
0
 public Faction(NewOverworldFile.OverworldData.FactionDescriptor descriptor)
 {
     Threats         = new List <Creature>();
     Minions         = new List <CreatureAI>();
     SelectedMinions = new List <CreatureAI>();
     Stockpiles      = new List <Stockpile>();
     TradeEnvoys     = new List <TradeEnvoy>();
     WarParties      = new List <WarParty>();
     OwnedObjects    = new List <Body>();
     IsRaceFaction   = false;
     TradeMoney      = 0.0m;
     GoodWill        = descriptor.GoodWill;
     PrimaryColor    = descriptor.PrimaryColory;
     SecondaryColor  = descriptor.SecondaryColor;
     Name            = descriptor.Name;
     Race            = RaceLibrary.FindRace(descriptor.Race);
     Center          = new Point(descriptor.CenterX, descriptor.CenterY);
 }
コード例 #3
0
        public void AddFactions(WorldManager world, List <Faction> factionsInSpawn)
        {
            if (Factions == null)
            {
                Factions = new Dictionary <string, Faction>();

                Factions["Player"] = new Faction(world)
                {
                    Name = "Player",
                    Race = RaceLibrary.FindRace("Dwarf")
                };

                Factions["The Motherland"] = new Faction(world)
                {
                    Name          = "The Motherland",
                    Race          = RaceLibrary.FindRace("Dwarf"),
                    IsRaceFaction = false,
                    TradeMoney    = 10000
                };

                Factions["Herbivore"] = new Faction(world)
                {
                    Name          = "Herbivore",
                    Race          = RaceLibrary.FindRace("Herbivore"),
                    IsRaceFaction = true
                };

                Factions["Carnivore"] = new Faction(world)
                {
                    Name          = "Carnivore",
                    Race          = RaceLibrary.FindRace("Carnivore"),
                    IsRaceFaction = true
                };
            }
            foreach (Faction faction in factionsInSpawn)
            {
                Factions[faction.Name] = faction;
            }
        }
コード例 #4
0
        public void Initialize(WorldManager state, CompanyInformation CompanyInformation)
        {
            if (Factions == null)
            {
                Factions           = new Dictionary <string, Faction>();
                Factions["Player"] = new Faction(state)
                {
                    Name = "Player",
                    Race = RaceLibrary.FindRace("Dwarf")
                };

                Factions["The Motherland"] = new Faction(state)
                {
                    Name              = "The Motherland",
                    Race              = RaceLibrary.FindRace("Dwarf"),
                    IsRaceFaction     = false,
                    TradeMoney        = 10000,
                    TerritorySize     = 9999,
                    DistanceToCapital = 600,
                    IsMotherland      = true,
                };
            }


            Factions["Goblins"] = new Faction(state)
            {
                Name          = "Goblins",
                Race          = RaceLibrary.FindRace("Goblins"),
                IsRaceFaction = true
            };

            Factions["Elf"] = new Faction(state)
            {
                Name          = "Elf",
                Race          = RaceLibrary.FindRace("Elf"),
                IsRaceFaction = true
            };

            Factions["Undead"] = new Faction(state)
            {
                Name          = "Undead",
                Race          = RaceLibrary.FindRace("Undead"),
                IsRaceFaction = true
            };

            Factions["Demon"] = new Faction(state)
            {
                Name          = "Demon",
                Race          = RaceLibrary.FindRace("Demon"),
                IsRaceFaction = true
            };

            Factions["Herbivore"] = new Faction(state)
            {
                Name          = "Herbivore",
                Race          = RaceLibrary.FindRace("Herbivore"),
                IsRaceFaction = true
            };

            Factions["Carnivore"] = new Faction(state)
            {
                Name          = "Carnivore",
                Race          = RaceLibrary.FindRace("Carnivore"),
                IsRaceFaction = true
            };


            Factions["Molemen"] = new Faction(state)
            {
                Name          = "Molemen",
                Race          = RaceLibrary.FindRace("Molemen"),
                IsRaceFaction = true
            };

            Factions["Player"].Economy = new Economy(Factions["Player"], 300.0m, state, CompanyInformation);
        }