示例#1
0
        public int GetTotalValuePoint(Status status, Status weight)
        {
            int atk = GetAttackPoint(status.atk, status.cri, status.cdmg);
            atk += Mathf.CeilToInt(GetTotalATK(status.atk) * (weight.atk-1) * 0.6f);
            atk += GetTotalCRI(status.cri) * (weight.cri-1) * 60;
            atk += GetTotalCRIDMG(status.cdmg) * (weight.cdmg-1) * 30;
            int def = GetDefencePoint(status.hp, status.def) * weight.hp * weight.def;
            int spd = GetTotalSPD(status.spd) * 35 * weight.spd;
            int res = GetTotalRES(status.res) * 50 * weight.res;
            int acc = GetTotalACC(status.acc) * 50 * weight.acc;

            int total = atk+def+spd+res+acc;

            return total;
        }
示例#2
0
        /// <summary>
        /// 各種ステータスに任意の価値の重み付けをして数値化した価値データを返す
        /// </summary>
        /// <returns>The value.</returns>
        /// <param name="hp_w">Hp w.</param>
        /// <param name="atk_w">Atk w.</param>
        /// <param name="def_w">Def w.</param>
        /// <param name="spd_w">Spd w.</param>
        /// <param name="cri_w">Cri w.</param>
        /// <param name="dmg_w">Dmg w.</param>
        /// <param name="res_w">Res w.</param>
        /// <param name="acc_w">Acc w.</param>
        public int GetValue(Status weight)
        {
            float val = 0f;
            val += ATK_Percent * ATK_PERCENT_VAL * weight.atk;
            val += ATK_Flat * ATK_FLAT_VAL * weight.atk;
            val += HP_Percent * HP_PERCENT_VAL * weight.hp;
            val += HP_Flat * HP_FLAT_VAL * weight.hp;
            val += DEF_Percent * DEF_PERCENT_VAL * weight.def;
            val += DEF_Flat * DEF_FLAT_VAL * weight.def;
            val += SPD * SPD_VAL * weight.spd;
            val += ACC * ACC_VAL * weight.acc;
            val += RES * RES_VAL * weight.res;
            val += CRI * CRI_VAL * weight.cri;
            val += CRIDMG * CRIDMG_VAL * weight.cdmg;

            return (int)val;
        }