Пример #1
0
        public AbilityStats(AAbilityType type, int level, int quantity,
                            int range, bool isInstantDamage, bool targetColony, bool targetShips, bool targetStar,
                            double firePower, double accuracy, double energyCost, double ammo,
                            double accuracyRangePenalty, double armorEfficiency, double shieldEfficiency, double planetEfficiency,
                            BodyTraitType appliesTrait)
        {
            this.Type     = type;
            this.Level    = level;
            this.Quantity = quantity;

            this.Range           = range;
            this.IsInstantDamage = isInstantDamage;
            this.TargetColony    = targetColony;
            this.TargetShips     = targetShips;
            this.TargetStar      = targetStar;

            this.FirePower            = firePower;
            this.Accuracy             = accuracy;
            this.EnergyCost           = energyCost;
            this.AccuracyRangePenalty = accuracyRangePenalty;
            this.Ammo             = ammo;
            this.ArmorEfficiency  = armorEfficiency;
            this.ShieldEfficiency = shieldEfficiency;
            this.PlanetEfficiency = planetEfficiency;

            this.AppliesTrait = appliesTrait;
        }
Пример #2
0
        public static AbilityStats Create(AAbilityType type, int level, int quantity, StaticsDB statics)
        {
            var factory = new AbilityStatsFactory(level, statics);

            type.Accept(factory);

            return(new AbilityStats(type, level, quantity, factory.range, factory.isInstantDamage, factory.targetColony, factory.targetShips, factory.targetStar,
                                    factory.firePower, factory.accuracy, factory.energyCost, factory.ammo,
                                    factory.accuracyRangePenalty, factory.armorEfficiency, factory.shieldEfficiency, factory.planetEfficiency,
                                    factory.appliesTrait));
        }
Пример #3
0
        public static AbilityStats Create(AAbilityType type, AComponentType provider, int level, int quantity, StaticsDB statics)
        {
            var factory = new AbilityStatsFactory(level, statics);

            type.Accept(factory);

            return(new AbilityStats(type, provider, level, quantity, factory.range, factory.isInstantDamage, factory.isProjectile,
                                    factory.targetColony, factory.targetShips, factory.targetStar,
                                    factory.firePower, factory.accuracy, factory.energyCost, factory.ammo,
                                    factory.accuracyRangePenalty, factory.armorEfficiency, factory.shieldEfficiency, factory.planetEfficiency,
                                    factory.appliesTrait, factory.projectileImage, factory.speed, factory.splashMaxTargets,
                                    factory.splashFirePower, factory.splashShieldEfficiency, factory.splashArmorEfficiency));
        }
Пример #4
0
        public AbilityStats(AAbilityType type, AComponentType provider, int level, int quantity,
                            int range, bool isInstantDamage, bool isProjectile,
                            bool targetColony, bool targetShips, bool targetStar,
                            double firePower, double accuracy, double energyCost, double ammo,
                            double accuracyRangePenalty, double armorEfficiency, double shieldEfficiency, double planetEfficiency,
                            StarTraitType appliesTrait, string projectileImage, double speed, double splashMaxTargets,
                            double splashFirePower, double splashShieldEfficiency, double splashArmorEfficiency)
        {
            this.Type     = type;
            this.Provider = provider;
            this.Level    = level;
            this.Quantity = quantity;

            this.Range           = range;
            this.IsInstantDamage = isInstantDamage;
            this.IsProjectile    = isProjectile;
            this.TargetColony    = targetColony;
            this.TargetShips     = targetShips;
            this.TargetStar      = targetStar;

            this.FirePower            = firePower;
            this.Accuracy             = accuracy;
            this.EnergyCost           = energyCost;
            this.AccuracyRangePenalty = accuracyRangePenalty;
            this.Ammo             = ammo;
            this.ArmorEfficiency  = armorEfficiency;
            this.ShieldEfficiency = shieldEfficiency;
            this.PlanetEfficiency = planetEfficiency;

            this.AppliesTrait = appliesTrait;

            this.ProjectileImage        = projectileImage;
            this.Speed                  = speed;
            this.SplashMaxTargets       = splashMaxTargets;
            this.SplashFirePower        = splashFirePower;
            this.SplashShieldEfficiency = splashShieldEfficiency;
            this.SplashArmorEfficiency  = splashArmorEfficiency;
        }