Esempio n. 1
0
        public void FightCrit_AfterHit()
        {
            var tracker = new FightTracker();

            tracker.Players.Add("Player1");

            tracker.TrackFightHit(new FightHitEvent {
                Timestamp = DateTime.Now, Source = "Player1", Target = "Mob1", Type = "slash", Amount = 200
            });
            tracker.TrackFightCrit(new FightCritEvent {
                Timestamp = DateTime.Now, Source = "Player1", Amount = 200, Sequence = FightCritEventSequence.AfterHit
            });

            var f = tracker.Fights[0];

            Assert.Equal(0, f.Participants[1].AttackTypes[0].NormalHitCount);
            Assert.Equal(0, f.Participants[1].AttackTypes[0].NormalHitSum);
            Assert.Equal(1, f.Participants[1].AttackTypes[0].CritHitCount);
            Assert.Equal(200, f.Participants[1].AttackTypes[0].CritHitSum);
        }
Esempio n. 2
0
        public void FightCrit_Ignore()
        {
            var tracker = new FightTracker();

            tracker.Players.Add("Player1");

            // ignore crits where the damage is absorbed by a rune
            tracker.TrackFightCrit(new FightCritEvent {
                Timestamp = DateTime.Now, Source = "Player1", Amount = 200, Sequence = FightCritEventSequence.BeforeHit
            });
            tracker.TrackFightMiss(new FightMissEvent {
                Timestamp = DateTime.Now, Source = "Player1", Target = "Mob1", Type = "rune"
            });
            tracker.TrackFightHit(new FightHitEvent {
                Timestamp = DateTime.Now, Source = "Player1", Target = "Mob1", Type = "slash", Amount = 100
            });

            var f = tracker.Fights[0];

            Assert.Equal(1, f.Participants[1].AttackTypes[0].NormalHitCount);
            Assert.Equal(100, f.Participants[1].AttackTypes[0].NormalHitSum);
            Assert.Equal(0, f.Participants[1].AttackTypes[0].CritHitCount);
            Assert.Equal(0, f.Participants[1].AttackTypes[0].CritHitSum);
        }