Пример #1
0
        public void AddStatBonus_AppropriatelyRasiesEvent([Values] StatType statType, [Values(1, 5)] int bonusAmount, [Values] bool isSecret)
        {
            _fighter.AddStatBonus(statType, bonusAmount, isSecret);

            List <EventLog> logs = _logger.Logs;

            Assert.AreEqual(1, logs.Count);

            EventLog log = logs[0];

            Assert.AreEqual(EventType.StatBonusApplied, log.Type);

            StatBonusAppliedEventArgs e = log.E as StatBonusAppliedEventArgs;

            Assert.NotNull(e);
            Assert.AreEqual(statType, e.Stat);
            Assert.AreEqual(bonusAmount, e.BonusAmount);
            Assert.AreEqual(isSecret, e.IsSecretStatBonus);
        }
Пример #2
0
 public override void ApplyBonus(HumanFighter fighter, GodRelationshipManager relationshipManager, bool isSecretBonus = false)
 {
     fighter.AddStatBonus(_statType, BonusAmount, isSecretBonus);
 }