Esempio n. 1
0
        public override SkillForecast ComputeForecast(ICombatant attacker, ICombatant defender)
        {
            var hitChance = new HitChance(attacker, defender);

            var critChance   = new CritChance(attacker, defender);
            var glanceChance = new GlanceChance(attacker, defender);

            var chances = new SkillChances {
                CritChance   = critChance.Value,
                HitChance    = hitChance.Value,
                GlanceChance = glanceChance.Value
            };

            var attackCount = new AttackCount(attacker, defender);

            var hit = new SkillHit {
                BaseDamage = DamageUtils.ComputeMeleeDamage(attacker, defender),
                HitCount   = attackCount.Value
            };

            return(new SkillForecast {
                Type = Type,
                Hit = hit,
                Chances = chances,
                Attacker = attacker,
                Defender = defender
            });
        }
Esempio n. 2
0
        public override SkillForecast ComputeForecast(ICombatant attacker, ICombatant defender)
        {
            var result = base.ComputeForecast(attacker, defender);

            // Knockback only gets one hit, always
            var hit = new SkillHit {
                BaseDamage = DamageUtils.ComputeMeleeDamage(attacker, defender),
                HitCount   = 1
            };

            result.Hit = hit;

            return(result);
        }
Esempio n. 3
0
        public override SkillForecast ComputeForecast(ICombatant attacker, ICombatant defender)
        {
            var attackCount = 1;
            var chances     = new SkillChances {
                CritChance   = 100,
                HitChance    = 100,
                GlanceChance = 0
            };

            var myKinesis = attacker.GetAttribute(Attribute.AttributeType.Special).Value;
            var hit       = new SkillHit {
                BaseDamage = myKinesis,
                HitCount   = attackCount
            };

            return(new SkillForecast {
                Type = Type,
                Hit = hit,
                Chances = chances,
                Attacker = attacker,
                Defender = defender
            });
        }