amount = Math.min(((full) ? target.getMaxCp() : (target.getMaxCp() * skill.getPower() / 100.0)), target.getMaxCp() - target.getCurrentCp());
target.setCurrentCp(amount + target.getCurrentCp());
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CP_WILL_BE_RESTORED);
sm.addNumber((int) amount);
target.sendPacket(sm);
StatusUpdate sump = new StatusUpdate(target.getObjectId());
sump.addAttribute(StatusUpdate.CUR_CP, (int) target.getCurrentCp());
}
}
}