Exemple #1
0
 public charProperty copy(charProperty prop)
 {
     if (prop == null)
         prop = new charProperty();
     charProperty newChar=(charProperty)base.copy(prop);
     copyProperty(newChar);
     return newChar;
 }
Exemple #2
0
        public new void fromXml(XmlNode node)
        {
            base.fromXml(node);

            XmlNode propertyNode = ((XmlElement)node).GetElementsByTagName("Its Property").Item(0);
            ItsProperty = new charProperty();
            ItsProperty.fromXml(propertyNode);
        }
Exemple #3
0
 public especialFactor(bool constant, charProperty property, int den, int dType, int nDice)
 {
     this.is_constant = constant;
     this.ItsProperty = property;
     this.ItsConstantNum = this.ItsProperty == null ? 0 : this.ItsProperty.Value;
     this.Denominator = den;
     this.DiceType = dType;
     this.NumberOfDice = nDice;
 }
Exemple #4
0
        public new void fromXml(XmlNode node)
        {
            base.fromXml(node);

            XmlNode fPropertyNode = ((XmlElement)node).GetElementsByTagName("Property").Item(0);
            this.FirstProperty = new charProperty();
            this.FirstProperty.fromXml(fPropertyNode);

            XmlNode sPropertyNode = ((XmlElement)node).GetElementsByTagName("Property").Item(1);
            this.SecondProperty = new charProperty();
            this.SecondProperty.fromXml(sPropertyNode);

            XmlNode factorNode = ((XmlElement)node).GetElementsByTagName("Factor").Item(0);
            this.ItsFactor = new Factor();
            this.ItsFactor.fromXml(factorNode);

            XmlNodeList threshholdList = ((XmlElement)((XmlElement)node).
                GetElementsByTagName("Threshholds").Item(0)).GetElementsByTagName("Thressholds");
            for (int i = 0; i < threshholdList.Count; i++)
            {
                itsThreshholds[i] = Int32.Parse(threshholdList[i].InnerText);
            }
        }
Exemple #5
0
 public Check(charProperty fProperty, charProperty sProperty, Factor factor)
 {
     this.FirstProperty = fProperty;
     this.SecondProperty = sProperty;
     this.ItsFactor = factor;
 }
Exemple #6
0
 public Check()
 {
     firstProperty = new charProperty();
     secondProperty = new charProperty();
     itsFactor = new Factor();
 }
Exemple #7
0
 public Bonus(Factor factor, charProperty property)
 {
     ItsFactor = factor;
     ItsProperty = property;
 }
Exemple #8
0
 public void increaseValue(charProperty property, double value)
 {
     property.increaseValue(value);
 }
Exemple #9
0
 public void decreaseValue(charProperty property,int value)
 {
     property.decreaseValue(value);
 }
Exemple #10
0
        internal charProperty copyProperty(charProperty copyProperty)
        {
            base.copy(copyProperty);
            if (copyProperty == null)
                copyProperty = new charProperty();
            copyProperty.Name = this.Name;
            copyProperty.ItsMax = this.ItsMax;
            copyProperty.ItsMin = this.ItsMin;
            copyProperty.BaseValue = this.BaseValue;
            copyProperty.itsBonuses = this.itsBonuses.copy();

            return new charProperty();
        }