public override void GenerateFlowDocument()
        {
            _flowDocument = new FlowDocument();
            DocBuilder.AddHeader(ref _flowDocument, NodeName, 3);
            if (!String.IsNullOrEmpty(Description))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
            }
            DocBuilder.AddContentLine(ref _flowDocument, "Type", new DocContentItem("Gas Giant"));
            DocBuilder.AddContentLine(ref _flowDocument, "Body", new DocContentItem(_body, 19, "Table 1-6: Body"));
            DocBuilder.AddContentLine(ref _flowDocument, "Gravity", new DocContentItem(_gravity, 20, "Table 1-7: Gravity"));
            if (_planetaryRingsDebris == 1)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Planetary Rings (Debris)", new DocContentItem("No additional penalty to required Pilot Test when passing through the Rings", 20, "Table 1-8: Orbital Features"));
            }
            else if (_planetaryRingsDebris > 1)
            {
                int multiplier = _planetaryRingsDebris - 1;
                int penalty    = -10 * multiplier;
                DocBuilder.AddContentLine(ref _flowDocument, "Planetary Rings (Debris)", new DocContentItem(penalty + " penalty to required Pilot Test when passing through the Rings", 20, "Table 1-8: Orbital Features"));
            }
            if (_planetaryRingsDust > 0)
            {
                int multiplier = _planetaryRingsDust - 1;
                int penalty    = (-5 * multiplier) - 20;
                DocBuilder.AddContentLine(ref _flowDocument, "Planetary Rings (Dust)", new DocContentItem(penalty + " penalty to use augers through or within the Rings", 20, "Table 1-8: Orbital Features"));
            }

            if (_inhabitants != Species.None)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitants", new DocContentItem(GetSpeciesText(_inhabitants)));
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitant Development", _inhabitantDevelopment);
            }
        }
        public override void GenerateFlowDocument()
        {
            _flowDocument = new FlowDocument();
            DocBuilder.AddHeader(ref _flowDocument, NodeName, 3);
            if (!String.IsNullOrEmpty(Description))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
            }
            DocBuilder.AddContentLine(ref _flowDocument, "Station Type", new DocContentItem(_stationOrigin, 15, "Table 1-4: Derelict Station Origins"));
            DocBuilder.AddContentLine(ref _flowDocument, "Armour", new DocContentItem(Armour.ToString(CultureInfo.InvariantCulture), 15, "Derelict Station"));
            DocBuilder.AddContentLine(ref _flowDocument, "Hull Integrity", new DocContentItem(_hullIntegrity.ToString(CultureInfo.InvariantCulture), 15, "Derelict Station"));
            if (_resourceArcheotechCache > 0)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Archeotech Resources", new DocContentItem(ResourceArcheotechCacheText));
            }
            if (_resourceXenosRuins > 0)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Xenotech Resources", new DocContentItem(ResourceXenosRuinsText));
            }
            if (_resourceArcheotechCache == 0 && _resourceXenosRuins == 0)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Resources", new DocContentItem("None"));
            }

            if (_inhabitants != Species.None)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitants", new DocContentItem(GetSpeciesText(_inhabitants)));
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitant Development", _inhabitantDevelopment);
            }
        }
        public override void GenerateFlowDocument()
        {
            _flowDocument = new FlowDocument();
            DocBuilder.AddHeader(ref _flowDocument, _ship.ShipName, 3);
            if (!String.IsNullOrEmpty(Description))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
            }
            DocBuilder.AddContentLine(ref _flowDocument, "Species", new DocContentItem(Globals.GetSpeciesString(_ship.Race)));
            DocBuilder.AddContentLine(ref _flowDocument, "Ship Type", new DocContentItem(_ship.ShipName, _ship.PageNumber, "", _ship.BookSource));
            DocBuilder.AddContentLine(ref _flowDocument, "Ship Class", StarshipTools.GetShipClassDoc(_ship.ShipClass));

            if (_ship.Race == Species.Human && _ship.ShipName != "Wolfpack Raider")
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Power", new DocContentItem(_ship.UsedPower + " / " + _ship.TotalPower));
                DocBuilder.AddContentLine(ref _flowDocument, "Space", new DocContentItem(_ship.UsedSpace + " / " + _ship.TotalSpace));
                if (_ship.EssentialComponents.Count > 0)
                {
                    List <DocContentItem> items = _ship.EssentialComponents.Select(component => new DocContentItem(component.ComponentName, component.PageNumber, "", component.BookSource)).ToList();
                    DocBuilder.AddContentList(ref _flowDocument, "Essential Components", items);
                }
                else
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Essential Components", new DocContentItem("None"));
                }
                if (_ship.SupplementalComponents.Count > 0)
                {
                    List <DocContentItem> items = _ship.SupplementalComponents.Select(component => new DocContentItem(component.ComponentName, component.PageNumber, "", component.BookSource)).ToList();
                    DocBuilder.AddContentList(ref _flowDocument, "Supplemental Components", items);
                }
                else
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Supplemental Components", new DocContentItem("None"));
                }
                if (_ship.WeaponComponents.Count > 0)
                {
                    List <DocContentItem> items = _ship.WeaponComponents.Select(component => new DocContentItem(component.MountSlot + ": " + component.ComponentName, component.PageNumber, "", component.BookSource)).ToList();
                    DocBuilder.AddContentList(ref _flowDocument, "Weapon Components", items);
                }
                else
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Essential Components", new DocContentItem("None"));
                }
            }
            else if (_ship.Race == Species.Ork)
            {
                if (_ship.OrkUpgrades.Count > 0)
                {
                    List <DocContentItem> items = _ship.OrkUpgrades.Select(upgrade => new DocContentItem(upgrade)).ToList();
                    DocBuilder.AddContentList(ref _flowDocument, "Orky Ship Modifications", items);
                }
                else
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Orky Ship Modifications", new DocContentItem("None"));
                }
            }
        }
 public override void GenerateFlowDocument()
 {
     _flowDocument = new FlowDocument();
     DocBuilder.AddHeader(ref _flowDocument, NodeName, 3);
     if (!String.IsNullOrEmpty(Description))
     {
         DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
     }
     DocBuilder.AddContentLine(ref _flowDocument, "", new DocContentItem("Dust Clouds follow the rules for Nebulae on page 227 of the Rogue Trader Core Rulebook. ", 15, "Dust Cloud"));
 }
 public override void GenerateFlowDocument()
 {
     _flowDocument = new FlowDocument();
     DocBuilder.AddHeader(ref _flowDocument, NodeName, 2);
     DocBuilder.AddContentLine(ref _flowDocument, "System Influence", new DocContentItem(GetZoneSizeString(), 13, "Table 1-2: Star Generation"));
     if (Children.Count == 0)
     {
         DocBuilder.AddContentLine(ref _flowDocument, "", new DocContentItem("This system's " + NodeName + " is empty and barren. Maybe there was something here once, but there's nothing left now. "));
     }
 }
        public override void GenerateFlowDocument()
        {
            _flowDocument = new FlowDocument();
            DocBuilder.AddHeader(ref _flowDocument, NodeName, 5);
            if (!String.IsNullOrEmpty(Description))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
            }
            DocBuilder.AddContentLine(ref _flowDocument, "Type", new DocContentItem("Large Asteroid", 16));

            if (_inhabitants != Species.None)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitants", new DocContentItem(GetSpeciesText(_inhabitants)));
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitant Development", _inhabitantDevelopment);
            }
        }
 public override void GenerateFlowDocument()
 {
     _flowDocument = new FlowDocument();
     DocBuilder.AddHeader(ref _flowDocument, NodeName, 2);
     if (!String.IsNullOrEmpty(Description))
     {
         DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
     }
     if (_pirateDenContainsWayfarerStation)
     {
         DocBuilder.AddContentLine(ref _flowDocument, "Pirate Den", new DocContentItem("The pirates in this system are based around a space station (such as a Wayfarer Station).", 210, "Wayfarer Station", RuleBook.CoreRuleBook));
     }
     if (Children.Count > 0)
     {
         DocBuilder.AddContentLine(ref _flowDocument, "Number of Pirate Ships Present", new DocContentItem(Children.Count.ToString(CultureInfo.InvariantCulture)));
     }
 }
Esempio n. 8
0
 public override void GenerateFlowDocument()
 {
     _flowDocument = new FlowDocument();
     DocBuilder.AddHeader(ref _flowDocument, NodeName, 3);
     if (!String.IsNullOrEmpty(Description))
     {
         DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
     }
     if (NumSolarFlaresInThisZone > 1)
     {
         DocBuilder.AddContentLine(ref _flowDocument, "", new DocContentItem("There are Solar Flares in this zone that are unusually strong. There are a total of " + NumSolarFlaresInThisZone + " instances of Solar Flares present, giving a +" + (NumSolarFlaresInThisZone - 1) + " bonus to the 1d10 roll for determining if there is a Solar Flare that day. ", 16, "Solar Flares"));
     }
     else
     {
         DocBuilder.AddContentLine(ref _flowDocument, "", new DocContentItem("There are Solar Flares in this zone of regular strength. There are no additional instances of Solar Flares present to add any further penalties. ", 16, "Solar Flares"));
     }
 }
 public override void GenerateFlowDocument()
 {
     _flowDocument = new FlowDocument();
     DocBuilder.AddHeader(ref _flowDocument, NodeName, 3);
     if (!String.IsNullOrEmpty(Description))
     {
         DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
     }
     if (NumRadiationBurstsInThisZone > 1)
     {
         DocBuilder.AddContentLine(ref _flowDocument, "", new DocContentItem("There are Radiation Bursts that are unusually strong in this zone. There are a total of " + NumRadiationBurstsInThisZone + " instances of Radiation Bursts present, giving a -" + (NumRadiationBurstsInThisZone - 1) * 5 + " penalty to Detection after halving. ", 16, "Radiation Bursts"));
     }
     else
     {
         DocBuilder.AddContentLine(ref _flowDocument, "", new DocContentItem("There are Radiation Burst of regular strength in this zone. There are no additional instances of Radiation Bursts present to add any further penalties. ", 16, "Radiation Bursts"));
     }
 }
        public override void GenerateFlowDocument()
        {
            _flowDocument = new FlowDocument();
            DocBuilder.AddHeader(ref _flowDocument, NodeName, 3);
            if (!String.IsNullOrEmpty(Description))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
            }
            DocBuilder.AddContentLine(ref _flowDocument, "Treasure Type", GetTreasureType());
            DocBuilder.AddContentLine(ref _flowDocument, "Item", _treasureName);
            DocBuilder.AddContentLine(ref _flowDocument, "Origin", GetOriginTypeDoc());
            DocBuilder.AddContentLine(ref _flowDocument, "Craftsmanship", GetCraftsmanship());

            if (_origin == TreasureOrigin.AncientMiracle)
            {
                if (_miraclesOfTheDarkAge.Count == 1)
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Miracles of the Dark Age", _miraclesOfTheDarkAge[0]);
                }
                else if (_miraclesOfTheDarkAge.Count > 1)
                {
                    DocBuilder.AddContentList(ref _flowDocument, "Miracles of the Dark Age", _miraclesOfTheDarkAge);
                }
            }
            else if (_origin == TreasureOrigin.AlienTechnology)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Xenos Construction", _xenosConstruction);
            }
            else if (_origin == TreasureOrigin.CursedArtefact)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Mark of the Curse", _markOfTheCurse);
            }

            if (!String.IsNullOrWhiteSpace(_quirk1))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Quirk", new DocContentItem(_quirk1, 92, "Table 2-35: Quirks"));
            }
            if (!String.IsNullOrWhiteSpace(_quirk2))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Quirk", new DocContentItem(_quirk2, 92, "Table 2-35: Quirks"));
            }
        }
Esempio n. 11
0
        public override void GenerateFlowDocument()
        {
            _flowDocument = new FlowDocument();
            DocBuilder.AddHeader(ref _flowDocument, NodeName, 3);
            if (!String.IsNullOrEmpty(Description))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
            }
            DocBuilder.AddContentLine(ref _flowDocument, "Fleet Composition", new DocContentItem(_fleetComposition, 17, "Table 1-5: Starship Graveyard Origins"));
            if (Properties.Settings.Default.BookBattlefleetKoronus)
            {
                List <DocContentItem> items = _hulks.Select(hulk => hulk.GenerateDocItem()).ToList();
                DocBuilder.AddContentList(ref _flowDocument, "Hulks", items);
            }
            else
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Number of Hulks", new DocContentItem(_hulks.Count.ToString(CultureInfo.InvariantCulture)));
            }
            if (HasAdditionalResources())
            {
                //DocBuilder.AddContentList(ref _flowDocument, "Resources", GetAdditionalResourceList());
                if (_resourceArcheotechCache > 0)
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Archeotech Resources", new DocContentItem(ResourceArcheotechCacheText, 28));
                }
                if (_resourceXenosRuins > 0)
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Xenotech Resources", new DocContentItem(ResourceXenosRuinsText, 31));
                }
            }
            else
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Resources", new DocContentItem("None"));
            }

            if (_inhabitants != Species.None)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitants", new DocContentItem(GetSpeciesText(_inhabitants)));
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitant Development", _inhabitantDevelopment);
            }
        }
        public override void GenerateFlowDocument()
        {
            _flowDocument = new FlowDocument();
            DocBuilder.AddHeader(ref _flowDocument, NodeName, 3);
            if (!String.IsNullOrEmpty(Description))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
            }
            if (HasMineralResources())
            {
                DocBuilder.AddContentList(ref _flowDocument, "Base Mineral Resources", GetMineralResourceList());
            }
            else
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Base Mineral Resources", new DocContentItem("None"));
            }

            if (_inhabitants != Species.None)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitants", new DocContentItem(GetSpeciesText(_inhabitants)));
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitant Development", _inhabitantDevelopment);
            }
        }
        public override void GenerateFlowDocument()
        {
            _flowDocument = new FlowDocument();
            if (_isMoon)
            {
                DocBuilder.AddHeader(ref _flowDocument, NodeName, 5);
            }
            else
            {
                DocBuilder.AddHeader(ref _flowDocument, NodeName, 3);
            }
            if (!String.IsNullOrEmpty(Description))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
            }
            if (_isMoon)
            {
                string typeName = "Moon";
                if (_maidenWorld)
                {
                    typeName += " (Eldar Maiden World)";
                }
                DocBuilder.AddContentLine(ref _flowDocument, "Type", new DocContentItem(typeName, 16));
            }
            else
            {
                string typeName = "Planet";
                if (_maidenWorld)
                {
                    typeName += " (Eldar Maiden World)";
                }
                DocBuilder.AddContentLine(ref _flowDocument, "Type", new DocContentItem(typeName, 16));
            }
            DocBuilder.AddContentLine(ref _flowDocument, "Body", new DocContentItem(_body, 19, "Table 1-6: Body"));
            DocBuilder.AddContentLine(ref _flowDocument, "Gravity", new DocContentItem(_gravity, 20, "Table 1-7: Gravity"));
            DocBuilder.AddContentLine(ref _flowDocument, "Atmospheric Presence", new DocContentItem(_atmosphericPresence, 21, "Table 1-9: Atmospheric Presence"));
            DocBuilder.AddContentLine(ref _flowDocument, "Atmospheric Composition", new DocContentItem(_atmosphericComposition, 21, "Table 1-10: Atmospheric Composition"));
            DocBuilder.AddContentLine(ref _flowDocument, "Climate", new DocContentItem(_climate, 22, "Table 1-11: Climate"));
            DocBuilder.AddContentLine(ref _flowDocument, "Habitability", new DocContentItem(GetHabitabilityString(), 23, "Table 1-12: Habitability"));
            DocBuilder.AddContentLine(ref _flowDocument, "Major Continents or Archipelagos", new DocContentItem(GetNumberOfContinentsText(), 23, "Landmasses"));
            DocBuilder.AddContentLine(ref _flowDocument, "Smaller Islands", new DocContentItem(GetNumberOfIslandsText(), 23, "Landmasses"));
            List <DocContentItem> territoryList = _environment.GetListOfTerritories();

            if (territoryList.Count == 0)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Territories", new DocContentItem("None"));
            }
            else
            {
                DocBuilder.AddContentList(ref _flowDocument, "Territories", territoryList);
            }

            foreach (Territory territory in _environment.Territories)
            {
                List <DocContentItem> landmarkList = territory.GetLandmarkList();
                if (landmarkList.Count == 1)
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Landmarks in " + _environment.GetBaseTerrainName(territory.BaseTerrain), landmarkList[0]);
                }
                else if (landmarkList.Count > 1)
                {
                    DocBuilder.AddContentList(ref _flowDocument, "Landmarks in " + _environment.GetBaseTerrainName(territory.BaseTerrain), landmarkList);
                }
                else
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Landmarks in " + _environment.GetBaseTerrainName(territory.BaseTerrain), new DocContentItem("None"));
                }
            }

            if (HasMineralResources())
            {
                List <DocContentItem> mineralResourceList = GetMineralResourceList();
                if (mineralResourceList.Count == 1)
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Base Mineral Resources", mineralResourceList[0]);
                }
                else
                {
                    DocBuilder.AddContentList(ref _flowDocument, "Base Mineral Resources", mineralResourceList);
                }
            }
            else
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Base Mineral Resources", new DocContentItem("None"));
            }

            List <DocContentItem> organicCompounds = GetOrganicCompoundList();

            if (organicCompounds.Count == 1)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Organic Compounds", organicCompounds[0]);
            }
            else if (organicCompounds.Count > 1)
            {
                DocBuilder.AddContentList(ref _flowDocument, "Organic Compounds", organicCompounds);
            }
            else
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Organic Compounds", new DocContentItem("None"));
            }

            if (_resourceArcheotechCache > 0)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Archeotech Caches", new DocContentItem(ResourceArcheotechCacheText, 28));
            }
            else
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Archeotech Caches", new DocContentItem("None"));
            }

            if (_resourceXenosRuins > 0)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Xenos Ruins", GetXenosRuinsDocContentItem());
            }
            else
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Xenos Ruins", new DocContentItem("None"));
            }

            string speciesText = GetSpeciesText(_inhabitants);

            if (_isInhabitantHomeWorld)
            {
                speciesText += " (Home World)";
            }
            DocBuilder.AddContentLine(ref _flowDocument, "Inhabitants", new DocContentItem(speciesText));
            if (_inhabitants != Species.None)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Inhabitant Development", _inhabitantDevelopment);
                if (_primitiveXenosNode != null && _primitiveXenosNode.Children.Count > 0)
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "The Koronus Bestiary", new DocContentItem("More information about inhabitant species below"));
                }
            }

            if (_warpStorm)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Warp Storm",
                                          new DocContentItem("This planet is engulfed in a permanent Warp storm, rendering it inaccessible to all but the most dedicated (and insane) of travellers. ", 12, "Warp Turbulence"));
            }
        }
Esempio n. 14
0
        public override void GenerateFlowDocument()
        {
            _flowDocument = new FlowDocument();
            //_flowDocument.IsColumnWidthFlexible = false;

            // Create stat block
            Table table = new Table();

            DocBuilder.AddHeader(ref _flowDocument, NodeName, 5);
            if (!String.IsNullOrEmpty(Description))
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Description", new DocContentItem(Description));
            }

            _flowDocument.Blocks.Add(table);
            const int numColumns = 9;

            for (int i = 0; i < numColumns; i++)
            {
                TableColumn column = new TableColumn {
                    Width = GridLength.Auto
                };
                //column.Width = new GridLength(35);
                table.Columns.Add(column);
            }
            table.CellSpacing = 0;

            table.RowGroups.Add(new TableRowGroup());
            table.RowGroups[0].Rows.Add(new TableRow());
            TableRow currentRow = table.RowGroups[0].Rows[0];

            currentRow.FontSize   = 12;
            currentRow.FontWeight = FontWeights.Bold;

            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(NodeName))));
            currentRow.Cells[0].ColumnSpan      = numColumns;
            currentRow.Cells[0].BorderBrush     = Brushes.Black;
            currentRow.Cells[0].BorderThickness = new Thickness(1);
            currentRow.Cells[0].Padding         = new Thickness(2);

            table.RowGroups[0].Rows.Add(new TableRow());
            currentRow = table.RowGroups[0].Rows[1];

            currentRow.FontSize   = 12;
            currentRow.FontWeight = FontWeights.Bold;

            currentRow.Cells.Add(new TableCell(new Paragraph(new Run("WS"))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run("BS"))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run("S"))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run("T"))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run("Ag"))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run("Int"))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run("Per"))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run("WP"))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run("Fel"))));
            for (int i = 0; i < numColumns; i++)
            {
                currentRow.Cells[i].TextAlignment   = TextAlignment.Center;
                currentRow.Cells[i].BorderBrush     = Brushes.Black;
                currentRow.Cells[i].BorderThickness = new Thickness(1);
                currentRow.Cells[i].Padding         = new Thickness(2);
            }

            table.RowGroups[0].Rows.Add(new TableRow());
            currentRow = table.RowGroups[0].Rows[2];

            currentRow.FontSize = 9;
            //currentRow.FontWeight = FontWeights.Bold;

            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(""))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(""))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.GetUnnaturalStrengthTextForTable()))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.GetUnnaturalToughnessTextForTable()))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(""))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(""))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(""))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(""))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(""))));
            for (int i = 0; i < numColumns; i++)
            {
                currentRow.Cells[i].TextAlignment   = TextAlignment.Left;
                currentRow.Cells[i].BorderBrush     = Brushes.Black;
                currentRow.Cells[i].BorderThickness = new Thickness(1, 1, 1, 0);
                currentRow.Cells[i].Padding         = new Thickness(2, 0, 0, 2);
            }

            table.RowGroups[0].Rows.Add(new TableRow());
            currentRow = table.RowGroups[0].Rows[3];

            currentRow.FontSize = 14;
            //currentRow.FontWeight = FontWeights.Bold;

            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.Stats.GetStatTextForTable(_xenos.Stats.WeaponSkill)))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.Stats.GetStatTextForTable(_xenos.Stats.BallisticSkill)))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.Stats.GetStatTextForTable(_xenos.Stats.Strength)))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.Stats.GetStatTextForTable(_xenos.Stats.Toughness)))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.Stats.GetStatTextForTable(_xenos.Stats.Agility)))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.Stats.GetStatTextForTable(_xenos.Stats.Intelligence)))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.Stats.GetStatTextForTable(_xenos.Stats.Perception)))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.Stats.GetStatTextForTable(_xenos.Stats.WillPower)))));
            currentRow.Cells.Add(new TableCell(new Paragraph(new Run(_xenos.Stats.GetStatTextForTable(_xenos.Stats.Fellowship)))));
            for (int i = 0; i < numColumns; i++)
            {
                currentRow.Cells[i].TextAlignment   = TextAlignment.Center;
                currentRow.Cells[i].BorderBrush     = Brushes.Black;
                currentRow.Cells[i].BorderThickness = new Thickness(1, 0, 1, 1);
                currentRow.Cells[i].Padding         = new Thickness(2, 0, 2, 2);
            }

            table.RowGroups[0].Rows.Add(new TableRow());
            currentRow = table.RowGroups[0].Rows[4];

            Paragraph paragraph = new Paragraph {
                FontSize = 12
            };

            paragraph.Inlines.Add(new Bold(new Run("Movement: ")));
            paragraph.Inlines.Add(new Run(_xenos.GetMovementString()));
            currentRow.Cells.Add(new TableCell(paragraph));
            currentRow.Cells[0].ColumnSpan = 6;
            currentRow.Cells[0].Padding    = new Thickness(2, 10, 2, 3);

            paragraph = new Paragraph {
                FontSize = 12
            };
            paragraph.Inlines.Add(new Bold(new Run("Wounds: ")));
            paragraph.Inlines.Add(new Run(_xenos.Wounds.ToString(CultureInfo.InvariantCulture)));
            currentRow.Cells.Add(new TableCell(paragraph));
            currentRow.Cells[1].ColumnSpan    = 3;
            currentRow.Cells[1].TextAlignment = TextAlignment.Right;
            currentRow.Cells[1].Padding       = new Thickness(2, 10, 2, 3);

            table.RowGroups[0].Rows.Add(new TableRow());
            currentRow = table.RowGroups[0].Rows[5];

            paragraph = new Paragraph {
                FontSize = 12
            };
            paragraph.Inlines.Add(new Bold(new Run("Armour: ")));
            paragraph.Inlines.Add(new Run(_xenos.GetArmourText(_xenos is XenosPrimitive)));
            currentRow.Cells.Add(new TableCell(paragraph));
            currentRow.Cells[0].ColumnSpan = 6;
            currentRow.Cells[0].Padding    = new Thickness(2, 3, 2, 0);

            paragraph = new Paragraph {
                FontSize = 12
            };
            paragraph.Inlines.Add(new Bold(new Run("Total TB: ")));
            paragraph.Inlines.Add(new Run(_xenos.GetTotalToughnessBonus().ToString(CultureInfo.InvariantCulture)));
            currentRow.Cells.Add(new TableCell(paragraph));
            currentRow.Cells[1].ColumnSpan    = 3;
            currentRow.Cells[1].TextAlignment = TextAlignment.Right;
            currentRow.Cells[1].Padding       = new Thickness(2, 3, 2, 0);

            // END generate table

            var xenos = _xenos as XenosStarsOfInequity;

            if (xenos != null)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Bestial Archetype", xenos.BestialArchetypeText);
                DocBuilder.AddContentLine(ref _flowDocument, "Bestial Nature", xenos.BestialNature);
            }
            var bestiary = _xenos as XenosKoronusBestiary;

            if (bestiary != null)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Base Profile", bestiary.BaseProfileText);
                if (bestiary.FloraType != FloraType.NotFlora)
                {
                    DocBuilder.AddContentLine(ref _flowDocument, "Flora Type", bestiary.FloraTypeText);
                }
            }
            var primitive = _xenos as XenosPrimitive;

            if (primitive != null)
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Unusual Xenos Communication", primitive.UnusualCommunication);
                DocBuilder.AddContentLine(ref _flowDocument, "Social Structure", primitive.SocialStructure);
            }

            DocBuilder.AddContentLine(ref _flowDocument, "Skills", new DocContentItem(_xenos.GetSkillList()));
            DocBuilder.AddContentLine(ref _flowDocument, "Talents", new DocContentItem(_xenos.GetTalentList()));
            if (Properties.Settings.Default.ShowPageNumbers)
            {
                DocBuilder.AddContentList(ref _flowDocument, "Traits", _xenos.Traits.GetTraitListDocContentItems());
            }
            else
            {
                DocBuilder.AddContentLine(ref _flowDocument, "Traits", new DocContentItem(_xenos.GetTraitList()));
            }
            DocBuilder.AddContentLine(ref _flowDocument, "Weapons", new DocContentItem(_xenos.GetWeaponList()));
        }
Esempio n. 15
0
 public override void GenerateFlowDocument()
 {
     _flowDocument = new FlowDocument();
     DocBuilder.AddHeader(ref _flowDocument, NodeName, 4);
 }