示例#1
0
        public Single RateTarget()
        {
            if (!_v.Target.CanBeRevived())
            {
                return(0);
            }

            if (_v.Target.IsZombie)
            {
                _v.MagicAccuracy();

                Single hitRate = BattleScriptAccuracyEstimate.RatePlayerAttackHit(_v.Context.HitRate);
                Single evaRate = BattleScriptAccuracyEstimate.RatePlayerAttackEvade(_v.Context.Evade);

                Single result = BattleScriptStatusEstimate.RateStatus(BattleStatus.Death) * hitRate * evaRate;
                if (!_v.Target.IsPlayer)
                {
                    result *= -1;
                }
                return(result);
            }

            if (!_v.Target.IsPlayer)
            {
                return(0);
            }

            BattleStatus playerStatus  = _v.Target.CurrentStatus;
            BattleStatus removeStatus  = _v.Command.AbilityStatus;
            BattleStatus removedStatus = playerStatus & removeStatus;
            Int32        rating        = BattleScriptStatusEstimate.RateStatuses(removedStatus);

            return(-1 * rating);
        }
        public Single RateTarget()
        {
            Int32 magicDiff = _v.Target.Magic - _v.Target.Magic * 3 / 4;

            Single result = magicDiff * BattleScriptAccuracyEstimate.RatePlayerAttackEvade(_v.Context.Evade);

            if (_v.Target.IsUnderStatus(BattleStatus.Shell))
            {
                result *= BattleScriptAccuracyEstimate.RatePlayerAttackHit(_v.Context.HitRate >> 1);
            }
            else
            {
                result *= BattleScriptAccuracyEstimate.RatePlayerAttackHit(_v.Context.HitRate);
            }

            if (_v.Target.IsPlayer)
            {
                result *= -1;
            }

            return(result);
        }
        public Single RateTarget()
        {
            Int32 defenceDiff = _v.Target.PhisicalDefence / 2;

            Single result = defenceDiff * BattleScriptAccuracyEstimate.RatePlayerAttackEvade(_v.Context.Evade);

            if (_v.Target.IsUnderStatus(BattleStatus.Shell))
            {
                result *= BattleScriptAccuracyEstimate.RatePlayerAttackHit(_v.Context.HitRate >> 1);
            }
            else
            {
                result *= BattleScriptAccuracyEstimate.RatePlayerAttackHit(_v.Context.HitRate);
            }

            if (_v.Target.IsPlayer)
            {
                result *= -1;
            }

            return(result);
        }