コード例 #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
ファイル: AbilityStats.cs プロジェクト: weshec/Stareater
        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
ファイル: TraitInfo.cs プロジェクト: weshec/Stareater
 internal TraitInfo(StarTraitType data)
 {
     this.ImagePath = data.ImagePath;
     this.LangCode  = data.LanguageCode;
 }
コード例 #5
0
ファイル: TraitInfo.cs プロジェクト: JosephClay/Stareater
 internal TraitInfo(StarTraitType data)
 {
     this.ImagePath = data.ImagePath;
 }
コード例 #6
0
 public IStarTrait Instantiate(StarTraitType traitType)
 {
     return(new EffectTemporary(traitType, this.duration));
 }