示例#1
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.StarTraits[ability.AppliesTraitId];
            this.ammo         = ability.Ammo.Evaluate(vars);
        }
示例#2
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;
        }
示例#3
0
 public IStarTrait Instantiate(StarTraitType traitType)
 {
     return(new EffectAfflictPlanets(traitType));
 }
示例#4
0
 internal TraitInfo(StarTraitType data)
 {
     this.ImagePath = data.ImagePath;
     this.LangCode  = data.LanguageCode;
 }
示例#5
0
 internal TraitInfo(StarTraitType data)
 {
     this.ImagePath = data.ImagePath;
 }
示例#6
0
 public IStarTrait Instantiate(StarTraitType traitType)
 {
     return(new EffectTemporary(traitType, this.duration));
 }