public Hero(Image image, int frameWidth, int frameHeight, int frameDuration,int type) throws IOException {
        super(image, frameWidth, frameHeight, frameDuration);
       
        attackArea = new AttackArea(image, frameWidth, frameHeight, 50, 50);
        attackArea.setAttackDamage(50);
        attackArea.setIncrementDuration(1000);
        attackArea.setIncrementLength(50);
        attackArea.setMaxIncrement(3);
        attackArea.setPosition(this.getX()+this.getWidth(), this.getY());
       
        hitEffect = getEffect(type);
        hitEffect.setPosition(this.getX()+this.getWidth(), this.getY() + 5);
        showEffect = false;
    }