protected double calcPower(Enemy target,MoveType aimType, double distance){
        double powerFromScore = 3.0*aimType.score/PERFECT_SCORE;
        double powerFromDistance = 0.0;
        if ( distance < 80 ) {
            powerFromDistance = 3.0;
//@@@
        }else if ( distance < 200 ) {
            powerFromDistance = 3.0 - (distance - 100) / 100.0;
        }else if ( distance < 400 ) {
            powerFromDistance = 2.0 - (distance - 200) / 400.0;
        }else if ( distance < 700 ) {
            powerFromDistance = 1.5 - (distance - 400) / 200.0;
//        }else if ( distance < 180 ) {
//            powerFromDistance = 3.0 - (distance - 80) / 200.0;
//        }else if ( distance < 280 ) {
//            powerFromDistance = 2.5 - (distance - 180) / 400.0;
//        }else if ( distance < 380 ) {
//            powerFromDistance = 2.25 - (distance - 280) / 400.0;
//        }else if ( distance < 480 ) {
//            powerFromDistance = 2.00 - (distance - 380) / 400.0;
//        }else if ( distance < 580 ) {
//            powerFromDistance = 1.75 - (distance - 480) / 400.0;
//        }else if ( distance < 680 ) {
//            powerFromDistance = 1.50 - (distance - 580) / 400.0;
//        }else if ( distance < 780 ) {
//            powerFromDistance = 1.25 - (distance - 680) / 200.0;
//        }else if ( distance < 880 ) {
//            powerFromDistance = 0.75 - (distance - 780) / 150.0;
        }else{
            powerFromDistance = 0.1;
        }
        double power = (powerFromScore > powerFromDistance)? powerFromScore : powerFromDistance;

        double limit = powerLimit(target,aimType);
        if ( limit == 0.0 ) {
            if ( ctx.my.calcDistance(target) < 90 ) { // Prevent ram bonus
                limit = 3.0;
            }
        }
        return (limit < power) ? limit : power;
    }