private static Power ParsePower(XElement powerElement) { var power = new Power(); power.Name = powerElement.Attribute("name").Value; power.CooldownEnum = ParseCooldown(powerElement.Elements("specific").First(s => s.Attribute("name").Value == "Power Usage").Value); power.ActionTypeEnum = ParseActionType(powerElement.Elements("specific").First(s => s.Attribute("name").Value == "Action Type").Value); if (powerElement.Elements("Weapon").Any()) { power.Attack = String.Format("{0} vs. {1}", powerElement.Element("Weapon").Element("AttackBonus").Value.Trim(), powerElement.Element("Weapon").Element("Defense").Value.Trim()); power.Damage = powerElement.Element("Weapon").Element("Damage").Value.Trim(); } power.Available = true; return power; }
partial void DeletePower(Power instance);
partial void UpdatePower(Power instance);
partial void InsertPower(Power instance);
private void detach_Powers(Power entity) { this.SendPropertyChanging(); entity.Character = null; }
private void attach_Powers(Power entity) { this.SendPropertyChanging(); entity.Character = this; }