public void Populate(IStatsVariables stats, IReadOnlyCollection <Effect> activeEffects, IReadOnlyCollection <IVariables> relatedVars)
        {
            var iceDamage      = ComputeIceDamage(stats, activeEffects);
            var fireDamage     = ComputeFireDamage(stats, activeEffects);
            var windDamage     = ComputeWindDamage(stats, activeEffects);
            var earthDamage    = ComputeEarthDamage(stats, activeEffects);
            var lightDamage    = ComputeLightDamage(stats, activeEffects);
            var darkDamage     = ComputeDarkDamage(stats, activeEffects);
            var slashingDamage = ComputeSlashingDamage(stats, activeEffects);
            var bluntDamage    = ComputeBluntDamage(stats, activeEffects);
            var piercingDamage = ComputePiercingDamage(stats, activeEffects);
            var unarmedDamage  = ComputeUnarmedDamage(stats, activeEffects);
            var pureDamage     = ComputeDamage(stats, activeEffects);

            stats.IceDamage(iceDamage);
            stats.FireDamage(fireDamage);
            stats.WindDamage(windDamage);
            stats.EarthDamage(earthDamage);
            stats.LightDamage(lightDamage);
            stats.DarkDamage(darkDamage);
            stats.SlashingDamage(slashingDamage);
            stats.BluntDamage(bluntDamage);
            stats.PiercingDamage(piercingDamage);
            stats.UnarmedDamage(unarmedDamage);
            stats.Damage(pureDamage);
        }
Exemplo n.º 2
0
 public static float GetDamageFromDamageType(this IStatsVariables stats, int damageType)
 {
     if (damageType == DamageTypes.PiercingDamage)
     {
         return(stats.PiercingDamage());
     }
     if (damageType == DamageTypes.SlashingDamage)
     {
         return(stats.SlashingDamage());
     }
     if (damageType == DamageTypes.BluntDamage)
     {
         return(stats.BluntDamage());
     }
     if (damageType == DamageTypes.UnarmedDamage)
     {
         return(stats.UnarmedDamage());
     }
     if (damageType == DamageTypes.FireDamage)
     {
         return(stats.FireDamage());
     }
     if (damageType == DamageTypes.IceDamage)
     {
         return(stats.IceDamage());
     }
     if (damageType == DamageTypes.WindDamage)
     {
         return(stats.WindDamage());
     }
     if (damageType == DamageTypes.EarthDamage)
     {
         return(stats.EarthDamage());
     }
     if (damageType == DamageTypes.LightDamage)
     {
         return(stats.LightDamage());
     }
     if (damageType == DamageTypes.DarkDamage)
     {
         return(stats.DarkDamage());
     }
     if (damageType == DamageTypes.Damage)
     {
         return(stats.Damage());
     }
     return(0);
 }
Exemplo n.º 3
0
 public static ICollection <StatReference> GetDamageReferences(this IStatsVariables stats)
 {
     return(new[]
     {
         new StatReference(DamageTypes.IceDamage, stats.IceDamage()),
         new StatReference(DamageTypes.FireDamage, stats.FireDamage()),
         new StatReference(DamageTypes.WindDamage, stats.WindDamage()),
         new StatReference(DamageTypes.EarthDamage, stats.EarthDamage()),
         new StatReference(DamageTypes.LightDamage, stats.LightDamage()),
         new StatReference(DamageTypes.DarkDamage, stats.DarkDamage()),
         new StatReference(DamageTypes.SlashingDamage, stats.SlashingDamage()),
         new StatReference(DamageTypes.BluntDamage, stats.BluntDamage()),
         new StatReference(DamageTypes.PiercingDamage, stats.PiercingDamage()),
         new StatReference(DamageTypes.UnarmedDamage, stats.UnarmedDamage()),
         new StatReference(DamageTypes.Damage, stats.Damage())
     });
 }
Exemplo n.º 4
0
        public static float GetDamageFor(this IStatsVariables stats, int effectType)
        {
            if (effectType == EffectTypes.PiercingBonusAmount)
            {
                return(stats.PiercingDamage());
            }
            if (effectType == EffectTypes.SlashingBonusAmount)
            {
                return(stats.SlashingDamage());
            }
            if (effectType == EffectTypes.BluntBonusAmount)
            {
                return(stats.BluntDamage());
            }
            if (effectType == EffectTypes.UnarmedBonusAmount)
            {
                return(stats.UnarmedDamage());
            }
            if (effectType == EffectTypes.FireBonusAmount)
            {
                return(stats.FireDamage());
            }
            if (effectType == EffectTypes.IceBonusAmount)
            {
                return(stats.IceDamage());
            }
            if (effectType == EffectTypes.WindBonusAmount)
            {
                return(stats.WindDamage());
            }
            if (effectType == EffectTypes.EarthBonusAmount)
            {
                return(stats.EarthDamage());
            }
            if (effectType == EffectTypes.LightBonusAmount)
            {
                return(stats.LightDamage());
            }
            if (effectType == EffectTypes.DarkBonusAmount)
            {
                return(stats.DarkDamage());
            }

            if (effectType == EffectTypes.AllElementDamageBonusAmount)
            {
                return(stats.FireDamage() + stats.IceDamage() + stats.WindDamage() +
                       stats.EarthDamage() + stats.LightDamage() + stats.DarkDamage());
            }

            if (effectType == EffectTypes.AllMeleeDefenseBonusAmount)
            {
                return(stats.PiercingDamage() + stats.SlashingDamage() +
                       stats.BluntDamage() + stats.UnarmedDamage());
            }

            if (effectType == EffectTypes.DamageBonusAmount)
            {
                return(stats.Damage());
            }

            return(0);
        }