Пример #1
0
        public override CombatResults CalculateResults(Stats.StatsPackage caster, Stats.StatsPackage target)
        {
            CombatResults results = DoesAttackHit(caster, target);

            if (!results.DidMiss && !results.DidAvoid)
            {
                int damage = (int)(caster.AttackPower.EffectiveValue * 0.8);
                if (DoesAttackCrit(caster))
                {
                    damage          = ApplyCriticalDamage(damage, caster);
                    results.DidCrit = true;
                }

                results.PureDamage      = damage;
                results.AbsorbedDamage  = CalculateAbsorption(results.PureDamage, target);
                results.AppliedDamage   = results.PureDamage - results.AbsorbedDamage;
                results.ReflectedDamage = CalculateReflectedDamage(results.AppliedDamage, target);
            }

            int result = Engine.RNG.Next(0, 100);

            if (result <= 100)
            {
                if (!target.HasEffect("Basic DoT"))
                {
                    target.ApplyEffect(new Effects.SimpleDot(target));
                }
            }

            return(results);
        }
Пример #2
0
 public override CombatResults CalculateResults(Stats.StatsPackage caster, Stats.StatsPackage target)
 {
     results = new CombatResults()
     {
         Caster = caster, Target = target, UsedAbility = this
     };
     caster.ApplyEffect(new Effects.ShieldWall(caster));
     return(results);
 }
Пример #3
0
            public override CombatResults CalculateResults(Stats.StatsPackage caster, Stats.StatsPackage target)
            {
                if (!target.HasEffect(typeof(Effect_Weaken)))
                {
                    target.ApplyEffect(new Effect_Weaken(target));
                }

                return(new CombatResults()
                {
                    Caster = caster, Target = target, UsedAbility = this
                });
            }
Пример #4
0
            public override CombatResults CalculateResults(Stats.StatsPackage caster, Stats.StatsPackage target)
            {
                if (!target.HasEffect(typeof(Effect_Poison)))
                {
                    target.ApplyEffect(new Effect_Poison());
                }
                else
                {
                    Effect_Poison poison = (Effect_Poison)target.GetEffect(typeof(Effect_Poison));
                    if (poison.stacks < 5)
                    {
                        poison.stacks++;
                        poison.Duration = 10;
                    }
                }

                return(new CombatResults()
                {
                    Caster = caster, Target = target, UsedAbility = this
                });
            }