invertika_game.Game.Being.performAttack C# (CSharp) Method

performAttack() private method

private performAttack ( Being target, Damage damage ) : int
target Being
damage Damage
return int
        int performAttack(Being target, Damage damage)
        {
            //// check target legality
            //if (!target
            //        || target == this
            //        || target.getAction() == DEAD
            //        || !target.canFight())
            //    return -1;

            //if (getMap().getPvP() == PVP_NONE
            //        && target.getType() == OBJECT_CHARACTER
            //        && getType() == OBJECT_CHARACTER)
            //    return -1;

            //// check if target is in range using the pythagorean theorem
            //int distx = this.getPosition().x - target.getPosition().x;
            //int disty = this.getPosition().y - target.getPosition().y;
            //int distSquare = (distx * distx + disty * disty);
            //int maxDist = damage.range + target.getSize();
            //if (maxDist * maxDist < distSquare)
            //    return -1;

            //// Note: The auto-attack system will handle the delay between two attacks.

            //return (mTarget.damage(this, damage));

            return 0; //ssk
        }