@Override
    public void draw(Graphics g, int x, int y, int side) {
        Graphics2D g2d = (Graphics2D) g;
        g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .35f));
        g.drawImage(ResourceManager.getImage("shadow"), x, y, side, side, null);
        g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1f));
        super.draw(g, x, y, side);
        if (washealed > 0) {
            g.drawImage(ResourceManager.getImage("heal"), x, y, side, side, null);
        }
        if (!washurt.isEmpty()) {
            for (Integer i : washurt) {
                int hx = x + (new Random().nextInt((side / 3) * 2));
                int hy = y + (new Random().nextInt((side / 7) * 4)) + side / 6;
                g.drawImage(ResourceManager.getImage("hurt"), hx, hy, side / 3, side / 3, null);
                g.setFont(new Font(Font.MONOSPACED, Font.PLAIN, (side / 3) - 3));
                g.setColor(Color.WHITE);
                g.drawString(i + "", hx + side / 12, hy + (side / 7) * 2);
            }
        }
        if (maxhp() != hp() || washealed > 0) {
            g.setColor(Color.BLACK);
            g.fillRect(x + 4, y, side - 8, 4);
            g.setColor(Color.RED);
            int bl = (int) (((double) (side - 8.0) / (double) maxhp()) * (double) hp());
            g.fillRect(x + 4, y + 1, bl, 2);
            if (!washurt.isEmpty()) {
                int tot = 0;
                for (Integer i : washurt) {
                    tot += i;
                }
                g.setColor(Color.WHITE);
                int bn = (int) (((double) (side - 8.0) / (double) maxhp()) * (double) tot);
                g.fillRect(x + 4 + bl, y + 1, bn, 2);

            }
            if (washealed > 0) {
                g.setColor(Color.GREEN);
                int bn = (int) (((double) (side - 8.0) / (double) maxhp()) * (double) washealed);
                g.fillRect(x + 4 + bl - bn, y + 1, bn, 2);
            }
        }
        washurt.clear();
        washealed = -1;
    }