Exemple #1
0
        public Schiff(Pirat p, Meer m)
        {
            Random r = new Random();

            int schiffRandomMain   = r.Next(Enums.Schiff.SchiffMain.Count() - 1);
            int schiffRandomSuffix = r.Next(Enums.Schiff.SchiffSuffix.Count() - 1);

            this.Name = String.Format("{0} {1}",
                                      Enums.Schiff.SchiffMain.First(x => x.Key == (schiffRandomMain < 0 ? 0 : schiffRandomMain)).Value,
                                      Enums.Schiff.SchiffSuffix.First(x => x.Key == (schiffRandomSuffix < 0 ? 0 : schiffRandomSuffix)).Value);

            this.LocationType = Enums.LocationType.Schiff;
            this.NamePrefix   = "auf dem Schiff";
            this.Pirat        = p;
            this.Meer         = m;

            if (this.NPCPiraten == null)
            {
                this.NPCPiraten = new List <Pirat>();
            }
            else
            {
                this.NPCPiraten.Clear();
            }
            for (int c = 0; c < r.Next(1, 3); c++)
            {
                this.NPCPiraten.Add(new Pirat(String.Empty, String.Empty, String.Empty, 30, 100));
                //r.Next(this.Pirat.Staerke + 20)
            }
        }
Exemple #2
0
        public Insel(Pirat p, Meer m)
        {
            Random r = new Random();

            int islandRandomPrefix = r.Next(Enums.IslandNames.IslandPrefix.Count() - 1);
            int islandRandomMain   = r.Next(Enums.IslandNames.IslandMain.Count() - 1);
            int islandRandomSuffix = r.Next(Enums.IslandNames.IslandSuffix.Count() - 1);

            this.Name = String.Format("{0} {1} {2}",
                                      Enums.IslandNames.IslandPrefix.First(x => x.Key == (islandRandomPrefix < 0 ? 0: islandRandomPrefix)).Value,
                                      Enums.IslandNames.IslandMain.First(x => x.Key == (islandRandomMain < 0 ? 0 : islandRandomMain)).Value,
                                      Enums.IslandNames.IslandSuffix.First(x => x.Key == (islandRandomSuffix < 0 ? 0 : islandRandomSuffix)).Value);
            this.Kneipe       = new Kneipe(p, this);
            this.Strand       = new Strand(p, this);
            this.LocationType = Enums.LocationType.Insel;
            this.NamePrefix   = "auf der Insel";
            this.Pirat        = p;
            this.Meer         = m;
        }