Exemple #1
0
        public override SkillEffects ComputeResult(ICombatant attacker, ICombatant defender, IRandomizer randomizer)
        {
            var defenderEffects = new List <IEffect>();
            var firstHit        = DamageUtils.ComputeHit(attacker, defender, randomizer);

            defenderEffects.Add(firstHit);

            return(new SkillEffects(defenderEffects));
        }
Exemple #2
0
        public override SkillEffects ComputeResult(ICombatant attacker, ICombatant defender, IRandomizer randomizer)
        {
            var parryChance = defender.GetStat(StatType.ProjectileParryChance);
            var didParry    = randomizer.GetNextRandom() < (100 - parryChance.Value);

            if (didParry)
            {
                return(new SkillEffects(
                           new List <IEffect> {
                    new Miss(MissReason.Parry)
                }
                           ));
            }

            var firstHit = DamageUtils.ComputeHit(attacker, defender, randomizer);

            return(new SkillEffects(new List <IEffect>()
            {
                firstHit
            }));
        }