예제 #1
0
    //ひとつのアクションの評価点確認
    int PointRating(ActionState a, Character target)
    {
        int v = a.GetValue();

        if (a.GetIsMagick())
        {
            v -= target.GetDef();
        }
        switch (a.action.GetActionType())
        {
        case Actions.Attack:
            //敵を倒せる場合は高評価
            if (v >= target.GetHp())
            {
                v += 100;
            }
            break;

        case Actions.Heal:
            //味方の体力が半分以下なら高評価
            if (target.GetHp() <= target.GetMaxHp() / 2)
            {
                v += 10;
            }
            break;

        case Actions.Item:
            break;

        case Actions.ApplyStatus:
            break;

        default:
            break;
        }
        return(v);
    }