コード例 #1
0
ファイル: skill.cs プロジェクト: euniceroar/gameDev
    public override float cast(gameChar source, gameChar target, int currentRound)
    {
        float sourceMP = source.getCurrentMP();

        if (sourceMP < cost)
        {
            return(-1);
        }
        source.setCurrentMP(sourceMP - cost);

        float effectingVal = 0;

        effectingVal = effectVal * source.getIntVal() * 0.1f;
        target.decreaseAttr(field, effectingVal, currentRound);
        return(effectingVal);
    }