@Override
    public void tick(Game game) {
        inventory.checkUnloads(game);
        SwordItem sword = (SwordItem) inventory.findClass(SwordItem.class);
        if (sword != null) {
            setDmg(sword.getDamage());
        }
        ArmorItem armor = (ArmorItem) inventory.findClass(ArmorItem.class);
        if (sword != null) {
            setMaxHP((int) (oghp() + ((maxxp / 10) * armor.value())));
        }
        RingItem ring = (RingItem) inventory.findClass(RingItem.class);
        if (ring != null) {
            setHitrate(0.7 + (0.3 / 12) * ring.value());
        }
        if (moves % 40 == 0) {
            heal(maxhp() / 10);
        }
        hunger += 0.0005;
        if (hunger >= 1) {
            addStatus("You died from hunger");
            takeDamage(hp(), null);
        } else if (hunger > 0.95) {
            addStatus("You are extremely hungry");
            addStatus("You should consider eating");
            takeDamage(1, null);
        } else if (hunger > 0.8) {
            addStatus("You are really hungry");
        }
        moves++;
    }