Beispiel #1
0
        public override void WritePropertyXML(XmlWriter xmlWriter)
        {
            base.WritePropertyXML(xmlWriter);

            xmlWriter.WriteStartElement("Type");
            xmlWriter.WriteString(Methods.GetCreatureTypeString(Type));
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("ChallengeRating");
            xmlWriter.WriteString(ChallengeRating.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("AttackSets");
            foreach (AttackSet attackSet in AttackSets)
            {
                attackSet.WriteXML(xmlWriter);
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Strength");
            xmlWriter.WriteString(Strength.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Dexterity");
            xmlWriter.WriteString(Dexterity.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Constitution");
            xmlWriter.WriteString(Constitution.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Intelligence");
            xmlWriter.WriteString(Intelligence.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Wisdom");
            xmlWriter.WriteString(Wisdom.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Charisma");
            xmlWriter.WriteString(Charisma.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("BaseAttackBonus");
            xmlWriter.WriteString(BaseAttackBonus.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("GrappleModifier");
            xmlWriter.WriteString(GrappleModifier.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("HitPoints");
            xmlWriter.WriteString(HitPoints.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("HitDice");
            xmlWriter.WriteString(HitDice.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("HitDieType");
            xmlWriter.WriteString(Methods.GetDieTypeString(HitDieType));
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("ArmorClass");
            xmlWriter.WriteString(ArmorClass.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("TouchArmorClass");
            xmlWriter.WriteString(TouchArmorClass.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("FlatFootedArmorClass");
            xmlWriter.WriteString(FlatFootedArmorClass.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Speed");
            Speed.WriteXML(xmlWriter);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("FortitudeSave");
            xmlWriter.WriteString(FortitudeSave.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("ReflexSave");
            xmlWriter.WriteString(ReflexSave.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("WillSave");
            xmlWriter.WriteString(WillSave.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Feats");
            foreach (string feat in Feats)
            {
                xmlWriter.WriteStartElement("Feat");
                xmlWriter.WriteString(feat);
                xmlWriter.WriteEndElement();
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Space");
            xmlWriter.WriteString(Space.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Reach");
            xmlWriter.WriteString(Reach.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Size");
            xmlWriter.WriteString(Methods.GetSizeString(Size));
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("DamageReductions");
            foreach (DamageReduction dr in DamageReductions)
            {
                dr.WriteXML(xmlWriter);
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Immunities");
            Immunities.WriteXML(xmlWriter);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("EnergyResistances");
            foreach (EnergyResistance er in EnergyResistances)
            {
                er.WriteXML(xmlWriter);
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("SpellResistance");
            xmlWriter.WriteString(SpellResistance.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("FastHealing");
            xmlWriter.WriteString(FastHealing.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("SpecialAttacks");
            xmlWriter.WriteString(SpecialAttacks);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("SpecialQualities");
            xmlWriter.WriteString(String.Join(", ", SpecialQualities));
            xmlWriter.WriteEndElement();
        }