示例#1
0
        public Coefficient copy(Coefficient coef)
        {
            Coefficient copyCoefficient = (Coefficient)base.copy(coef);
            copyCoefficient.is_constant = this.is_constant;
            copyCoefficient.Denominator = this.Denominator;
            copyCoefficient.ItsConstantNum = this.ItsConstantNum;
            copyCoefficient.NumberOfDice = this.NumberOfDice;
            copyCoefficient.DiceType = this.DiceType;

            return copyCoefficient;
        }
示例#2
0
文件: Skill.cs 项目: jjaspe/Libraries
 public bool changeCoefficient(string name, Coefficient newCoef)
 {
     if (isGoverningAttribute(name))
     {
         changeCoefficient(getAttribute(name), newCoef);
         return true;
     }
     else
         return false;
 }
示例#3
0
文件: Skill.cs 项目: jjaspe/Libraries
        public new void fromXml(XmlNode node)
        {
            base.fromXml(node);
            XmlNodeList attributeList = ((XmlElement)((XmlElement)node).
                GetElementsByTagName("Governing_Attributes").Item(0)).GetElementsByTagName("Attribute");
            Attribute currentAtt;
            foreach (XmlNode attributeNode in attributeList)
            {
                currentAtt = new Attribute();
                currentAtt.fromXml(attributeNode);
                itsGoverningAttributes.addOrSet(currentAtt);
            }

            XmlNodeList statList = ((XmlElement)((XmlElement)node).
                GetElementsByTagName("Governing_Stats").Item(0)).GetElementsByTagName("Stat");
            Stat currentStat;
            foreach (XmlNode Node in statList)
            {
                currentStat = new Stat();
                currentStat.fromXml(Node);
                itsGoverningStats.addOrSet(currentStat);
            }

            XmlNodeList coefficientList = ((XmlElement)((XmlElement)node).
                GetElementsByTagName("Coefficients").Item(0)).GetElementsByTagName("Coefficient");
            Coefficient currentCoefficient;
            foreach (XmlNode Node in coefficientList)
            {
                currentCoefficient = new Coefficient();
                currentCoefficient.fromXml(Node);
                this.itsAtt_Coefficients.add(currentCoefficient);
            }
        }
示例#4
0
文件: Skill.cs 项目: jjaspe/Libraries
        public bool changeCoefficient(Attribute modAttribute, Coefficient newCoef)
        {
            Coefficient current=itsAtt_Coefficients.find(modAttribute.Name);
            current=newCoef;//if its found, then its set, if not then current is null and nothing happens

            return (current==null);
        }