function tick(entity, manager) {
		//punch
        if ((entity.getHeldItem().isEmpty() || entity.getHeldItem().isWeapon()) && entity.isPunching() && entity.getHeldItem().name() != 'fiskheroes:katana' && entity.getData("skarlet:dyn/texture_punch") == 9) {
        manager.setData(entity, "skarlet:dyn/texture_punch", Math.floor(Math.random() * 9));
        } else if (!entity.isPunching() && entity.getHeldItem().name() != 'fiskheroes:katana' && entity.getData("skarlet:dyn/texture_punch") != 9) {
        manager.setData(entity, "skarlet:dyn/texture_punch", 9);
        }
		
        if ((entity.isPunching() || entity.getData('fiskheroes:is_swing_in_progress')) && entity.getHeldItem().name() == 'fiskheroes:katana' && entity.getData("skarlet:dyn/texture_punch") == 6) {
        manager.setData(entity, "skarlet:dyn/texture_punch", Math.floor(Math.random() * 6));
        } else if (!entity.isPunching() && !entity.getData('fiskheroes:is_swing_in_progress') && entity.getHeldItem().name() == 'fiskheroes:katana' && entity.getData("skarlet:dyn/texture_punch") != 6) {
        manager.setData(entity, "skarlet:dyn/texture_punch", 6);
        }
		
        if ((entity.isPunching() || entity.getData('fiskheroes:is_swing_in_progress')) && entity.getData("skarlet:dyn/position_punch") == 9) {
        manager.setData(entity, "skarlet:dyn/position_punch", Math.floor(Math.random() * 9));
        } else if (!entity.isPunching() && !entity.getData('fiskheroes:is_swing_in_progress') && entity.getData("skarlet:dyn/position_punch") != 9) {
        manager.setData(entity, "skarlet:dyn/position_punch", 9);
        }
		
		//gun
		var t = entity.getData("fiskheroes:ticks_since_gunshot");
		var firing = (t & 255) < 5 || ((t >> 8) & 255) < 5;
        if (firing && entity.getData("skarlet:dyn/position_gun") == 9) {
        manager.setData(entity, "skarlet:dyn/position_gun", Math.floor(Math.random() * 9));
        } else if (!firing && entity.getData("skarlet:dyn/position_gun") != 9) {
        manager.setData(entity, "skarlet:dyn/position_gun", 9);
        }
		
		//water
        if (entity.isInWater() && entity.getData("skarlet:dyn/position_water") == 9) {
        manager.setData(entity, "skarlet:dyn/position_water", Math.floor(Math.random() * 9));
        } else if (entity.isInWater() && entity.ticksExisted() % 10 >= 0 && entity.ticksExisted() % 10 < 1 && entity.getData("skarlet:dyn/position_water") != 9) {
        manager.setData(entity, "skarlet:dyn/position_water", 9);
        }
		
        if (entity.isInWater() && entity.getData("skarlet:dyn/texture_water") == 3) {
        manager.setData(entity, "skarlet:dyn/texture_water", Math.floor(Math.random() * 3));
        } else if (entity.isInWater() && entity.ticksExisted() % 10 >= 0 && entity.ticksExisted() % 10 < 1 && entity.getData("skarlet:dyn/texture_water") != 3) {
        manager.setData(entity, "skarlet:dyn/texture_water", 3);
        }
		
		//die
        if (!entity.isAlive() && entity.getData("skarlet:dyn/texture_die") == 6) {
        manager.setData(entity, "skarlet:dyn/texture_die", Math.floor(Math.random() * 6));
        } else if (entity.isAlive() && entity.getData("skarlet:dyn/texture_die") != 6) {
        manager.setData(entity, "skarlet:dyn/texture_die", 6);
        }
		
        if (!entity.isAlive() && entity.getData("skarlet:dyn/position_die") == 9) {
        manager.setData(entity, "skarlet:dyn/position_die", Math.floor(Math.random() * 9));
        } else if (entity.isAlive() && entity.getData("skarlet:dyn/position_die") != 9) {
        manager.setData(entity, "skarlet:dyn/position_die", 9);
        }
}
