コード例 #1
0
 public IncomingAttackPrepStage(BaseActivity parent, IncomingRangedAttack incoming, EvasionMode <T> evasionMode, params object[] args) : base("IncomingAttackPrep")
 {
     ParentActivity = parent;
     Incoming       = incoming;
     Evasion        = evasionMode;
     Provider       = Evasion.CreateProvider(args);
     SetUpProvider(Provider, true);
     BaseActivity.BackgroundStages.Add(this); // Put into startAction() or even Activate() if the timing on this (not yet defined and all) is an issue.
 }
コード例 #2
0
        public IncomingAttackReactionStage(BaseActivity parent, IncomingRangedAttack incoming, EvasionMode <T> evasionMode, IProvider <T> provider) : base("IncomingAttackReaction")
        {
            ParentActivity = parent;
            Incoming       = incoming;
            Evasion        = evasionMode;
            Provider       = provider ?? Evasion.CreateProvider();

            SetUpProvider(Provider);
            Stopwatch = new System.Diagnostics.Stopwatch();
        }
コード例 #3
0
 public override double AssessShot(SmoothedList <float> relevantFactors, List <TimeSpan> timestamps, IncomingRangedAttack incoming)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
            public override double AssessShot(SmoothedList <float> distancesDodged, List <TimeSpan> timestamps, IncomingRangedAttack incoming)
            {
                var effectiveDodge   = distancesDodged.Last() / DistanceForOneSigma / (1.0 + 0.01 * incoming.DodgeCompensationBonus);
                var bellCurveDieRoll = Accord.Statistics.Distributions.Univariate.NormalDistribution.Random();
                var resultScore      = incoming.BaseZScore - effectiveDodge - bellCurveDieRoll;

                Log.Debug("Evasion|AssessShot", $"Resolved an evasion attempt with a {((resultScore > 0) ? "hit" : "miss")} ({resultScore:f2}) based on an EffectiveDodge of {effectiveDodge:f2} and a random dodge of {bellCurveDieRoll:f2}.");
                return(resultScore);
            }