public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); AddElementalDamageProperties(list); if (DamageModifier != 0) { list.Add(1074762, DamageModifier.ToString()); // Damage Modifier: ~1_PERCENT~% } }
private void AreDamageEqual(List <DamageModifier> mp, List <DamageModifier> ddi) { Assert.AreEqual(mp.Count, ddi.Count); foreach (DamageModifier dMP in mp) { DamageModifier dDDI = ddi.SingleOrDefault(x => x.Type == dMP.Type); Assert.IsNotNull(dDDI); Assert.AreEqual(dMP.Value, dDDI.Value); Assert.AreEqual(dMP.Type, dDDI.Type); Assert.AreEqual(dMP.ToString(), dDDI.ToString()); } }
private void update_list() { DamageList.Items.Clear(); fTotalDamage = 0; foreach (OngoingCondition oc in fData.Conditions) { if (oc.Type != OngoingType.Damage) { continue; } int value = oc.Value; DamageModifier dm = find_damage_modifier(oc.DamageType); if (dm != null) { if (dm.Value == 0) { value = 0; } else { value += dm.Value; value = Math.Max(value, 0); } } ListViewItem lvi = DamageList.Items.Add(oc.ToString(fEncounter, false)); lvi.SubItems.Add((dm != null) ? dm.ToString() : ""); lvi.SubItems.Add(value.ToString()); lvi.Tag = oc; lvi.Group = DamageList.Groups[0]; fTotalDamage += value; } ListViewItem lvi_total = DamageList.Items.Add("Total"); lvi_total.SubItems.Add(""); lvi_total.SubItems.Add(fTotalDamage.ToString()); lvi_total.Group = DamageList.Groups[1]; lvi_total.Font = new Font(Font, Font.Style | FontStyle.Bold); if (fData.Conditions.Count == 0) { ListViewItem lvi = DamageList.Items.Add("(no damage)"); lvi.ForeColor = SystemColors.GrayText; } }
private void update_list() { this.DamageList.Items.Clear(); this.fTotalDamage = 0; foreach (OngoingCondition condition in this.fData.Conditions) { if (condition.Type != OngoingType.Damage) { continue; } int value = condition.Value; DamageModifier damageModifier = this.find_damage_modifier(condition.DamageType); if (damageModifier != null) { if (damageModifier.Value != 0) { value += damageModifier.Value; value = Math.Max(value, 0); } else { value = 0; } } ListViewItem item = this.DamageList.Items.Add(condition.ToString(this.fEncounter, false)); item.SubItems.Add((damageModifier != null ? damageModifier.ToString() : "")); item.SubItems.Add(value.ToString()); item.Tag = condition; item.Group = this.DamageList.Groups[0]; this.fTotalDamage += value; } ListViewItem font = this.DamageList.Items.Add("Total"); font.SubItems.Add(""); font.SubItems.Add(this.fTotalDamage.ToString()); font.Group = this.DamageList.Groups[1]; font.Font = new System.Drawing.Font(this.Font, this.Font.Style | FontStyle.Bold); if (this.fData.Conditions.Count == 0) { ListViewItem grayText = this.DamageList.Items.Add("(no damage)"); grayText.ForeColor = SystemColors.GrayText; } }
public override string ToString() { string weaponString = base.ToString() + ", "; weaponString += NumberHands.ToString() + ", "; weaponString += AttackValue.ToString() + ", "; weaponString += AttackModifier.ToString() + ", "; weaponString += DamageValue.ToString() + ", "; weaponString += DamageModifier.ToString() + ","; weaponString += StrValue.ToString() + ","; weaponString += DexValue.ToString() + ","; weaponString += IntValue.ToString() + ","; weaponString += Stability.ToString(); foreach (Type t in allowableClasses) { weaponString += ", " + t.Name; } return(base.ToString()); }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (m_Exceptional) { list.Add(1060636); // exceptional } if (m_Crafter != null) { list.Add(1050043, m_Crafter.Name); // crafted by ~1_NAME~ } int ammoamount = (Ammo != null ? Ammo.Amount : 0); list.Add((Ammo is Bolt ? 1075266 : 1075265), "{0}\t{1}", ammoamount.ToString(), MaxAmmo.ToString()); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ arrows/bolts if (DamageModifier != 0) { list.Add(1074762, DamageModifier.ToString()); // Damage Modifier: ~1_PERCENT~% } list.Add(1075085); // Requirement: Mondain's Legacy int prop; if ((prop = Attributes.WeaponDamage) != 0) { list.Add(1060401, prop.ToString()); // damage increase ~1_val~% } if ((prop = Attributes.DefendChance) != 0) { list.Add(1060408, prop.ToString()); // defense chance increase ~1_val~% } if ((prop = Attributes.BonusDex) != 0) { list.Add(1060409, prop.ToString()); // dexterity bonus ~1_val~ } if ((prop = Attributes.EnhancePotions) != 0) { list.Add(1060411, prop.ToString()); // enhance potions ~1_val~% } if ((prop = Attributes.CastRecovery) != 0) { list.Add(1060412, prop.ToString()); // faster cast recovery ~1_val~ } if ((prop = Attributes.CastSpeed) != 0) { list.Add(1060413, prop.ToString()); // faster casting ~1_val~ } if ((prop = Attributes.AttackChance) != 0) { list.Add(1060415, prop.ToString()); // hit chance increase ~1_val~% } if ((prop = Attributes.BonusHits) != 0) { list.Add(1060431, prop.ToString()); // hit point increase ~1_val~ } if ((prop = Attributes.BonusInt) != 0) { list.Add(1060432, prop.ToString()); // intelligence bonus ~1_val~ } if ((prop = Attributes.LowerManaCost) != 0) { list.Add(1060433, prop.ToString()); // lower mana cost ~1_val~% } if ((prop = Attributes.LowerRegCost) != 0) { list.Add(1060434, prop.ToString()); // lower reagent cost ~1_val~% } if ((prop = Attributes.LowerAmmoCost) != 0) { list.Add(1075208, prop.ToString()); // Lower Ammo Cost ~1_Percentage~% } if ((prop = Attributes.Luck) != 0) { list.Add(1060436, prop.ToString()); // luck ~1_val~ } if ((prop = Attributes.BonusMana) != 0) { list.Add(1060439, prop.ToString()); // mana increase ~1_val~ } if ((prop = Attributes.RegenMana) != 0) { list.Add(1060440, prop.ToString()); // mana regeneration ~1_val~ } if ((prop = Attributes.NightSight) != 0) { list.Add(1060441); // night sight } if ((prop = Attributes.ReflectPhysical) != 0) { list.Add(1060442, prop.ToString()); // reflect physical damage ~1_val~% } if ((prop = Attributes.RegenStam) != 0) { list.Add(1060443, prop.ToString()); // stamina regeneration ~1_val~ } if ((prop = Attributes.RegenHits) != 0) { list.Add(1060444, prop.ToString()); // hit point regeneration ~1_val~ } if ((prop = Attributes.SpellChanneling) != 0) { list.Add(1060482); // spell channeling } if ((prop = Attributes.SpellDamage) != 0) { list.Add(1060483, prop.ToString()); // spell damage increase ~1_val~% } if ((prop = Attributes.BonusStam) != 0) { list.Add(1060484, prop.ToString()); // stamina increase ~1_val~ } if ((prop = Attributes.BonusStr) != 0) { list.Add(1060485, prop.ToString()); // strength bonus ~1_val~ } if ((prop = Attributes.WeaponSpeed) != 0) { list.Add(1060486, prop.ToString()); // swing speed increase ~1_val~% } if (DirectDamage != 0) { list.Add(1079978, DirectDamage.ToString()); // Direct Damage: ~1_PERCENT~% } if (PhysicalDamage != 0) { list.Add(1060403, PhysicalDamage.ToString()); // physical damage ~1_val~% } if (FireDamage != 0) { list.Add(1060405, FireDamage.ToString()); // fire damage ~1_val~% } if (ColdDamage != 0) { list.Add(1060404, ColdDamage.ToString()); // cold damage ~1_val~% } if (PoisonDamage != 0) { list.Add(1060406, PoisonDamage.ToString()); // poison damage ~1_val~% } if (EnergyDamage != 0) { list.Add(1060407, EnergyDamage.ToString()); // energy damage ~1_val~% } if (ChaosDamage != 0) { list.Add(1072846, ChaosDamage.ToString()); // chaos damage ~1_val~% } GetSetArmorPropertiesFirst(list); this.AddContentProperty(list); if (WeightReduction != 0) { list.Add(1072210, WeightReduction.ToString()); // Weight reduction: ~1_PERCENTAGE~% } GetSetArmorPropertiesSecond(list); }
public override void Print(string prefix = "", string suffix = "") { base.Print(prefix, " (DMG 1d" + DamageDice + DamageModifier.ToString("+0;-#") + ", ACC " + Accuracy.ToString("+#;-#;±0") + ")" + suffix); }