public void ReadXML(XmlNode xmlNode) { try { foreach (XmlNode childNode in xmlNode.ChildNodes) { if (childNode.Name == "NumDice") { NumDice = Convert.ToInt32(childNode.InnerText); } else if (childNode.Name == "Die") { Die = Methods.GetDieTypeFromString(childNode.InnerText); } else if (childNode.Name == "Modifier") { Modifier = Convert.ToInt32(childNode.InnerText); } else if (childNode.Name == "DamageDescriptorSet") { DamageDescriptorSet = new DamageDescriptorSet(childNode); } } } catch (XmlException e) { MessageBox.Show(e.ToString()); } }
public CreatureAttributes() { Type = Types.Creature.Humanoid; ChallengeRating = 1; AttackSets = new FullyObservableCollection <AttackSet>(); Strength = 10; Dexterity = 10; Constitution = 10; Intelligence = 10; Wisdom = 10; Charisma = 10; BaseAttackBonus = 0; GrappleModifier = 0; HitPoints = 3; HitDice = 1; HitDieType = Types.Die.d3; ArmorClass = 10; TouchArmorClass = 10; FlatFootedArmorClass = 10; Speed = new SpeedSet(30); FortitudeSave = 0; ReflexSave = 0; WillSave = 0; Feats = new List <string>(); Space = 5; Reach = 5; Size = Types.Size.Medium; DamageReductions = new ObservableCollection <DamageReduction>(); Immunities = new DamageDescriptorSet(); EnergyResistances = new ObservableCollection <EnergyResistance>(); SpellResistance = 0; FastHealing = 0; SpecialAttacks = ""; SpecialQualities = new List <string>(); }
public bool IsBypassedBy(DamageDescriptorSet damage) { bool bypassed = true; if (!damage.IsEnergyDamage()) { foreach (Types.Damage drDamageType in DamageTypes.ToList()) { bool matched = damage.Contains(drDamageType); // If none of the weapon's damage qualities match this part of the damage type, then if (!matched) { bypassed = false; break; } } } return(bypassed); }
public void ReadXML(XmlNode xmlNode) { try { foreach (XmlNode childNode in xmlNode.ChildNodes) { if (childNode.Name == "Value") { Value = Convert.ToInt32(childNode.InnerText); } else if (childNode.Name == "DamageDescriptorSet") { DamageTypes = new DamageDescriptorSet(); DamageTypes.ReadXML(childNode); } } } catch (XmlException e) { MessageBox.Show(e.ToString()); } }
public DamageReduction(DamageReduction other) { _value = other._value; DamageTypes = new DamageDescriptorSet(other.DamageTypes); }
public DamageReduction() { _types = new DamageDescriptorSet(); }
public Damage(Damage other) { DamageDescriptorSet = new DamageDescriptorSet(other.DamageDescriptorSet); }
public Damage() { _damageDescriptorSet = new DamageDescriptorSet(); }
public DamageSet(DamageSet other) { Amount = other.Amount; DamageDescriptorSet = new DamageDescriptorSet(other.DamageDescriptorSet); }
public DamageSet(int amount, DamageDescriptorSet damageDescriptorSet) { _amount = amount; _damageDescriptorSet = damageDescriptorSet; }
public DamageDescriptorSet(DamageDescriptorSet other) { _descriptors = new HashSet <Types.Damage>(other._descriptors); }