示例#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);
            }