Esempio n. 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;
        }
Esempio n. 2
0
        public void Visit(StarShootAbility ability)
        {
            var vars = new Var(AComponentType.LevelKey, this.level).Get;

            this.range           = (int)ability.Range.Evaluate(vars);
            this.isInstantDamage = true;
            this.targetStar      = true;

            this.energyCost   = ability.EnergyCost.Evaluate(vars);
            this.appliesTrait = statics.Traits[ability.AppliesTraitId];
        }
Esempio n. 3
0
 internal TraitInfo(BodyTraitType data)
 {
     this.data = data;
 }