Exemplo n.º 1
0
        public static double GetSurveillanceBonus(this Squadron squadron, AirRegimentBehavior behavior)
        {
            if (squadron == null)
            {
                return(1);
            }

            var info = squadron.Plane.Info;

            if (behavior == AirRegimentBehavior.Defense)
            {
                if (info.Type == SlotItemType.艦上偵察機)
                {
                    return(info.ViewRange <= 7 ? 1.2 : 1.3);
                }
                else if (info.Type == SlotItemType.大型飛行艇 || info.Type == SlotItemType.水上偵察機)
                {
                    return(info.ViewRange <= 7 ? 1.1
                     : info.ViewRange == 8 ? 1.13
                     : 1.16);
                }
                else
                {
                    return(info.ViewRange == 8 ? 1.18 : 1.23);
                }
            }
            else
            {
                if (info.Type == SlotItemType.陸上偵察機)
                {
                    return(info.ViewRange == 8 ? 1.15 : 1.18);
                }
                return(1);
            }
        }
Exemplo n.º 2
0
        public double GetAirSuperiority(AirRegimentBehavior behavior)
        {
            if (this.State != SquadronState.Deployed)
            {
                return(0);
            }

            var info             = this.Plane.Info;
            var intercept        = this.IsInterceptor ? info.Evade : 0;
            var antiBomber       = this.IsInterceptor ? info.Hit : 0;
            var improvementBonus = this.GetImprovementBonus(this.Plane);
            var ex = (info.Id == 138 && info.Name == "二式大艇") ?
                     (this.WorkingCount >= 4 && this.Plane.Level >= 4) ? 1 :
                     (info.Id == 312 && info.Name == "二式陸上偵察機(熟練)") ?
                     (this.WorkingCount >= 4 && this.Plane.Level >= 2) ? 1 : 0 : 0 : 0;

            var correctAA = (behavior == AirRegimentBehavior.Defense) ? (info.AA + intercept + (2 * antiBomber)) : (info.AA + (1.5 * intercept));

            return(Math.Floor((correctAA + improvementBonus) * Math.Sqrt(this.WorkingCount) + this.Plane.GetBonus() + ex));
        }
        public static string GetText(this AirRegimentBehavior behavior)
        {
            switch (behavior)
            {
            case AirRegimentBehavior.Standby:
                return("待機");

            case AirRegimentBehavior.Sortie:
                return("出撃");

            case AirRegimentBehavior.Defense:
                return("防空");

            case AirRegimentBehavior.Retreat:
                return("退避");

            case AirRegimentBehavior.Rest:
                return("休息");

            default:
                return("");
            }
        }