public void GetStatsTest() { Loadout load = new Loadout(); load.AddRune(TestData.Rune1()); load.AddRune(TestData.Rune2()); load.AddRune(TestData.Rune3()); load.AddRune(TestData.Rune4()); load.AddRune(TestData.Rune5()); load.AddRune(TestData.Rune6()); var statsComp = TestData.statsFull(); var statRhs = load.GetStats(TestData.statsBase()); Assert.AreEqual(statsComp.Health, statRhs.Health); Assert.AreEqual(statsComp.Attack, statRhs.Attack); Assert.AreEqual(statsComp.Defense, statRhs.Defense); Assert.AreEqual(statsComp.Speed, statRhs.Speed); Assert.AreEqual(statsComp.Accuracy, statRhs.Accuracy); Assert.AreEqual(statsComp.Resistance, statRhs.Resistance); Assert.AreEqual(statsComp.CritRate, statRhs.CritRate); Assert.AreEqual(statsComp.CritDamage, statRhs.CritDamage); Assert.AreEqual(statsComp.EffectiveHP, statRhs.EffectiveHP); Assert.AreEqual(statsComp.EffectiveHPDefenseBreak, statRhs.EffectiveHPDefenseBreak); Assert.AreEqual(statsComp.MaxDamage, statRhs.MaxDamage); Assert.AreEqual(statsComp.AverageDamage, statRhs.AverageDamage); Assert.AreEqual(statsComp.DamagePerSpeed, statRhs.DamagePerSpeed); }
private void listView3_SelectedIndexChanged(object sender, EventArgs e) { if (listView3.FocusedItem != null) { var item = listView3.FocusedItem; if (item.Tag != null) { Loadout build = (Loadout)item.Tag; var mon = data.GetMonster(int.Parse(item.SubItems[2].Text)); ShowStats(build.GetStats(mon), mon); ShowRunes(build.runes); } } }